os-rp.pwn 3.7 MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428324293243032431324323243332434324353243632437324383243932440324413244232443324443244532446324473244832449324503245132452324533245432455324563245732458324593246032461324623246332464324653246632467324683246932470324713247232473324743247532476324773247832479324803248132482324833248432485324863248732488324893249032491324923249332494324953249632497324983249932500325013250232503325043250532506325073250832509325103251132512325133251432515325163251732518325193252032521325223252332524325253252632527325283252932530325313253232533325343253532536325373253832539325403254132542325433254432545325463254732548325493255032551325523255332554325553255632557325583255932560325613256232563325643256532566325673256832569325703257132572325733257432575325763257732578325793258032581325823258332584325853258632587325883258932590325913259232593325943259532596325973259832599326003260132602326033260432605326063260732608326093261032611326123261332614326153261632617326183261932620326213262232623326243262532626326273262832629326303263132632326333263432635326363263732638326393264032641326423264332644326453264632647326483264932650326513265232653326543265532656326573265832659326603266132662326633266432665326663266732668326693267032671326723267332674326753267632677326783267932680326813268232683326843268532686326873268832689326903269132692326933269432695326963269732698326993270032701327023270332704327053270632707327083270932710327113271232713327143271532716327173271832719327203272132722327233272432725327263272732728327293273032731327323273332734327353273632737327383273932740327413274232743327443274532746327473274832749327503275132752327533275432755327563275732758327593276032761327623276332764327653276632767327683276932770327713277232773327743277532776327773277832779327803278132782327833278432785327863278732788327893279032791327923279332794327953279632797327983279932800328013280232803328043280532806328073280832809328103281132812328133281432815328163281732818328193282032821328223282332824328253282632827328283282932830328313283232833328343283532836328373283832839328403284132842328433284432845328463284732848328493285032851328523285332854328553285632857328583285932860328613286232863328643286532866328673286832869328703287132872328733287432875328763287732878328793288032881328823288332884328853288632887328883288932890328913289232893328943289532896328973289832899329003290132902329033290432905329063290732908329093291032911329123291332914329153291632917329183291932920329213292232923329243292532926329273292832929329303293132932329333293432935329363293732938329393294032941329423294332944329453294632947329483294932950329513295232953329543295532956329573295832959329603296132962329633296432965329663296732968329693297032971329723297332974329753297632977329783297932980329813298232983329843298532986329873298832989329903299132992329933299432995329963299732998329993300033001330023300333004330053300633007330083300933010330113301233013330143301533016330173301833019330203302133022330233302433025330263302733028330293303033031330323303333034330353303633037330383303933040330413304233043330443304533046330473304833049330503305133052330533305433055330563305733058330593306033061330623306333064330653306633067330683306933070330713307233073330743307533076330773307833079330803308133082330833308433085330863308733088330893309033091330923309333094330953309633097330983309933100331013310233103331043310533106331073310833109331103311133112331133311433115331163311733118331193312033121331223312333124331253312633127331283312933130331313313233133331343313533136331373313833139331403314133142331433314433145331463314733148331493315033151331523315333154331553315633157331583315933160331613316233163331643316533166331673316833169331703317133172331733317433175331763317733178331793318033181331823318333184331853318633187331883318933190331913319233193331943319533196331973319833199332003320133202332033320433205332063320733208332093321033211332123321333214332153321633217332183321933220332213322233223332243322533226332273322833229332303323133232332333323433235332363323733238332393324033241332423324333244332453324633247332483324933250332513325233253332543325533256332573325833259332603326133262332633326433265332663326733268332693327033271332723327333274332753327633277332783327933280332813328233283332843328533286332873328833289332903329133292332933329433295332963329733298332993330033301333023330333304333053330633307333083330933310333113331233313333143331533316333173331833319333203332133322333233332433325333263332733328333293333033331333323333333334333353333633337333383333933340333413334233343333443334533346333473334833349333503335133352333533335433355333563335733358333593336033361333623336333364333653336633367333683336933370333713337233373333743337533376333773337833379333803338133382333833338433385333863338733388333893339033391333923339333394333953339633397333983339933400334013340233403334043340533406334073340833409334103341133412334133341433415334163341733418334193342033421334223342333424334253342633427334283342933430334313343233433334343343533436334373343833439334403344133442334433344433445334463344733448334493345033451334523345333454334553345633457334583345933460334613346233463334643346533466334673346833469334703347133472334733347433475334763347733478334793348033481334823348333484334853348633487334883348933490334913349233493334943349533496334973349833499335003350133502335033350433505335063350733508335093351033511335123351333514335153351633517335183351933520335213352233523335243352533526335273352833529335303353133532335333353433535335363353733538335393354033541335423354333544335453354633547335483354933550335513355233553335543355533556335573355833559335603356133562335633356433565335663356733568335693357033571335723357333574335753357633577335783357933580335813358233583335843358533586335873358833589335903359133592335933359433595335963359733598335993360033601336023360333604336053360633607336083360933610336113361233613336143361533616336173361833619336203362133622336233362433625336263362733628336293363033631336323363333634336353363633637336383363933640336413364233643336443364533646336473364833649336503365133652336533365433655336563365733658336593366033661336623366333664336653366633667336683366933670336713367233673336743367533676336773367833679336803368133682336833368433685336863368733688336893369033691336923369333694336953369633697336983369933700337013370233703337043370533706337073370833709337103371133712337133371433715337163371733718337193372033721337223372333724337253372633727337283372933730337313373233733337343373533736337373373833739337403374133742337433374433745337463374733748337493375033751337523375333754337553375633757337583375933760337613376233763337643376533766337673376833769337703377133772337733377433775337763377733778337793378033781337823378333784337853378633787337883378933790337913379233793337943379533796337973379833799338003380133802338033380433805338063380733808338093381033811338123381333814338153381633817338183381933820338213382233823338243382533826338273382833829338303383133832338333383433835338363383733838338393384033841338423384333844338453384633847338483384933850338513385233853338543385533856338573385833859338603386133862338633386433865338663386733868338693387033871338723387333874338753387633877338783387933880338813388233883338843388533886338873388833889338903389133892338933389433895338963389733898338993390033901339023390333904339053390633907339083390933910339113391233913339143391533916339173391833919339203392133922339233392433925339263392733928339293393033931339323393333934339353393633937339383393933940339413394233943339443394533946339473394833949339503395133952339533395433955339563395733958339593396033961339623396333964339653396633967339683396933970339713397233973339743397533976339773397833979339803398133982339833398433985339863398733988339893399033991339923399333994339953399633997339983399934000340013400234003340043400534006340073400834009340103401134012340133401434015340163401734018340193402034021340223402334024340253402634027340283402934030340313403234033340343403534036340373403834039340403404134042340433404434045340463404734048340493405034051340523405334054340553405634057340583405934060340613406234063340643406534066340673406834069340703407134072340733407434075340763407734078340793408034081340823408334084340853408634087340883408934090340913409234093340943409534096340973409834099341003410134102341033410434105341063410734108341093411034111341123411334114341153411634117341183411934120341213412234123341243412534126341273412834129341303413134132341333413434135341363413734138341393414034141341423414334144341453414634147341483414934150341513415234153341543415534156341573415834159341603416134162341633416434165341663416734168341693417034171341723417334174341753417634177341783417934180341813418234183341843418534186341873418834189341903419134192341933419434195341963419734198341993420034201342023420334204342053420634207342083420934210342113421234213342143421534216342173421834219342203422134222342233422434225342263422734228342293423034231342323423334234342353423634237342383423934240342413424234243342443424534246342473424834249342503425134252342533425434255342563425734258342593426034261342623426334264342653426634267342683426934270342713427234273342743427534276342773427834279342803428134282342833428434285342863428734288342893429034291342923429334294342953429634297342983429934300343013430234303343043430534306343073430834309343103431134312343133431434315343163431734318343193432034321343223432334324343253432634327343283432934330343313433234333343343433534336343373433834339343403434134342343433434434345343463434734348343493435034351343523435334354343553435634357343583435934360343613436234363343643436534366343673436834369343703437134372343733437434375343763437734378343793438034381343823438334384343853438634387343883438934390343913439234393343943439534396343973439834399344003440134402344033440434405344063440734408344093441034411344123441334414344153441634417344183441934420344213442234423344243442534426344273442834429344303443134432344333443434435344363443734438344393444034441344423444334444344453444634447344483444934450344513445234453344543445534456344573445834459344603446134462344633446434465344663446734468344693447034471344723447334474344753447634477344783447934480344813448234483344843448534486344873448834489344903449134492344933449434495344963449734498344993450034501345023450334504345053450634507345083450934510345113451234513345143451534516345173451834519345203452134522345233452434525345263452734528345293453034531345323453334534345353453634537345383453934540345413454234543345443454534546345473454834549345503455134552345533455434555345563455734558345593456034561345623456334564345653456634567345683456934570345713457234573345743457534576345773457834579345803458134582345833458434585345863458734588345893459034591345923459334594345953459634597345983459934600346013460234603346043460534606346073460834609346103461134612346133461434615346163461734618346193462034621346223462334624346253462634627346283462934630346313463234633346343463534636346373463834639346403464134642346433464434645346463464734648346493465034651346523465334654346553465634657346583465934660346613466234663346643466534666346673466834669346703467134672346733467434675346763467734678346793468034681346823468334684346853468634687346883468934690346913469234693346943469534696346973469834699347003470134702347033470434705347063470734708347093471034711347123471334714347153471634717347183471934720347213472234723347243472534726347273472834729347303473134732347333473434735347363473734738347393474034741347423474334744347453474634747347483474934750347513475234753347543475534756347573475834759347603476134762347633476434765347663476734768347693477034771347723477334774347753477634777347783477934780347813478234783347843478534786347873478834789347903479134792347933479434795347963479734798347993480034801348023480334804348053480634807348083480934810348113481234813348143481534816348173481834819348203482134822348233482434825348263482734828348293483034831348323483334834348353483634837348383483934840348413484234843348443484534846348473484834849348503485134852348533485434855348563485734858348593486034861348623486334864348653486634867348683486934870348713487234873348743487534876348773487834879348803488134882348833488434885348863488734888348893489034891348923489334894348953489634897348983489934900349013490234903349043490534906349073490834909349103491134912349133491434915349163491734918349193492034921349223492334924349253492634927349283492934930349313493234933349343493534936349373493834939349403494134942349433494434945349463494734948349493495034951349523495334954349553495634957349583495934960349613496234963349643496534966349673496834969349703497134972349733497434975349763497734978349793498034981349823498334984349853498634987349883498934990349913499234993349943499534996349973499834999350003500135002350033500435005350063500735008350093501035011350123501335014350153501635017350183501935020350213502235023350243502535026350273502835029350303503135032350333503435035350363503735038350393504035041350423504335044350453504635047350483504935050350513505235053350543505535056350573505835059350603506135062350633506435065350663506735068350693507035071350723507335074350753507635077350783507935080350813508235083350843508535086350873508835089350903509135092350933509435095350963509735098350993510035101351023510335104351053510635107351083510935110351113511235113351143511535116351173511835119351203512135122351233512435125351263512735128351293513035131351323513335134351353513635137351383513935140351413514235143351443514535146351473514835149351503515135152351533515435155351563515735158351593516035161351623516335164351653516635167351683516935170351713517235173351743517535176351773517835179351803518135182351833518435185351863518735188351893519035191351923519335194351953519635197351983519935200352013520235203352043520535206352073520835209352103521135212352133521435215352163521735218352193522035221352223522335224352253522635227352283522935230352313523235233352343523535236352373523835239352403524135242352433524435245352463524735248352493525035251352523525335254352553525635257352583525935260352613526235263352643526535266352673526835269352703527135272352733527435275352763527735278352793528035281352823528335284352853528635287352883528935290352913529235293352943529535296352973529835299353003530135302353033530435305353063530735308353093531035311353123531335314353153531635317353183531935320353213532235323353243532535326353273532835329353303533135332353333533435335353363533735338353393534035341353423534335344353453534635347353483534935350353513535235353353543535535356353573535835359353603536135362353633536435365353663536735368353693537035371353723537335374353753537635377353783537935380353813538235383353843538535386353873538835389353903539135392353933539435395353963539735398353993540035401354023540335404354053540635407354083540935410354113541235413354143541535416354173541835419354203542135422354233542435425354263542735428354293543035431354323543335434354353543635437354383543935440354413544235443354443544535446354473544835449354503545135452354533545435455354563545735458354593546035461354623546335464354653546635467354683546935470354713547235473354743547535476354773547835479354803548135482354833548435485354863548735488354893549035491354923549335494354953549635497354983549935500355013550235503355043550535506355073550835509355103551135512355133551435515355163551735518355193552035521355223552335524355253552635527355283552935530355313553235533355343553535536355373553835539355403554135542355433554435545355463554735548355493555035551355523555335554355553555635557355583555935560355613556235563355643556535566355673556835569355703557135572355733557435575355763557735578355793558035581355823558335584355853558635587355883558935590355913559235593355943559535596355973559835599356003560135602356033560435605356063560735608356093561035611356123561335614356153561635617356183561935620356213562235623356243562535626356273562835629356303563135632356333563435635356363563735638356393564035641356423564335644356453564635647356483564935650356513565235653356543565535656356573565835659356603566135662356633566435665356663566735668356693567035671356723567335674356753567635677356783567935680356813568235683356843568535686356873568835689356903569135692356933569435695356963569735698356993570035701357023570335704357053570635707357083570935710357113571235713357143571535716357173571835719357203572135722357233572435725357263572735728357293573035731357323573335734357353573635737357383573935740357413574235743357443574535746357473574835749357503575135752357533575435755357563575735758357593576035761357623576335764357653576635767357683576935770357713577235773357743577535776357773577835779357803578135782357833578435785357863578735788357893579035791357923579335794357953579635797357983579935800358013580235803358043580535806358073580835809358103581135812358133581435815358163581735818358193582035821358223582335824358253582635827358283582935830358313583235833358343583535836358373583835839358403584135842358433584435845358463584735848358493585035851358523585335854358553585635857358583585935860358613586235863358643586535866358673586835869358703587135872358733587435875358763587735878358793588035881358823588335884358853588635887358883588935890358913589235893358943589535896358973589835899359003590135902359033590435905359063590735908359093591035911359123591335914359153591635917359183591935920359213592235923359243592535926359273592835929359303593135932359333593435935359363593735938359393594035941359423594335944359453594635947359483594935950359513595235953359543595535956359573595835959359603596135962359633596435965359663596735968359693597035971359723597335974359753597635977359783597935980359813598235983359843598535986359873598835989359903599135992359933599435995359963599735998359993600036001360023600336004360053600636007360083600936010360113601236013360143601536016360173601836019360203602136022360233602436025360263602736028360293603036031360323603336034360353603636037360383603936040360413604236043360443604536046360473604836049360503605136052360533605436055360563605736058360593606036061360623606336064360653606636067360683606936070360713607236073360743607536076360773607836079360803608136082360833608436085360863608736088360893609036091360923609336094360953609636097360983609936100361013610236103361043610536106361073610836109361103611136112361133611436115361163611736118361193612036121361223612336124361253612636127361283612936130361313613236133361343613536136361373613836139361403614136142361433614436145361463614736148361493615036151361523615336154361553615636157361583615936160361613616236163361643616536166361673616836169361703617136172361733617436175361763617736178361793618036181361823618336184361853618636187361883618936190361913619236193361943619536196361973619836199362003620136202362033620436205362063620736208362093621036211362123621336214362153621636217362183621936220362213622236223362243622536226362273622836229362303623136232362333623436235362363623736238362393624036241362423624336244362453624636247362483624936250362513625236253362543625536256362573625836259362603626136262362633626436265362663626736268362693627036271362723627336274362753627636277362783627936280362813628236283362843628536286362873628836289362903629136292362933629436295362963629736298362993630036301363023630336304363053630636307363083630936310363113631236313363143631536316363173631836319363203632136322363233632436325363263632736328363293633036331363323633336334363353633636337363383633936340363413634236343363443634536346363473634836349363503635136352363533635436355363563635736358363593636036361363623636336364363653636636367363683636936370363713637236373363743637536376363773637836379363803638136382363833638436385363863638736388363893639036391363923639336394363953639636397363983639936400364013640236403364043640536406364073640836409364103641136412364133641436415364163641736418364193642036421364223642336424364253642636427364283642936430364313643236433364343643536436364373643836439364403644136442364433644436445364463644736448364493645036451364523645336454364553645636457364583645936460364613646236463364643646536466364673646836469364703647136472364733647436475364763647736478364793648036481364823648336484364853648636487364883648936490364913649236493364943649536496364973649836499365003650136502365033650436505365063650736508365093651036511365123651336514365153651636517365183651936520365213652236523365243652536526365273652836529365303653136532365333653436535365363653736538365393654036541365423654336544365453654636547365483654936550365513655236553365543655536556365573655836559365603656136562365633656436565365663656736568365693657036571365723657336574365753657636577365783657936580365813658236583365843658536586365873658836589365903659136592365933659436595365963659736598365993660036601366023660336604366053660636607366083660936610366113661236613366143661536616366173661836619366203662136622366233662436625366263662736628366293663036631366323663336634366353663636637366383663936640366413664236643366443664536646366473664836649366503665136652366533665436655366563665736658366593666036661366623666336664366653666636667366683666936670366713667236673366743667536676366773667836679366803668136682366833668436685366863668736688366893669036691366923669336694366953669636697366983669936700367013670236703367043670536706367073670836709367103671136712367133671436715367163671736718367193672036721367223672336724367253672636727367283672936730367313673236733367343673536736367373673836739367403674136742367433674436745367463674736748367493675036751367523675336754367553675636757367583675936760367613676236763367643676536766367673676836769367703677136772367733677436775367763677736778367793678036781367823678336784367853678636787367883678936790367913679236793367943679536796367973679836799368003680136802368033680436805368063680736808368093681036811368123681336814368153681636817368183681936820368213682236823368243682536826368273682836829368303683136832368333683436835368363683736838368393684036841368423684336844368453684636847368483684936850368513685236853368543685536856368573685836859368603686136862368633686436865368663686736868368693687036871368723687336874368753687636877368783687936880368813688236883368843688536886368873688836889368903689136892368933689436895368963689736898368993690036901369023690336904369053690636907369083690936910369113691236913369143691536916369173691836919369203692136922369233692436925369263692736928369293693036931369323693336934369353693636937369383693936940369413694236943369443694536946369473694836949369503695136952369533695436955369563695736958369593696036961369623696336964369653696636967369683696936970369713697236973369743697536976369773697836979369803698136982369833698436985369863698736988369893699036991369923699336994369953699636997369983699937000370013700237003370043700537006370073700837009370103701137012370133701437015370163701737018370193702037021370223702337024370253702637027370283702937030370313703237033370343703537036370373703837039370403704137042370433704437045370463704737048370493705037051370523705337054370553705637057370583705937060370613706237063370643706537066370673706837069370703707137072370733707437075370763707737078370793708037081370823708337084370853708637087370883708937090370913709237093370943709537096370973709837099371003710137102371033710437105371063710737108371093711037111371123711337114371153711637117371183711937120371213712237123371243712537126371273712837129371303713137132371333713437135371363713737138371393714037141371423714337144371453714637147371483714937150371513715237153371543715537156371573715837159371603716137162371633716437165371663716737168371693717037171371723717337174371753717637177371783717937180371813718237183371843718537186371873718837189371903719137192371933719437195371963719737198371993720037201372023720337204372053720637207372083720937210372113721237213372143721537216372173721837219372203722137222372233722437225372263722737228372293723037231372323723337234372353723637237372383723937240372413724237243372443724537246372473724837249372503725137252372533725437255372563725737258372593726037261372623726337264372653726637267372683726937270372713727237273372743727537276372773727837279372803728137282372833728437285372863728737288372893729037291372923729337294372953729637297372983729937300373013730237303373043730537306373073730837309373103731137312373133731437315373163731737318373193732037321373223732337324373253732637327373283732937330373313733237333373343733537336373373733837339373403734137342373433734437345373463734737348373493735037351373523735337354373553735637357373583735937360373613736237363373643736537366373673736837369373703737137372373733737437375373763737737378373793738037381373823738337384373853738637387373883738937390373913739237393373943739537396373973739837399374003740137402374033740437405374063740737408374093741037411374123741337414374153741637417374183741937420374213742237423374243742537426374273742837429374303743137432374333743437435374363743737438374393744037441374423744337444374453744637447374483744937450374513745237453374543745537456374573745837459374603746137462374633746437465374663746737468374693747037471374723747337474374753747637477374783747937480374813748237483374843748537486374873748837489374903749137492374933749437495374963749737498374993750037501375023750337504375053750637507375083750937510375113751237513375143751537516375173751837519375203752137522375233752437525375263752737528375293753037531375323753337534375353753637537375383753937540375413754237543375443754537546375473754837549375503755137552375533755437555375563755737558375593756037561375623756337564375653756637567375683756937570375713757237573375743757537576375773757837579375803758137582375833758437585375863758737588375893759037591375923759337594375953759637597375983759937600376013760237603376043760537606376073760837609376103761137612376133761437615376163761737618376193762037621376223762337624376253762637627376283762937630376313763237633376343763537636376373763837639376403764137642376433764437645376463764737648376493765037651376523765337654376553765637657376583765937660376613766237663376643766537666376673766837669376703767137672376733767437675376763767737678376793768037681376823768337684376853768637687376883768937690376913769237693376943769537696376973769837699377003770137702377033770437705377063770737708377093771037711377123771337714377153771637717377183771937720377213772237723377243772537726377273772837729377303773137732377333773437735377363773737738377393774037741377423774337744377453774637747377483774937750377513775237753377543775537756377573775837759377603776137762377633776437765377663776737768377693777037771377723777337774377753777637777377783777937780377813778237783377843778537786377873778837789377903779137792377933779437795377963779737798377993780037801378023780337804378053780637807378083780937810378113781237813378143781537816378173781837819378203782137822378233782437825378263782737828378293783037831378323783337834378353783637837378383783937840378413784237843378443784537846378473784837849378503785137852378533785437855378563785737858378593786037861378623786337864378653786637867378683786937870378713787237873378743787537876378773787837879378803788137882378833788437885378863788737888378893789037891378923789337894378953789637897378983789937900379013790237903379043790537906379073790837909379103791137912379133791437915379163791737918379193792037921379223792337924379253792637927379283792937930379313793237933379343793537936379373793837939379403794137942379433794437945379463794737948379493795037951379523795337954379553795637957379583795937960379613796237963379643796537966379673796837969379703797137972379733797437975379763797737978379793798037981379823798337984379853798637987379883798937990379913799237993379943799537996379973799837999380003800138002380033800438005380063800738008380093801038011380123801338014380153801638017380183801938020380213802238023380243802538026380273802838029380303803138032380333803438035380363803738038380393804038041380423804338044380453804638047380483804938050380513805238053380543805538056380573805838059380603806138062380633806438065380663806738068380693807038071380723807338074380753807638077380783807938080380813808238083380843808538086380873808838089380903809138092380933809438095380963809738098380993810038101381023810338104381053810638107381083810938110381113811238113381143811538116381173811838119381203812138122381233812438125381263812738128381293813038131381323813338134381353813638137381383813938140381413814238143381443814538146381473814838149381503815138152381533815438155381563815738158381593816038161381623816338164381653816638167381683816938170381713817238173381743817538176381773817838179381803818138182381833818438185381863818738188381893819038191381923819338194381953819638197381983819938200382013820238203382043820538206382073820838209382103821138212382133821438215382163821738218382193822038221382223822338224382253822638227382283822938230382313823238233382343823538236382373823838239382403824138242382433824438245382463824738248382493825038251382523825338254382553825638257382583825938260382613826238263382643826538266382673826838269382703827138272382733827438275382763827738278382793828038281382823828338284382853828638287382883828938290382913829238293382943829538296382973829838299383003830138302383033830438305383063830738308383093831038311383123831338314383153831638317383183831938320383213832238323383243832538326383273832838329383303833138332383333833438335383363833738338383393834038341383423834338344383453834638347383483834938350383513835238353383543835538356383573835838359383603836138362383633836438365383663836738368383693837038371383723837338374383753837638377383783837938380383813838238383383843838538386383873838838389383903839138392383933839438395383963839738398383993840038401384023840338404384053840638407384083840938410384113841238413384143841538416384173841838419384203842138422384233842438425384263842738428384293843038431384323843338434384353843638437384383843938440384413844238443384443844538446384473844838449384503845138452384533845438455384563845738458384593846038461384623846338464384653846638467384683846938470384713847238473384743847538476384773847838479384803848138482384833848438485384863848738488384893849038491384923849338494384953849638497384983849938500385013850238503385043850538506385073850838509385103851138512385133851438515385163851738518385193852038521385223852338524385253852638527385283852938530385313853238533385343853538536385373853838539385403854138542385433854438545385463854738548385493855038551385523855338554385553855638557385583855938560385613856238563385643856538566385673856838569385703857138572385733857438575385763857738578385793858038581385823858338584385853858638587385883858938590385913859238593385943859538596385973859838599386003860138602386033860438605386063860738608386093861038611386123861338614386153861638617386183861938620386213862238623386243862538626386273862838629386303863138632386333863438635386363863738638386393864038641386423864338644386453864638647386483864938650386513865238653386543865538656386573865838659386603866138662386633866438665386663866738668386693867038671386723867338674386753867638677386783867938680386813868238683386843868538686386873868838689386903869138692386933869438695386963869738698386993870038701387023870338704387053870638707387083870938710387113871238713387143871538716387173871838719387203872138722387233872438725387263872738728387293873038731387323873338734387353873638737387383873938740387413874238743387443874538746387473874838749387503875138752387533875438755387563875738758387593876038761387623876338764387653876638767387683876938770387713877238773387743877538776387773877838779387803878138782387833878438785387863878738788387893879038791387923879338794387953879638797387983879938800388013880238803388043880538806388073880838809388103881138812388133881438815388163881738818388193882038821388223882338824388253882638827388283882938830388313883238833388343883538836388373883838839388403884138842388433884438845388463884738848388493885038851388523885338854388553885638857388583885938860388613886238863388643886538866388673886838869388703887138872388733887438875388763887738878388793888038881388823888338884388853888638887388883888938890388913889238893388943889538896388973889838899389003890138902389033890438905389063890738908389093891038911389123891338914389153891638917389183891938920389213892238923389243892538926389273892838929389303893138932389333893438935389363893738938389393894038941389423894338944389453894638947389483894938950389513895238953389543895538956389573895838959389603896138962389633896438965389663896738968389693897038971389723897338974389753897638977389783897938980389813898238983389843898538986389873898838989389903899138992389933899438995389963899738998389993900039001390023900339004390053900639007390083900939010390113901239013390143901539016390173901839019390203902139022390233902439025390263902739028390293903039031390323903339034390353903639037390383903939040390413904239043390443904539046390473904839049390503905139052390533905439055390563905739058390593906039061390623906339064390653906639067390683906939070390713907239073390743907539076390773907839079390803908139082390833908439085390863908739088390893909039091390923909339094390953909639097390983909939100391013910239103391043910539106391073910839109391103911139112391133911439115391163911739118391193912039121391223912339124391253912639127391283912939130391313913239133391343913539136391373913839139391403914139142391433914439145391463914739148391493915039151391523915339154391553915639157391583915939160391613916239163391643916539166391673916839169391703917139172391733917439175391763917739178391793918039181391823918339184391853918639187391883918939190391913919239193391943919539196391973919839199392003920139202392033920439205392063920739208392093921039211392123921339214392153921639217392183921939220392213922239223392243922539226392273922839229392303923139232392333923439235392363923739238392393924039241392423924339244392453924639247392483924939250392513925239253392543925539256392573925839259392603926139262392633926439265392663926739268392693927039271392723927339274392753927639277392783927939280392813928239283392843928539286392873928839289392903929139292392933929439295392963929739298392993930039301393023930339304393053930639307393083930939310393113931239313393143931539316393173931839319393203932139322393233932439325393263932739328393293933039331393323933339334393353933639337393383933939340393413934239343393443934539346393473934839349393503935139352393533935439355393563935739358393593936039361393623936339364393653936639367393683936939370393713937239373393743937539376393773937839379393803938139382393833938439385393863938739388393893939039391393923939339394393953939639397393983939939400394013940239403394043940539406394073940839409394103941139412394133941439415394163941739418394193942039421394223942339424394253942639427394283942939430394313943239433394343943539436394373943839439394403944139442394433944439445394463944739448394493945039451394523945339454394553945639457394583945939460394613946239463394643946539466394673946839469394703947139472394733947439475394763947739478394793948039481394823948339484394853948639487394883948939490394913949239493394943949539496394973949839499395003950139502395033950439505395063950739508395093951039511395123951339514395153951639517395183951939520395213952239523395243952539526395273952839529395303953139532395333953439535395363953739538395393954039541395423954339544395453954639547395483954939550395513955239553395543955539556395573955839559395603956139562395633956439565395663956739568395693957039571395723957339574395753957639577395783957939580395813958239583395843958539586395873958839589395903959139592395933959439595395963959739598395993960039601396023960339604396053960639607396083960939610396113961239613396143961539616396173961839619396203962139622396233962439625396263962739628396293963039631396323963339634396353963639637396383963939640396413964239643396443964539646396473964839649396503965139652396533965439655396563965739658396593966039661396623966339664396653966639667396683966939670396713967239673396743967539676396773967839679396803968139682396833968439685396863968739688396893969039691396923969339694396953969639697396983969939700397013970239703397043970539706397073970839709397103971139712397133971439715397163971739718397193972039721397223972339724397253972639727397283972939730397313973239733397343973539736397373973839739397403974139742397433974439745397463974739748397493975039751397523975339754397553975639757397583975939760397613976239763397643976539766397673976839769397703977139772397733977439775397763977739778397793978039781397823978339784397853978639787397883978939790397913979239793397943979539796397973979839799398003980139802398033980439805398063980739808398093981039811398123981339814398153981639817398183981939820398213982239823398243982539826398273982839829398303983139832398333983439835398363983739838398393984039841398423984339844398453984639847398483984939850398513985239853398543985539856398573985839859398603986139862398633986439865398663986739868398693987039871398723987339874398753987639877398783987939880398813988239883398843988539886398873988839889398903989139892398933989439895398963989739898398993990039901399023990339904399053990639907399083990939910399113991239913399143991539916399173991839919399203992139922399233992439925399263992739928399293993039931399323993339934399353993639937399383993939940399413994239943399443994539946399473994839949399503995139952399533995439955399563995739958399593996039961399623996339964399653996639967399683996939970399713997239973399743997539976399773997839979399803998139982399833998439985399863998739988399893999039991399923999339994399953999639997399983999940000400014000240003400044000540006400074000840009400104001140012400134001440015400164001740018400194002040021400224002340024400254002640027400284002940030400314003240033400344003540036400374003840039400404004140042400434004440045400464004740048400494005040051400524005340054400554005640057400584005940060400614006240063400644006540066400674006840069400704007140072400734007440075400764007740078400794008040081400824008340084400854008640087400884008940090400914009240093400944009540096400974009840099401004010140102401034010440105401064010740108401094011040111401124011340114401154011640117401184011940120401214012240123401244012540126401274012840129401304013140132401334013440135401364013740138401394014040141401424014340144401454014640147401484014940150401514015240153401544015540156401574015840159401604016140162401634016440165401664016740168401694017040171401724017340174401754017640177401784017940180401814018240183401844018540186401874018840189401904019140192401934019440195401964019740198401994020040201402024020340204402054020640207402084020940210402114021240213402144021540216402174021840219402204022140222402234022440225402264022740228402294023040231402324023340234402354023640237402384023940240402414024240243402444024540246402474024840249402504025140252402534025440255402564025740258402594026040261402624026340264402654026640267402684026940270402714027240273402744027540276402774027840279402804028140282402834028440285402864028740288402894029040291402924029340294402954029640297402984029940300403014030240303403044030540306403074030840309403104031140312403134031440315403164031740318403194032040321403224032340324403254032640327403284032940330403314033240333403344033540336403374033840339403404034140342403434034440345403464034740348403494035040351403524035340354403554035640357403584035940360403614036240363403644036540366403674036840369403704037140372403734037440375403764037740378403794038040381403824038340384403854038640387403884038940390403914039240393403944039540396403974039840399404004040140402404034040440405404064040740408404094041040411404124041340414404154041640417404184041940420404214042240423404244042540426404274042840429404304043140432404334043440435404364043740438404394044040441404424044340444404454044640447404484044940450404514045240453404544045540456404574045840459404604046140462404634046440465404664046740468404694047040471404724047340474404754047640477404784047940480404814048240483404844048540486404874048840489404904049140492404934049440495404964049740498404994050040501405024050340504405054050640507405084050940510405114051240513405144051540516405174051840519405204052140522405234052440525405264052740528405294053040531405324053340534405354053640537405384053940540405414054240543405444054540546405474054840549405504055140552405534055440555405564055740558405594056040561405624056340564405654056640567405684056940570405714057240573405744057540576405774057840579405804058140582405834058440585405864058740588405894059040591405924059340594405954059640597405984059940600406014060240603406044060540606406074060840609406104061140612406134061440615406164061740618406194062040621406224062340624406254062640627406284062940630406314063240633406344063540636406374063840639406404064140642406434064440645406464064740648406494065040651406524065340654406554065640657406584065940660406614066240663406644066540666406674066840669406704067140672406734067440675406764067740678406794068040681406824068340684406854068640687406884068940690406914069240693406944069540696406974069840699407004070140702407034070440705407064070740708407094071040711407124071340714407154071640717407184071940720407214072240723407244072540726407274072840729407304073140732407334073440735407364073740738407394074040741407424074340744407454074640747407484074940750407514075240753407544075540756407574075840759407604076140762407634076440765407664076740768407694077040771407724077340774407754077640777407784077940780407814078240783407844078540786407874078840789407904079140792407934079440795407964079740798407994080040801408024080340804408054080640807408084080940810408114081240813408144081540816408174081840819408204082140822408234082440825408264082740828408294083040831408324083340834408354083640837408384083940840408414084240843408444084540846408474084840849408504085140852408534085440855408564085740858408594086040861408624086340864408654086640867408684086940870408714087240873408744087540876408774087840879408804088140882408834088440885408864088740888408894089040891408924089340894408954089640897408984089940900409014090240903409044090540906409074090840909409104091140912409134091440915409164091740918409194092040921409224092340924409254092640927409284092940930409314093240933409344093540936409374093840939409404094140942409434094440945409464094740948409494095040951409524095340954409554095640957409584095940960409614096240963409644096540966409674096840969409704097140972409734097440975409764097740978409794098040981409824098340984409854098640987409884098940990409914099240993409944099540996409974099840999410004100141002410034100441005410064100741008410094101041011410124101341014410154101641017410184101941020410214102241023410244102541026410274102841029410304103141032410334103441035410364103741038410394104041041410424104341044410454104641047410484104941050410514105241053410544105541056410574105841059410604106141062410634106441065410664106741068410694107041071410724107341074410754107641077410784107941080410814108241083410844108541086410874108841089410904109141092410934109441095410964109741098410994110041101411024110341104411054110641107411084110941110411114111241113411144111541116411174111841119411204112141122411234112441125411264112741128411294113041131411324113341134411354113641137411384113941140411414114241143411444114541146411474114841149411504115141152411534115441155411564115741158411594116041161411624116341164411654116641167411684116941170411714117241173411744117541176411774117841179411804118141182411834118441185411864118741188411894119041191411924119341194411954119641197411984119941200412014120241203412044120541206412074120841209412104121141212412134121441215412164121741218412194122041221412224122341224412254122641227412284122941230412314123241233412344123541236412374123841239412404124141242412434124441245412464124741248412494125041251412524125341254412554125641257412584125941260412614126241263412644126541266412674126841269412704127141272412734127441275412764127741278412794128041281412824128341284412854128641287412884128941290412914129241293412944129541296412974129841299413004130141302413034130441305413064130741308413094131041311413124131341314413154131641317413184131941320413214132241323413244132541326413274132841329413304133141332413334133441335413364133741338413394134041341413424134341344413454134641347413484134941350413514135241353413544135541356413574135841359413604136141362413634136441365413664136741368413694137041371413724137341374413754137641377413784137941380413814138241383413844138541386413874138841389413904139141392413934139441395413964139741398413994140041401414024140341404414054140641407414084140941410414114141241413414144141541416414174141841419414204142141422414234142441425414264142741428414294143041431414324143341434414354143641437414384143941440414414144241443414444144541446414474144841449414504145141452414534145441455414564145741458414594146041461414624146341464414654146641467414684146941470414714147241473414744147541476414774147841479414804148141482414834148441485414864148741488414894149041491414924149341494414954149641497414984149941500415014150241503415044150541506415074150841509415104151141512415134151441515415164151741518415194152041521415224152341524415254152641527415284152941530415314153241533415344153541536415374153841539415404154141542415434154441545415464154741548415494155041551415524155341554415554155641557415584155941560415614156241563415644156541566415674156841569415704157141572415734157441575415764157741578415794158041581415824158341584415854158641587415884158941590415914159241593415944159541596415974159841599416004160141602416034160441605416064160741608416094161041611416124161341614416154161641617416184161941620416214162241623416244162541626416274162841629416304163141632416334163441635416364163741638416394164041641416424164341644416454164641647416484164941650416514165241653416544165541656416574165841659416604166141662416634166441665416664166741668416694167041671416724167341674416754167641677416784167941680416814168241683416844168541686416874168841689416904169141692416934169441695416964169741698416994170041701417024170341704417054170641707417084170941710417114171241713417144171541716417174171841719417204172141722417234172441725417264172741728417294173041731417324173341734417354173641737417384173941740417414174241743417444174541746417474174841749417504175141752417534175441755417564175741758417594176041761417624176341764417654176641767417684176941770417714177241773417744177541776417774177841779417804178141782417834178441785417864178741788417894179041791417924179341794417954179641797417984179941800418014180241803418044180541806418074180841809418104181141812418134181441815418164181741818418194182041821418224182341824418254182641827418284182941830418314183241833418344183541836418374183841839418404184141842418434184441845418464184741848418494185041851418524185341854418554185641857418584185941860418614186241863418644186541866418674186841869418704187141872418734187441875418764187741878418794188041881418824188341884418854188641887418884188941890418914189241893418944189541896418974189841899419004190141902419034190441905419064190741908419094191041911419124191341914419154191641917419184191941920419214192241923419244192541926419274192841929419304193141932419334193441935419364193741938419394194041941419424194341944419454194641947419484194941950419514195241953419544195541956419574195841959419604196141962419634196441965419664196741968419694197041971419724197341974419754197641977419784197941980419814198241983419844198541986419874198841989419904199141992419934199441995419964199741998419994200042001420024200342004420054200642007420084200942010420114201242013420144201542016420174201842019420204202142022420234202442025420264202742028420294203042031420324203342034420354203642037420384203942040420414204242043420444204542046420474204842049420504205142052420534205442055420564205742058420594206042061420624206342064420654206642067420684206942070420714207242073420744207542076420774207842079420804208142082420834208442085420864208742088420894209042091420924209342094420954209642097420984209942100421014210242103421044210542106421074210842109421104211142112421134211442115421164211742118421194212042121421224212342124421254212642127421284212942130421314213242133421344213542136421374213842139421404214142142421434214442145421464214742148421494215042151421524215342154421554215642157421584215942160421614216242163421644216542166421674216842169421704217142172421734217442175421764217742178421794218042181421824218342184421854218642187421884218942190421914219242193421944219542196421974219842199422004220142202422034220442205422064220742208422094221042211422124221342214422154221642217422184221942220422214222242223422244222542226422274222842229422304223142232422334223442235422364223742238422394224042241422424224342244422454224642247422484224942250422514225242253422544225542256422574225842259422604226142262422634226442265422664226742268422694227042271422724227342274422754227642277422784227942280422814228242283422844228542286422874228842289422904229142292422934229442295422964229742298422994230042301423024230342304423054230642307423084230942310423114231242313423144231542316423174231842319423204232142322423234232442325423264232742328423294233042331423324233342334423354233642337423384233942340423414234242343423444234542346423474234842349423504235142352423534235442355423564235742358423594236042361423624236342364423654236642367423684236942370423714237242373423744237542376423774237842379423804238142382423834238442385423864238742388423894239042391423924239342394423954239642397423984239942400424014240242403424044240542406424074240842409424104241142412424134241442415424164241742418424194242042421424224242342424424254242642427424284242942430424314243242433424344243542436424374243842439424404244142442424434244442445424464244742448424494245042451424524245342454424554245642457424584245942460424614246242463424644246542466424674246842469424704247142472424734247442475424764247742478424794248042481424824248342484424854248642487424884248942490424914249242493424944249542496424974249842499425004250142502425034250442505425064250742508425094251042511425124251342514425154251642517425184251942520425214252242523425244252542526425274252842529425304253142532425334253442535425364253742538425394254042541425424254342544425454254642547425484254942550425514255242553425544255542556425574255842559425604256142562425634256442565425664256742568425694257042571425724257342574425754257642577425784257942580425814258242583425844258542586425874258842589425904259142592425934259442595425964259742598425994260042601426024260342604426054260642607426084260942610426114261242613426144261542616426174261842619426204262142622426234262442625426264262742628426294263042631426324263342634426354263642637426384263942640426414264242643426444264542646426474264842649426504265142652426534265442655426564265742658426594266042661426624266342664426654266642667426684266942670426714267242673426744267542676426774267842679426804268142682426834268442685426864268742688426894269042691426924269342694426954269642697426984269942700427014270242703427044270542706427074270842709427104271142712427134271442715427164271742718427194272042721427224272342724427254272642727427284272942730427314273242733427344273542736427374273842739427404274142742427434274442745427464274742748427494275042751427524275342754427554275642757427584275942760427614276242763427644276542766427674276842769427704277142772427734277442775427764277742778427794278042781427824278342784427854278642787427884278942790427914279242793427944279542796427974279842799428004280142802428034280442805428064280742808428094281042811428124281342814428154281642817428184281942820428214282242823428244282542826428274282842829428304283142832428334283442835428364283742838428394284042841428424284342844428454284642847428484284942850428514285242853428544285542856428574285842859428604286142862428634286442865428664286742868428694287042871428724287342874428754287642877428784287942880428814288242883428844288542886428874288842889428904289142892428934289442895428964289742898428994290042901429024290342904429054290642907429084290942910429114291242913429144291542916429174291842919429204292142922429234292442925429264292742928429294293042931429324293342934429354293642937429384293942940429414294242943429444294542946429474294842949429504295142952429534295442955429564295742958429594296042961429624296342964429654296642967429684296942970429714297242973429744297542976429774297842979429804298142982429834298442985429864298742988429894299042991429924299342994429954299642997429984299943000430014300243003430044300543006430074300843009430104301143012430134301443015430164301743018430194302043021430224302343024430254302643027430284302943030430314303243033430344303543036430374303843039430404304143042430434304443045430464304743048430494305043051430524305343054430554305643057430584305943060430614306243063430644306543066430674306843069430704307143072430734307443075430764307743078430794308043081430824308343084430854308643087430884308943090430914309243093430944309543096430974309843099431004310143102431034310443105431064310743108431094311043111431124311343114431154311643117431184311943120431214312243123431244312543126431274312843129431304313143132431334313443135431364313743138431394314043141431424314343144431454314643147431484314943150431514315243153431544315543156431574315843159431604316143162431634316443165431664316743168431694317043171431724317343174431754317643177431784317943180431814318243183431844318543186431874318843189431904319143192431934319443195431964319743198431994320043201432024320343204432054320643207432084320943210432114321243213432144321543216432174321843219432204322143222432234322443225432264322743228432294323043231432324323343234432354323643237432384323943240432414324243243432444324543246432474324843249432504325143252432534325443255432564325743258432594326043261432624326343264432654326643267432684326943270432714327243273432744327543276432774327843279432804328143282432834328443285432864328743288432894329043291432924329343294432954329643297432984329943300433014330243303433044330543306433074330843309433104331143312433134331443315433164331743318433194332043321433224332343324433254332643327433284332943330433314333243333433344333543336433374333843339433404334143342433434334443345433464334743348433494335043351433524335343354433554335643357433584335943360433614336243363433644336543366433674336843369433704337143372433734337443375433764337743378433794338043381433824338343384433854338643387433884338943390433914339243393433944339543396433974339843399434004340143402434034340443405434064340743408434094341043411434124341343414434154341643417434184341943420434214342243423434244342543426434274342843429434304343143432434334343443435434364343743438434394344043441434424344343444434454344643447434484344943450434514345243453434544345543456434574345843459434604346143462434634346443465434664346743468434694347043471434724347343474434754347643477434784347943480434814348243483434844348543486434874348843489434904349143492434934349443495434964349743498434994350043501435024350343504435054350643507435084350943510435114351243513435144351543516435174351843519435204352143522435234352443525435264352743528435294353043531435324353343534435354353643537435384353943540435414354243543435444354543546435474354843549435504355143552435534355443555435564355743558435594356043561435624356343564435654356643567435684356943570435714357243573435744357543576435774357843579435804358143582435834358443585435864358743588435894359043591435924359343594435954359643597435984359943600436014360243603436044360543606436074360843609436104361143612436134361443615436164361743618436194362043621436224362343624436254362643627436284362943630436314363243633436344363543636436374363843639436404364143642436434364443645436464364743648436494365043651436524365343654436554365643657436584365943660436614366243663436644366543666436674366843669436704367143672436734367443675436764367743678436794368043681436824368343684436854368643687436884368943690436914369243693436944369543696436974369843699437004370143702437034370443705437064370743708437094371043711437124371343714437154371643717437184371943720437214372243723437244372543726437274372843729437304373143732437334373443735437364373743738437394374043741437424374343744437454374643747437484374943750437514375243753437544375543756437574375843759437604376143762437634376443765437664376743768437694377043771437724377343774437754377643777437784377943780437814378243783437844378543786437874378843789437904379143792437934379443795437964379743798437994380043801438024380343804438054380643807438084380943810438114381243813438144381543816438174381843819438204382143822438234382443825438264382743828438294383043831438324383343834438354383643837438384383943840438414384243843438444384543846438474384843849438504385143852438534385443855438564385743858438594386043861438624386343864438654386643867438684386943870438714387243873438744387543876438774387843879438804388143882438834388443885438864388743888438894389043891438924389343894438954389643897438984389943900439014390243903439044390543906439074390843909439104391143912439134391443915439164391743918439194392043921439224392343924439254392643927439284392943930439314393243933439344393543936439374393843939439404394143942439434394443945439464394743948439494395043951439524395343954439554395643957439584395943960439614396243963439644396543966439674396843969439704397143972439734397443975439764397743978439794398043981439824398343984439854398643987439884398943990439914399243993439944399543996439974399843999440004400144002440034400444005440064400744008440094401044011440124401344014440154401644017440184401944020440214402244023440244402544026440274402844029440304403144032440334403444035440364403744038440394404044041440424404344044440454404644047440484404944050440514405244053440544405544056440574405844059440604406144062440634406444065440664406744068440694407044071440724407344074440754407644077440784407944080440814408244083440844408544086440874408844089440904409144092440934409444095440964409744098440994410044101441024410344104441054410644107441084410944110441114411244113441144411544116441174411844119441204412144122441234412444125441264412744128441294413044131441324413344134441354413644137441384413944140441414414244143441444414544146441474414844149441504415144152441534415444155441564415744158441594416044161441624416344164441654416644167441684416944170441714417244173441744417544176441774417844179441804418144182441834418444185441864418744188441894419044191441924419344194441954419644197441984419944200442014420244203442044420544206442074420844209442104421144212442134421444215442164421744218442194422044221442224422344224442254422644227442284422944230442314423244233442344423544236442374423844239442404424144242442434424444245442464424744248442494425044251442524425344254442554425644257442584425944260442614426244263442644426544266442674426844269442704427144272442734427444275442764427744278442794428044281442824428344284442854428644287442884428944290442914429244293442944429544296442974429844299443004430144302443034430444305443064430744308443094431044311443124431344314443154431644317443184431944320443214432244323443244432544326443274432844329443304433144332443334433444335443364433744338443394434044341443424434344344443454434644347443484434944350443514435244353443544435544356443574435844359443604436144362443634436444365443664436744368443694437044371443724437344374443754437644377443784437944380443814438244383443844438544386443874438844389443904439144392443934439444395443964439744398443994440044401444024440344404444054440644407444084440944410444114441244413444144441544416444174441844419444204442144422444234442444425444264442744428444294443044431444324443344434444354443644437444384443944440444414444244443444444444544446444474444844449444504445144452444534445444455444564445744458444594446044461444624446344464444654446644467444684446944470444714447244473444744447544476444774447844479444804448144482444834448444485444864448744488444894449044491444924449344494444954449644497444984449944500445014450244503445044450544506445074450844509445104451144512445134451444515445164451744518445194452044521445224452344524445254452644527445284452944530445314453244533445344453544536445374453844539445404454144542445434454444545445464454744548445494455044551445524455344554445554455644557445584455944560445614456244563445644456544566445674456844569445704457144572445734457444575445764457744578445794458044581445824458344584445854458644587445884458944590445914459244593445944459544596445974459844599446004460144602446034460444605446064460744608446094461044611446124461344614446154461644617446184461944620446214462244623446244462544626446274462844629446304463144632446334463444635446364463744638446394464044641446424464344644446454464644647446484464944650446514465244653446544465544656446574465844659446604466144662446634466444665446664466744668446694467044671446724467344674446754467644677446784467944680446814468244683446844468544686446874468844689446904469144692446934469444695446964469744698446994470044701447024470344704447054470644707447084470944710447114471244713447144471544716447174471844719447204472144722447234472444725447264472744728447294473044731447324473344734447354473644737447384473944740447414474244743447444474544746447474474844749447504475144752447534475444755447564475744758447594476044761447624476344764447654476644767447684476944770447714477244773447744477544776447774477844779447804478144782447834478444785447864478744788447894479044791447924479344794447954479644797447984479944800448014480244803448044480544806448074480844809448104481144812448134481444815448164481744818448194482044821448224482344824448254482644827448284482944830448314483244833448344483544836448374483844839448404484144842448434484444845448464484744848448494485044851448524485344854448554485644857448584485944860448614486244863448644486544866448674486844869448704487144872448734487444875448764487744878448794488044881448824488344884448854488644887448884488944890448914489244893448944489544896448974489844899449004490144902449034490444905449064490744908449094491044911449124491344914449154491644917449184491944920449214492244923449244492544926449274492844929449304493144932449334493444935449364493744938449394494044941449424494344944449454494644947449484494944950449514495244953449544495544956449574495844959449604496144962449634496444965449664496744968449694497044971449724497344974449754497644977449784497944980449814498244983449844498544986449874498844989449904499144992449934499444995449964499744998449994500045001450024500345004450054500645007450084500945010450114501245013450144501545016450174501845019450204502145022450234502445025450264502745028450294503045031450324503345034450354503645037450384503945040450414504245043450444504545046450474504845049450504505145052450534505445055450564505745058450594506045061450624506345064450654506645067450684506945070450714507245073450744507545076450774507845079450804508145082450834508445085450864508745088450894509045091450924509345094450954509645097450984509945100451014510245103451044510545106451074510845109451104511145112451134511445115451164511745118451194512045121451224512345124451254512645127451284512945130451314513245133451344513545136451374513845139451404514145142451434514445145451464514745148451494515045151451524515345154451554515645157451584515945160451614516245163451644516545166451674516845169451704517145172451734517445175451764517745178451794518045181451824518345184451854518645187451884518945190451914519245193451944519545196451974519845199452004520145202452034520445205452064520745208452094521045211452124521345214452154521645217452184521945220452214522245223452244522545226452274522845229452304523145232452334523445235452364523745238452394524045241452424524345244452454524645247452484524945250452514525245253452544525545256452574525845259452604526145262452634526445265452664526745268452694527045271452724527345274452754527645277452784527945280452814528245283452844528545286452874528845289452904529145292452934529445295452964529745298452994530045301453024530345304453054530645307453084530945310453114531245313453144531545316453174531845319453204532145322453234532445325453264532745328453294533045331453324533345334453354533645337453384533945340453414534245343453444534545346453474534845349453504535145352453534535445355453564535745358453594536045361453624536345364453654536645367453684536945370453714537245373453744537545376453774537845379453804538145382453834538445385453864538745388453894539045391453924539345394453954539645397453984539945400454014540245403454044540545406454074540845409454104541145412454134541445415454164541745418454194542045421454224542345424454254542645427454284542945430454314543245433454344543545436454374543845439454404544145442454434544445445454464544745448454494545045451454524545345454454554545645457454584545945460454614546245463454644546545466454674546845469454704547145472454734547445475454764547745478454794548045481454824548345484454854548645487454884548945490454914549245493454944549545496454974549845499455004550145502455034550445505455064550745508455094551045511455124551345514455154551645517455184551945520455214552245523455244552545526455274552845529455304553145532455334553445535455364553745538455394554045541455424554345544455454554645547455484554945550455514555245553455544555545556455574555845559455604556145562455634556445565455664556745568455694557045571455724557345574455754557645577455784557945580455814558245583455844558545586455874558845589455904559145592455934559445595455964559745598455994560045601456024560345604456054560645607456084560945610456114561245613456144561545616456174561845619456204562145622456234562445625456264562745628456294563045631456324563345634456354563645637456384563945640456414564245643456444564545646456474564845649456504565145652456534565445655456564565745658456594566045661456624566345664456654566645667456684566945670456714567245673456744567545676456774567845679456804568145682456834568445685456864568745688456894569045691456924569345694456954569645697456984569945700457014570245703457044570545706457074570845709457104571145712457134571445715457164571745718457194572045721457224572345724457254572645727457284572945730457314573245733457344573545736457374573845739457404574145742457434574445745457464574745748457494575045751457524575345754457554575645757457584575945760457614576245763457644576545766457674576845769457704577145772457734577445775457764577745778457794578045781457824578345784457854578645787457884578945790457914579245793457944579545796457974579845799458004580145802458034580445805458064580745808458094581045811458124581345814458154581645817458184581945820458214582245823458244582545826458274582845829458304583145832458334583445835458364583745838458394584045841458424584345844458454584645847458484584945850458514585245853458544585545856458574585845859458604586145862458634586445865458664586745868458694587045871458724587345874458754587645877458784587945880458814588245883458844588545886458874588845889458904589145892458934589445895458964589745898458994590045901459024590345904459054590645907459084590945910459114591245913459144591545916459174591845919459204592145922459234592445925459264592745928459294593045931459324593345934459354593645937459384593945940459414594245943459444594545946459474594845949459504595145952459534595445955459564595745958459594596045961459624596345964459654596645967459684596945970459714597245973459744597545976459774597845979459804598145982459834598445985459864598745988459894599045991459924599345994459954599645997459984599946000460014600246003460044600546006460074600846009460104601146012460134601446015460164601746018460194602046021460224602346024460254602646027460284602946030460314603246033460344603546036460374603846039460404604146042460434604446045460464604746048460494605046051460524605346054460554605646057460584605946060460614606246063460644606546066460674606846069460704607146072460734607446075460764607746078460794608046081460824608346084460854608646087460884608946090460914609246093460944609546096460974609846099461004610146102461034610446105461064610746108461094611046111461124611346114461154611646117461184611946120461214612246123461244612546126461274612846129461304613146132461334613446135461364613746138461394614046141461424614346144461454614646147461484614946150461514615246153461544615546156461574615846159461604616146162461634616446165461664616746168461694617046171461724617346174461754617646177461784617946180461814618246183461844618546186461874618846189461904619146192461934619446195461964619746198461994620046201462024620346204462054620646207462084620946210462114621246213462144621546216462174621846219462204622146222462234622446225462264622746228462294623046231462324623346234462354623646237462384623946240462414624246243462444624546246462474624846249462504625146252462534625446255462564625746258462594626046261462624626346264462654626646267462684626946270462714627246273462744627546276462774627846279462804628146282462834628446285462864628746288462894629046291462924629346294462954629646297462984629946300463014630246303463044630546306463074630846309463104631146312463134631446315463164631746318463194632046321463224632346324463254632646327463284632946330463314633246333463344633546336463374633846339463404634146342463434634446345463464634746348463494635046351463524635346354463554635646357463584635946360463614636246363463644636546366463674636846369463704637146372463734637446375463764637746378463794638046381463824638346384463854638646387463884638946390463914639246393463944639546396463974639846399464004640146402464034640446405464064640746408464094641046411464124641346414464154641646417464184641946420464214642246423464244642546426464274642846429464304643146432464334643446435464364643746438464394644046441464424644346444464454644646447464484644946450464514645246453464544645546456464574645846459464604646146462464634646446465464664646746468464694647046471464724647346474464754647646477464784647946480464814648246483464844648546486464874648846489464904649146492464934649446495464964649746498464994650046501465024650346504465054650646507465084650946510465114651246513465144651546516465174651846519465204652146522465234652446525465264652746528465294653046531465324653346534465354653646537465384653946540465414654246543465444654546546465474654846549465504655146552465534655446555465564655746558465594656046561465624656346564465654656646567465684656946570465714657246573465744657546576465774657846579465804658146582465834658446585465864658746588465894659046591465924659346594465954659646597465984659946600466014660246603466044660546606466074660846609466104661146612466134661446615466164661746618466194662046621466224662346624466254662646627466284662946630466314663246633466344663546636466374663846639466404664146642466434664446645466464664746648466494665046651466524665346654466554665646657466584665946660466614666246663466644666546666466674666846669466704667146672466734667446675466764667746678466794668046681466824668346684466854668646687466884668946690466914669246693466944669546696466974669846699467004670146702467034670446705467064670746708467094671046711467124671346714467154671646717467184671946720467214672246723467244672546726467274672846729467304673146732467334673446735467364673746738467394674046741467424674346744467454674646747467484674946750467514675246753467544675546756467574675846759467604676146762467634676446765467664676746768467694677046771467724677346774467754677646777467784677946780467814678246783467844678546786467874678846789467904679146792467934679446795467964679746798467994680046801468024680346804468054680646807468084680946810468114681246813468144681546816468174681846819468204682146822468234682446825468264682746828468294683046831468324683346834468354683646837468384683946840468414684246843468444684546846468474684846849468504685146852468534685446855468564685746858468594686046861468624686346864468654686646867468684686946870468714687246873468744687546876468774687846879468804688146882468834688446885468864688746888468894689046891468924689346894468954689646897468984689946900469014690246903469044690546906469074690846909469104691146912469134691446915469164691746918469194692046921469224692346924469254692646927469284692946930469314693246933469344693546936469374693846939469404694146942469434694446945469464694746948469494695046951469524695346954469554695646957469584695946960469614696246963469644696546966469674696846969469704697146972469734697446975469764697746978469794698046981469824698346984469854698646987469884698946990469914699246993469944699546996469974699846999470004700147002470034700447005470064700747008470094701047011470124701347014470154701647017470184701947020470214702247023470244702547026470274702847029470304703147032470334703447035470364703747038470394704047041470424704347044470454704647047470484704947050470514705247053470544705547056470574705847059470604706147062470634706447065470664706747068470694707047071470724707347074470754707647077470784707947080470814708247083470844708547086470874708847089470904709147092470934709447095470964709747098470994710047101471024710347104471054710647107471084710947110471114711247113471144711547116471174711847119471204712147122471234712447125471264712747128471294713047131471324713347134471354713647137471384713947140471414714247143471444714547146471474714847149471504715147152471534715447155471564715747158471594716047161471624716347164471654716647167471684716947170471714717247173471744717547176471774717847179471804718147182471834718447185471864718747188471894719047191471924719347194471954719647197471984719947200472014720247203472044720547206472074720847209472104721147212472134721447215472164721747218472194722047221472224722347224472254722647227472284722947230472314723247233472344723547236472374723847239472404724147242472434724447245472464724747248472494725047251472524725347254472554725647257472584725947260472614726247263472644726547266472674726847269472704727147272472734727447275472764727747278472794728047281472824728347284472854728647287472884728947290472914729247293472944729547296472974729847299473004730147302473034730447305473064730747308473094731047311473124731347314473154731647317473184731947320473214732247323473244732547326473274732847329473304733147332473334733447335473364733747338473394734047341473424734347344473454734647347473484734947350473514735247353473544735547356473574735847359473604736147362473634736447365473664736747368473694737047371473724737347374473754737647377473784737947380473814738247383473844738547386473874738847389473904739147392473934739447395473964739747398473994740047401474024740347404474054740647407474084740947410474114741247413474144741547416474174741847419474204742147422474234742447425474264742747428474294743047431474324743347434474354743647437474384743947440474414744247443474444744547446474474744847449474504745147452474534745447455474564745747458474594746047461474624746347464474654746647467474684746947470474714747247473474744747547476474774747847479474804748147482474834748447485474864748747488474894749047491474924749347494474954749647497474984749947500475014750247503475044750547506475074750847509475104751147512475134751447515475164751747518475194752047521475224752347524475254752647527475284752947530475314753247533475344753547536475374753847539475404754147542475434754447545475464754747548475494755047551475524755347554475554755647557475584755947560475614756247563475644756547566475674756847569475704757147572475734757447575475764757747578475794758047581475824758347584475854758647587475884758947590475914759247593475944759547596475974759847599476004760147602476034760447605476064760747608476094761047611476124761347614476154761647617476184761947620476214762247623476244762547626476274762847629476304763147632476334763447635476364763747638476394764047641476424764347644476454764647647476484764947650476514765247653476544765547656476574765847659476604766147662476634766447665476664766747668476694767047671476724767347674476754767647677476784767947680476814768247683476844768547686476874768847689476904769147692476934769447695476964769747698476994770047701477024770347704477054770647707477084770947710477114771247713477144771547716477174771847719477204772147722477234772447725477264772747728477294773047731477324773347734477354773647737477384773947740477414774247743477444774547746477474774847749477504775147752477534775447755477564775747758477594776047761477624776347764477654776647767477684776947770477714777247773477744777547776477774777847779477804778147782477834778447785477864778747788477894779047791477924779347794477954779647797477984779947800478014780247803478044780547806478074780847809478104781147812478134781447815478164781747818478194782047821478224782347824478254782647827478284782947830478314783247833478344783547836478374783847839478404784147842478434784447845478464784747848478494785047851478524785347854478554785647857478584785947860478614786247863478644786547866478674786847869478704787147872478734787447875478764787747878478794788047881478824788347884478854788647887478884788947890478914789247893478944789547896478974789847899479004790147902479034790447905479064790747908479094791047911479124791347914479154791647917479184791947920479214792247923479244792547926479274792847929479304793147932479334793447935479364793747938479394794047941479424794347944479454794647947479484794947950479514795247953479544795547956479574795847959479604796147962479634796447965479664796747968479694797047971479724797347974479754797647977479784797947980479814798247983479844798547986479874798847989479904799147992479934799447995479964799747998479994800048001480024800348004480054800648007480084800948010480114801248013480144801548016480174801848019480204802148022480234802448025480264802748028480294803048031480324803348034480354803648037480384803948040480414804248043480444804548046480474804848049480504805148052480534805448055480564805748058480594806048061480624806348064480654806648067480684806948070480714807248073480744807548076480774807848079480804808148082480834808448085480864808748088480894809048091480924809348094480954809648097480984809948100481014810248103481044810548106481074810848109481104811148112481134811448115481164811748118481194812048121481224812348124481254812648127481284812948130481314813248133481344813548136481374813848139481404814148142481434814448145481464814748148481494815048151481524815348154481554815648157481584815948160481614816248163481644816548166481674816848169481704817148172481734817448175481764817748178481794818048181481824818348184481854818648187481884818948190481914819248193481944819548196481974819848199482004820148202482034820448205482064820748208482094821048211482124821348214482154821648217482184821948220482214822248223482244822548226482274822848229482304823148232482334823448235482364823748238482394824048241482424824348244482454824648247482484824948250482514825248253482544825548256482574825848259482604826148262482634826448265482664826748268482694827048271482724827348274482754827648277482784827948280482814828248283482844828548286482874828848289482904829148292482934829448295482964829748298482994830048301483024830348304483054830648307483084830948310483114831248313483144831548316483174831848319483204832148322483234832448325483264832748328483294833048331483324833348334483354833648337483384833948340483414834248343483444834548346483474834848349483504835148352483534835448355483564835748358483594836048361483624836348364483654836648367483684836948370483714837248373483744837548376483774837848379483804838148382483834838448385483864838748388483894839048391483924839348394483954839648397483984839948400484014840248403484044840548406484074840848409484104841148412484134841448415484164841748418484194842048421484224842348424484254842648427484284842948430484314843248433484344843548436484374843848439484404844148442484434844448445484464844748448484494845048451484524845348454484554845648457484584845948460484614846248463484644846548466484674846848469484704847148472484734847448475484764847748478484794848048481484824848348484484854848648487484884848948490484914849248493484944849548496484974849848499485004850148502485034850448505485064850748508485094851048511485124851348514485154851648517485184851948520485214852248523485244852548526485274852848529485304853148532485334853448535485364853748538485394854048541485424854348544485454854648547485484854948550485514855248553485544855548556485574855848559485604856148562485634856448565485664856748568485694857048571485724857348574485754857648577485784857948580485814858248583485844858548586485874858848589485904859148592485934859448595485964859748598485994860048601486024860348604486054860648607486084860948610486114861248613486144861548616486174861848619486204862148622486234862448625486264862748628486294863048631486324863348634486354863648637486384863948640486414864248643486444864548646486474864848649486504865148652486534865448655486564865748658486594866048661486624866348664486654866648667486684866948670486714867248673486744867548676486774867848679486804868148682486834868448685486864868748688486894869048691486924869348694486954869648697486984869948700487014870248703487044870548706487074870848709487104871148712487134871448715487164871748718487194872048721487224872348724487254872648727487284872948730487314873248733487344873548736487374873848739487404874148742487434874448745487464874748748487494875048751487524875348754487554875648757487584875948760487614876248763487644876548766487674876848769487704877148772487734877448775487764877748778487794878048781487824878348784487854878648787487884878948790487914879248793487944879548796487974879848799488004880148802488034880448805488064880748808488094881048811488124881348814488154881648817488184881948820488214882248823488244882548826488274882848829488304883148832488334883448835488364883748838488394884048841488424884348844488454884648847488484884948850488514885248853488544885548856488574885848859488604886148862488634886448865488664886748868488694887048871488724887348874488754887648877488784887948880488814888248883488844888548886488874888848889488904889148892488934889448895488964889748898488994890048901489024890348904489054890648907489084890948910489114891248913489144891548916489174891848919489204892148922489234892448925489264892748928489294893048931489324893348934489354893648937489384893948940489414894248943489444894548946489474894848949489504895148952489534895448955489564895748958489594896048961489624896348964489654896648967489684896948970489714897248973489744897548976489774897848979489804898148982489834898448985489864898748988489894899048991489924899348994489954899648997489984899949000490014900249003490044900549006490074900849009490104901149012490134901449015490164901749018490194902049021490224902349024490254902649027490284902949030490314903249033490344903549036490374903849039490404904149042490434904449045490464904749048490494905049051490524905349054490554905649057490584905949060490614906249063490644906549066490674906849069490704907149072490734907449075490764907749078490794908049081490824908349084490854908649087490884908949090490914909249093490944909549096490974909849099491004910149102491034910449105491064910749108491094911049111491124911349114491154911649117491184911949120491214912249123491244912549126491274912849129491304913149132491334913449135491364913749138491394914049141491424914349144491454914649147491484914949150491514915249153491544915549156491574915849159491604916149162491634916449165491664916749168491694917049171491724917349174491754917649177491784917949180491814918249183491844918549186491874918849189491904919149192491934919449195491964919749198491994920049201492024920349204492054920649207492084920949210492114921249213492144921549216492174921849219492204922149222492234922449225492264922749228492294923049231492324923349234492354923649237492384923949240492414924249243492444924549246492474924849249492504925149252492534925449255492564925749258492594926049261492624926349264492654926649267492684926949270492714927249273492744927549276492774927849279492804928149282492834928449285492864928749288492894929049291492924929349294492954929649297492984929949300493014930249303493044930549306493074930849309493104931149312493134931449315493164931749318493194932049321493224932349324493254932649327493284932949330493314933249333493344933549336493374933849339493404934149342493434934449345493464934749348493494935049351493524935349354493554935649357493584935949360493614936249363493644936549366493674936849369493704937149372493734937449375493764937749378493794938049381493824938349384493854938649387493884938949390493914939249393493944939549396493974939849399494004940149402494034940449405494064940749408494094941049411494124941349414494154941649417494184941949420494214942249423494244942549426494274942849429494304943149432494334943449435494364943749438494394944049441494424944349444494454944649447494484944949450494514945249453494544945549456494574945849459494604946149462494634946449465494664946749468494694947049471494724947349474494754947649477494784947949480494814948249483494844948549486494874948849489494904949149492494934949449495494964949749498494994950049501495024950349504495054950649507495084950949510495114951249513495144951549516495174951849519495204952149522495234952449525495264952749528495294953049531495324953349534495354953649537495384953949540495414954249543495444954549546495474954849549495504955149552495534955449555495564955749558495594956049561495624956349564495654956649567495684956949570495714957249573495744957549576495774957849579495804958149582495834958449585495864958749588495894959049591495924959349594495954959649597495984959949600496014960249603496044960549606496074960849609496104961149612496134961449615496164961749618496194962049621496224962349624496254962649627496284962949630496314963249633496344963549636496374963849639496404964149642496434964449645496464964749648496494965049651496524965349654496554965649657496584965949660496614966249663496644966549666496674966849669496704967149672496734967449675496764967749678496794968049681496824968349684496854968649687496884968949690496914969249693496944969549696496974969849699497004970149702497034970449705497064970749708497094971049711497124971349714497154971649717497184971949720497214972249723497244972549726497274972849729497304973149732497334973449735497364973749738497394974049741497424974349744497454974649747497484974949750497514975249753497544975549756497574975849759497604976149762497634976449765497664976749768497694977049771497724977349774497754977649777497784977949780497814978249783497844978549786497874978849789497904979149792497934979449795497964979749798497994980049801498024980349804498054980649807498084980949810498114981249813498144981549816498174981849819498204982149822498234982449825498264982749828498294983049831498324983349834498354983649837498384983949840498414984249843498444984549846498474984849849498504985149852498534985449855498564985749858498594986049861498624986349864498654986649867498684986949870498714987249873498744987549876498774987849879498804988149882498834988449885498864988749888498894989049891498924989349894498954989649897498984989949900499014990249903499044990549906499074990849909499104991149912499134991449915499164991749918499194992049921499224992349924499254992649927499284992949930499314993249933499344993549936499374993849939499404994149942499434994449945499464994749948499494995049951499524995349954499554995649957499584995949960499614996249963499644996549966499674996849969499704997149972499734997449975499764997749978499794998049981499824998349984499854998649987499884998949990499914999249993499944999549996499974999849999500005000150002500035000450005500065000750008500095001050011500125001350014500155001650017500185001950020500215002250023500245002550026500275002850029500305003150032500335003450035500365003750038500395004050041500425004350044500455004650047500485004950050500515005250053500545005550056500575005850059500605006150062500635006450065500665006750068500695007050071500725007350074500755007650077500785007950080500815008250083500845008550086500875008850089500905009150092500935009450095500965009750098500995010050101501025010350104501055010650107501085010950110501115011250113501145011550116501175011850119501205012150122501235012450125501265012750128501295013050131501325013350134501355013650137501385013950140501415014250143501445014550146501475014850149501505015150152501535015450155501565015750158501595016050161501625016350164501655016650167501685016950170501715017250173501745017550176501775017850179501805018150182501835018450185501865018750188501895019050191501925019350194501955019650197501985019950200502015020250203502045020550206502075020850209502105021150212502135021450215502165021750218502195022050221502225022350224502255022650227502285022950230502315023250233502345023550236502375023850239502405024150242502435024450245502465024750248502495025050251502525025350254502555025650257502585025950260502615026250263502645026550266502675026850269502705027150272502735027450275502765027750278502795028050281502825028350284502855028650287502885028950290502915029250293502945029550296502975029850299503005030150302503035030450305503065030750308503095031050311503125031350314503155031650317503185031950320503215032250323503245032550326503275032850329503305033150332503335033450335503365033750338503395034050341503425034350344503455034650347503485034950350503515035250353503545035550356503575035850359503605036150362503635036450365503665036750368503695037050371503725037350374503755037650377503785037950380503815038250383503845038550386503875038850389503905039150392503935039450395503965039750398503995040050401504025040350404504055040650407504085040950410504115041250413504145041550416504175041850419504205042150422504235042450425504265042750428504295043050431504325043350434504355043650437504385043950440504415044250443504445044550446504475044850449504505045150452504535045450455504565045750458504595046050461504625046350464504655046650467504685046950470504715047250473504745047550476504775047850479504805048150482504835048450485504865048750488504895049050491504925049350494504955049650497504985049950500505015050250503505045050550506505075050850509505105051150512505135051450515505165051750518505195052050521505225052350524505255052650527505285052950530505315053250533505345053550536505375053850539505405054150542505435054450545505465054750548505495055050551505525055350554505555055650557505585055950560505615056250563505645056550566505675056850569505705057150572505735057450575505765057750578505795058050581505825058350584505855058650587505885058950590505915059250593505945059550596505975059850599506005060150602506035060450605506065060750608506095061050611506125061350614506155061650617506185061950620506215062250623506245062550626506275062850629506305063150632506335063450635506365063750638506395064050641506425064350644506455064650647506485064950650506515065250653506545065550656506575065850659506605066150662506635066450665506665066750668506695067050671506725067350674506755067650677506785067950680506815068250683506845068550686506875068850689506905069150692506935069450695506965069750698506995070050701507025070350704507055070650707507085070950710507115071250713507145071550716507175071850719507205072150722507235072450725507265072750728507295073050731507325073350734507355073650737507385073950740507415074250743507445074550746507475074850749507505075150752507535075450755507565075750758507595076050761507625076350764507655076650767507685076950770507715077250773507745077550776507775077850779507805078150782507835078450785507865078750788507895079050791507925079350794507955079650797507985079950800508015080250803508045080550806508075080850809508105081150812508135081450815508165081750818508195082050821508225082350824508255082650827508285082950830508315083250833508345083550836508375083850839508405084150842508435084450845508465084750848508495085050851508525085350854508555085650857508585085950860508615086250863508645086550866508675086850869508705087150872508735087450875508765087750878508795088050881508825088350884508855088650887508885088950890508915089250893508945089550896508975089850899509005090150902509035090450905509065090750908509095091050911509125091350914509155091650917509185091950920509215092250923509245092550926509275092850929509305093150932509335093450935509365093750938509395094050941509425094350944509455094650947509485094950950509515095250953509545095550956509575095850959509605096150962509635096450965509665096750968509695097050971509725097350974509755097650977509785097950980509815098250983509845098550986509875098850989509905099150992509935099450995509965099750998509995100051001510025100351004510055100651007510085100951010510115101251013510145101551016510175101851019510205102151022510235102451025510265102751028510295103051031510325103351034510355103651037510385103951040510415104251043510445104551046510475104851049510505105151052510535105451055510565105751058510595106051061510625106351064510655106651067510685106951070510715107251073510745107551076510775107851079510805108151082510835108451085510865108751088510895109051091510925109351094510955109651097510985109951100511015110251103511045110551106511075110851109511105111151112511135111451115511165111751118511195112051121511225112351124511255112651127511285112951130511315113251133511345113551136511375113851139511405114151142511435114451145511465114751148511495115051151511525115351154511555115651157511585115951160511615116251163511645116551166511675116851169511705117151172511735117451175511765117751178511795118051181511825118351184511855118651187511885118951190511915119251193511945119551196511975119851199512005120151202512035120451205512065120751208512095121051211512125121351214512155121651217512185121951220512215122251223512245122551226512275122851229512305123151232512335123451235512365123751238512395124051241512425124351244512455124651247512485124951250512515125251253512545125551256512575125851259512605126151262512635126451265512665126751268512695127051271512725127351274512755127651277512785127951280512815128251283512845128551286512875128851289512905129151292512935129451295512965129751298512995130051301513025130351304513055130651307513085130951310513115131251313513145131551316513175131851319513205132151322513235132451325513265132751328513295133051331513325133351334513355133651337513385133951340513415134251343513445134551346513475134851349513505135151352513535135451355513565135751358513595136051361513625136351364513655136651367513685136951370513715137251373513745137551376513775137851379513805138151382513835138451385513865138751388513895139051391513925139351394513955139651397513985139951400514015140251403514045140551406514075140851409514105141151412514135141451415514165141751418514195142051421514225142351424514255142651427514285142951430514315143251433514345143551436514375143851439514405144151442514435144451445514465144751448514495145051451514525145351454514555145651457514585145951460514615146251463514645146551466514675146851469514705147151472514735147451475514765147751478514795148051481514825148351484514855148651487514885148951490514915149251493514945149551496514975149851499515005150151502515035150451505515065150751508515095151051511515125151351514515155151651517515185151951520515215152251523515245152551526515275152851529515305153151532515335153451535515365153751538515395154051541515425154351544515455154651547515485154951550515515155251553515545155551556515575155851559515605156151562515635156451565515665156751568515695157051571515725157351574515755157651577515785157951580515815158251583515845158551586515875158851589515905159151592515935159451595515965159751598515995160051601516025160351604516055160651607516085160951610516115161251613516145161551616516175161851619516205162151622516235162451625516265162751628516295163051631516325163351634516355163651637516385163951640516415164251643516445164551646516475164851649516505165151652516535165451655516565165751658516595166051661516625166351664516655166651667516685166951670516715167251673516745167551676516775167851679516805168151682516835168451685516865168751688516895169051691516925169351694516955169651697516985169951700517015170251703517045170551706517075170851709517105171151712517135171451715517165171751718517195172051721517225172351724517255172651727517285172951730517315173251733517345173551736517375173851739517405174151742517435174451745517465174751748517495175051751517525175351754517555175651757517585175951760517615176251763517645176551766517675176851769517705177151772517735177451775517765177751778517795178051781517825178351784517855178651787517885178951790517915179251793517945179551796517975179851799518005180151802518035180451805518065180751808518095181051811518125181351814518155181651817518185181951820518215182251823518245182551826518275182851829518305183151832518335183451835518365183751838518395184051841518425184351844518455184651847518485184951850518515185251853518545185551856518575185851859518605186151862518635186451865518665186751868518695187051871518725187351874518755187651877518785187951880518815188251883518845188551886518875188851889518905189151892518935189451895518965189751898518995190051901519025190351904519055190651907519085190951910519115191251913519145191551916519175191851919519205192151922519235192451925519265192751928519295193051931519325193351934519355193651937519385193951940519415194251943519445194551946519475194851949519505195151952519535195451955519565195751958519595196051961519625196351964519655196651967519685196951970519715197251973519745197551976519775197851979519805198151982519835198451985519865198751988519895199051991519925199351994519955199651997519985199952000520015200252003520045200552006520075200852009520105201152012520135201452015520165201752018520195202052021520225202352024520255202652027520285202952030520315203252033520345203552036520375203852039520405204152042520435204452045520465204752048520495205052051520525205352054520555205652057520585205952060520615206252063520645206552066520675206852069520705207152072520735207452075520765207752078520795208052081520825208352084520855208652087520885208952090520915209252093520945209552096520975209852099521005210152102521035210452105521065210752108521095211052111521125211352114521155211652117521185211952120521215212252123521245212552126521275212852129521305213152132521335213452135521365213752138521395214052141521425214352144521455214652147521485214952150521515215252153521545215552156521575215852159521605216152162521635216452165521665216752168521695217052171521725217352174521755217652177521785217952180521815218252183521845218552186521875218852189521905219152192521935219452195521965219752198521995220052201522025220352204522055220652207522085220952210522115221252213522145221552216522175221852219522205222152222522235222452225522265222752228522295223052231522325223352234522355223652237522385223952240522415224252243522445224552246522475224852249522505225152252522535225452255522565225752258522595226052261522625226352264522655226652267522685226952270522715227252273522745227552276522775227852279522805228152282522835228452285522865228752288522895229052291522925229352294522955229652297522985229952300523015230252303523045230552306523075230852309523105231152312523135231452315523165231752318523195232052321523225232352324523255232652327523285232952330523315233252333523345233552336523375233852339523405234152342523435234452345523465234752348523495235052351523525235352354523555235652357523585235952360523615236252363523645236552366523675236852369523705237152372523735237452375523765237752378523795238052381523825238352384523855238652387523885238952390523915239252393523945239552396523975239852399524005240152402524035240452405524065240752408524095241052411524125241352414524155241652417524185241952420524215242252423524245242552426524275242852429524305243152432524335243452435524365243752438524395244052441524425244352444524455244652447524485244952450524515245252453524545245552456524575245852459524605246152462524635246452465524665246752468524695247052471524725247352474524755247652477524785247952480524815248252483524845248552486524875248852489524905249152492524935249452495524965249752498524995250052501525025250352504525055250652507525085250952510525115251252513525145251552516525175251852519525205252152522525235252452525525265252752528525295253052531525325253352534525355253652537525385253952540525415254252543525445254552546525475254852549525505255152552525535255452555525565255752558525595256052561525625256352564525655256652567525685256952570525715257252573525745257552576525775257852579525805258152582525835258452585525865258752588525895259052591525925259352594525955259652597525985259952600526015260252603526045260552606526075260852609526105261152612526135261452615526165261752618526195262052621526225262352624526255262652627526285262952630526315263252633526345263552636526375263852639526405264152642526435264452645526465264752648526495265052651526525265352654526555265652657526585265952660526615266252663526645266552666526675266852669526705267152672526735267452675526765267752678526795268052681526825268352684526855268652687526885268952690526915269252693526945269552696526975269852699527005270152702527035270452705527065270752708527095271052711527125271352714527155271652717527185271952720527215272252723527245272552726527275272852729527305273152732527335273452735527365273752738527395274052741527425274352744527455274652747527485274952750527515275252753527545275552756527575275852759527605276152762527635276452765527665276752768527695277052771527725277352774527755277652777527785277952780527815278252783527845278552786527875278852789527905279152792527935279452795527965279752798527995280052801528025280352804528055280652807528085280952810528115281252813528145281552816528175281852819528205282152822528235282452825528265282752828528295283052831528325283352834528355283652837528385283952840528415284252843528445284552846528475284852849528505285152852528535285452855528565285752858528595286052861528625286352864528655286652867528685286952870528715287252873528745287552876528775287852879528805288152882528835288452885528865288752888528895289052891528925289352894528955289652897528985289952900529015290252903529045290552906529075290852909529105291152912529135291452915529165291752918529195292052921529225292352924529255292652927529285292952930529315293252933529345293552936529375293852939529405294152942529435294452945529465294752948529495295052951529525295352954529555295652957529585295952960529615296252963529645296552966529675296852969529705297152972529735297452975529765297752978529795298052981529825298352984529855298652987529885298952990529915299252993529945299552996529975299852999530005300153002530035300453005530065300753008530095301053011530125301353014530155301653017530185301953020530215302253023530245302553026530275302853029530305303153032530335303453035530365303753038530395304053041530425304353044530455304653047530485304953050530515305253053530545305553056530575305853059530605306153062530635306453065530665306753068530695307053071530725307353074530755307653077530785307953080530815308253083530845308553086530875308853089530905309153092530935309453095530965309753098530995310053101531025310353104531055310653107531085310953110531115311253113531145311553116531175311853119531205312153122531235312453125531265312753128531295313053131531325313353134531355313653137531385313953140531415314253143531445314553146531475314853149531505315153152531535315453155531565315753158531595316053161531625316353164531655316653167531685316953170531715317253173531745317553176531775317853179531805318153182531835318453185531865318753188531895319053191531925319353194531955319653197531985319953200532015320253203532045320553206532075320853209532105321153212532135321453215532165321753218532195322053221532225322353224532255322653227532285322953230532315323253233532345323553236532375323853239532405324153242532435324453245532465324753248532495325053251532525325353254532555325653257532585325953260532615326253263532645326553266532675326853269532705327153272532735327453275532765327753278532795328053281532825328353284532855328653287532885328953290532915329253293532945329553296532975329853299533005330153302533035330453305533065330753308533095331053311533125331353314533155331653317533185331953320533215332253323533245332553326533275332853329533305333153332533335333453335533365333753338533395334053341533425334353344533455334653347533485334953350533515335253353533545335553356533575335853359533605336153362533635336453365533665336753368533695337053371533725337353374533755337653377533785337953380533815338253383533845338553386533875338853389533905339153392533935339453395533965339753398533995340053401534025340353404534055340653407534085340953410534115341253413534145341553416534175341853419534205342153422534235342453425534265342753428534295343053431534325343353434534355343653437534385343953440534415344253443534445344553446534475344853449534505345153452534535345453455534565345753458534595346053461534625346353464534655346653467534685346953470534715347253473534745347553476534775347853479534805348153482534835348453485534865348753488534895349053491534925349353494534955349653497534985349953500535015350253503535045350553506535075350853509535105351153512535135351453515535165351753518535195352053521535225352353524535255352653527535285352953530535315353253533535345353553536535375353853539535405354153542535435354453545535465354753548535495355053551535525355353554535555355653557535585355953560535615356253563535645356553566535675356853569535705357153572535735357453575535765357753578535795358053581535825358353584535855358653587535885358953590535915359253593535945359553596535975359853599536005360153602536035360453605536065360753608536095361053611536125361353614536155361653617536185361953620536215362253623536245362553626536275362853629536305363153632536335363453635536365363753638536395364053641536425364353644536455364653647536485364953650536515365253653536545365553656536575365853659536605366153662536635366453665536665366753668536695367053671536725367353674536755367653677536785367953680536815368253683536845368553686536875368853689536905369153692536935369453695536965369753698536995370053701537025370353704537055370653707537085370953710537115371253713537145371553716537175371853719537205372153722537235372453725537265372753728537295373053731537325373353734537355373653737537385373953740537415374253743537445374553746537475374853749537505375153752537535375453755537565375753758537595376053761537625376353764537655376653767537685376953770537715377253773537745377553776537775377853779537805378153782537835378453785537865378753788537895379053791537925379353794537955379653797537985379953800538015380253803538045380553806538075380853809538105381153812538135381453815538165381753818538195382053821538225382353824538255382653827538285382953830538315383253833538345383553836538375383853839538405384153842538435384453845538465384753848538495385053851538525385353854538555385653857538585385953860538615386253863538645386553866538675386853869538705387153872538735387453875538765387753878538795388053881538825388353884538855388653887538885388953890538915389253893538945389553896538975389853899539005390153902539035390453905539065390753908539095391053911539125391353914539155391653917539185391953920539215392253923539245392553926539275392853929539305393153932539335393453935539365393753938539395394053941539425394353944539455394653947539485394953950539515395253953539545395553956539575395853959539605396153962539635396453965539665396753968539695397053971539725397353974539755397653977539785397953980539815398253983539845398553986539875398853989539905399153992539935399453995539965399753998539995400054001540025400354004540055400654007540085400954010540115401254013540145401554016540175401854019540205402154022540235402454025540265402754028540295403054031540325403354034540355403654037540385403954040540415404254043540445404554046540475404854049540505405154052540535405454055540565405754058540595406054061540625406354064540655406654067540685406954070540715407254073540745407554076540775407854079540805408154082540835408454085540865408754088540895409054091540925409354094540955409654097540985409954100541015410254103541045410554106541075410854109541105411154112541135411454115541165411754118541195412054121541225412354124541255412654127541285412954130541315413254133541345413554136541375413854139541405414154142541435414454145541465414754148541495415054151541525415354154541555415654157541585415954160541615416254163541645416554166541675416854169541705417154172541735417454175541765417754178541795418054181541825418354184541855418654187541885418954190541915419254193541945419554196541975419854199542005420154202542035420454205542065420754208542095421054211542125421354214542155421654217542185421954220542215422254223542245422554226542275422854229542305423154232542335423454235542365423754238542395424054241542425424354244542455424654247542485424954250542515425254253542545425554256542575425854259542605426154262542635426454265542665426754268542695427054271542725427354274542755427654277542785427954280542815428254283542845428554286542875428854289542905429154292542935429454295542965429754298542995430054301543025430354304543055430654307543085430954310543115431254313543145431554316543175431854319543205432154322543235432454325543265432754328543295433054331543325433354334543355433654337543385433954340543415434254343543445434554346543475434854349543505435154352543535435454355543565435754358543595436054361543625436354364543655436654367543685436954370543715437254373543745437554376543775437854379543805438154382543835438454385543865438754388543895439054391543925439354394543955439654397543985439954400544015440254403544045440554406544075440854409544105441154412544135441454415544165441754418544195442054421544225442354424544255442654427544285442954430544315443254433544345443554436544375443854439544405444154442544435444454445544465444754448544495445054451544525445354454544555445654457544585445954460544615446254463544645446554466544675446854469544705447154472544735447454475544765447754478544795448054481544825448354484544855448654487544885448954490544915449254493544945449554496544975449854499545005450154502545035450454505545065450754508545095451054511545125451354514545155451654517545185451954520545215452254523545245452554526545275452854529545305453154532545335453454535545365453754538545395454054541545425454354544545455454654547545485454954550545515455254553545545455554556545575455854559545605456154562545635456454565545665456754568545695457054571545725457354574545755457654577545785457954580545815458254583545845458554586545875458854589545905459154592545935459454595545965459754598545995460054601546025460354604546055460654607546085460954610546115461254613546145461554616546175461854619546205462154622546235462454625546265462754628546295463054631546325463354634546355463654637546385463954640546415464254643546445464554646546475464854649546505465154652546535465454655546565465754658546595466054661546625466354664546655466654667546685466954670546715467254673546745467554676546775467854679546805468154682546835468454685546865468754688546895469054691546925469354694546955469654697546985469954700547015470254703547045470554706547075470854709547105471154712547135471454715547165471754718547195472054721547225472354724547255472654727547285472954730547315473254733547345473554736547375473854739547405474154742547435474454745547465474754748547495475054751547525475354754547555475654757547585475954760547615476254763547645476554766547675476854769547705477154772547735477454775547765477754778547795478054781547825478354784547855478654787547885478954790547915479254793547945479554796547975479854799548005480154802548035480454805548065480754808548095481054811548125481354814548155481654817548185481954820548215482254823548245482554826548275482854829548305483154832548335483454835548365483754838548395484054841548425484354844548455484654847548485484954850548515485254853548545485554856548575485854859548605486154862548635486454865548665486754868548695487054871548725487354874548755487654877548785487954880548815488254883548845488554886548875488854889548905489154892548935489454895548965489754898548995490054901549025490354904549055490654907549085490954910549115491254913549145491554916549175491854919549205492154922549235492454925549265492754928549295493054931549325493354934549355493654937549385493954940549415494254943549445494554946549475494854949549505495154952549535495454955549565495754958549595496054961549625496354964549655496654967549685496954970549715497254973549745497554976549775497854979549805498154982549835498454985549865498754988549895499054991549925499354994549955499654997549985499955000550015500255003550045500555006550075500855009550105501155012550135501455015550165501755018550195502055021550225502355024550255502655027550285502955030550315503255033550345503555036550375503855039550405504155042550435504455045550465504755048550495505055051550525505355054550555505655057550585505955060550615506255063550645506555066550675506855069550705507155072550735507455075550765507755078550795508055081550825508355084550855508655087550885508955090550915509255093550945509555096550975509855099551005510155102551035510455105551065510755108551095511055111551125511355114551155511655117551185511955120551215512255123551245512555126551275512855129551305513155132551335513455135551365513755138551395514055141551425514355144551455514655147551485514955150551515515255153551545515555156551575515855159551605516155162551635516455165551665516755168551695517055171551725517355174551755517655177551785517955180551815518255183551845518555186551875518855189551905519155192551935519455195551965519755198551995520055201552025520355204552055520655207552085520955210552115521255213552145521555216552175521855219552205522155222552235522455225552265522755228552295523055231552325523355234552355523655237552385523955240552415524255243552445524555246552475524855249552505525155252552535525455255552565525755258552595526055261552625526355264552655526655267552685526955270552715527255273552745527555276552775527855279552805528155282552835528455285552865528755288552895529055291552925529355294552955529655297552985529955300553015530255303553045530555306553075530855309553105531155312553135531455315553165531755318553195532055321553225532355324553255532655327553285532955330553315533255333553345533555336553375533855339553405534155342553435534455345553465534755348553495535055351553525535355354553555535655357553585535955360553615536255363553645536555366553675536855369553705537155372553735537455375553765537755378553795538055381553825538355384553855538655387553885538955390553915539255393553945539555396553975539855399554005540155402554035540455405554065540755408554095541055411554125541355414554155541655417554185541955420554215542255423554245542555426554275542855429554305543155432554335543455435554365543755438554395544055441554425544355444554455544655447554485544955450554515545255453554545545555456554575545855459554605546155462554635546455465554665546755468554695547055471554725547355474554755547655477554785547955480554815548255483554845548555486554875548855489554905549155492554935549455495554965549755498554995550055501555025550355504555055550655507555085550955510555115551255513555145551555516555175551855519555205552155522555235552455525555265552755528555295553055531555325553355534555355553655537555385553955540555415554255543555445554555546555475554855549555505555155552555535555455555555565555755558555595556055561555625556355564555655556655567555685556955570555715557255573555745557555576555775557855579555805558155582555835558455585555865558755588555895559055591555925559355594555955559655597555985559955600556015560255603556045560555606556075560855609556105561155612556135561455615556165561755618556195562055621556225562355624556255562655627556285562955630556315563255633556345563555636556375563855639556405564155642556435564455645556465564755648556495565055651556525565355654556555565655657556585565955660556615566255663556645566555666556675566855669556705567155672556735567455675556765567755678556795568055681556825568355684556855568655687556885568955690556915569255693556945569555696556975569855699557005570155702557035570455705557065570755708557095571055711557125571355714557155571655717557185571955720557215572255723557245572555726557275572855729557305573155732557335573455735557365573755738557395574055741557425574355744557455574655747557485574955750557515575255753557545575555756557575575855759557605576155762557635576455765557665576755768557695577055771557725577355774557755577655777557785577955780557815578255783557845578555786557875578855789557905579155792557935579455795557965579755798557995580055801558025580355804558055580655807558085580955810558115581255813558145581555816558175581855819558205582155822558235582455825558265582755828558295583055831558325583355834558355583655837558385583955840558415584255843558445584555846558475584855849558505585155852558535585455855558565585755858558595586055861558625586355864558655586655867558685586955870558715587255873558745587555876558775587855879558805588155882558835588455885558865588755888558895589055891558925589355894558955589655897558985589955900559015590255903559045590555906559075590855909559105591155912559135591455915559165591755918559195592055921559225592355924559255592655927559285592955930559315593255933559345593555936559375593855939559405594155942559435594455945559465594755948559495595055951559525595355954559555595655957559585595955960559615596255963559645596555966559675596855969559705597155972559735597455975559765597755978559795598055981559825598355984559855598655987559885598955990559915599255993559945599555996559975599855999560005600156002560035600456005560065600756008560095601056011560125601356014560155601656017560185601956020560215602256023560245602556026560275602856029560305603156032560335603456035560365603756038560395604056041560425604356044560455604656047560485604956050560515605256053560545605556056560575605856059560605606156062560635606456065560665606756068560695607056071560725607356074560755607656077560785607956080560815608256083560845608556086560875608856089560905609156092560935609456095560965609756098560995610056101561025610356104561055610656107561085610956110561115611256113561145611556116561175611856119561205612156122561235612456125561265612756128561295613056131561325613356134561355613656137561385613956140561415614256143561445614556146561475614856149561505615156152561535615456155561565615756158561595616056161561625616356164561655616656167561685616956170561715617256173561745617556176561775617856179561805618156182561835618456185561865618756188561895619056191561925619356194561955619656197561985619956200562015620256203562045620556206562075620856209562105621156212562135621456215562165621756218562195622056221562225622356224562255622656227562285622956230562315623256233562345623556236562375623856239562405624156242562435624456245562465624756248562495625056251562525625356254562555625656257562585625956260562615626256263562645626556266562675626856269562705627156272562735627456275562765627756278562795628056281562825628356284562855628656287562885628956290562915629256293562945629556296562975629856299563005630156302563035630456305563065630756308563095631056311563125631356314563155631656317563185631956320563215632256323563245632556326563275632856329563305633156332563335633456335563365633756338563395634056341563425634356344563455634656347563485634956350563515635256353563545635556356563575635856359563605636156362563635636456365563665636756368563695637056371563725637356374563755637656377563785637956380563815638256383563845638556386563875638856389563905639156392563935639456395563965639756398563995640056401564025640356404564055640656407564085640956410564115641256413564145641556416564175641856419564205642156422564235642456425564265642756428564295643056431564325643356434564355643656437564385643956440564415644256443564445644556446564475644856449564505645156452564535645456455564565645756458564595646056461564625646356464564655646656467564685646956470564715647256473564745647556476564775647856479564805648156482564835648456485564865648756488564895649056491564925649356494564955649656497564985649956500565015650256503565045650556506565075650856509565105651156512565135651456515565165651756518565195652056521565225652356524565255652656527565285652956530565315653256533565345653556536565375653856539565405654156542565435654456545565465654756548565495655056551565525655356554565555655656557565585655956560565615656256563565645656556566565675656856569565705657156572565735657456575565765657756578565795658056581565825658356584565855658656587565885658956590565915659256593565945659556596565975659856599566005660156602566035660456605566065660756608566095661056611566125661356614566155661656617566185661956620566215662256623566245662556626566275662856629566305663156632566335663456635566365663756638566395664056641566425664356644566455664656647566485664956650566515665256653566545665556656566575665856659566605666156662566635666456665566665666756668566695667056671566725667356674566755667656677566785667956680566815668256683566845668556686566875668856689566905669156692566935669456695566965669756698566995670056701567025670356704567055670656707567085670956710567115671256713567145671556716567175671856719567205672156722567235672456725567265672756728567295673056731567325673356734567355673656737567385673956740567415674256743567445674556746567475674856749567505675156752567535675456755567565675756758567595676056761567625676356764567655676656767567685676956770567715677256773567745677556776567775677856779567805678156782567835678456785567865678756788567895679056791567925679356794567955679656797567985679956800568015680256803568045680556806568075680856809568105681156812568135681456815568165681756818568195682056821568225682356824568255682656827568285682956830568315683256833568345683556836568375683856839568405684156842568435684456845568465684756848568495685056851568525685356854568555685656857568585685956860568615686256863568645686556866568675686856869568705687156872568735687456875568765687756878568795688056881568825688356884568855688656887568885688956890568915689256893568945689556896568975689856899569005690156902569035690456905569065690756908569095691056911569125691356914569155691656917569185691956920569215692256923569245692556926569275692856929569305693156932569335693456935569365693756938569395694056941569425694356944569455694656947569485694956950569515695256953569545695556956569575695856959569605696156962569635696456965569665696756968569695697056971569725697356974569755697656977569785697956980569815698256983569845698556986569875698856989569905699156992569935699456995569965699756998569995700057001570025700357004570055700657007570085700957010570115701257013570145701557016570175701857019570205702157022570235702457025570265702757028570295703057031570325703357034570355703657037570385703957040570415704257043570445704557046570475704857049570505705157052570535705457055570565705757058570595706057061570625706357064570655706657067570685706957070570715707257073570745707557076570775707857079570805708157082570835708457085570865708757088570895709057091570925709357094570955709657097570985709957100571015710257103571045710557106571075710857109571105711157112571135711457115571165711757118571195712057121571225712357124571255712657127571285712957130571315713257133571345713557136571375713857139571405714157142571435714457145571465714757148571495715057151571525715357154571555715657157571585715957160571615716257163571645716557166571675716857169571705717157172571735717457175571765717757178571795718057181571825718357184571855718657187571885718957190571915719257193571945719557196571975719857199572005720157202572035720457205572065720757208572095721057211572125721357214572155721657217572185721957220572215722257223572245722557226572275722857229572305723157232572335723457235572365723757238572395724057241572425724357244572455724657247572485724957250572515725257253572545725557256572575725857259572605726157262572635726457265572665726757268572695727057271572725727357274572755727657277572785727957280572815728257283572845728557286572875728857289572905729157292572935729457295572965729757298572995730057301573025730357304573055730657307573085730957310573115731257313573145731557316573175731857319573205732157322573235732457325573265732757328573295733057331573325733357334573355733657337573385733957340573415734257343573445734557346573475734857349573505735157352573535735457355573565735757358573595736057361573625736357364573655736657367573685736957370573715737257373573745737557376573775737857379573805738157382573835738457385573865738757388573895739057391573925739357394573955739657397573985739957400574015740257403574045740557406574075740857409574105741157412574135741457415574165741757418574195742057421574225742357424574255742657427574285742957430574315743257433574345743557436574375743857439574405744157442574435744457445574465744757448574495745057451574525745357454574555745657457574585745957460574615746257463574645746557466574675746857469574705747157472574735747457475574765747757478574795748057481574825748357484574855748657487574885748957490574915749257493574945749557496574975749857499575005750157502575035750457505575065750757508575095751057511575125751357514575155751657517575185751957520575215752257523575245752557526575275752857529575305753157532575335753457535575365753757538575395754057541575425754357544575455754657547575485754957550575515755257553575545755557556575575755857559575605756157562575635756457565575665756757568575695757057571575725757357574575755757657577575785757957580575815758257583575845758557586575875758857589575905759157592575935759457595575965759757598575995760057601576025760357604576055760657607576085760957610576115761257613576145761557616576175761857619576205762157622576235762457625576265762757628576295763057631576325763357634576355763657637576385763957640576415764257643576445764557646576475764857649576505765157652576535765457655576565765757658576595766057661576625766357664576655766657667576685766957670576715767257673576745767557676576775767857679576805768157682576835768457685576865768757688576895769057691576925769357694576955769657697576985769957700577015770257703577045770557706577075770857709577105771157712577135771457715577165771757718577195772057721577225772357724577255772657727577285772957730577315773257733577345773557736577375773857739577405774157742577435774457745577465774757748577495775057751577525775357754577555775657757577585775957760577615776257763577645776557766577675776857769577705777157772577735777457775577765777757778577795778057781577825778357784577855778657787577885778957790577915779257793577945779557796577975779857799578005780157802578035780457805578065780757808578095781057811578125781357814578155781657817578185781957820578215782257823578245782557826578275782857829578305783157832578335783457835578365783757838578395784057841578425784357844578455784657847578485784957850578515785257853578545785557856578575785857859578605786157862578635786457865578665786757868578695787057871578725787357874578755787657877578785787957880578815788257883578845788557886578875788857889578905789157892578935789457895578965789757898578995790057901579025790357904579055790657907579085790957910579115791257913579145791557916579175791857919579205792157922579235792457925579265792757928579295793057931579325793357934579355793657937579385793957940579415794257943579445794557946579475794857949579505795157952579535795457955579565795757958579595796057961579625796357964579655796657967579685796957970579715797257973579745797557976579775797857979579805798157982579835798457985579865798757988579895799057991579925799357994579955799657997579985799958000580015800258003580045800558006580075800858009580105801158012580135801458015580165801758018580195802058021580225802358024580255802658027580285802958030580315803258033580345803558036580375803858039580405804158042580435804458045580465804758048580495805058051580525805358054580555805658057580585805958060580615806258063580645806558066580675806858069580705807158072580735807458075580765807758078580795808058081580825808358084580855808658087580885808958090580915809258093580945809558096580975809858099581005810158102581035810458105581065810758108581095811058111581125811358114581155811658117581185811958120581215812258123581245812558126581275812858129581305813158132581335813458135581365813758138581395814058141581425814358144581455814658147581485814958150581515815258153581545815558156581575815858159581605816158162581635816458165581665816758168581695817058171581725817358174581755817658177581785817958180581815818258183581845818558186581875818858189581905819158192581935819458195581965819758198581995820058201582025820358204582055820658207582085820958210582115821258213582145821558216582175821858219582205822158222582235822458225582265822758228582295823058231582325823358234582355823658237582385823958240582415824258243582445824558246582475824858249582505825158252582535825458255582565825758258582595826058261582625826358264582655826658267582685826958270582715827258273582745827558276582775827858279582805828158282582835828458285582865828758288582895829058291582925829358294582955829658297582985829958300583015830258303583045830558306583075830858309583105831158312583135831458315583165831758318583195832058321583225832358324583255832658327583285832958330583315833258333583345833558336583375833858339583405834158342583435834458345583465834758348583495835058351583525835358354583555835658357583585835958360583615836258363583645836558366583675836858369583705837158372583735837458375583765837758378583795838058381583825838358384583855838658387583885838958390583915839258393583945839558396583975839858399584005840158402584035840458405584065840758408584095841058411584125841358414584155841658417584185841958420584215842258423584245842558426584275842858429584305843158432584335843458435584365843758438584395844058441584425844358444584455844658447584485844958450584515845258453584545845558456584575845858459584605846158462584635846458465584665846758468584695847058471584725847358474584755847658477584785847958480584815848258483584845848558486584875848858489584905849158492584935849458495584965849758498584995850058501585025850358504585055850658507585085850958510585115851258513585145851558516585175851858519585205852158522585235852458525585265852758528585295853058531585325853358534585355853658537585385853958540585415854258543585445854558546585475854858549585505855158552585535855458555585565855758558585595856058561585625856358564585655856658567585685856958570585715857258573585745857558576585775857858579585805858158582585835858458585585865858758588585895859058591585925859358594585955859658597585985859958600586015860258603586045860558606586075860858609586105861158612586135861458615586165861758618586195862058621586225862358624586255862658627586285862958630586315863258633586345863558636586375863858639586405864158642586435864458645586465864758648586495865058651586525865358654586555865658657586585865958660586615866258663586645866558666586675866858669586705867158672586735867458675586765867758678586795868058681586825868358684586855868658687586885868958690586915869258693586945869558696586975869858699587005870158702587035870458705587065870758708587095871058711587125871358714587155871658717587185871958720587215872258723587245872558726587275872858729587305873158732587335873458735587365873758738587395874058741587425874358744587455874658747587485874958750587515875258753587545875558756587575875858759587605876158762587635876458765587665876758768587695877058771587725877358774587755877658777587785877958780587815878258783587845878558786587875878858789587905879158792587935879458795587965879758798587995880058801588025880358804588055880658807588085880958810588115881258813588145881558816588175881858819588205882158822588235882458825588265882758828588295883058831588325883358834588355883658837588385883958840588415884258843588445884558846588475884858849588505885158852588535885458855588565885758858588595886058861588625886358864588655886658867588685886958870588715887258873588745887558876588775887858879588805888158882588835888458885588865888758888588895889058891588925889358894588955889658897588985889958900589015890258903589045890558906589075890858909589105891158912589135891458915589165891758918589195892058921589225892358924589255892658927589285892958930589315893258933589345893558936589375893858939589405894158942589435894458945589465894758948589495895058951589525895358954589555895658957589585895958960589615896258963589645896558966589675896858969589705897158972589735897458975589765897758978589795898058981589825898358984589855898658987589885898958990589915899258993589945899558996589975899858999590005900159002590035900459005590065900759008590095901059011590125901359014590155901659017590185901959020590215902259023590245902559026590275902859029590305903159032590335903459035590365903759038590395904059041590425904359044590455904659047590485904959050590515905259053590545905559056590575905859059590605906159062590635906459065590665906759068590695907059071590725907359074590755907659077590785907959080590815908259083590845908559086590875908859089590905909159092590935909459095590965909759098590995910059101591025910359104591055910659107591085910959110591115911259113591145911559116591175911859119591205912159122591235912459125591265912759128591295913059131591325913359134591355913659137591385913959140591415914259143591445914559146591475914859149591505915159152591535915459155591565915759158591595916059161591625916359164591655916659167591685916959170591715917259173591745917559176591775917859179591805918159182591835918459185591865918759188591895919059191591925919359194591955919659197591985919959200592015920259203592045920559206592075920859209592105921159212592135921459215592165921759218592195922059221592225922359224592255922659227592285922959230592315923259233592345923559236592375923859239592405924159242592435924459245592465924759248592495925059251592525925359254592555925659257592585925959260592615926259263592645926559266592675926859269592705927159272592735927459275592765927759278592795928059281592825928359284592855928659287592885928959290592915929259293592945929559296592975929859299593005930159302593035930459305593065930759308593095931059311593125931359314593155931659317593185931959320593215932259323593245932559326593275932859329593305933159332593335933459335593365933759338593395934059341593425934359344593455934659347593485934959350593515935259353593545935559356593575935859359593605936159362593635936459365593665936759368593695937059371593725937359374593755937659377593785937959380593815938259383593845938559386593875938859389593905939159392593935939459395593965939759398593995940059401594025940359404594055940659407594085940959410594115941259413594145941559416594175941859419594205942159422594235942459425594265942759428594295943059431594325943359434594355943659437594385943959440594415944259443594445944559446594475944859449594505945159452594535945459455594565945759458594595946059461594625946359464594655946659467594685946959470594715947259473594745947559476594775947859479594805948159482594835948459485594865948759488594895949059491594925949359494594955949659497594985949959500595015950259503595045950559506595075950859509595105951159512595135951459515595165951759518595195952059521595225952359524595255952659527595285952959530595315953259533595345953559536595375953859539595405954159542595435954459545595465954759548595495955059551595525955359554595555955659557595585955959560595615956259563595645956559566595675956859569595705957159572595735957459575595765957759578595795958059581595825958359584595855958659587595885958959590595915959259593595945959559596595975959859599596005960159602596035960459605596065960759608596095961059611596125961359614596155961659617596185961959620596215962259623596245962559626596275962859629596305963159632596335963459635596365963759638596395964059641596425964359644596455964659647596485964959650596515965259653596545965559656596575965859659596605966159662596635966459665596665966759668596695967059671596725967359674596755967659677596785967959680596815968259683596845968559686596875968859689596905969159692596935969459695596965969759698596995970059701597025970359704597055970659707597085970959710597115971259713597145971559716597175971859719597205972159722597235972459725597265972759728597295973059731597325973359734597355973659737597385973959740597415974259743597445974559746597475974859749597505975159752597535975459755597565975759758597595976059761597625976359764597655976659767597685976959770597715977259773597745977559776597775977859779597805978159782597835978459785597865978759788597895979059791597925979359794597955979659797597985979959800598015980259803598045980559806598075980859809598105981159812598135981459815598165981759818598195982059821598225982359824598255982659827598285982959830598315983259833598345983559836598375983859839598405984159842598435984459845598465984759848598495985059851598525985359854598555985659857598585985959860598615986259863598645986559866598675986859869598705987159872598735987459875598765987759878598795988059881598825988359884598855988659887598885988959890598915989259893598945989559896598975989859899599005990159902599035990459905599065990759908599095991059911599125991359914599155991659917599185991959920599215992259923599245992559926599275992859929599305993159932599335993459935599365993759938599395994059941599425994359944599455994659947599485994959950599515995259953599545995559956599575995859959599605996159962599635996459965599665996759968599695997059971599725997359974599755997659977599785997959980599815998259983599845998559986599875998859989599905999159992599935999459995599965999759998599996000060001600026000360004600056000660007600086000960010600116001260013600146001560016600176001860019600206002160022600236002460025600266002760028600296003060031600326003360034600356003660037600386003960040600416004260043600446004560046600476004860049600506005160052600536005460055600566005760058600596006060061600626006360064600656006660067600686006960070600716007260073600746007560076600776007860079600806008160082600836008460085600866008760088600896009060091600926009360094600956009660097600986009960100601016010260103601046010560106601076010860109601106011160112601136011460115601166011760118601196012060121601226012360124601256012660127601286012960130601316013260133601346013560136601376013860139601406014160142601436014460145601466014760148601496015060151601526015360154601556015660157601586015960160601616016260163601646016560166601676016860169601706017160172601736017460175601766017760178601796018060181601826018360184601856018660187601886018960190601916019260193601946019560196601976019860199602006020160202602036020460205602066020760208602096021060211602126021360214602156021660217602186021960220602216022260223602246022560226602276022860229602306023160232602336023460235602366023760238602396024060241602426024360244602456024660247602486024960250602516025260253602546025560256602576025860259602606026160262602636026460265602666026760268602696027060271602726027360274602756027660277602786027960280602816028260283602846028560286602876028860289602906029160292602936029460295602966029760298602996030060301603026030360304603056030660307603086030960310603116031260313603146031560316603176031860319603206032160322603236032460325603266032760328603296033060331603326033360334603356033660337603386033960340603416034260343603446034560346603476034860349603506035160352603536035460355603566035760358603596036060361603626036360364603656036660367603686036960370603716037260373603746037560376603776037860379603806038160382603836038460385603866038760388603896039060391603926039360394603956039660397603986039960400604016040260403604046040560406604076040860409604106041160412604136041460415604166041760418604196042060421604226042360424604256042660427604286042960430604316043260433604346043560436604376043860439604406044160442604436044460445604466044760448604496045060451604526045360454604556045660457604586045960460604616046260463604646046560466604676046860469604706047160472604736047460475604766047760478604796048060481604826048360484604856048660487604886048960490604916049260493604946049560496604976049860499605006050160502605036050460505605066050760508605096051060511605126051360514605156051660517605186051960520605216052260523605246052560526605276052860529605306053160532605336053460535605366053760538605396054060541605426054360544605456054660547605486054960550605516055260553605546055560556605576055860559605606056160562605636056460565605666056760568605696057060571605726057360574605756057660577605786057960580605816058260583605846058560586605876058860589605906059160592605936059460595605966059760598605996060060601606026060360604606056060660607606086060960610606116061260613606146061560616606176061860619606206062160622606236062460625606266062760628606296063060631606326063360634606356063660637606386063960640606416064260643606446064560646606476064860649606506065160652606536065460655606566065760658606596066060661606626066360664606656066660667606686066960670606716067260673606746067560676606776067860679606806068160682606836068460685606866068760688606896069060691606926069360694606956069660697606986069960700607016070260703607046070560706607076070860709607106071160712607136071460715607166071760718607196072060721607226072360724607256072660727607286072960730607316073260733607346073560736607376073860739607406074160742607436074460745607466074760748607496075060751607526075360754607556075660757607586075960760607616076260763607646076560766607676076860769607706077160772607736077460775607766077760778607796078060781607826078360784607856078660787607886078960790607916079260793607946079560796607976079860799608006080160802608036080460805608066080760808608096081060811608126081360814608156081660817608186081960820608216082260823608246082560826608276082860829608306083160832608336083460835608366083760838608396084060841608426084360844608456084660847608486084960850608516085260853608546085560856608576085860859608606086160862608636086460865608666086760868608696087060871608726087360874608756087660877608786087960880608816088260883608846088560886608876088860889608906089160892608936089460895608966089760898608996090060901609026090360904609056090660907609086090960910609116091260913609146091560916609176091860919609206092160922609236092460925609266092760928609296093060931609326093360934609356093660937609386093960940609416094260943609446094560946609476094860949609506095160952609536095460955609566095760958609596096060961609626096360964609656096660967609686096960970609716097260973609746097560976609776097860979609806098160982609836098460985609866098760988609896099060991609926099360994609956099660997609986099961000610016100261003610046100561006610076100861009610106101161012610136101461015610166101761018610196102061021610226102361024610256102661027610286102961030610316103261033610346103561036610376103861039610406104161042610436104461045610466104761048610496105061051610526105361054610556105661057610586105961060610616106261063610646106561066610676106861069610706107161072610736107461075610766107761078610796108061081610826108361084610856108661087610886108961090610916109261093610946109561096610976109861099611006110161102611036110461105611066110761108611096111061111611126111361114611156111661117611186111961120611216112261123611246112561126611276112861129611306113161132611336113461135611366113761138611396114061141611426114361144611456114661147611486114961150611516115261153611546115561156611576115861159611606116161162611636116461165611666116761168611696117061171611726117361174611756117661177611786117961180611816118261183611846118561186611876118861189611906119161192611936119461195611966119761198611996120061201612026120361204612056120661207612086120961210612116121261213612146121561216612176121861219612206122161222612236122461225612266122761228612296123061231612326123361234612356123661237612386123961240612416124261243612446124561246612476124861249612506125161252612536125461255612566125761258612596126061261612626126361264612656126661267612686126961270612716127261273612746127561276612776127861279612806128161282612836128461285612866128761288612896129061291612926129361294612956129661297612986129961300613016130261303613046130561306613076130861309613106131161312613136131461315613166131761318613196132061321613226132361324613256132661327613286132961330613316133261333613346133561336613376133861339613406134161342613436134461345613466134761348613496135061351613526135361354613556135661357613586135961360613616136261363613646136561366613676136861369613706137161372613736137461375613766137761378613796138061381613826138361384613856138661387613886138961390613916139261393613946139561396613976139861399614006140161402614036140461405614066140761408614096141061411614126141361414614156141661417614186141961420614216142261423614246142561426614276142861429614306143161432614336143461435614366143761438614396144061441614426144361444614456144661447614486144961450614516145261453614546145561456614576145861459614606146161462614636146461465614666146761468614696147061471614726147361474614756147661477614786147961480614816148261483614846148561486614876148861489614906149161492614936149461495614966149761498614996150061501615026150361504615056150661507615086150961510615116151261513615146151561516615176151861519615206152161522615236152461525615266152761528615296153061531615326153361534615356153661537615386153961540615416154261543615446154561546615476154861549615506155161552615536155461555615566155761558615596156061561615626156361564615656156661567615686156961570615716157261573615746157561576615776157861579615806158161582615836158461585615866158761588615896159061591615926159361594615956159661597615986159961600616016160261603616046160561606616076160861609616106161161612616136161461615616166161761618616196162061621616226162361624616256162661627616286162961630616316163261633616346163561636616376163861639616406164161642616436164461645616466164761648616496165061651616526165361654616556165661657616586165961660616616166261663616646166561666616676166861669616706167161672616736167461675616766167761678616796168061681616826168361684616856168661687616886168961690616916169261693616946169561696616976169861699617006170161702617036170461705617066170761708617096171061711617126171361714617156171661717617186171961720617216172261723617246172561726617276172861729617306173161732617336173461735617366173761738617396174061741617426174361744617456174661747617486174961750617516175261753617546175561756617576175861759617606176161762617636176461765617666176761768617696177061771617726177361774617756177661777617786177961780617816178261783617846178561786617876178861789617906179161792617936179461795617966179761798617996180061801618026180361804618056180661807618086180961810618116181261813618146181561816618176181861819618206182161822618236182461825618266182761828618296183061831618326183361834618356183661837618386183961840618416184261843618446184561846618476184861849618506185161852618536185461855618566185761858618596186061861618626186361864618656186661867618686186961870618716187261873618746187561876618776187861879618806188161882618836188461885618866188761888618896189061891618926189361894618956189661897618986189961900619016190261903619046190561906619076190861909619106191161912619136191461915619166191761918619196192061921619226192361924619256192661927619286192961930619316193261933619346193561936619376193861939619406194161942619436194461945619466194761948619496195061951619526195361954619556195661957619586195961960619616196261963619646196561966619676196861969619706197161972619736197461975619766197761978619796198061981619826198361984619856198661987619886198961990619916199261993619946199561996619976199861999620006200162002620036200462005620066200762008620096201062011620126201362014620156201662017620186201962020620216202262023620246202562026620276202862029620306203162032620336203462035620366203762038620396204062041620426204362044620456204662047620486204962050620516205262053620546205562056620576205862059620606206162062620636206462065620666206762068620696207062071620726207362074620756207662077620786207962080620816208262083620846208562086620876208862089620906209162092620936209462095620966209762098620996210062101621026210362104621056210662107621086210962110621116211262113621146211562116621176211862119621206212162122621236212462125621266212762128621296213062131621326213362134621356213662137621386213962140621416214262143621446214562146621476214862149621506215162152621536215462155621566215762158621596216062161621626216362164621656216662167621686216962170621716217262173621746217562176621776217862179621806218162182621836218462185621866218762188621896219062191621926219362194621956219662197621986219962200622016220262203622046220562206622076220862209622106221162212622136221462215622166221762218622196222062221622226222362224622256222662227622286222962230622316223262233622346223562236622376223862239622406224162242622436224462245622466224762248622496225062251622526225362254622556225662257622586225962260622616226262263622646226562266622676226862269622706227162272622736227462275622766227762278622796228062281622826228362284622856228662287622886228962290622916229262293622946229562296622976229862299623006230162302623036230462305623066230762308623096231062311623126231362314623156231662317623186231962320623216232262323623246232562326623276232862329623306233162332623336233462335623366233762338623396234062341623426234362344623456234662347623486234962350623516235262353623546235562356623576235862359623606236162362623636236462365623666236762368623696237062371623726237362374623756237662377623786237962380623816238262383623846238562386623876238862389623906239162392623936239462395623966239762398623996240062401624026240362404624056240662407624086240962410624116241262413624146241562416624176241862419624206242162422624236242462425624266242762428624296243062431624326243362434624356243662437624386243962440624416244262443624446244562446624476244862449624506245162452624536245462455624566245762458624596246062461624626246362464624656246662467624686246962470624716247262473624746247562476624776247862479624806248162482624836248462485624866248762488624896249062491624926249362494624956249662497624986249962500625016250262503625046250562506625076250862509625106251162512625136251462515625166251762518625196252062521625226252362524625256252662527625286252962530625316253262533625346253562536625376253862539625406254162542625436254462545625466254762548625496255062551625526255362554625556255662557625586255962560625616256262563625646256562566625676256862569625706257162572625736257462575625766257762578625796258062581625826258362584625856258662587625886258962590625916259262593625946259562596625976259862599626006260162602626036260462605626066260762608626096261062611626126261362614626156261662617626186261962620626216262262623626246262562626626276262862629626306263162632626336263462635626366263762638626396264062641626426264362644626456264662647626486264962650626516265262653626546265562656626576265862659626606266162662626636266462665626666266762668626696267062671626726267362674626756267662677626786267962680626816268262683626846268562686626876268862689626906269162692626936269462695626966269762698626996270062701627026270362704627056270662707627086270962710627116271262713627146271562716627176271862719627206272162722627236272462725627266272762728627296273062731627326273362734627356273662737627386273962740627416274262743627446274562746627476274862749627506275162752627536275462755627566275762758627596276062761627626276362764627656276662767627686276962770627716277262773627746277562776627776277862779627806278162782627836278462785627866278762788627896279062791627926279362794627956279662797627986279962800628016280262803628046280562806628076280862809628106281162812628136281462815628166281762818628196282062821628226282362824628256282662827628286282962830628316283262833628346283562836628376283862839628406284162842628436284462845628466284762848628496285062851628526285362854628556285662857628586285962860628616286262863628646286562866628676286862869628706287162872628736287462875628766287762878628796288062881628826288362884628856288662887628886288962890628916289262893628946289562896628976289862899629006290162902629036290462905629066290762908629096291062911629126291362914629156291662917629186291962920629216292262923629246292562926629276292862929629306293162932629336293462935629366293762938629396294062941629426294362944629456294662947629486294962950629516295262953629546295562956629576295862959629606296162962629636296462965629666296762968629696297062971629726297362974629756297662977629786297962980629816298262983629846298562986629876298862989629906299162992629936299462995629966299762998629996300063001630026300363004630056300663007630086300963010630116301263013630146301563016630176301863019630206302163022630236302463025630266302763028630296303063031630326303363034630356303663037630386303963040630416304263043630446304563046630476304863049630506305163052630536305463055630566305763058630596306063061630626306363064630656306663067630686306963070630716307263073630746307563076630776307863079630806308163082630836308463085630866308763088630896309063091630926309363094630956309663097630986309963100631016310263103631046310563106631076310863109631106311163112631136311463115631166311763118631196312063121631226312363124631256312663127631286312963130631316313263133631346313563136631376313863139631406314163142631436314463145631466314763148631496315063151631526315363154631556315663157631586315963160631616316263163631646316563166631676316863169631706317163172631736317463175631766317763178631796318063181631826318363184631856318663187631886318963190631916319263193631946319563196631976319863199632006320163202632036320463205632066320763208632096321063211632126321363214632156321663217632186321963220632216322263223632246322563226632276322863229632306323163232632336323463235632366323763238632396324063241632426324363244632456324663247632486324963250632516325263253632546325563256632576325863259632606326163262632636326463265632666326763268632696327063271632726327363274632756327663277632786327963280632816328263283632846328563286632876328863289632906329163292632936329463295632966329763298632996330063301633026330363304633056330663307633086330963310633116331263313633146331563316633176331863319633206332163322633236332463325633266332763328633296333063331633326333363334633356333663337633386333963340633416334263343633446334563346633476334863349633506335163352633536335463355633566335763358633596336063361633626336363364633656336663367633686336963370633716337263373633746337563376633776337863379633806338163382633836338463385633866338763388633896339063391633926339363394633956339663397633986339963400634016340263403634046340563406634076340863409634106341163412634136341463415634166341763418634196342063421634226342363424634256342663427634286342963430634316343263433634346343563436634376343863439634406344163442634436344463445634466344763448634496345063451634526345363454634556345663457634586345963460634616346263463634646346563466634676346863469634706347163472634736347463475634766347763478634796348063481634826348363484634856348663487634886348963490634916349263493634946349563496634976349863499635006350163502635036350463505635066350763508635096351063511635126351363514635156351663517635186351963520635216352263523635246352563526635276352863529635306353163532635336353463535635366353763538635396354063541635426354363544635456354663547635486354963550635516355263553635546355563556635576355863559635606356163562635636356463565635666356763568635696357063571635726357363574635756357663577635786357963580635816358263583635846358563586635876358863589635906359163592635936359463595635966359763598635996360063601636026360363604636056360663607636086360963610636116361263613636146361563616636176361863619636206362163622636236362463625636266362763628636296363063631636326363363634636356363663637636386363963640636416364263643636446364563646636476364863649636506365163652636536365463655636566365763658636596366063661636626366363664636656366663667636686366963670636716367263673636746367563676636776367863679636806368163682636836368463685636866368763688636896369063691636926369363694636956369663697636986369963700637016370263703637046370563706637076370863709637106371163712637136371463715637166371763718637196372063721637226372363724637256372663727637286372963730637316373263733637346373563736637376373863739637406374163742637436374463745637466374763748637496375063751637526375363754637556375663757637586375963760637616376263763637646376563766637676376863769637706377163772637736377463775637766377763778637796378063781637826378363784637856378663787637886378963790637916379263793637946379563796637976379863799638006380163802638036380463805638066380763808638096381063811638126381363814638156381663817638186381963820638216382263823638246382563826638276382863829638306383163832638336383463835638366383763838638396384063841638426384363844638456384663847638486384963850638516385263853638546385563856638576385863859638606386163862638636386463865638666386763868638696387063871638726387363874638756387663877638786387963880638816388263883638846388563886638876388863889638906389163892638936389463895638966389763898638996390063901639026390363904639056390663907639086390963910639116391263913639146391563916639176391863919639206392163922639236392463925639266392763928639296393063931639326393363934639356393663937639386393963940639416394263943639446394563946639476394863949639506395163952639536395463955639566395763958639596396063961639626396363964639656396663967639686396963970639716397263973639746397563976639776397863979639806398163982639836398463985639866398763988639896399063991639926399363994639956399663997639986399964000640016400264003640046400564006640076400864009640106401164012640136401464015640166401764018640196402064021640226402364024640256402664027640286402964030640316403264033640346403564036640376403864039640406404164042640436404464045640466404764048640496405064051640526405364054640556405664057640586405964060640616406264063640646406564066640676406864069640706407164072640736407464075640766407764078640796408064081640826408364084640856408664087640886408964090640916409264093640946409564096640976409864099641006410164102641036410464105641066410764108641096411064111641126411364114641156411664117641186411964120641216412264123641246412564126641276412864129641306413164132641336413464135641366413764138641396414064141641426414364144641456414664147641486414964150641516415264153641546415564156641576415864159641606416164162641636416464165641666416764168641696417064171641726417364174641756417664177641786417964180641816418264183641846418564186641876418864189641906419164192641936419464195641966419764198641996420064201642026420364204642056420664207642086420964210642116421264213642146421564216642176421864219642206422164222642236422464225642266422764228642296423064231642326423364234642356423664237642386423964240642416424264243642446424564246642476424864249642506425164252642536425464255642566425764258642596426064261642626426364264642656426664267642686426964270642716427264273642746427564276642776427864279642806428164282642836428464285642866428764288642896429064291642926429364294642956429664297642986429964300643016430264303643046430564306643076430864309643106431164312643136431464315643166431764318643196432064321643226432364324643256432664327643286432964330643316433264333643346433564336643376433864339643406434164342643436434464345643466434764348643496435064351643526435364354643556435664357643586435964360643616436264363643646436564366643676436864369643706437164372643736437464375643766437764378643796438064381643826438364384643856438664387643886438964390643916439264393643946439564396643976439864399644006440164402644036440464405644066440764408644096441064411644126441364414644156441664417644186441964420644216442264423644246442564426644276442864429644306443164432644336443464435644366443764438644396444064441644426444364444644456444664447644486444964450644516445264453644546445564456644576445864459644606446164462644636446464465644666446764468644696447064471644726447364474644756447664477644786447964480644816448264483644846448564486644876448864489644906449164492644936449464495644966449764498644996450064501645026450364504645056450664507645086450964510645116451264513645146451564516645176451864519645206452164522645236452464525645266452764528645296453064531645326453364534645356453664537645386453964540645416454264543645446454564546645476454864549645506455164552645536455464555645566455764558645596456064561645626456364564645656456664567645686456964570645716457264573645746457564576645776457864579645806458164582645836458464585645866458764588645896459064591645926459364594645956459664597645986459964600646016460264603646046460564606646076460864609646106461164612646136461464615646166461764618646196462064621646226462364624646256462664627646286462964630646316463264633646346463564636646376463864639646406464164642646436464464645646466464764648646496465064651646526465364654646556465664657646586465964660646616466264663646646466564666646676466864669646706467164672646736467464675646766467764678646796468064681646826468364684646856468664687646886468964690646916469264693646946469564696646976469864699647006470164702647036470464705647066470764708647096471064711647126471364714647156471664717647186471964720647216472264723647246472564726647276472864729647306473164732647336473464735647366473764738647396474064741647426474364744647456474664747647486474964750647516475264753647546475564756647576475864759647606476164762647636476464765647666476764768647696477064771647726477364774647756477664777647786477964780647816478264783647846478564786647876478864789647906479164792647936479464795647966479764798647996480064801648026480364804648056480664807648086480964810648116481264813648146481564816648176481864819648206482164822648236482464825648266482764828648296483064831648326483364834648356483664837648386483964840648416484264843648446484564846648476484864849648506485164852648536485464855648566485764858648596486064861648626486364864648656486664867648686486964870648716487264873648746487564876648776487864879648806488164882648836488464885648866488764888648896489064891648926489364894648956489664897648986489964900649016490264903649046490564906649076490864909649106491164912649136491464915649166491764918649196492064921649226492364924649256492664927649286492964930649316493264933649346493564936649376493864939649406494164942649436494464945649466494764948649496495064951649526495364954649556495664957649586495964960649616496264963649646496564966649676496864969649706497164972649736497464975649766497764978649796498064981649826498364984649856498664987649886498964990649916499264993649946499564996649976499864999650006500165002650036500465005650066500765008650096501065011650126501365014650156501665017650186501965020650216502265023650246502565026650276502865029650306503165032650336503465035650366503765038650396504065041650426504365044650456504665047650486504965050650516505265053650546505565056650576505865059650606506165062650636506465065650666506765068650696507065071650726507365074650756507665077650786507965080650816508265083650846508565086650876508865089650906509165092650936509465095650966509765098650996510065101651026510365104651056510665107651086510965110651116511265113651146511565116651176511865119651206512165122651236512465125651266512765128651296513065131651326513365134651356513665137651386513965140651416514265143651446514565146651476514865149651506515165152651536515465155651566515765158651596516065161651626516365164651656516665167651686516965170651716517265173651746517565176651776517865179651806518165182651836518465185651866518765188651896519065191651926519365194651956519665197651986519965200652016520265203652046520565206652076520865209652106521165212652136521465215652166521765218652196522065221652226522365224652256522665227652286522965230652316523265233652346523565236652376523865239652406524165242652436524465245652466524765248652496525065251652526525365254652556525665257652586525965260652616526265263652646526565266652676526865269652706527165272652736527465275652766527765278652796528065281652826528365284652856528665287652886528965290652916529265293652946529565296652976529865299653006530165302653036530465305653066530765308653096531065311653126531365314653156531665317653186531965320653216532265323653246532565326653276532865329653306533165332653336533465335653366533765338653396534065341653426534365344653456534665347653486534965350653516535265353653546535565356653576535865359653606536165362653636536465365653666536765368653696537065371653726537365374653756537665377653786537965380653816538265383653846538565386653876538865389653906539165392653936539465395653966539765398653996540065401654026540365404654056540665407654086540965410654116541265413654146541565416654176541865419654206542165422654236542465425654266542765428654296543065431654326543365434654356543665437654386543965440654416544265443654446544565446654476544865449654506545165452654536545465455654566545765458654596546065461654626546365464654656546665467654686546965470654716547265473654746547565476654776547865479654806548165482654836548465485654866548765488654896549065491654926549365494654956549665497654986549965500655016550265503655046550565506655076550865509655106551165512655136551465515655166551765518655196552065521655226552365524655256552665527655286552965530655316553265533655346553565536655376553865539655406554165542655436554465545655466554765548655496555065551655526555365554655556555665557655586555965560655616556265563655646556565566655676556865569655706557165572655736557465575655766557765578655796558065581655826558365584655856558665587655886558965590655916559265593655946559565596655976559865599656006560165602656036560465605656066560765608656096561065611656126561365614656156561665617656186561965620656216562265623656246562565626656276562865629656306563165632656336563465635656366563765638656396564065641656426564365644656456564665647656486564965650656516565265653656546565565656656576565865659656606566165662656636566465665656666566765668656696567065671656726567365674656756567665677656786567965680656816568265683656846568565686656876568865689656906569165692656936569465695656966569765698656996570065701657026570365704657056570665707657086570965710657116571265713657146571565716657176571865719657206572165722657236572465725657266572765728657296573065731657326573365734657356573665737657386573965740657416574265743657446574565746657476574865749657506575165752657536575465755657566575765758657596576065761657626576365764657656576665767657686576965770657716577265773657746577565776657776577865779657806578165782657836578465785657866578765788657896579065791657926579365794657956579665797657986579965800658016580265803658046580565806658076580865809658106581165812658136581465815658166581765818658196582065821658226582365824658256582665827658286582965830658316583265833658346583565836658376583865839658406584165842658436584465845658466584765848658496585065851658526585365854658556585665857658586585965860658616586265863658646586565866658676586865869658706587165872658736587465875658766587765878658796588065881658826588365884658856588665887658886588965890658916589265893658946589565896658976589865899659006590165902659036590465905659066590765908659096591065911659126591365914659156591665917659186591965920659216592265923659246592565926659276592865929659306593165932659336593465935659366593765938659396594065941659426594365944659456594665947659486594965950659516595265953659546595565956659576595865959659606596165962659636596465965659666596765968659696597065971659726597365974659756597665977659786597965980659816598265983659846598565986659876598865989659906599165992659936599465995659966599765998659996600066001660026600366004660056600666007660086600966010660116601266013660146601566016660176601866019660206602166022660236602466025660266602766028660296603066031660326603366034660356603666037660386603966040660416604266043660446604566046660476604866049660506605166052660536605466055660566605766058660596606066061660626606366064660656606666067660686606966070660716607266073660746607566076660776607866079660806608166082660836608466085660866608766088660896609066091660926609366094660956609666097660986609966100661016610266103661046610566106661076610866109661106611166112661136611466115661166611766118661196612066121661226612366124661256612666127661286612966130661316613266133661346613566136661376613866139661406614166142661436614466145661466614766148661496615066151661526615366154661556615666157661586615966160661616616266163661646616566166661676616866169661706617166172661736617466175661766617766178661796618066181661826618366184661856618666187661886618966190661916619266193661946619566196661976619866199662006620166202662036620466205662066620766208662096621066211662126621366214662156621666217662186621966220662216622266223662246622566226662276622866229662306623166232662336623466235662366623766238662396624066241662426624366244662456624666247662486624966250662516625266253662546625566256662576625866259662606626166262662636626466265662666626766268662696627066271662726627366274662756627666277662786627966280662816628266283662846628566286662876628866289662906629166292662936629466295662966629766298662996630066301663026630366304663056630666307663086630966310663116631266313663146631566316663176631866319663206632166322663236632466325663266632766328663296633066331663326633366334663356633666337663386633966340663416634266343663446634566346663476634866349663506635166352663536635466355663566635766358663596636066361663626636366364663656636666367663686636966370663716637266373663746637566376663776637866379663806638166382663836638466385663866638766388663896639066391663926639366394663956639666397663986639966400664016640266403664046640566406664076640866409664106641166412664136641466415664166641766418664196642066421664226642366424664256642666427664286642966430664316643266433664346643566436664376643866439664406644166442664436644466445664466644766448664496645066451664526645366454664556645666457664586645966460664616646266463664646646566466664676646866469664706647166472664736647466475664766647766478664796648066481664826648366484664856648666487664886648966490664916649266493664946649566496664976649866499665006650166502665036650466505665066650766508665096651066511665126651366514665156651666517665186651966520665216652266523665246652566526665276652866529665306653166532665336653466535665366653766538665396654066541665426654366544665456654666547665486654966550665516655266553665546655566556665576655866559665606656166562665636656466565665666656766568665696657066571665726657366574665756657666577665786657966580665816658266583665846658566586665876658866589665906659166592665936659466595665966659766598665996660066601666026660366604666056660666607666086660966610666116661266613666146661566616666176661866619666206662166622666236662466625666266662766628666296663066631666326663366634666356663666637666386663966640666416664266643666446664566646666476664866649666506665166652666536665466655666566665766658666596666066661666626666366664666656666666667666686666966670666716667266673666746667566676666776667866679666806668166682666836668466685666866668766688666896669066691666926669366694666956669666697666986669966700667016670266703667046670566706667076670866709667106671166712667136671466715667166671766718667196672066721667226672366724667256672666727667286672966730667316673266733667346673566736667376673866739667406674166742667436674466745667466674766748667496675066751667526675366754667556675666757667586675966760667616676266763667646676566766667676676866769667706677166772667736677466775667766677766778667796678066781667826678366784667856678666787667886678966790667916679266793667946679566796667976679866799668006680166802668036680466805668066680766808668096681066811668126681366814668156681666817668186681966820668216682266823668246682566826668276682866829668306683166832668336683466835668366683766838668396684066841668426684366844668456684666847668486684966850668516685266853668546685566856668576685866859668606686166862668636686466865668666686766868668696687066871668726687366874668756687666877668786687966880668816688266883668846688566886668876688866889668906689166892668936689466895668966689766898668996690066901669026690366904669056690666907669086690966910669116691266913669146691566916669176691866919669206692166922669236692466925669266692766928669296693066931669326693366934669356693666937669386693966940669416694266943669446694566946669476694866949669506695166952669536695466955669566695766958669596696066961669626696366964669656696666967669686696966970669716697266973669746697566976669776697866979669806698166982669836698466985669866698766988669896699066991669926699366994669956699666997669986699967000670016700267003670046700567006670076700867009670106701167012670136701467015670166701767018670196702067021670226702367024670256702667027670286702967030670316703267033670346703567036670376703867039670406704167042670436704467045670466704767048670496705067051670526705367054670556705667057670586705967060670616706267063670646706567066670676706867069670706707167072670736707467075670766707767078670796708067081670826708367084670856708667087670886708967090670916709267093670946709567096670976709867099671006710167102671036710467105671066710767108671096711067111671126711367114671156711667117671186711967120671216712267123671246712567126671276712867129671306713167132671336713467135671366713767138671396714067141671426714367144671456714667147671486714967150671516715267153671546715567156671576715867159671606716167162671636716467165671666716767168671696717067171671726717367174671756717667177671786717967180671816718267183671846718567186671876718867189671906719167192671936719467195671966719767198671996720067201672026720367204672056720667207672086720967210672116721267213672146721567216672176721867219672206722167222672236722467225672266722767228672296723067231672326723367234672356723667237672386723967240672416724267243672446724567246672476724867249672506725167252672536725467255672566725767258672596726067261672626726367264672656726667267672686726967270672716727267273672746727567276672776727867279672806728167282672836728467285672866728767288672896729067291672926729367294672956729667297672986729967300673016730267303673046730567306673076730867309673106731167312673136731467315673166731767318673196732067321673226732367324673256732667327673286732967330673316733267333673346733567336673376733867339673406734167342673436734467345673466734767348673496735067351673526735367354673556735667357673586735967360673616736267363673646736567366673676736867369673706737167372673736737467375673766737767378673796738067381673826738367384673856738667387673886738967390673916739267393673946739567396673976739867399674006740167402674036740467405674066740767408674096741067411674126741367414674156741667417674186741967420674216742267423674246742567426674276742867429674306743167432674336743467435674366743767438674396744067441674426744367444674456744667447674486744967450674516745267453674546745567456674576745867459674606746167462674636746467465674666746767468674696747067471674726747367474674756747667477674786747967480674816748267483674846748567486674876748867489674906749167492674936749467495674966749767498674996750067501675026750367504675056750667507675086750967510675116751267513675146751567516675176751867519675206752167522675236752467525675266752767528675296753067531675326753367534675356753667537675386753967540675416754267543675446754567546675476754867549675506755167552675536755467555675566755767558675596756067561675626756367564675656756667567675686756967570675716757267573675746757567576675776757867579675806758167582675836758467585675866758767588675896759067591675926759367594675956759667597675986759967600676016760267603676046760567606676076760867609676106761167612676136761467615676166761767618676196762067621676226762367624676256762667627676286762967630676316763267633676346763567636676376763867639676406764167642676436764467645676466764767648676496765067651676526765367654676556765667657676586765967660676616766267663676646766567666676676766867669676706767167672676736767467675676766767767678676796768067681676826768367684676856768667687676886768967690676916769267693676946769567696676976769867699677006770167702677036770467705677066770767708677096771067711677126771367714677156771667717677186771967720677216772267723677246772567726677276772867729677306773167732677336773467735677366773767738677396774067741677426774367744677456774667747677486774967750677516775267753677546775567756677576775867759677606776167762677636776467765677666776767768677696777067771677726777367774677756777667777677786777967780677816778267783677846778567786677876778867789677906779167792677936779467795677966779767798677996780067801678026780367804678056780667807678086780967810678116781267813678146781567816678176781867819678206782167822678236782467825678266782767828678296783067831678326783367834678356783667837678386783967840678416784267843678446784567846678476784867849678506785167852678536785467855678566785767858678596786067861678626786367864678656786667867678686786967870678716787267873678746787567876678776787867879678806788167882678836788467885678866788767888678896789067891678926789367894678956789667897678986789967900679016790267903679046790567906679076790867909679106791167912679136791467915679166791767918679196792067921679226792367924679256792667927679286792967930679316793267933679346793567936679376793867939679406794167942679436794467945679466794767948679496795067951679526795367954679556795667957679586795967960679616796267963679646796567966679676796867969679706797167972679736797467975679766797767978679796798067981679826798367984679856798667987679886798967990679916799267993679946799567996679976799867999680006800168002680036800468005680066800768008680096801068011680126801368014680156801668017680186801968020680216802268023680246802568026680276802868029680306803168032680336803468035680366803768038680396804068041680426804368044680456804668047680486804968050680516805268053680546805568056680576805868059680606806168062680636806468065680666806768068680696807068071680726807368074680756807668077680786807968080680816808268083680846808568086680876808868089680906809168092680936809468095680966809768098680996810068101681026810368104681056810668107681086810968110681116811268113681146811568116681176811868119681206812168122681236812468125681266812768128681296813068131681326813368134681356813668137681386813968140681416814268143681446814568146681476814868149681506815168152681536815468155681566815768158681596816068161681626816368164681656816668167681686816968170681716817268173681746817568176681776817868179681806818168182681836818468185681866818768188681896819068191681926819368194681956819668197681986819968200682016820268203682046820568206682076820868209682106821168212682136821468215682166821768218682196822068221682226822368224682256822668227682286822968230682316823268233682346823568236682376823868239682406824168242682436824468245682466824768248682496825068251682526825368254682556825668257682586825968260682616826268263682646826568266682676826868269682706827168272682736827468275682766827768278682796828068281682826828368284682856828668287682886828968290682916829268293682946829568296682976829868299683006830168302683036830468305683066830768308683096831068311683126831368314683156831668317683186831968320683216832268323683246832568326683276832868329683306833168332683336833468335683366833768338683396834068341683426834368344683456834668347683486834968350683516835268353683546835568356683576835868359683606836168362683636836468365683666836768368683696837068371683726837368374683756837668377683786837968380683816838268383683846838568386683876838868389683906839168392683936839468395683966839768398683996840068401684026840368404684056840668407684086840968410684116841268413684146841568416684176841868419684206842168422684236842468425684266842768428684296843068431684326843368434684356843668437684386843968440684416844268443684446844568446684476844868449684506845168452684536845468455684566845768458684596846068461684626846368464684656846668467684686846968470684716847268473684746847568476684776847868479684806848168482684836848468485684866848768488684896849068491684926849368494684956849668497684986849968500685016850268503685046850568506685076850868509685106851168512685136851468515685166851768518685196852068521685226852368524685256852668527685286852968530685316853268533685346853568536685376853868539685406854168542685436854468545685466854768548685496855068551685526855368554685556855668557685586855968560685616856268563685646856568566685676856868569685706857168572685736857468575685766857768578685796858068581685826858368584685856858668587685886858968590685916859268593685946859568596685976859868599686006860168602686036860468605686066860768608686096861068611686126861368614686156861668617686186861968620686216862268623686246862568626686276862868629686306863168632686336863468635686366863768638686396864068641686426864368644686456864668647686486864968650686516865268653686546865568656686576865868659686606866168662686636866468665686666866768668686696867068671686726867368674686756867668677686786867968680686816868268683686846868568686686876868868689686906869168692686936869468695686966869768698686996870068701687026870368704687056870668707687086870968710687116871268713687146871568716687176871868719687206872168722687236872468725687266872768728687296873068731687326873368734687356873668737687386873968740687416874268743687446874568746687476874868749687506875168752687536875468755687566875768758687596876068761687626876368764687656876668767687686876968770687716877268773687746877568776687776877868779687806878168782687836878468785687866878768788687896879068791687926879368794687956879668797687986879968800688016880268803688046880568806688076880868809688106881168812688136881468815688166881768818688196882068821688226882368824688256882668827688286882968830688316883268833688346883568836688376883868839688406884168842688436884468845688466884768848688496885068851688526885368854688556885668857688586885968860688616886268863688646886568866688676886868869688706887168872688736887468875688766887768878688796888068881688826888368884688856888668887688886888968890688916889268893688946889568896688976889868899689006890168902689036890468905689066890768908689096891068911689126891368914689156891668917689186891968920689216892268923689246892568926689276892868929689306893168932689336893468935689366893768938689396894068941689426894368944689456894668947689486894968950689516895268953689546895568956689576895868959689606896168962689636896468965689666896768968689696897068971689726897368974689756897668977689786897968980689816898268983689846898568986689876898868989689906899168992689936899468995689966899768998689996900069001690026900369004690056900669007690086900969010690116901269013690146901569016690176901869019690206902169022690236902469025690266902769028690296903069031690326903369034690356903669037690386903969040690416904269043690446904569046690476904869049690506905169052690536905469055690566905769058690596906069061690626906369064690656906669067690686906969070690716907269073690746907569076690776907869079690806908169082690836908469085690866908769088690896909069091690926909369094690956909669097690986909969100691016910269103691046910569106691076910869109691106911169112691136911469115691166911769118691196912069121691226912369124691256912669127691286912969130691316913269133691346913569136691376913869139691406914169142691436914469145691466914769148691496915069151691526915369154691556915669157691586915969160691616916269163691646916569166691676916869169691706917169172691736917469175691766917769178691796918069181691826918369184691856918669187691886918969190691916919269193691946919569196691976919869199692006920169202692036920469205692066920769208692096921069211692126921369214692156921669217692186921969220692216922269223692246922569226692276922869229692306923169232692336923469235692366923769238692396924069241692426924369244692456924669247692486924969250692516925269253692546925569256692576925869259692606926169262692636926469265692666926769268692696927069271692726927369274692756927669277692786927969280692816928269283692846928569286692876928869289692906929169292692936929469295692966929769298692996930069301693026930369304693056930669307693086930969310693116931269313693146931569316693176931869319693206932169322693236932469325693266932769328693296933069331693326933369334693356933669337693386933969340693416934269343693446934569346693476934869349693506935169352693536935469355693566935769358693596936069361693626936369364693656936669367693686936969370693716937269373693746937569376693776937869379693806938169382693836938469385693866938769388693896939069391693926939369394693956939669397693986939969400694016940269403694046940569406694076940869409694106941169412694136941469415694166941769418694196942069421694226942369424694256942669427694286942969430694316943269433694346943569436694376943869439694406944169442694436944469445694466944769448694496945069451694526945369454694556945669457694586945969460694616946269463694646946569466694676946869469694706947169472694736947469475694766947769478694796948069481694826948369484694856948669487694886948969490694916949269493694946949569496694976949869499695006950169502695036950469505695066950769508695096951069511695126951369514695156951669517695186951969520695216952269523695246952569526695276952869529695306953169532695336953469535695366953769538695396954069541695426954369544695456954669547695486954969550695516955269553695546955569556695576955869559695606956169562695636956469565695666956769568695696957069571695726957369574695756957669577695786957969580695816958269583695846958569586695876958869589695906959169592695936959469595695966959769598695996960069601696026960369604696056960669607696086960969610696116961269613696146961569616696176961869619696206962169622696236962469625696266962769628696296963069631696326963369634696356963669637696386963969640696416964269643696446964569646696476964869649696506965169652696536965469655696566965769658696596966069661696626966369664696656966669667696686966969670696716967269673696746967569676696776967869679696806968169682696836968469685696866968769688696896969069691696926969369694696956969669697696986969969700697016970269703697046970569706697076970869709697106971169712697136971469715697166971769718697196972069721697226972369724697256972669727697286972969730697316973269733697346973569736697376973869739697406974169742697436974469745697466974769748697496975069751697526975369754697556975669757697586975969760697616976269763697646976569766697676976869769697706977169772697736977469775697766977769778697796978069781697826978369784697856978669787697886978969790697916979269793697946979569796697976979869799698006980169802698036980469805698066980769808698096981069811698126981369814698156981669817698186981969820698216982269823698246982569826698276982869829698306983169832698336983469835698366983769838698396984069841698426984369844698456984669847698486984969850698516985269853698546985569856698576985869859698606986169862698636986469865698666986769868698696987069871698726987369874698756987669877698786987969880698816988269883698846988569886698876988869889698906989169892698936989469895698966989769898698996990069901699026990369904699056990669907699086990969910699116991269913699146991569916699176991869919699206992169922699236992469925699266992769928699296993069931699326993369934699356993669937699386993969940699416994269943699446994569946699476994869949699506995169952699536995469955699566995769958699596996069961699626996369964699656996669967699686996969970699716997269973699746997569976699776997869979699806998169982699836998469985699866998769988699896999069991699926999369994699956999669997699986999970000700017000270003700047000570006700077000870009700107001170012700137001470015700167001770018700197002070021700227002370024700257002670027700287002970030700317003270033700347003570036700377003870039700407004170042700437004470045700467004770048700497005070051700527005370054700557005670057700587005970060700617006270063700647006570066700677006870069700707007170072700737007470075700767007770078700797008070081700827008370084700857008670087700887008970090700917009270093700947009570096700977009870099701007010170102701037010470105701067010770108701097011070111701127011370114701157011670117701187011970120701217012270123701247012570126701277012870129701307013170132701337013470135701367013770138701397014070141701427014370144701457014670147701487014970150701517015270153701547015570156701577015870159701607016170162701637016470165701667016770168701697017070171701727017370174701757017670177701787017970180701817018270183701847018570186701877018870189701907019170192701937019470195701967019770198701997020070201702027020370204702057020670207702087020970210702117021270213702147021570216702177021870219702207022170222702237022470225702267022770228702297023070231702327023370234702357023670237702387023970240702417024270243702447024570246702477024870249702507025170252702537025470255702567025770258702597026070261702627026370264702657026670267702687026970270702717027270273702747027570276702777027870279702807028170282702837028470285702867028770288702897029070291702927029370294702957029670297702987029970300703017030270303703047030570306703077030870309703107031170312703137031470315703167031770318703197032070321703227032370324703257032670327703287032970330703317033270333703347033570336703377033870339703407034170342703437034470345703467034770348703497035070351703527035370354703557035670357703587035970360703617036270363703647036570366703677036870369703707037170372703737037470375703767037770378703797038070381703827038370384703857038670387703887038970390703917039270393703947039570396703977039870399704007040170402704037040470405704067040770408704097041070411704127041370414704157041670417704187041970420704217042270423704247042570426704277042870429704307043170432704337043470435704367043770438704397044070441704427044370444704457044670447704487044970450704517045270453704547045570456704577045870459704607046170462704637046470465704667046770468704697047070471704727047370474704757047670477704787047970480704817048270483704847048570486704877048870489704907049170492704937049470495704967049770498704997050070501705027050370504705057050670507705087050970510705117051270513705147051570516705177051870519705207052170522705237052470525705267052770528705297053070531705327053370534705357053670537705387053970540705417054270543705447054570546705477054870549705507055170552705537055470555705567055770558705597056070561705627056370564705657056670567705687056970570705717057270573705747057570576705777057870579705807058170582705837058470585705867058770588705897059070591705927059370594705957059670597705987059970600706017060270603706047060570606706077060870609706107061170612706137061470615706167061770618706197062070621706227062370624706257062670627706287062970630706317063270633706347063570636706377063870639706407064170642706437064470645706467064770648706497065070651706527065370654706557065670657706587065970660706617066270663706647066570666706677066870669706707067170672706737067470675706767067770678706797068070681706827068370684706857068670687706887068970690706917069270693706947069570696706977069870699707007070170702707037070470705707067070770708707097071070711707127071370714707157071670717707187071970720707217072270723707247072570726707277072870729707307073170732707337073470735707367073770738707397074070741707427074370744707457074670747707487074970750707517075270753707547075570756707577075870759707607076170762707637076470765707667076770768707697077070771707727077370774707757077670777707787077970780707817078270783707847078570786707877078870789707907079170792707937079470795707967079770798707997080070801708027080370804708057080670807708087080970810708117081270813708147081570816708177081870819708207082170822708237082470825708267082770828708297083070831708327083370834708357083670837708387083970840708417084270843708447084570846708477084870849708507085170852708537085470855708567085770858708597086070861708627086370864708657086670867708687086970870708717087270873708747087570876708777087870879708807088170882708837088470885708867088770888708897089070891708927089370894708957089670897708987089970900709017090270903709047090570906709077090870909709107091170912709137091470915709167091770918709197092070921709227092370924709257092670927709287092970930709317093270933709347093570936709377093870939709407094170942709437094470945709467094770948709497095070951709527095370954709557095670957709587095970960709617096270963709647096570966709677096870969709707097170972709737097470975709767097770978709797098070981709827098370984709857098670987709887098970990709917099270993709947099570996709977099870999710007100171002710037100471005710067100771008710097101071011710127101371014710157101671017710187101971020710217102271023710247102571026710277102871029710307103171032710337103471035710367103771038710397104071041710427104371044710457104671047710487104971050710517105271053710547105571056710577105871059710607106171062710637106471065710667106771068710697107071071710727107371074710757107671077710787107971080710817108271083710847108571086710877108871089710907109171092710937109471095710967109771098710997110071101711027110371104711057110671107711087110971110711117111271113711147111571116711177111871119711207112171122711237112471125711267112771128711297113071131711327113371134711357113671137711387113971140711417114271143711447114571146711477114871149711507115171152711537115471155711567115771158711597116071161711627116371164711657116671167711687116971170711717117271173711747117571176711777117871179711807118171182711837118471185711867118771188711897119071191711927119371194711957119671197711987119971200712017120271203712047120571206712077120871209712107121171212712137121471215712167121771218712197122071221712227122371224712257122671227712287122971230712317123271233712347123571236712377123871239712407124171242712437124471245712467124771248712497125071251712527125371254712557125671257712587125971260712617126271263712647126571266712677126871269712707127171272712737127471275712767127771278712797128071281712827128371284712857128671287712887128971290712917129271293712947129571296712977129871299713007130171302713037130471305713067130771308713097131071311713127131371314713157131671317713187131971320713217132271323713247132571326713277132871329713307133171332713337133471335713367133771338713397134071341713427134371344713457134671347713487134971350713517135271353713547135571356713577135871359713607136171362713637136471365713667136771368713697137071371713727137371374713757137671377713787137971380713817138271383713847138571386713877138871389713907139171392713937139471395713967139771398713997140071401714027140371404714057140671407714087140971410714117141271413714147141571416714177141871419714207142171422714237142471425714267142771428714297143071431714327143371434714357143671437714387143971440714417144271443714447144571446714477144871449714507145171452714537145471455714567145771458714597146071461714627146371464714657146671467714687146971470714717147271473714747147571476714777147871479714807148171482714837148471485714867148771488714897149071491714927149371494714957149671497714987149971500715017150271503715047150571506715077150871509715107151171512715137151471515715167151771518715197152071521715227152371524715257152671527715287152971530715317153271533715347153571536715377153871539715407154171542715437154471545715467154771548715497155071551715527155371554715557155671557715587155971560715617156271563715647156571566715677156871569715707157171572715737157471575715767157771578715797158071581715827158371584715857158671587715887158971590715917159271593715947159571596715977159871599716007160171602716037160471605716067160771608716097161071611716127161371614716157161671617716187161971620716217162271623716247162571626716277162871629716307163171632716337163471635716367163771638716397164071641716427164371644716457164671647716487164971650716517165271653716547165571656716577165871659716607166171662716637166471665716667166771668716697167071671716727167371674716757167671677716787167971680716817168271683716847168571686716877168871689716907169171692716937169471695716967169771698716997170071701717027170371704717057170671707717087170971710717117171271713717147171571716717177171871719717207172171722717237172471725717267172771728717297173071731717327173371734717357173671737717387173971740717417174271743717447174571746717477174871749717507175171752717537175471755717567175771758717597176071761717627176371764717657176671767717687176971770717717177271773717747177571776717777177871779717807178171782717837178471785717867178771788717897179071791717927179371794717957179671797717987179971800718017180271803718047180571806718077180871809718107181171812718137181471815718167181771818718197182071821718227182371824718257182671827718287182971830718317183271833718347183571836718377183871839718407184171842718437184471845718467184771848718497185071851718527185371854718557185671857718587185971860718617186271863718647186571866718677186871869718707187171872718737187471875718767187771878718797188071881718827188371884718857188671887718887188971890718917189271893718947189571896718977189871899719007190171902719037190471905719067190771908719097191071911719127191371914719157191671917719187191971920719217192271923719247192571926719277192871929719307193171932719337193471935719367193771938719397194071941719427194371944719457194671947719487194971950719517195271953719547195571956719577195871959719607196171962719637196471965719667196771968719697197071971719727197371974719757197671977719787197971980719817198271983719847198571986719877198871989719907199171992719937199471995719967199771998719997200072001720027200372004720057200672007720087200972010720117201272013720147201572016720177201872019720207202172022720237202472025720267202772028720297203072031720327203372034720357203672037720387203972040720417204272043720447204572046720477204872049720507205172052720537205472055720567205772058720597206072061720627206372064720657206672067720687206972070720717207272073720747207572076720777207872079720807208172082720837208472085720867208772088720897209072091720927209372094720957209672097720987209972100721017210272103721047210572106721077210872109721107211172112721137211472115721167211772118721197212072121721227212372124721257212672127721287212972130721317213272133721347213572136721377213872139721407214172142721437214472145721467214772148721497215072151721527215372154721557215672157721587215972160721617216272163721647216572166721677216872169721707217172172721737217472175721767217772178721797218072181721827218372184721857218672187721887218972190721917219272193721947219572196721977219872199722007220172202722037220472205722067220772208722097221072211722127221372214722157221672217722187221972220722217222272223722247222572226722277222872229722307223172232722337223472235722367223772238722397224072241722427224372244722457224672247722487224972250722517225272253722547225572256722577225872259722607226172262722637226472265722667226772268722697227072271722727227372274722757227672277722787227972280722817228272283722847228572286722877228872289722907229172292722937229472295722967229772298722997230072301723027230372304723057230672307723087230972310723117231272313723147231572316723177231872319723207232172322723237232472325723267232772328723297233072331723327233372334723357233672337723387233972340723417234272343723447234572346723477234872349723507235172352723537235472355723567235772358723597236072361723627236372364723657236672367723687236972370723717237272373723747237572376723777237872379723807238172382723837238472385723867238772388723897239072391723927239372394723957239672397723987239972400724017240272403724047240572406724077240872409724107241172412724137241472415724167241772418724197242072421724227242372424724257242672427724287242972430724317243272433724347243572436724377243872439724407244172442724437244472445724467244772448724497245072451724527245372454724557245672457724587245972460724617246272463724647246572466724677246872469724707247172472724737247472475724767247772478724797248072481724827248372484724857248672487724887248972490724917249272493724947249572496724977249872499725007250172502725037250472505725067250772508725097251072511725127251372514725157251672517725187251972520725217252272523725247252572526725277252872529725307253172532725337253472535725367253772538725397254072541725427254372544725457254672547725487254972550725517255272553725547255572556725577255872559725607256172562725637256472565725667256772568725697257072571725727257372574725757257672577725787257972580725817258272583725847258572586725877258872589725907259172592725937259472595725967259772598725997260072601726027260372604726057260672607726087260972610726117261272613726147261572616726177261872619726207262172622726237262472625726267262772628726297263072631726327263372634726357263672637726387263972640726417264272643726447264572646726477264872649726507265172652726537265472655726567265772658726597266072661726627266372664726657266672667726687266972670726717267272673726747267572676726777267872679726807268172682726837268472685726867268772688726897269072691726927269372694726957269672697726987269972700727017270272703727047270572706727077270872709727107271172712727137271472715727167271772718727197272072721727227272372724727257272672727727287272972730727317273272733727347273572736727377273872739727407274172742727437274472745727467274772748727497275072751727527275372754727557275672757727587275972760727617276272763727647276572766727677276872769727707277172772727737277472775727767277772778727797278072781727827278372784727857278672787727887278972790727917279272793727947279572796727977279872799728007280172802728037280472805728067280772808728097281072811728127281372814728157281672817728187281972820728217282272823728247282572826728277282872829728307283172832728337283472835728367283772838728397284072841728427284372844728457284672847728487284972850728517285272853728547285572856728577285872859728607286172862728637286472865728667286772868728697287072871728727287372874728757287672877728787287972880728817288272883728847288572886728877288872889728907289172892728937289472895728967289772898728997290072901729027290372904729057290672907729087290972910729117291272913729147291572916729177291872919729207292172922729237292472925729267292772928729297293072931729327293372934729357293672937729387293972940729417294272943729447294572946729477294872949729507295172952729537295472955729567295772958729597296072961729627296372964729657296672967729687296972970729717297272973729747297572976729777297872979729807298172982729837298472985729867298772988729897299072991729927299372994729957299672997729987299973000730017300273003730047300573006730077300873009730107301173012730137301473015730167301773018730197302073021730227302373024730257302673027730287302973030730317303273033730347303573036730377303873039730407304173042730437304473045730467304773048730497305073051730527305373054730557305673057730587305973060730617306273063730647306573066730677306873069730707307173072730737307473075730767307773078730797308073081730827308373084730857308673087730887308973090730917309273093730947309573096730977309873099731007310173102731037310473105731067310773108731097311073111731127311373114731157311673117731187311973120731217312273123731247312573126731277312873129731307313173132731337313473135731367313773138731397314073141731427314373144731457314673147731487314973150731517315273153731547315573156731577315873159731607316173162731637316473165731667316773168731697317073171731727317373174731757317673177731787317973180731817318273183731847318573186731877318873189731907319173192731937319473195731967319773198731997320073201732027320373204732057320673207732087320973210732117321273213732147321573216732177321873219732207322173222732237322473225732267322773228732297323073231732327323373234732357323673237732387323973240732417324273243732447324573246732477324873249732507325173252732537325473255732567325773258732597326073261732627326373264732657326673267732687326973270732717327273273732747327573276732777327873279732807328173282732837328473285732867328773288732897329073291732927329373294732957329673297732987329973300733017330273303733047330573306733077330873309733107331173312733137331473315733167331773318733197332073321733227332373324733257332673327733287332973330733317333273333733347333573336733377333873339733407334173342733437334473345733467334773348733497335073351733527335373354733557335673357733587335973360733617336273363733647336573366733677336873369733707337173372733737337473375733767337773378733797338073381733827338373384733857338673387733887338973390733917339273393733947339573396733977339873399734007340173402734037340473405734067340773408734097341073411734127341373414734157341673417734187341973420734217342273423734247342573426734277342873429734307343173432734337343473435734367343773438734397344073441734427344373444734457344673447734487344973450734517345273453734547345573456734577345873459734607346173462734637346473465734667346773468734697347073471734727347373474734757347673477734787347973480734817348273483734847348573486734877348873489734907349173492734937349473495734967349773498734997350073501735027350373504735057350673507735087350973510735117351273513735147351573516735177351873519735207352173522735237352473525735267352773528735297353073531735327353373534735357353673537735387353973540735417354273543735447354573546735477354873549735507355173552735537355473555735567355773558735597356073561735627356373564735657356673567735687356973570735717357273573735747357573576735777357873579735807358173582735837358473585735867358773588735897359073591735927359373594735957359673597735987359973600736017360273603736047360573606736077360873609736107361173612736137361473615736167361773618736197362073621736227362373624736257362673627736287362973630736317363273633736347363573636736377363873639736407364173642736437364473645736467364773648736497365073651736527365373654736557365673657736587365973660736617366273663736647366573666736677366873669736707367173672736737367473675736767367773678736797368073681736827368373684736857368673687736887368973690736917369273693736947369573696736977369873699737007370173702737037370473705737067370773708737097371073711737127371373714737157371673717737187371973720737217372273723737247372573726737277372873729737307373173732737337373473735737367373773738737397374073741737427374373744737457374673747737487374973750737517375273753737547375573756737577375873759737607376173762737637376473765737667376773768737697377073771737727377373774737757377673777737787377973780737817378273783737847378573786737877378873789737907379173792737937379473795737967379773798737997380073801738027380373804738057380673807738087380973810738117381273813738147381573816738177381873819738207382173822738237382473825738267382773828738297383073831738327383373834738357383673837738387383973840738417384273843738447384573846738477384873849738507385173852738537385473855738567385773858738597386073861738627386373864738657386673867738687386973870738717387273873738747387573876738777387873879738807388173882738837388473885738867388773888738897389073891738927389373894738957389673897738987389973900739017390273903739047390573906739077390873909739107391173912739137391473915739167391773918739197392073921739227392373924739257392673927739287392973930739317393273933739347393573936739377393873939739407394173942739437394473945739467394773948739497395073951739527395373954739557395673957739587395973960739617396273963739647396573966739677396873969739707397173972739737397473975739767397773978739797398073981739827398373984739857398673987739887398973990739917399273993739947399573996739977399873999740007400174002740037400474005740067400774008740097401074011740127401374014740157401674017740187401974020740217402274023740247402574026740277402874029740307403174032740337403474035740367403774038740397404074041740427404374044740457404674047740487404974050740517405274053740547405574056740577405874059740607406174062740637406474065740667406774068740697407074071740727407374074740757407674077740787407974080740817408274083740847408574086740877408874089740907409174092740937409474095740967409774098740997410074101741027410374104741057410674107741087410974110741117411274113741147411574116741177411874119741207412174122741237412474125741267412774128741297413074131741327413374134741357413674137741387413974140741417414274143741447414574146741477414874149741507415174152741537415474155741567415774158741597416074161741627416374164741657416674167741687416974170741717417274173741747417574176741777417874179741807418174182741837418474185741867418774188741897419074191741927419374194741957419674197741987419974200742017420274203742047420574206742077420874209742107421174212742137421474215742167421774218742197422074221742227422374224742257422674227742287422974230742317423274233742347423574236742377423874239742407424174242742437424474245742467424774248742497425074251742527425374254742557425674257742587425974260742617426274263742647426574266742677426874269742707427174272742737427474275742767427774278742797428074281742827428374284742857428674287742887428974290742917429274293742947429574296742977429874299743007430174302743037430474305743067430774308743097431074311743127431374314743157431674317743187431974320743217432274323743247432574326743277432874329743307433174332743337433474335743367433774338743397434074341743427434374344743457434674347743487434974350743517435274353743547435574356743577435874359743607436174362743637436474365743667436774368743697437074371743727437374374743757437674377743787437974380743817438274383743847438574386743877438874389743907439174392743937439474395743967439774398743997440074401744027440374404744057440674407744087440974410744117441274413744147441574416744177441874419744207442174422744237442474425744267442774428744297443074431744327443374434744357443674437744387443974440744417444274443744447444574446744477444874449744507445174452744537445474455744567445774458744597446074461744627446374464744657446674467744687446974470744717447274473744747447574476744777447874479744807448174482744837448474485744867448774488744897449074491744927449374494744957449674497744987449974500745017450274503745047450574506745077450874509745107451174512745137451474515745167451774518745197452074521745227452374524745257452674527745287452974530745317453274533745347453574536745377453874539745407454174542745437454474545745467454774548745497455074551745527455374554745557455674557745587455974560745617456274563745647456574566745677456874569745707457174572745737457474575745767457774578745797458074581745827458374584745857458674587745887458974590745917459274593745947459574596745977459874599746007460174602746037460474605746067460774608746097461074611746127461374614746157461674617746187461974620746217462274623746247462574626746277462874629746307463174632746337463474635746367463774638746397464074641746427464374644746457464674647746487464974650746517465274653746547465574656746577465874659746607466174662746637466474665746667466774668746697467074671746727467374674746757467674677746787467974680746817468274683746847468574686746877468874689746907469174692746937469474695746967469774698746997470074701747027470374704747057470674707747087470974710747117471274713747147471574716747177471874719747207472174722747237472474725747267472774728747297473074731747327473374734747357473674737747387473974740747417474274743747447474574746747477474874749747507475174752747537475474755747567475774758747597476074761747627476374764747657476674767747687476974770747717477274773747747477574776747777477874779747807478174782747837478474785747867478774788747897479074791747927479374794747957479674797747987479974800748017480274803748047480574806748077480874809748107481174812748137481474815748167481774818748197482074821748227482374824748257482674827748287482974830748317483274833748347483574836748377483874839748407484174842748437484474845748467484774848748497485074851748527485374854748557485674857748587485974860748617486274863748647486574866748677486874869748707487174872748737487474875748767487774878748797488074881748827488374884748857488674887748887488974890748917489274893748947489574896748977489874899749007490174902749037490474905749067490774908749097491074911749127491374914749157491674917749187491974920749217492274923749247492574926749277492874929749307493174932749337493474935749367493774938749397494074941749427494374944749457494674947749487494974950749517495274953749547495574956749577495874959749607496174962749637496474965749667496774968749697497074971749727497374974749757497674977749787497974980749817498274983749847498574986749877498874989749907499174992749937499474995749967499774998749997500075001750027500375004750057500675007750087500975010750117501275013750147501575016750177501875019750207502175022750237502475025750267502775028750297503075031750327503375034750357503675037750387503975040750417504275043750447504575046750477504875049750507505175052750537505475055750567505775058750597506075061750627506375064750657506675067750687506975070750717507275073750747507575076750777507875079750807508175082750837508475085750867508775088750897509075091750927509375094750957509675097750987509975100751017510275103751047510575106751077510875109751107511175112751137511475115751167511775118751197512075121751227512375124751257512675127751287512975130751317513275133751347513575136751377513875139751407514175142751437514475145751467514775148751497515075151751527515375154751557515675157751587515975160751617516275163751647516575166751677516875169751707517175172751737517475175751767517775178751797518075181751827518375184751857518675187751887518975190751917519275193751947519575196751977519875199752007520175202752037520475205752067520775208752097521075211752127521375214752157521675217752187521975220752217522275223752247522575226752277522875229752307523175232752337523475235752367523775238752397524075241752427524375244752457524675247752487524975250752517525275253752547525575256752577525875259752607526175262752637526475265752667526775268752697527075271752727527375274752757527675277752787527975280752817528275283752847528575286752877528875289752907529175292752937529475295752967529775298752997530075301753027530375304753057530675307753087530975310753117531275313753147531575316753177531875319753207532175322753237532475325753267532775328753297533075331753327533375334753357533675337753387533975340753417534275343753447534575346753477534875349753507535175352753537535475355753567535775358753597536075361753627536375364753657536675367753687536975370753717537275373753747537575376753777537875379753807538175382753837538475385753867538775388753897539075391753927539375394753957539675397753987539975400754017540275403754047540575406754077540875409754107541175412754137541475415754167541775418754197542075421754227542375424754257542675427754287542975430754317543275433754347543575436754377543875439754407544175442754437544475445754467544775448754497545075451754527545375454754557545675457754587545975460754617546275463754647546575466754677546875469754707547175472754737547475475754767547775478754797548075481754827548375484754857548675487754887548975490754917549275493754947549575496754977549875499755007550175502755037550475505755067550775508755097551075511755127551375514755157551675517755187551975520755217552275523755247552575526755277552875529755307553175532755337553475535755367553775538755397554075541755427554375544755457554675547755487554975550755517555275553755547555575556755577555875559755607556175562755637556475565755667556775568755697557075571755727557375574755757557675577755787557975580755817558275583755847558575586755877558875589755907559175592755937559475595755967559775598755997560075601756027560375604756057560675607756087560975610756117561275613756147561575616756177561875619756207562175622756237562475625756267562775628756297563075631756327563375634756357563675637756387563975640756417564275643756447564575646756477564875649756507565175652756537565475655756567565775658756597566075661756627566375664756657566675667756687566975670756717567275673756747567575676756777567875679756807568175682756837568475685756867568775688756897569075691756927569375694756957569675697756987569975700757017570275703757047570575706757077570875709757107571175712757137571475715757167571775718757197572075721757227572375724757257572675727757287572975730757317573275733757347573575736757377573875739757407574175742757437574475745757467574775748757497575075751757527575375754757557575675757757587575975760757617576275763757647576575766757677576875769757707577175772757737577475775757767577775778757797578075781757827578375784757857578675787757887578975790757917579275793757947579575796757977579875799758007580175802758037580475805758067580775808758097581075811758127581375814758157581675817758187581975820758217582275823758247582575826758277582875829758307583175832758337583475835758367583775838758397584075841758427584375844758457584675847758487584975850758517585275853758547585575856758577585875859758607586175862758637586475865758667586775868758697587075871758727587375874758757587675877758787587975880758817588275883758847588575886758877588875889758907589175892758937589475895758967589775898758997590075901759027590375904759057590675907759087590975910759117591275913759147591575916759177591875919759207592175922759237592475925759267592775928759297593075931759327593375934759357593675937759387593975940759417594275943759447594575946759477594875949759507595175952759537595475955759567595775958759597596075961759627596375964759657596675967759687596975970759717597275973759747597575976759777597875979759807598175982759837598475985759867598775988759897599075991759927599375994759957599675997759987599976000760017600276003760047600576006760077600876009760107601176012760137601476015760167601776018760197602076021760227602376024760257602676027760287602976030760317603276033760347603576036760377603876039760407604176042760437604476045760467604776048760497605076051760527605376054760557605676057760587605976060760617606276063760647606576066760677606876069760707607176072760737607476075760767607776078760797608076081760827608376084760857608676087760887608976090760917609276093760947609576096760977609876099761007610176102761037610476105761067610776108761097611076111761127611376114761157611676117761187611976120761217612276123761247612576126761277612876129761307613176132761337613476135761367613776138761397614076141761427614376144761457614676147761487614976150761517615276153761547615576156761577615876159761607616176162761637616476165761667616776168761697617076171761727617376174761757617676177761787617976180761817618276183761847618576186761877618876189761907619176192761937619476195761967619776198761997620076201762027620376204762057620676207762087620976210762117621276213762147621576216762177621876219762207622176222762237622476225762267622776228762297623076231762327623376234762357623676237762387623976240762417624276243762447624576246762477624876249762507625176252762537625476255762567625776258762597626076261762627626376264762657626676267762687626976270762717627276273762747627576276762777627876279762807628176282762837628476285762867628776288762897629076291762927629376294762957629676297762987629976300763017630276303763047630576306763077630876309763107631176312763137631476315763167631776318763197632076321763227632376324763257632676327763287632976330763317633276333763347633576336763377633876339763407634176342763437634476345763467634776348763497635076351763527635376354763557635676357763587635976360763617636276363763647636576366763677636876369763707637176372763737637476375763767637776378763797638076381763827638376384763857638676387763887638976390763917639276393763947639576396763977639876399764007640176402764037640476405764067640776408764097641076411764127641376414764157641676417764187641976420764217642276423764247642576426764277642876429764307643176432764337643476435764367643776438764397644076441764427644376444764457644676447764487644976450764517645276453764547645576456764577645876459764607646176462764637646476465764667646776468764697647076471764727647376474764757647676477764787647976480764817648276483764847648576486764877648876489764907649176492764937649476495764967649776498764997650076501765027650376504765057650676507765087650976510765117651276513765147651576516765177651876519765207652176522765237652476525765267652776528765297653076531765327653376534765357653676537765387653976540765417654276543765447654576546765477654876549765507655176552765537655476555765567655776558765597656076561765627656376564765657656676567765687656976570765717657276573765747657576576765777657876579765807658176582765837658476585765867658776588765897659076591765927659376594765957659676597765987659976600766017660276603766047660576606766077660876609766107661176612766137661476615766167661776618766197662076621766227662376624766257662676627766287662976630766317663276633766347663576636766377663876639766407664176642766437664476645766467664776648766497665076651766527665376654766557665676657766587665976660766617666276663766647666576666766677666876669766707667176672766737667476675766767667776678766797668076681766827668376684766857668676687766887668976690766917669276693766947669576696766977669876699767007670176702767037670476705767067670776708767097671076711767127671376714767157671676717767187671976720767217672276723767247672576726767277672876729767307673176732767337673476735767367673776738767397674076741767427674376744767457674676747767487674976750767517675276753767547675576756767577675876759767607676176762767637676476765767667676776768767697677076771767727677376774767757677676777767787677976780767817678276783767847678576786767877678876789767907679176792767937679476795767967679776798767997680076801768027680376804768057680676807768087680976810768117681276813768147681576816768177681876819768207682176822768237682476825768267682776828768297683076831768327683376834768357683676837768387683976840768417684276843768447684576846768477684876849768507685176852768537685476855768567685776858768597686076861768627686376864768657686676867768687686976870768717687276873768747687576876768777687876879768807688176882768837688476885768867688776888768897689076891768927689376894768957689676897768987689976900769017690276903769047690576906769077690876909769107691176912769137691476915769167691776918769197692076921769227692376924769257692676927769287692976930769317693276933769347693576936769377693876939769407694176942769437694476945769467694776948769497695076951769527695376954769557695676957769587695976960769617696276963769647696576966769677696876969769707697176972769737697476975769767697776978769797698076981769827698376984769857698676987769887698976990769917699276993769947699576996769977699876999770007700177002770037700477005770067700777008770097701077011770127701377014770157701677017770187701977020770217702277023770247702577026770277702877029770307703177032770337703477035770367703777038770397704077041770427704377044770457704677047770487704977050770517705277053770547705577056770577705877059770607706177062770637706477065770667706777068770697707077071770727707377074770757707677077770787707977080770817708277083770847708577086770877708877089770907709177092770937709477095770967709777098770997710077101771027710377104771057710677107771087710977110771117711277113771147711577116771177711877119771207712177122771237712477125771267712777128771297713077131771327713377134771357713677137771387713977140771417714277143771447714577146771477714877149771507715177152771537715477155771567715777158771597716077161771627716377164771657716677167771687716977170771717717277173771747717577176771777717877179771807718177182771837718477185771867718777188771897719077191771927719377194771957719677197771987719977200772017720277203772047720577206772077720877209772107721177212772137721477215772167721777218772197722077221772227722377224772257722677227772287722977230772317723277233772347723577236772377723877239772407724177242772437724477245772467724777248772497725077251772527725377254772557725677257772587725977260772617726277263772647726577266772677726877269772707727177272772737727477275772767727777278772797728077281772827728377284772857728677287772887728977290772917729277293772947729577296772977729877299773007730177302773037730477305773067730777308773097731077311773127731377314773157731677317773187731977320773217732277323773247732577326773277732877329773307733177332773337733477335773367733777338773397734077341773427734377344773457734677347773487734977350773517735277353773547735577356773577735877359773607736177362773637736477365773667736777368773697737077371773727737377374773757737677377773787737977380773817738277383773847738577386773877738877389773907739177392773937739477395773967739777398773997740077401774027740377404774057740677407774087740977410774117741277413774147741577416774177741877419774207742177422774237742477425774267742777428774297743077431774327743377434774357743677437774387743977440774417744277443774447744577446774477744877449774507745177452774537745477455774567745777458774597746077461774627746377464774657746677467774687746977470774717747277473774747747577476774777747877479774807748177482774837748477485774867748777488774897749077491774927749377494774957749677497774987749977500775017750277503775047750577506775077750877509775107751177512775137751477515775167751777518775197752077521775227752377524775257752677527775287752977530775317753277533775347753577536775377753877539775407754177542775437754477545775467754777548775497755077551775527755377554775557755677557775587755977560775617756277563775647756577566775677756877569775707757177572775737757477575775767757777578775797758077581775827758377584775857758677587775887758977590775917759277593775947759577596775977759877599776007760177602776037760477605776067760777608776097761077611776127761377614776157761677617776187761977620776217762277623776247762577626776277762877629776307763177632776337763477635776367763777638776397764077641776427764377644776457764677647776487764977650776517765277653776547765577656776577765877659776607766177662776637766477665776667766777668776697767077671776727767377674776757767677677776787767977680776817768277683776847768577686776877768877689776907769177692776937769477695776967769777698776997770077701777027770377704777057770677707777087770977710777117771277713777147771577716777177771877719777207772177722777237772477725777267772777728777297773077731777327773377734777357773677737777387773977740777417774277743777447774577746777477774877749777507775177752777537775477755777567775777758777597776077761777627776377764777657776677767777687776977770777717777277773777747777577776777777777877779777807778177782777837778477785777867778777788777897779077791777927779377794777957779677797777987779977800778017780277803778047780577806778077780877809778107781177812778137781477815778167781777818778197782077821778227782377824778257782677827778287782977830778317783277833778347783577836778377783877839778407784177842778437784477845778467784777848778497785077851778527785377854778557785677857778587785977860778617786277863778647786577866778677786877869778707787177872778737787477875778767787777878778797788077881778827788377884778857788677887778887788977890778917789277893778947789577896778977789877899779007790177902779037790477905779067790777908779097791077911779127791377914779157791677917779187791977920779217792277923779247792577926779277792877929779307793177932779337793477935779367793777938779397794077941779427794377944779457794677947779487794977950779517795277953779547795577956779577795877959779607796177962779637796477965779667796777968779697797077971779727797377974779757797677977779787797977980779817798277983779847798577986779877798877989779907799177992779937799477995779967799777998779997800078001780027800378004780057800678007780087800978010780117801278013780147801578016780177801878019780207802178022780237802478025780267802778028780297803078031780327803378034780357803678037780387803978040780417804278043780447804578046780477804878049780507805178052780537805478055780567805778058780597806078061780627806378064780657806678067780687806978070780717807278073780747807578076780777807878079780807808178082780837808478085780867808778088780897809078091780927809378094780957809678097780987809978100781017810278103781047810578106781077810878109781107811178112781137811478115781167811778118781197812078121781227812378124781257812678127781287812978130781317813278133781347813578136781377813878139781407814178142781437814478145781467814778148781497815078151781527815378154781557815678157781587815978160781617816278163781647816578166781677816878169781707817178172781737817478175781767817778178781797818078181781827818378184781857818678187781887818978190781917819278193781947819578196781977819878199782007820178202782037820478205782067820778208782097821078211782127821378214782157821678217782187821978220782217822278223782247822578226782277822878229782307823178232782337823478235782367823778238782397824078241782427824378244782457824678247782487824978250782517825278253782547825578256782577825878259782607826178262782637826478265782667826778268782697827078271782727827378274782757827678277782787827978280782817828278283782847828578286782877828878289782907829178292782937829478295782967829778298782997830078301783027830378304783057830678307783087830978310783117831278313783147831578316783177831878319783207832178322783237832478325783267832778328783297833078331783327833378334783357833678337783387833978340783417834278343783447834578346783477834878349783507835178352783537835478355783567835778358783597836078361783627836378364783657836678367783687836978370783717837278373783747837578376783777837878379783807838178382783837838478385783867838778388783897839078391783927839378394783957839678397783987839978400784017840278403784047840578406784077840878409784107841178412784137841478415784167841778418784197842078421784227842378424784257842678427784287842978430784317843278433784347843578436784377843878439784407844178442784437844478445784467844778448784497845078451784527845378454784557845678457784587845978460784617846278463784647846578466784677846878469784707847178472784737847478475784767847778478784797848078481784827848378484784857848678487784887848978490784917849278493784947849578496784977849878499785007850178502785037850478505785067850778508785097851078511785127851378514785157851678517785187851978520785217852278523785247852578526785277852878529785307853178532785337853478535785367853778538785397854078541785427854378544785457854678547785487854978550785517855278553785547855578556785577855878559785607856178562785637856478565785667856778568785697857078571785727857378574785757857678577785787857978580785817858278583785847858578586785877858878589785907859178592785937859478595785967859778598785997860078601786027860378604786057860678607786087860978610786117861278613786147861578616786177861878619786207862178622786237862478625786267862778628786297863078631786327863378634786357863678637786387863978640786417864278643786447864578646786477864878649786507865178652786537865478655786567865778658786597866078661786627866378664786657866678667786687866978670786717867278673786747867578676786777867878679786807868178682786837868478685786867868778688786897869078691786927869378694786957869678697786987869978700787017870278703787047870578706787077870878709787107871178712787137871478715787167871778718787197872078721787227872378724787257872678727787287872978730787317873278733787347873578736787377873878739787407874178742787437874478745787467874778748787497875078751787527875378754787557875678757787587875978760787617876278763787647876578766787677876878769787707877178772787737877478775787767877778778787797878078781787827878378784787857878678787787887878978790787917879278793787947879578796787977879878799788007880178802788037880478805788067880778808788097881078811788127881378814788157881678817788187881978820788217882278823788247882578826788277882878829788307883178832788337883478835788367883778838788397884078841788427884378844788457884678847788487884978850788517885278853788547885578856788577885878859788607886178862788637886478865788667886778868788697887078871788727887378874788757887678877788787887978880788817888278883788847888578886788877888878889788907889178892788937889478895788967889778898788997890078901789027890378904789057890678907789087890978910789117891278913789147891578916789177891878919789207892178922789237892478925789267892778928789297893078931789327893378934789357893678937789387893978940789417894278943789447894578946789477894878949789507895178952789537895478955789567895778958789597896078961789627896378964789657896678967789687896978970789717897278973789747897578976789777897878979789807898178982789837898478985789867898778988789897899078991789927899378994789957899678997789987899979000790017900279003790047900579006790077900879009790107901179012790137901479015790167901779018790197902079021790227902379024790257902679027790287902979030790317903279033790347903579036790377903879039790407904179042790437904479045790467904779048790497905079051790527905379054790557905679057790587905979060790617906279063790647906579066790677906879069790707907179072790737907479075790767907779078790797908079081790827908379084790857908679087790887908979090790917909279093790947909579096790977909879099791007910179102791037910479105791067910779108791097911079111791127911379114791157911679117791187911979120791217912279123791247912579126791277912879129791307913179132791337913479135791367913779138791397914079141791427914379144791457914679147791487914979150791517915279153791547915579156791577915879159791607916179162791637916479165791667916779168791697917079171791727917379174791757917679177791787917979180791817918279183791847918579186791877918879189791907919179192791937919479195791967919779198791997920079201792027920379204792057920679207792087920979210792117921279213792147921579216792177921879219792207922179222792237922479225792267922779228792297923079231792327923379234792357923679237792387923979240792417924279243792447924579246792477924879249792507925179252792537925479255792567925779258792597926079261792627926379264792657926679267792687926979270792717927279273792747927579276792777927879279792807928179282792837928479285792867928779288792897929079291792927929379294792957929679297792987929979300793017930279303793047930579306793077930879309793107931179312793137931479315793167931779318793197932079321793227932379324793257932679327793287932979330793317933279333793347933579336793377933879339793407934179342793437934479345793467934779348793497935079351793527935379354793557935679357793587935979360793617936279363793647936579366793677936879369793707937179372793737937479375793767937779378793797938079381793827938379384793857938679387793887938979390793917939279393793947939579396793977939879399794007940179402794037940479405794067940779408794097941079411794127941379414794157941679417794187941979420794217942279423794247942579426794277942879429794307943179432794337943479435794367943779438794397944079441794427944379444794457944679447794487944979450794517945279453794547945579456794577945879459794607946179462794637946479465794667946779468794697947079471794727947379474794757947679477794787947979480794817948279483794847948579486794877948879489794907949179492794937949479495794967949779498794997950079501795027950379504795057950679507795087950979510795117951279513795147951579516795177951879519795207952179522795237952479525795267952779528795297953079531795327953379534795357953679537795387953979540795417954279543795447954579546795477954879549795507955179552795537955479555795567955779558795597956079561795627956379564795657956679567795687956979570795717957279573795747957579576795777957879579795807958179582795837958479585795867958779588795897959079591795927959379594795957959679597795987959979600796017960279603796047960579606796077960879609796107961179612796137961479615796167961779618796197962079621796227962379624796257962679627796287962979630796317963279633796347963579636796377963879639796407964179642796437964479645796467964779648796497965079651796527965379654796557965679657796587965979660796617966279663796647966579666796677966879669796707967179672796737967479675796767967779678796797968079681796827968379684796857968679687796887968979690796917969279693796947969579696796977969879699797007970179702797037970479705797067970779708797097971079711797127971379714797157971679717797187971979720797217972279723797247972579726797277972879729797307973179732797337973479735797367973779738797397974079741797427974379744797457974679747797487974979750797517975279753797547975579756797577975879759797607976179762797637976479765797667976779768797697977079771797727977379774797757977679777797787977979780797817978279783797847978579786797877978879789797907979179792797937979479795797967979779798797997980079801798027980379804798057980679807798087980979810798117981279813798147981579816798177981879819798207982179822798237982479825798267982779828798297983079831798327983379834798357983679837798387983979840798417984279843798447984579846798477984879849798507985179852798537985479855798567985779858798597986079861798627986379864798657986679867798687986979870798717987279873798747987579876798777987879879798807988179882798837988479885798867988779888798897989079891798927989379894798957989679897798987989979900799017990279903799047990579906799077990879909799107991179912799137991479915799167991779918799197992079921799227992379924799257992679927799287992979930799317993279933799347993579936799377993879939799407994179942799437994479945799467994779948799497995079951799527995379954799557995679957799587995979960799617996279963799647996579966799677996879969799707997179972799737997479975799767997779978799797998079981799827998379984799857998679987799887998979990799917999279993799947999579996799977999879999800008000180002800038000480005800068000780008800098001080011800128001380014800158001680017800188001980020800218002280023800248002580026800278002880029800308003180032800338003480035800368003780038800398004080041800428004380044800458004680047800488004980050800518005280053800548005580056800578005880059800608006180062800638006480065800668006780068800698007080071800728007380074800758007680077800788007980080800818008280083800848008580086800878008880089800908009180092800938009480095800968009780098800998010080101801028010380104801058010680107801088010980110801118011280113801148011580116801178011880119801208012180122801238012480125801268012780128801298013080131801328013380134801358013680137801388013980140801418014280143801448014580146801478014880149801508015180152801538015480155801568015780158801598016080161801628016380164801658016680167801688016980170801718017280173801748017580176801778017880179801808018180182801838018480185801868018780188801898019080191801928019380194801958019680197801988019980200802018020280203802048020580206802078020880209802108021180212802138021480215802168021780218802198022080221802228022380224802258022680227802288022980230802318023280233802348023580236802378023880239802408024180242802438024480245802468024780248802498025080251802528025380254802558025680257802588025980260802618026280263802648026580266802678026880269802708027180272802738027480275802768027780278802798028080281802828028380284802858028680287802888028980290802918029280293802948029580296802978029880299803008030180302803038030480305803068030780308803098031080311803128031380314803158031680317803188031980320803218032280323803248032580326803278032880329803308033180332803338033480335803368033780338803398034080341803428034380344803458034680347803488034980350803518035280353803548035580356803578035880359803608036180362803638036480365803668036780368803698037080371803728037380374803758037680377803788037980380803818038280383803848038580386803878038880389803908039180392803938039480395803968039780398803998040080401804028040380404804058040680407804088040980410804118041280413804148041580416804178041880419804208042180422804238042480425804268042780428804298043080431804328043380434804358043680437804388043980440804418044280443804448044580446804478044880449804508045180452804538045480455804568045780458804598046080461804628046380464804658046680467804688046980470804718047280473804748047580476804778047880479804808048180482804838048480485804868048780488804898049080491804928049380494804958049680497804988049980500805018050280503805048050580506805078050880509805108051180512805138051480515805168051780518805198052080521805228052380524805258052680527805288052980530805318053280533805348053580536805378053880539805408054180542805438054480545805468054780548805498055080551805528055380554805558055680557805588055980560805618056280563805648056580566805678056880569805708057180572805738057480575805768057780578805798058080581805828058380584805858058680587805888058980590805918059280593805948059580596805978059880599806008060180602806038060480605806068060780608806098061080611806128061380614806158061680617806188061980620806218062280623806248062580626806278062880629806308063180632806338063480635806368063780638806398064080641806428064380644806458064680647806488064980650806518065280653806548065580656806578065880659806608066180662806638066480665806668066780668806698067080671806728067380674806758067680677806788067980680806818068280683806848068580686806878068880689806908069180692806938069480695806968069780698806998070080701807028070380704807058070680707807088070980710807118071280713807148071580716807178071880719807208072180722807238072480725807268072780728807298073080731807328073380734807358073680737807388073980740807418074280743807448074580746807478074880749807508075180752807538075480755807568075780758807598076080761807628076380764807658076680767807688076980770807718077280773807748077580776807778077880779807808078180782807838078480785807868078780788807898079080791807928079380794807958079680797807988079980800808018080280803808048080580806808078080880809808108081180812808138081480815808168081780818808198082080821808228082380824808258082680827808288082980830808318083280833808348083580836808378083880839808408084180842808438084480845808468084780848808498085080851808528085380854808558085680857808588085980860808618086280863808648086580866808678086880869808708087180872808738087480875808768087780878808798088080881808828088380884808858088680887808888088980890808918089280893808948089580896808978089880899809008090180902809038090480905809068090780908809098091080911809128091380914809158091680917809188091980920809218092280923809248092580926809278092880929809308093180932809338093480935809368093780938809398094080941809428094380944809458094680947809488094980950809518095280953809548095580956809578095880959809608096180962809638096480965809668096780968809698097080971809728097380974809758097680977809788097980980809818098280983809848098580986809878098880989809908099180992809938099480995809968099780998809998100081001810028100381004810058100681007810088100981010810118101281013810148101581016810178101881019810208102181022810238102481025810268102781028810298103081031810328103381034810358103681037810388103981040810418104281043810448104581046810478104881049810508105181052810538105481055810568105781058810598106081061810628106381064810658106681067810688106981070810718107281073810748107581076810778107881079810808108181082810838108481085810868108781088810898109081091810928109381094810958109681097810988109981100811018110281103811048110581106811078110881109811108111181112811138111481115811168111781118811198112081121811228112381124811258112681127811288112981130811318113281133811348113581136811378113881139811408114181142811438114481145811468114781148811498115081151811528115381154811558115681157811588115981160811618116281163811648116581166811678116881169811708117181172811738117481175811768117781178811798118081181811828118381184811858118681187811888118981190811918119281193811948119581196811978119881199812008120181202812038120481205812068120781208812098121081211812128121381214812158121681217812188121981220812218122281223812248122581226812278122881229812308123181232812338123481235812368123781238812398124081241812428124381244812458124681247812488124981250812518125281253812548125581256812578125881259812608126181262812638126481265812668126781268812698127081271812728127381274812758127681277812788127981280812818128281283812848128581286812878128881289812908129181292812938129481295812968129781298812998130081301813028130381304813058130681307813088130981310813118131281313813148131581316813178131881319813208132181322813238132481325813268132781328813298133081331813328133381334813358133681337813388133981340813418134281343813448134581346813478134881349813508135181352813538135481355813568135781358813598136081361813628136381364813658136681367813688136981370813718137281373813748137581376813778137881379813808138181382813838138481385813868138781388813898139081391813928139381394813958139681397813988139981400814018140281403814048140581406814078140881409814108141181412814138141481415814168141781418814198142081421814228142381424814258142681427814288142981430814318143281433814348143581436814378143881439814408144181442814438144481445814468144781448814498145081451814528145381454814558145681457814588145981460814618146281463814648146581466814678146881469814708147181472814738147481475814768147781478814798148081481814828148381484814858148681487814888148981490814918149281493814948149581496814978149881499815008150181502815038150481505815068150781508815098151081511815128151381514815158151681517815188151981520815218152281523815248152581526815278152881529815308153181532815338153481535815368153781538815398154081541815428154381544815458154681547815488154981550815518155281553815548155581556815578155881559815608156181562815638156481565815668156781568815698157081571815728157381574815758157681577815788157981580815818158281583815848158581586815878158881589815908159181592815938159481595815968159781598815998160081601816028160381604816058160681607816088160981610816118161281613816148161581616816178161881619816208162181622816238162481625816268162781628816298163081631816328163381634816358163681637816388163981640816418164281643816448164581646816478164881649816508165181652816538165481655816568165781658816598166081661816628166381664816658166681667816688166981670816718167281673816748167581676816778167881679816808168181682816838168481685816868168781688816898169081691816928169381694816958169681697816988169981700817018170281703817048170581706817078170881709817108171181712817138171481715817168171781718817198172081721817228172381724817258172681727817288172981730817318173281733817348173581736817378173881739817408174181742817438174481745817468174781748817498175081751817528175381754817558175681757817588175981760817618176281763817648176581766817678176881769817708177181772817738177481775817768177781778817798178081781817828178381784817858178681787817888178981790817918179281793817948179581796817978179881799818008180181802818038180481805818068180781808818098181081811818128181381814818158181681817818188181981820818218182281823818248182581826818278182881829818308183181832818338183481835818368183781838818398184081841818428184381844818458184681847818488184981850818518185281853818548185581856818578185881859818608186181862818638186481865818668186781868818698187081871818728187381874818758187681877818788187981880818818188281883818848188581886818878188881889818908189181892818938189481895818968189781898818998190081901819028190381904819058190681907819088190981910819118191281913819148191581916819178191881919819208192181922819238192481925819268192781928819298193081931819328193381934819358193681937819388193981940819418194281943819448194581946819478194881949819508195181952819538195481955819568195781958819598196081961819628196381964819658196681967819688196981970819718197281973819748197581976819778197881979819808198181982819838198481985819868198781988819898199081991819928199381994819958199681997819988199982000820018200282003820048200582006820078200882009820108201182012820138201482015820168201782018820198202082021820228202382024820258202682027820288202982030820318203282033820348203582036820378203882039820408204182042820438204482045820468204782048820498205082051820528205382054820558205682057820588205982060820618206282063820648206582066820678206882069820708207182072820738207482075820768207782078820798208082081820828208382084820858208682087820888208982090820918209282093820948209582096820978209882099821008210182102821038210482105821068210782108821098211082111821128211382114821158211682117821188211982120821218212282123821248212582126821278212882129821308213182132821338213482135821368213782138821398214082141821428214382144821458214682147821488214982150821518215282153821548215582156821578215882159821608216182162821638216482165821668216782168821698217082171821728217382174821758217682177821788217982180821818218282183821848218582186821878218882189821908219182192821938219482195821968219782198821998220082201822028220382204822058220682207822088220982210822118221282213822148221582216822178221882219822208222182222822238222482225822268222782228822298223082231822328223382234822358223682237822388223982240822418224282243822448224582246822478224882249822508225182252822538225482255822568225782258822598226082261822628226382264822658226682267822688226982270822718227282273822748227582276822778227882279822808228182282822838228482285822868228782288822898229082291822928229382294822958229682297822988229982300823018230282303823048230582306823078230882309823108231182312823138231482315823168231782318823198232082321823228232382324823258232682327823288232982330823318233282333823348233582336823378233882339823408234182342823438234482345823468234782348823498235082351823528235382354823558235682357823588235982360823618236282363823648236582366823678236882369823708237182372823738237482375823768237782378823798238082381823828238382384823858238682387823888238982390823918239282393823948239582396823978239882399824008240182402824038240482405824068240782408824098241082411824128241382414824158241682417824188241982420824218242282423824248242582426824278242882429824308243182432824338243482435824368243782438824398244082441824428244382444824458244682447824488244982450824518245282453824548245582456824578245882459824608246182462824638246482465824668246782468824698247082471824728247382474824758247682477824788247982480824818248282483824848248582486824878248882489824908249182492824938249482495824968249782498824998250082501825028250382504825058250682507825088250982510825118251282513825148251582516825178251882519825208252182522825238252482525825268252782528825298253082531825328253382534825358253682537825388253982540825418254282543825448254582546825478254882549825508255182552825538255482555825568255782558825598256082561825628256382564825658256682567825688256982570825718257282573825748257582576825778257882579825808258182582825838258482585825868258782588825898259082591825928259382594825958259682597825988259982600826018260282603826048260582606826078260882609826108261182612826138261482615826168261782618826198262082621826228262382624826258262682627826288262982630826318263282633826348263582636826378263882639826408264182642826438264482645826468264782648826498265082651826528265382654826558265682657826588265982660826618266282663826648266582666826678266882669826708267182672826738267482675826768267782678826798268082681826828268382684826858268682687826888268982690826918269282693826948269582696826978269882699827008270182702827038270482705827068270782708827098271082711827128271382714827158271682717827188271982720827218272282723827248272582726827278272882729827308273182732827338273482735827368273782738827398274082741827428274382744827458274682747827488274982750827518275282753827548275582756827578275882759827608276182762827638276482765827668276782768827698277082771827728277382774827758277682777827788277982780827818278282783827848278582786827878278882789827908279182792827938279482795827968279782798827998280082801828028280382804828058280682807828088280982810828118281282813828148281582816828178281882819828208282182822828238282482825828268282782828828298283082831828328283382834828358283682837828388283982840828418284282843828448284582846828478284882849828508285182852828538285482855828568285782858828598286082861828628286382864828658286682867828688286982870828718287282873828748287582876828778287882879828808288182882828838288482885828868288782888828898289082891828928289382894828958289682897828988289982900829018290282903829048290582906829078290882909829108291182912829138291482915829168291782918829198292082921829228292382924829258292682927829288292982930829318293282933829348293582936829378293882939829408294182942829438294482945829468294782948829498295082951829528295382954829558295682957829588295982960829618296282963829648296582966829678296882969829708297182972829738297482975829768297782978829798298082981829828298382984829858298682987829888298982990829918299282993829948299582996829978299882999830008300183002830038300483005830068300783008830098301083011830128301383014830158301683017830188301983020830218302283023830248302583026830278302883029830308303183032830338303483035830368303783038830398304083041830428304383044830458304683047830488304983050830518305283053830548305583056830578305883059830608306183062830638306483065830668306783068830698307083071830728307383074830758307683077830788307983080830818308283083830848308583086830878308883089830908309183092830938309483095830968309783098830998310083101831028310383104831058310683107831088310983110831118311283113831148311583116831178311883119831208312183122831238312483125831268312783128831298313083131831328313383134831358313683137831388313983140831418314283143831448314583146831478314883149831508315183152831538315483155831568315783158831598316083161831628316383164831658316683167831688316983170831718317283173831748317583176831778317883179831808318183182831838318483185831868318783188831898319083191831928319383194831958319683197831988319983200832018320283203832048320583206832078320883209832108321183212832138321483215832168321783218832198322083221832228322383224832258322683227832288322983230832318323283233832348323583236832378323883239832408324183242832438324483245832468324783248832498325083251832528325383254832558325683257832588325983260832618326283263832648326583266832678326883269832708327183272832738327483275832768327783278832798328083281832828328383284832858328683287832888328983290832918329283293832948329583296832978329883299833008330183302833038330483305833068330783308833098331083311833128331383314833158331683317833188331983320833218332283323833248332583326833278332883329833308333183332833338333483335833368333783338833398334083341833428334383344833458334683347833488334983350833518335283353833548335583356833578335883359833608336183362833638336483365833668336783368833698337083371833728337383374833758337683377833788337983380833818338283383833848338583386833878338883389833908339183392833938339483395833968339783398833998340083401834028340383404834058340683407834088340983410834118341283413834148341583416834178341883419834208342183422834238342483425834268342783428834298343083431834328343383434834358343683437834388343983440834418344283443834448344583446834478344883449834508345183452834538345483455834568345783458834598346083461834628346383464834658346683467834688346983470834718347283473834748347583476834778347883479834808348183482834838348483485834868348783488834898349083491834928349383494834958349683497834988349983500835018350283503835048350583506835078350883509835108351183512835138351483515835168351783518835198352083521835228352383524835258352683527835288352983530835318353283533835348353583536835378353883539835408354183542835438354483545835468354783548835498355083551835528355383554835558355683557835588355983560835618356283563835648356583566835678356883569835708357183572835738357483575835768357783578835798358083581835828358383584835858358683587835888358983590835918359283593835948359583596835978359883599836008360183602836038360483605836068360783608836098361083611836128361383614836158361683617836188361983620836218362283623836248362583626836278362883629836308363183632836338363483635836368363783638836398364083641836428364383644836458364683647836488364983650836518365283653836548365583656836578365883659836608366183662836638366483665836668366783668836698367083671836728367383674836758367683677836788367983680836818368283683836848368583686836878368883689836908369183692836938369483695836968369783698836998370083701837028370383704837058370683707837088370983710837118371283713837148371583716837178371883719837208372183722837238372483725837268372783728837298373083731837328373383734837358373683737837388373983740837418374283743837448374583746837478374883749837508375183752837538375483755837568375783758837598376083761837628376383764837658376683767837688376983770837718377283773837748377583776837778377883779837808378183782837838378483785837868378783788837898379083791837928379383794837958379683797837988379983800838018380283803838048380583806838078380883809838108381183812838138381483815838168381783818838198382083821838228382383824838258382683827838288382983830838318383283833838348383583836838378383883839838408384183842838438384483845838468384783848838498385083851838528385383854838558385683857838588385983860838618386283863838648386583866838678386883869838708387183872838738387483875838768387783878838798388083881838828388383884838858388683887838888388983890838918389283893838948389583896838978389883899839008390183902839038390483905839068390783908839098391083911839128391383914839158391683917839188391983920839218392283923839248392583926839278392883929839308393183932839338393483935839368393783938839398394083941839428394383944839458394683947839488394983950839518395283953839548395583956839578395883959839608396183962839638396483965839668396783968839698397083971839728397383974839758397683977839788397983980839818398283983839848398583986839878398883989839908399183992839938399483995839968399783998839998400084001840028400384004840058400684007840088400984010840118401284013840148401584016840178401884019840208402184022840238402484025840268402784028840298403084031840328403384034840358403684037840388403984040840418404284043840448404584046840478404884049840508405184052840538405484055840568405784058840598406084061840628406384064840658406684067840688406984070840718407284073840748407584076840778407884079840808408184082840838408484085840868408784088840898409084091840928409384094840958409684097840988409984100841018410284103841048410584106841078410884109841108411184112841138411484115841168411784118841198412084121841228412384124841258412684127841288412984130841318413284133841348413584136841378413884139841408414184142841438414484145841468414784148841498415084151841528415384154841558415684157841588415984160841618416284163841648416584166841678416884169841708417184172841738417484175841768417784178841798418084181841828418384184841858418684187841888418984190841918419284193841948419584196841978419884199842008420184202842038420484205842068420784208842098421084211842128421384214842158421684217842188421984220842218422284223842248422584226842278422884229842308423184232842338423484235842368423784238842398424084241842428424384244842458424684247842488424984250842518425284253842548425584256842578425884259842608426184262842638426484265842668426784268842698427084271842728427384274842758427684277842788427984280842818428284283842848428584286842878428884289842908429184292842938429484295842968429784298842998430084301843028430384304843058430684307843088430984310843118431284313843148431584316843178431884319843208432184322843238432484325843268432784328843298433084331843328433384334843358433684337843388433984340843418434284343843448434584346843478434884349843508435184352843538435484355843568435784358843598436084361843628436384364843658436684367843688436984370843718437284373843748437584376843778437884379843808438184382843838438484385843868438784388843898439084391843928439384394843958439684397843988439984400844018440284403844048440584406844078440884409844108441184412844138441484415844168441784418844198442084421844228442384424844258442684427844288442984430844318443284433844348443584436844378443884439844408444184442844438444484445844468444784448844498445084451844528445384454844558445684457844588445984460844618446284463844648446584466844678446884469844708447184472844738447484475844768447784478844798448084481844828448384484844858448684487844888448984490844918449284493844948449584496844978449884499845008450184502845038450484505845068450784508845098451084511845128451384514845158451684517845188451984520845218452284523845248452584526845278452884529845308453184532845338453484535845368453784538845398454084541845428454384544845458454684547845488454984550845518455284553845548455584556845578455884559845608456184562845638456484565845668456784568845698457084571845728457384574845758457684577845788457984580845818458284583845848458584586845878458884589845908459184592845938459484595845968459784598845998460084601846028460384604846058460684607846088460984610846118461284613846148461584616846178461884619846208462184622846238462484625846268462784628846298463084631846328463384634846358463684637846388463984640846418464284643846448464584646846478464884649846508465184652846538465484655846568465784658846598466084661846628466384664846658466684667846688466984670846718467284673846748467584676846778467884679846808468184682846838468484685846868468784688846898469084691846928469384694846958469684697846988469984700847018470284703847048470584706847078470884709847108471184712847138471484715847168471784718847198472084721847228472384724847258472684727847288472984730847318473284733847348473584736847378473884739847408474184742847438474484745847468474784748847498475084751847528475384754847558475684757847588475984760847618476284763847648476584766847678476884769847708477184772847738477484775847768477784778847798478084781847828478384784847858478684787847888478984790847918479284793847948479584796847978479884799848008480184802848038480484805848068480784808848098481084811848128481384814848158481684817848188481984820848218482284823848248482584826848278482884829848308483184832848338483484835848368483784838848398484084841848428484384844848458484684847848488484984850848518485284853848548485584856848578485884859848608486184862848638486484865848668486784868848698487084871848728487384874848758487684877848788487984880848818488284883848848488584886848878488884889848908489184892848938489484895848968489784898848998490084901849028490384904849058490684907849088490984910849118491284913849148491584916849178491884919849208492184922849238492484925849268492784928849298493084931849328493384934849358493684937849388493984940849418494284943849448494584946849478494884949849508495184952849538495484955849568495784958849598496084961849628496384964849658496684967849688496984970849718497284973849748497584976849778497884979849808498184982849838498484985849868498784988849898499084991849928499384994849958499684997849988499985000850018500285003850048500585006850078500885009850108501185012850138501485015850168501785018850198502085021850228502385024850258502685027850288502985030850318503285033850348503585036850378503885039850408504185042850438504485045850468504785048850498505085051850528505385054850558505685057850588505985060850618506285063850648506585066850678506885069850708507185072850738507485075850768507785078850798508085081850828508385084850858508685087850888508985090850918509285093850948509585096850978509885099851008510185102851038510485105851068510785108851098511085111851128511385114851158511685117851188511985120851218512285123851248512585126851278512885129851308513185132851338513485135851368513785138851398514085141851428514385144851458514685147
  1. /* ******************************************************************
  2. ******************************************************************
  3. ******************************************************************
  4. OOOOOOOOOOOOOOOOOOOOOOOOOO SSSSSSSSSSSSSSSSSSSSSS
  5. OOOOOOOOOOOOOOOOOOOOOOOOOO SSSSSSSSSSSSSSSSSSSSSS
  6. OOOOOOOOOOOOOOOOOOOOOOOOOO SSSSSSSSSSSSSSSSSSSSSS
  7. OOOO OOOO SSSSSS
  8. OOOO OOOO SSSSSS
  9. OOOO ooooooooo OOOO SSSSSS
  10. OOOO o o OOOO SSSSSSSSSSSSSSSSSSSSSS
  11. OOOO o o o OOOO SSSSSSSSSSSSSSSSSSSSSS
  12. OOOO o o OOOO SSSSSSSSSSSSSSSSSSSSSS
  13. OOOO ooooooooo OOOO SSSSSS
  14. OOOO OOOO SSSSSS
  15. OOOO. OOOO SSSSSS
  16. OOOOOOOOOOOOOOOOOOOOOOOOOO SSSSSSSSSSSSSSSSSSSSSS
  17. OOOOOOOOOOOOOOOOOOOOOOOOOO SSSSSSSSSSSSSSSSSSSSSS
  18. OOOOOOOOOOOOOOOOOOOOOOOOOO SSSSSSSSSSSSSSSSSSSSSS
  19. ____ ______ ____ ___ _ ____ _ _
  20. |__/ | | | |___ |__] | |__| \_/
  21. | \ |__| |___ |___ | |___ | | |
  22. ******************************************************************
  23. ******************************************************************
  24. ******************************************************************
  25. Copyright (c) 2018 - 2019
  26. Old School Roleplay
  27. Pedro & Hernandez & MMilot
  28. */
  29. #include <a_samp>
  30. #include <crashdetect>
  31. #include <a_http>
  32. #include <a_mysql>
  33. #include <foreach>
  34. #include <progress2>
  35. #include <sscanf2>
  36. #include <regex>
  37. #include <tp>
  38. #include <selection>
  39. #include <Pawn.CMD>
  40. #include <easyDialog>
  41. #include <youtube_stream>
  42. #include <dof2>
  43. #include <streamer>
  44. // --------------------------------------
  45. #undef MAX_PLAYERS
  46. #define MAX_PLAYERS 120
  47. #define MYSQL_HOSTNAME "localhost"
  48. #define MYSQL_DATABASE "osrp"
  49. #define MYSQL_USERNAME "root"
  50. #define MYSQL_PASSWORD ""
  51. // ---------------------------------------
  52. #define SERVER_NAME "Old School Roleplay"
  53. #define SERVER_REVISION "OS:RP v0.4 R2"
  54. #define SERVER_ANTICHEAT "The server"
  55. #define SERVER_MUSIC_URL "os-rp.net/music"
  56. #define SERVER_FETCH_URL "os-rp.net/music"
  57. #define VIP_MUSIC_URL "os-rp.net/music"
  58. // ---------------------------------------
  59. #include "server/def/def_table.osrp"
  60. #include "server/def/def_colors.osrp"
  61. #include "server/def/def_admins.osrp"
  62. #include "server/def/def_max.osrp"
  63. #include "server/def/iterators.osrp"
  64. // ---------------------------------------
  65. #include "server/def/mysql_thread.osrp"
  66. #include "server/def/def_modelSelection.osrp"
  67. #include "server/def/def_misc.osrp"
  68. #include "server/def/def_elevator.osrp"
  69. // ---------------------------------------
  70. #undef SSCANF_Join
  71. #undef SSCANF_Leave
  72. //----------------------------------------
  73. #define INVALID_FLOOR (-1)
  74. #include <vehicleFix>
  75. // ---------------------------------------
  76. #define BODY_PART_CHEST (3)
  77. #define BODY_PART_GROIN (4)
  78. #define BODY_PART_LEFT_ARM (5)
  79. #define BODY_PART_RIGHT_ARM (6)
  80. #define BODY_PART_LEFT_LEG (7)
  81. #define BODY_PART_RIGHT_LEG (8)
  82. #define BODY_PART_HEAD (9)
  83. #pragma tabsize 0
  84. enum
  85. {
  86. DIALOG_NONE = 1,
  87. DIALOG_NEWUPGRADE,
  88. DIALOG_SETTINGS2,
  89. DIALOG_SETTINGS,
  90. DIALOG_POST_APPLICATION,
  91. DIALOG_HELP,
  92. DIALOG_STATS,
  93. DIALOG_ADNEW,
  94. DIALOG_FOOD,
  95. DIALOG_SKILL,
  96. DIALOG_BUYVEHICLENEW,
  97. DIALOG_NEWBIE,
  98. ACCOUNT_CREATION,
  99. DIALOG_REGISTER,
  100. DIALOG_LOGIN,
  101. DIALOG_GENDER,
  102. DIALOG_AGE,
  103. DIALOG_REFERRAL,
  104. DIALOG_ATM,
  105. DIALOG_ATMDEPOSIT,
  106. DIALOG_ATMWITHDRAW,
  107. DIALOG_BUYCLOTHINGTYPE,
  108. DIALOG_BUYCLOTHING,
  109. DIALOG_BUYCLOTHES,
  110. DIALOG_FACTIONPAY1,
  111. DIALOG_PHONEBOOK,
  112. DIALOG_LANDBUILDTYPE,
  113. DIALOG_LANDBUILD1,
  114. DIALOG_LANDBUILD2,
  115. DIALOG_LANDMENU,
  116. DIALOG_LANDOBJECTMENU,
  117. DIALOG_LANDOBJECTS,
  118. DIALOG_MP3PLAYER,
  119. DIALOG_MP3RADIO,
  120. DIALOG_MP3RADIOGENRES,
  121. DIALOG_MP3RADIOSUBGENRES,
  122. DIALOG_MP3RADIORESULTS,
  123. DIALOG_MP3RADIOSEARCH,
  124. DIALOG_GANGSTASH,
  125. DIALOG_GANGSTASHVEST,
  126. DIALOG_GANGSTASHWEAPONS1,
  127. DIALOG_GANGSTASHDRUGS1,
  128. DIALOG_GANGSTASHDRUGS2,
  129. DIALOG_GANGSTASHCRAFT,
  130. DIALOG_GANGSTASHMATS,
  131. DIALOG_GANGSTASHCASH,
  132. DIALOG_GANGWITHDRAW,
  133. DIALOG_GANGDEPOSIT,
  134. DIALOG_GANGARMSPRICES,
  135. DIALOG_GANGARMSDEALER,
  136. DIALOG_GANGARMSWEAPONS,
  137. DIALOG_GANGARMSEDIT,
  138. GangStashDepositMats,
  139. GangStashWithdrawMats,
  140. DIALOG_CRACKTRUNK,
  141. DIALOG_RULES,
  142. DIALOG_LOCATE,
  143. DIALOG_FACTIONEQUIPMENT,
  144. DIALOG_CREATEQUIZ,
  145. DIALOG_DELETEOBJECT,
  146. DIALOG_PAINTBALL,
  147. DIALOG_ADDSTATION,
  148. DIALOG_BUYVEHICLE
  149. }
  150. enum
  151. {
  152. VEHICLE_ENGINE,
  153. VEHICLE_LIGHTS,
  154. VEHICLE_ALARM,
  155. VEHICLE_DOORS,
  156. VEHICLE_BONNET,
  157. VEHICLE_BOOT,
  158. VEHICLE_OBJECTIVE
  159. };
  160. enum
  161. {
  162. STASH_CAPACITY_CASH,
  163. STASH_CAPACITY_MATERIALS,
  164. STASH_CAPACITY_WEED,
  165. STASH_CAPACITY_COCAINE,
  166. STASH_CAPACITY_METH,
  167. STASH_CAPACITY_PAINKILLERS,
  168. STASH_CAPACITY_WEAPONS
  169. };
  170. enum {
  171. EDIT_TYPE_NONE,
  172. EDIT_TYPE_PREVIEW,
  173. EDIT_TYPE_FURNITURE,
  174. EDIT_TYPE_PAYPHONE,
  175. EDIT_TYPE_ATM
  176. };
  177. enum
  178. {
  179. E_OBJECT_TYPE,
  180. E_OBJECT_INDEX_ID,
  181. E_OBJECT_EXTRA_ID,
  182. E_OBJECT_3DTEXT_ID,
  183. E_OBJECT_OPENED,
  184. E_OBJECT_WEAPONID,
  185. E_OBJECT_FACTION,
  186. E_OBJECT_X,
  187. E_OBJECT_Y,
  188. E_OBJECT_Z
  189. };
  190. enum
  191. {
  192. E_OBJECT_FURNITURE,
  193. E_OBJECT_WEAPON,
  194. E_OBJECT_LAND
  195. };
  196. enum
  197. {
  198. EDIT_CLOTHING_PREVIEW = 1,
  199. EDIT_CLOTHING,
  200. EDIT_LAND_OBJECT_PREVIEW,
  201. EDIT_LAND_OBJECT,
  202. EDIT_LAND_GATE_MOVE,
  203. EDIT_COP_CLOTHING
  204. };
  205. enum
  206. {
  207. DEPLOY_SPIKESTRIP,
  208. DEPLOY_CONE,
  209. DEPLOY_ROADBLOCK,
  210. DEPLOY_BARREL,
  211. DEPLOY_FLARE
  212. };
  213. enum
  214. {
  215. WORKOUT_NONE,
  216. WORKOUT_DUMBELLS,
  217. WORKOUT_TREADMILL
  218. };
  219. enum
  220. {
  221. BUSINESS_STORE,
  222. BUSINESS_GUNSHOP,
  223. BUSINESS_CLOTHES,
  224. BUSINESS_GYM,
  225. BUSINESS_RESTAURANT,
  226. BUSINESS_AGENCY,
  227. BUSINESS_BARCLUB,
  228. BUSINESS_TOOLSHOP,
  229. BUSINESS_DEALERSHIP
  230. };
  231. enum
  232. {
  233. FACTION_NONE,
  234. FACTION_POLICE,
  235. FACTION_MEDIC,
  236. FACTION_NEWS,
  237. FACTION_GOVERNMENT,
  238. FACTION_HITMAN,
  239. FACTION_FEDERAL,
  240. FACTION_ARMY,
  241. FACTION_TERRORIST
  242. };
  243. enum
  244. {
  245. JOB_NONE = -1,
  246. JOB_PIZZAMAN,
  247. JOB_COURIER,
  248. JOB_FISHERMAN,
  249. JOB_BODYGUARD,
  250. JOB_WEAPONDEALER,
  251. JOB_MECHANIC,
  252. JOB_MINER,
  253. JOB_SWEEPER,
  254. JOB_TAXIDRIVER,
  255. JOB_DRUGDEALER,
  256. JOB_LAWYER,
  257. JOB_DETECTIVE,
  258. JOB_GARBAGEMAN,
  259. JOB_FARMER
  260. };
  261. enum
  262. {
  263. CHECKPOINT_NONE = 0,
  264. CHECKPOINT_PIZZA,
  265. CHECKPOINT_TEST,
  266. CHECKPOINT_MINING,
  267. CHECKPOINT_MATS,
  268. CHECKPOINT_DRUGS,
  269. CHECKPOINT_HOUSE,
  270. CHECKPOINT_ROBBERY,
  271. CHECKPOINT_DROPCAR,
  272. CHECKPOINT_MISC,
  273. CHECKPOINT_GARBAGE,
  274. CHECKPOINT_FARMER,
  275. CHECKPOINT_HOUSEROB,
  276. CHECKPOINT_TRUCKDELIVERY
  277. };
  278. enum
  279. {
  280. HANGUP_DROPPED,
  281. HANGUP_USER
  282. };
  283. enum
  284. {
  285. MUSIC_NONE,
  286. MUSIC_MP3PLAYER,
  287. MUSIC_BOOMBOX,
  288. MUSIC_VEHICLE
  289. };
  290. enum
  291. {
  292. ITEM_WEAPON,
  293. ITEM_SELLGUN,
  294. ITEM_MATERIALS,
  295. ITEM_WEED,
  296. ITEM_COCAINE,
  297. ITEM_METH,
  298. ITEM_PAINKILLERS,
  299. ITEM_SEEDS,
  300. ITEM_EPHEDRINE,
  301. ITEM_CASH
  302. };
  303. enum
  304. {
  305. CAPACITY_MATERIALS,
  306. CAPACITY_WEED,
  307. CAPACITY_COCAINE,
  308. CAPACITY_METH,
  309. CAPACITY_PAINKILLERS,
  310. CAPACITY_SEEDS,
  311. CAPACITY_EPHEDRINE,
  312. CAPACITY_OIL
  313. };
  314. enum
  315. {
  316. LIMIT_HOUSES,
  317. LIMIT_BUSINESSES,
  318. LIMIT_GARAGES,
  319. LIMIT_VEHICLES
  320. };
  321. enum
  322. {
  323. POINT_DRUGFACTORY = 1,
  324. POINT_DRUGDEN,
  325. POINT_CRACKHOUSE,
  326. POINT_AUTOEXPORT,
  327. POINT_FUEL,
  328. POINT_MATPICKUP1,
  329. POINT_MATPICKUP2,
  330. POINT_MATFACTORY1,
  331. POINT_MATFACTORY2
  332. };
  333. enum
  334. {
  335. GANGWEAPON_9MM,
  336. GANGWEAPON_SDPISTOL,
  337. GANGWEAPON_DEAGLE,
  338. GANGWEAPON_SHOTGUN,
  339. GANGWEAPON_TEC9,
  340. GANGWEAPON_UZI,
  341. GANGWEAPON_MP5,
  342. GANGWEAPON_AK47,
  343. GANGWEAPON_RIFLE
  344. };
  345. enum
  346. {
  347. TAG_NONE,
  348. TAG_ADMIN,
  349. TAG_HELPER,
  350. TAG_VIP
  351. };
  352. enum
  353. {
  354. GRAPHICRANK_NONE = 0,
  355. GRAPHICRANK_REGULAR,
  356. GRAPHICRANK_SENIOR,
  357. GRAPHICRANK_MANAGER
  358. };
  359. enum
  360. {
  361. ZONETYPE_LAND = 1,
  362. ZONETYPE_TURF,
  363. ZONETYPE_POINT
  364. };
  365. enum
  366. {
  367. DOOR_DRIVER,
  368. DOOR_PASSENGER
  369. };
  370. enum
  371. {
  372. HOSPITAL_COUNTY = 1,
  373. HOSPITAL_ALLSAINTS,
  374. HOSPITAL_FMDHQ,
  375. HOSPITAL_VIPLOUNGE
  376. };
  377. enum e_Payphones {
  378. phID,
  379. phExists,
  380. phNumber,
  381. phOccupied,
  382. phCaller,
  383. Float:phX,
  384. Float:phY,
  385. Float:phZ,
  386. Float:phA,
  387. phInterior,
  388. phWorld,
  389. phObject,
  390. Text3D:phText
  391. };
  392. enum e_Timers
  393. {
  394. tFooter,
  395. tWorkout,
  396. tHospital,
  397. tRefuel,
  398. tRepair
  399. };
  400. enum e_ATM
  401. {
  402. atmID,
  403. atmExists,
  404. Float:atmSpawn[4],
  405. atmInterior,
  406. atmWorld,
  407. atmObject,
  408. Text3D:atmText
  409. };
  410. enum pEnum
  411. {
  412. PlayerText:pText[103],
  413. PlayerBar:pBars[2],
  414. pPassword[129],
  415. pUsername[MAX_PLAYER_NAME],
  416. pID,
  417. pLogged,
  418. pKicked,
  419. pLoginTries,
  420. pSetup,
  421. pGender,
  422. pAge,
  423. pSkin,
  424. Float:pCameraX,
  425. Float:pCameraY,
  426. Float:pCameraZ,
  427. Float:pPosX,
  428. Float:pPosY,
  429. Float:pPosZ,
  430. Float:pPosA,
  431. pInterior,
  432. pWorld,
  433. pCash,
  434. pBank,
  435. pPaycheck,
  436. pvLock,
  437. pWorkout,
  438. pWeight,
  439. pReps,
  440. pSpeedLevel,
  441. pDistanceRan,
  442. pWorkoutTime,
  443. pLevel,
  444. pSpawnSelect,
  445. pSpawnHouse,
  446. pSpawnPrecinct,
  447. pChatstyle,
  448. pEdit,
  449. pEditID,
  450. pHouseEdit,
  451. pPreviewIndex,
  452. pFurnitureIndex,
  453. pHouse,
  454. pFitness,
  455. pGymMembership,
  456. pBugFix,
  457. pInTurf,
  458. pCompany,
  459. pDealershipMenu,
  460. pDealershipIndex,
  461. pShowFooter,
  462. pFooterTimer,
  463. pVehicleCMD,
  464. pCrowbar,
  465. pSpeedTime,
  466. pSpeakerPhone,
  467. pRangeBooth,
  468. pTargets,
  469. pTargetLevel,
  470. pLegalTruckJob1,
  471. pLegalTruckJob2,
  472. pLegalTruckJob3,
  473. pIllegalTruckJob1,
  474. pIllegalTruckJob2,
  475. pIllegalTruckJob3,
  476. pTruckingLevel,
  477. pTruckingXP,
  478. bool:pSWATduty,
  479. pEditRack,
  480. pPVIPVoucher,
  481. pPhoneRingTone[132],
  482. pCellname,
  483. pToggleVehCam,
  484. pHouseAlarm,
  485. Text3D:aMeID,
  486. aMeStatus,
  487. pDJ,
  488. pAdvertVoucher,
  489. pSVIPExVoucher,
  490. pAdminStrike,
  491. Text3D:pRepfam[64],
  492. pGVIPExVoucher,
  493. pVIPSellable,
  494. pTicketTime,
  495. pCarVoucher,
  496. pVehVoucher,
  497. pSVIPVoucher,
  498. pGVIPVoucher,
  499. pGiftVoucher,
  500. pGiftTime,
  501. pEXP,
  502. pGraphic,
  503. pMinutes,
  504. pHours,
  505. pAdmin,
  506. pGraffiti,
  507. pGraffitiTime,
  508. pGraffitiText[64 char],
  509. pEditGraffiti,
  510. pEditLandGraffiti,
  511. pRobHouse,
  512. pAdminName[MAX_PLAYER_NAME],
  513. pHelper,
  514. Float:pHealth,
  515. Float:pArmor,
  516. pUpgradePoints,
  517. pWarnings,
  518. pInjured,
  519. pHospital,
  520. Float:pSpawnHealth,
  521. Float:pSpawnArmor,
  522. pJailType,
  523. pJailTime,
  524. pNewbieMuted,
  525. pHelpMuted,
  526. pAdMuted,
  527. pLiveMuted,
  528. pGlobalMuted,
  529. pReportMuted,
  530. pReportWarns,
  531. pFightStyle,
  532. pAccent[16],
  533. pCookies,
  534. pPhone,
  535. pCalling,
  536. pPhoneSMS,
  537. pCaller,
  538. pPayphone,
  539. pJob,
  540. pSecondJob,
  541. pCrimes,
  542. pArrested,
  543. pWantedLevel,
  544. pMaterials,
  545. pWeed,
  546. pCocaine,
  547. pMeth,
  548. pPainkillers,
  549. pSeeds,
  550. pEphedrine,
  551. pMuriaticAcid,
  552. pBakingSoda,
  553. pCigars,
  554. pWalkieTalkie,
  555. pChannel,
  556. pRentingHouse,
  557. pSpraycans,
  558. pBoombox,
  559. pMP3Player,
  560. pPhonebook,
  561. pFishingRod,
  562. pFishingBait,
  563. pFishWeight,
  564. pComponents,
  565. pCourierSkill,
  566. pFishingSkill,
  567. pGuardSkill,
  568. pWeaponSkill,
  569. pGunsAmmo[13],
  570. pAGuns[13],
  571. pGunLicense,
  572. pMechanicSkill,
  573. pLawyerSkill,
  574. pSmugglerSkill,
  575. pDetectiveSkill,
  576. pThiefSkill,
  577. pDealerSkill,
  578. pToggleTextdraws,
  579. pToggleTP,
  580. pToggleOOC,
  581. pTogglePhone,
  582. pToggleAdmin,
  583. pToggleHelper,
  584. pToggleNewbie,
  585. pTogglePoints,
  586. pToggleTurfs,
  587. pToggleWT,
  588. pTogglePM,
  589. pToggleRadio,
  590. pToggleVIP,
  591. pToggleMusic,
  592. pToggleFaction,
  593. pToggleGang,
  594. pToggleNews,
  595. pToggleGlobal,
  596. pToggleCam,
  597. pToggleHUD,
  598. pToggleReports,
  599. pToggleWhisper,
  600. pToggleBug,
  601. pCarLicense,
  602. pDonator,
  603. pVIPTime,
  604. pVIPCooldown,
  605. pWeapons[13],
  606. pAmmo[13],
  607. pTempWeapons[13],
  608. pFaction,
  609. pFactionRank,
  610. pFactionLeader,
  611. pGang,
  612. pWebDev,
  613. pGangRank,
  614. pDivision,
  615. pCrew,
  616. pContracted,
  617. pContractBy[MAX_PLAYER_NAME],
  618. pBombs,
  619. pCompletedHits,
  620. pFailedHits,
  621. pReports,
  622. pNewbies,
  623. pHelpRequests,
  624. pSpeedometer, // (1) KM/H (2) MPH
  625. pFactionMod,
  626. pGangMod,
  627. pBanAppealer,
  628. pFormerAdmin,
  629. pDeveloper,
  630. pAdminPersonnel,
  631. pDynamicAdmin,
  632. pHelperManager,
  633. pHumanResources,
  634. pComplaintMod,
  635. pGameAffairs,
  636. pWeedPlanted,
  637. pWeedTime,
  638. pWeedGrams,
  639. Float:pWeedX,
  640. Float:pWeedY,
  641. Float:pWeedZ,
  642. Float:pWeedA,
  643. Float:pWeed1X,
  644. Float:pWeed1Y,
  645. Float:pWeed1Z,
  646. Float:pWeed1A,
  647. Float:pWeed2X,
  648. Float:pWeed2Y,
  649. Float:pWeed2Z,
  650. Float:pWeed2A,
  651. pInventoryUpgrade,
  652. pAddictUpgrade,
  653. pTraderUpgrade,
  654. pAssetUpgrade,
  655. pLaborUpgrade,
  656. pDMWarnings,
  657. pWeaponRestricted,
  658. pReferralUID,
  659. pWatch,
  660. pGPS,
  661. pPrisonedBy[MAX_PLAYER_NAME],
  662. pPrisonReason[128],
  663. pClothes,
  664. pShowLands,
  665. pShowTurfs,
  666. pWatchOn,
  667. pGPSOn,
  668. pDoubleXP,
  669. pCourierCooldown,
  670. pPizzaCooldown,
  671. pDetectiveCooldown,
  672. pThiefCooldown,
  673. pCocaineCooldown,
  674. pGasCan,
  675. pPassport,
  676. pPassportName[MAX_PLAYER_NAME],
  677. pPassportLevel,
  678. pPassportSkin,
  679. pPassportPhone,
  680. pNewbieMuteTime,
  681. pReportMuteTime,
  682. pGlobalMuteTime,
  683. pAdminHide,
  684. pInsurance,
  685. pRope,
  686. pTotalPatients,
  687. pTotalFires,
  688. pFirstAid,
  689. pPoliceScanner,
  690. pBodykits,
  691. pRimkits,
  692. pScannerOn,
  693. pCurrentAmmo,
  694. pACAmmo,
  695. pLastReport,
  696. pLastNewbie,
  697. pLastFare,
  698. pLastRequest,
  699. pLastPay,
  700. pLastRepair,
  701. pLastRefuel,
  702. pLastDrug,
  703. pLastDefend,
  704. pLastSell,
  705. pLastEnter,
  706. pLastPress,
  707. pLastDeath,
  708. pLastDesync,
  709. pLastGlobal,
  710. pLastPizza,
  711. pLastStuck,
  712. pLastUpdate,
  713. pLastLoad,
  714. pLastBet,
  715. pLastShot,
  716. pLastFire,
  717. pFPS,
  718. pDrunkLevel,
  719. pSpectating,
  720. pAdminDuty,
  721. pActiveReport,
  722. pHospitalTime,
  723. pHospitalType,
  724. pListen,
  725. pJoinedEvent,
  726. pPaintball,
  727. pPaintballTeam,
  728. pDueling,
  729. pEventTeam,
  730. pAwaitingClothing,
  731. pTutorial,
  732. pTutorialTimer,
  733. pFreezeTimer,
  734. pHelpRequest[128],
  735. pAcceptedHelp,
  736. pHouseOffer,
  737. pHouseOffered,
  738. pHousePrice,
  739. pGarageOffer,
  740. pGarageOffered,
  741. pGaragePrice,
  742. pBizOffer,
  743. pBizOffered,
  744. pBizPrice,
  745. pVestOffer,
  746. pVestPrice,
  747. pCarOffer,
  748. pCarOffered,
  749. pCarPrice,
  750. pFactionOffer,
  751. pFactionOffered,
  752. pGangOffer,
  753. pGangOffered,
  754. pFriskOffer,
  755. pTicketOffer,
  756. pTicketPrice,
  757. pLiveOffer,
  758. pLiveBroadcast,
  759. pShakeOffer,
  760. pShakeType,
  761. pLandOffer,
  762. pLandOffered,
  763. pLandPrice,
  764. pSellOffer,
  765. pAllianceOffer,
  766. pWarOffer,
  767. pSellType,
  768. pSellExtra,
  769. pSellPrice,
  770. pDefendOffer,
  771. pDefendPrice,
  772. pDiceOffer,
  773. pDiceBet,
  774. pDiceRigged,
  775. pInviteOffer,
  776. pInviteHouse,
  777. pRobberyOffer,
  778. pDuelOffer,
  779. pObjectLand,
  780. pClothingIndex,
  781. pEditType,
  782. pEditObject,
  783. pCategory,
  784. pSelected,
  785. pFactionEdit,
  786. pPrice,
  787. pFurniturePerms,
  788. pLandPerms,
  789. pPizzas,
  790. pPizzaTime,
  791. Float:pDistance,
  792. pCP,
  793. pShipment,
  794. pFishTime,
  795. pUsedBait,
  796. pSmuggleMats,
  797. pSmuggleDrugs,
  798. pRefuel,
  799. pRefuelAmount,
  800. pCallLine,
  801. pCallStage,
  802. Float:pAFKPos[6],
  803. pAFK,
  804. pAFKTime,
  805. pLoopAnim,
  806. pDrivingTest,
  807. pTestVehicle,
  808. pTestCP,
  809. pMiningTime,
  810. pMiningRock,
  811. pSweeping,
  812. pSweepTime,
  813. pSweepEarnings,
  814. Text3D:pSpecialTag,
  815. pTagType,
  816. pVIPColor,
  817. pTaxiFare,
  818. pTaxiPassenger,
  819. pTaxiBill,
  820. pTaxiTime,
  821. pSkinSelected,
  822. pDuty,
  823. pBackup,
  824. pTazer,
  825. pTazedTime,
  826. pCuffed,
  827. pTied,
  828. pDraggedBy,
  829. pReceivingAid,
  830. pDelivered,
  831. pPlantedBomb,
  832. Float:pBombX,
  833. Float:pBombY,
  834. Float:pBombZ,
  835. pBombObject,
  836. pContractTaken,
  837. pPage,
  838. pSpamTime,
  839. pMuted,
  840. Text3D:pBoomboxText,
  841. pBoomboxPlaced, // BOOMBOX
  842. pBoomboxObject,
  843. pBoomboxListen,
  844. pBoomboxURL[128],
  845. Float:pMinX, // LAND CREATION
  846. Float:pMinY,
  847. Float:pMaxX,
  848. Float:pMaxY,
  849. pZoneType,
  850. pZonePickups[4],
  851. pZoneID,
  852. pZoneCreation, //
  853. pLandCost,
  854. pTurfType,
  855. pTurfName[32],
  856. pGenre[32],
  857. pSubgenre[32],
  858. pSearch,
  859. pMusicType,
  860. pStreamType,
  861. pNameChange[MAX_PLAYER_NAME],
  862. pFreeNamechange,
  863. pChosenLevel,
  864. pChosenSkin,
  865. pVehicleKeys,
  866. pCurrentWeapon,
  867. pCurrentVehicle,
  868. pVehicleCount,
  869. pACWarns,
  870. pACTime,
  871. pACFired,
  872. pArmorTime,
  873. pWeedObject,
  874. pPickPlant,
  875. pPickTime,
  876. pCookMeth,
  877. pCookTime,
  878. pCookGrams,
  879. pDrugsUsed,
  880. pDrugsTime,
  881. pBandana,
  882. pGangCar,
  883. pCapturingPoint,
  884. pCaptureTime,
  885. Float:pPointX,
  886. Float:pPointY,
  887. Float:pPointZ,
  888. pWatchingIntro, // server intro
  889. pHouseKeys,
  890. pLoginCamera,
  891. pSmuggleTime,
  892. pDealerGang,
  893. pPoisonTime,
  894. pJetpack,
  895. pTextFrom,
  896. pWhisperFrom,
  897. pMechanicCall,
  898. pTaxiCall,
  899. pEmergencyCall,
  900. pEmergencyType,
  901. pEmergency[128],
  902. pClip,
  903. pReloading,
  904. pFindTime,
  905. pFindPlayer,
  906. pRobCash,
  907. pLootTime,
  908. pRemoveFrom,
  909. pCBug,
  910. pMenuType,
  911. pSniper,
  912. Text3D:pLockText,
  913. Float:pLockHealth,
  914. pLockBreak,
  915. pLockTimer,
  916. pAnimation,
  917. pDropTime,
  918. pCocaineTrunk,
  919. pCocaineTime,
  920. pCocaineFrom,
  921. pRapidFire,
  922. pNoDamage,
  923. pGodmode,
  924. Float:pGodmodeHP,
  925. Float:pGodmodeAP,
  926. pNOPTime,
  927. pPreviewHouse,
  928. pPreviewType,
  929. pPreviewTime,
  930. pDedication,
  931. pPasswordChanged,
  932. pGarbage,
  933. pDamageTimer,
  934. pHHCheck,
  935. pHHTime,
  936. pHHRounded,
  937. pHHCount,
  938. pCustomTitle[64],
  939. pCustomTColor,
  940. pGovTimer,
  941. pGodshand,
  942. pUndercover[2],
  943. Float:pUndercoverHP,
  944. Float:pUndercoverAR,
  945. pHurt,
  946. pBugged,
  947. pSkates,
  948. pSkateObj,
  949. bool:pSkating,
  950. bool:pSkateAct,
  951. pOil,
  952. pCreatingPoll,
  953. pAnsweredPoll,
  954. pRareTime,
  955. pAcceptedEMS,
  956. pHunted,
  957. pHuntKilled,
  958. pDiamonds,
  959. pDeleteMode,
  960. pAdvertWarnings,
  961. pNoKnife,
  962. pExecute,
  963. pMarriedTo,
  964. pMarriedName[MAX_PLAYER_NAME],
  965. pMarriageOffer,
  966. pStationEdit,
  967. pRobbingBiz,
  968. pHelmet,
  969. pCarryCrate,
  970. pBlindfold,
  971. pBlinded,
  972. pRepairShop,
  973. pRepairTime
  974. };
  975. enum rEnum
  976. {
  977. rExists,
  978. rReporter,
  979. rAccepted,
  980. rHandledBy,
  981. rText[128],
  982. rTime
  983. };
  984. enum SAZONE_MAIN { //Betamaster
  985. SAZONE_NAME[28],
  986. Float:SAZONE_AREA[6]
  987. };
  988. enum impoundInfo
  989. {
  990. impoundSQLId,
  991. Float: impoundPosX,
  992. Float: impoundPosY,
  993. Float: impoundPosZ,
  994. impoundVW,
  995. impoundInt,
  996. Text3D: impoundTextID
  997. }
  998. enum eventEnum
  999. {
  1000. eReady,
  1001. eStarted,
  1002. eLocked,
  1003. eType, // (1) DM (2) TDM (3) Race
  1004. eJoinText[128],
  1005. Float:eHealth,
  1006. Float:eArmor,
  1007. Float:ePosX[2],
  1008. Float:ePosY[2],
  1009. Float:ePosZ[2],
  1010. Float:ePosA[2],
  1011. eInterior,
  1012. eWorld,
  1013. eWeapons[5],
  1014. eSkin[2],
  1015. eCS,
  1016. eQS,
  1017. eHeal,
  1018. eNext
  1019. };
  1020. enum robberyEnum
  1021. {
  1022. rTime,
  1023. rPlanning,
  1024. rStarted,
  1025. rStolen,
  1026. rRobbers[MAX_BANK_ROBBERS],
  1027. rObjects[2],
  1028. Text3D:rText[5]
  1029. };
  1030. enum mEnum
  1031. {
  1032. Float:mPosX,
  1033. Float:mPosY,
  1034. Float:mPosZ,
  1035. Float:mPosA,
  1036. mInterior,
  1037. mWorld
  1038. };
  1039. enum graffitiData {
  1040. graffitiID,
  1041. graffitiExists,
  1042. Float:graffitiPos[4],
  1043. graffitiIcon,
  1044. graffitiObject,
  1045. graffitiColor,
  1046. graffitiText[64],
  1047. graffitiDefault,
  1048. graffitiFont[50]
  1049. };
  1050. enum hEnum
  1051. {
  1052. hExists,
  1053. hID,
  1054. hOwnerID,
  1055. hOwner[MAX_PLAYER_NAME],
  1056. // hMapIcon,
  1057. hType,
  1058. hPrice,
  1059. hRentPrice,
  1060. hLevel,
  1061. hLocked,
  1062. hAlarm,
  1063. hTimestamp,
  1064. Float:hPosX,
  1065. Float:hPosY,
  1066. Float:hPosZ,
  1067. Float:hPosA,
  1068. Float:hIntX,
  1069. Float:hIntY,
  1070. Float:hIntZ,
  1071. Float:hIntA,
  1072. hInterior,
  1073. hWorld,
  1074. hOutsideInt,
  1075. hOutsideVW,
  1076. hCash,
  1077. hMaterials,
  1078. hWeed,
  1079. hCocaine,
  1080. hMeth,
  1081. hPainkillers,
  1082. hWeapons[10],
  1083. hLabels,
  1084. hPickup,
  1085. Text3D:hText,
  1086. hDelivery,
  1087. hLights,
  1088. hEdit
  1089. };
  1090. enum gEnum
  1091. {
  1092. gExists,
  1093. gID,
  1094. gOwnerID,
  1095. gOwner[MAX_PLAYER_NAME],
  1096. gType,
  1097. gPrice,
  1098. gLocked,
  1099. gTimestamp,
  1100. gFreeze,
  1101. Float:gPosX,
  1102. Float:gPosY,
  1103. Float:gPosZ,
  1104. Float:gPosA,
  1105. Float:gExitX,
  1106. Float:gExitY,
  1107. Float:gExitZ,
  1108. Float:gExitA,
  1109. gWorld,
  1110. gPickup,
  1111. Text3D:gText
  1112. };
  1113. enum bEnum
  1114. {
  1115. bExists,
  1116. bID,
  1117. bOwnerID,
  1118. bOwner[MAX_PLAYER_NAME],
  1119. bType,
  1120. bPrice,
  1121. bEntryFee,
  1122. bLocked,
  1123. bItemPrices[21],
  1124. Float:cVehicle[4],
  1125. bTimestamp,
  1126. Float:bPosX,
  1127. Float:bPosY,
  1128. Float:bPosZ,
  1129. Float:bPosA,
  1130. Float:bIntX,
  1131. Float:bIntY,
  1132. Float:bIntZ,
  1133. Float:bIntA,
  1134. bInterior,
  1135. bWorld,
  1136. bOutsideInt,
  1137. bOutsideVW,
  1138. bCash,
  1139. bProducts,
  1140. bMaterials,
  1141. bPickup,
  1142. Text3D:bText,
  1143. Float: GasPumpPosX[2],
  1144. Float: GasPumpPosY[2],
  1145. Float: GasPumpPosZ[2],
  1146. Float: GasPumpAngle[2],
  1147. Float: GasPumpCapacity[2],
  1148. Float: GasPumpGallons[2],
  1149. GasPumpObjectID[2],
  1150. Text3D: GasPumpInfoTextID[2],
  1151. Text3D: GasPumpSaleTextID[2],
  1152. Float: GasPumpSaleGallons[2],
  1153. Float: GasPumpSalePrice[2],
  1154. GasPumpTimer[2],
  1155. GasPumpVehicleID[2]
  1156. };
  1157. enum eEnum
  1158. {
  1159. eExists,
  1160. eID,
  1161. eOwnerID,
  1162. eOwner[MAX_PLAYER_NAME],
  1163. eName[40],
  1164. eIcon,
  1165. eLocked,
  1166. Float:eRadius,
  1167. Float:ePosX,
  1168. Float:ePosY,
  1169. Float:ePosZ,
  1170. Float:ePosA,
  1171. Float:eIntX,
  1172. Float:eIntY,
  1173. Float:eIntZ,
  1174. Float:eIntA,
  1175. eInterior,
  1176. eWorld,
  1177. eOutsideInt,
  1178. eOutsideVW,
  1179. eAdminLevel,
  1180. eFactionType,
  1181. eGang,
  1182. eVIP,
  1183. eVehicles,
  1184. eFreeze,
  1185. ePassword[64],
  1186. eLabel,
  1187. eType,
  1188. eMapIcon,
  1189. ePickup,
  1190. eMapIconID,
  1191. Text3D:eText,
  1192. eColor
  1193. };
  1194. enum cEnum
  1195. {
  1196. cExists,
  1197. cID,
  1198. cName[32],
  1199. cModel,
  1200. cBone,
  1201. cAttached,
  1202. Float:cPosX,
  1203. Float:cPosY,
  1204. Float:cPosZ,
  1205. Float:cRotX,
  1206. Float:cRotY,
  1207. Float:cRotZ,
  1208. Float:cScaleX,
  1209. Float:cScaleY,
  1210. Float:cScaleZ,
  1211. cAttachedIndex,
  1212. cMatColor1,
  1213. cMatColor2
  1214. };
  1215. enum vEnum
  1216. {
  1217. vID,
  1218. vOwnerID,
  1219. vOwner[MAX_PLAYER_NAME],
  1220. vModel,
  1221. vPrice,
  1222. vType,
  1223. vPlate[32],
  1224. vTickets,
  1225. gv_iLoadMax,
  1226. pvImpounded,
  1227. vLocked,
  1228. Float:vHealth,
  1229. Float:vPosX,
  1230. Float:vPosY,
  1231. Float:vPosZ,
  1232. Float:vPosA,
  1233. vColor1,
  1234. vColor2,
  1235. vPaintjob,
  1236. vInterior,
  1237. vWorld,
  1238. vNeon,
  1239. vNeonEnabled,
  1240. vTrunk,
  1241. vAlarm,
  1242. vCorp,
  1243. vMods[14],
  1244. vCash,
  1245. vMaterials,
  1246. vWeed,
  1247. vCocaine,
  1248. vMeth,
  1249. vPainkillers,
  1250. vWeapons[5],
  1251. vGang,
  1252. vFactionType,
  1253. vVIP,
  1254. vJob,
  1255. vRespawnDelay,
  1256. vObjects[2],
  1257. vTimer,
  1258. vRank,
  1259. carImpounded,
  1260. carImpoundPrice,
  1261. bool:vForSale,
  1262. vForSalePrice,
  1263. Text3D:vForSaleLabel,
  1264. Float:vMileage,
  1265. };
  1266. enum fEnum
  1267. {
  1268. fName[48],
  1269. fShortName[24],
  1270. fMOTD[128],
  1271. fLeader[MAX_PLAYER_NAME],
  1272. fType,
  1273. fColor,
  1274. fRankCount,
  1275. fBudget,
  1276. g_iLockerStock,
  1277. fSkins[MAX_FACTION_SKINS],
  1278. fPaycheck[MAX_FACTION_RANKS],
  1279. fTurfTokens,
  1280. Text3D:fText,
  1281. fPickup,
  1282. };
  1283. enum lkEnum
  1284. {
  1285. lID,
  1286. lExists,
  1287. lFaction,
  1288. Float:lPosX,
  1289. Float:lPosY,
  1290. Float:lPosZ,
  1291. lInterior,
  1292. lWorld,
  1293. lLabel,
  1294. lIcon,
  1295. locKevlar[2],
  1296. locMedKit[2],
  1297. locNitestick[2],
  1298. locMace[2],
  1299. locDeagle[2],
  1300. locShotgun[2],
  1301. locMP5[2],
  1302. locM4[2],
  1303. locSpas12[2],
  1304. locSniper[2],
  1305. locCamera[2],
  1306. locFireExt[2],
  1307. locPainKillers[2],
  1308. Text3D:lText,
  1309. lPickup
  1310. };
  1311. enum dEnum
  1312. {
  1313. dExists,
  1314. dType,
  1315. Float:dPosX,
  1316. Float:dPosY,
  1317. Float:dPosZ,
  1318. Float:dPosA,
  1319. dObject
  1320. };
  1321. enum lEnum
  1322. {
  1323. lExists,
  1324. lID,
  1325. lOwnerID,
  1326. lOwner[MAX_PLAYER_NAME],
  1327. lLevel,
  1328. lPrice,
  1329. Float:lMinX,
  1330. Float:lMinY,
  1331. Float:lMaxX,
  1332. Float:lMaxY,
  1333. Float:lHeightX,
  1334. Float:lHeightY,
  1335. Float:lHeightZ,
  1336. lGangZone,
  1337. lArea,
  1338. Text3D:lTextdraw,
  1339. lLabels
  1340. };
  1341. enum e_Damages
  1342. {
  1343. damageTaken,
  1344. damageWeapon,
  1345. damageBodypart,
  1346. damageArmor,
  1347. damageTime,
  1348. damageBy[90],
  1349. }
  1350. enum gaEnum
  1351. {
  1352. gSetup,
  1353. gName[32],
  1354. gMOTD[128],
  1355. gLeader[MAX_PLAYER_NAME],
  1356. gColor,
  1357. gStrikes,
  1358. gLevel,
  1359. gPoints,
  1360. gTurfTokens,
  1361. Float:gStashX,
  1362. Float:gStashY,
  1363. Float:gStashZ,
  1364. gStashInterior,
  1365. gStashWorld,
  1366. gCash,
  1367. gMaterials,
  1368. gWeed,
  1369. gCocaine,
  1370. gMeth,
  1371. gPainkillers,
  1372. gSkins[MAX_GANG_SKINS],
  1373. gWeapons[14],
  1374. gWeaponRanks[14],
  1375. gVestRank,
  1376. gArmsDealer,
  1377. gDrugDealer,
  1378. Float:gArmsX,
  1379. Float:gArmsY,
  1380. Float:gArmsZ,
  1381. Float:gArmsA,
  1382. Float:gDrugX,
  1383. Float:gDrugY,
  1384. Float:gDrugZ,
  1385. Float:gDrugA,
  1386. gArmsWorld,
  1387. gDrugWorld,
  1388. gDrugWeed,
  1389. gDrugCocaine,
  1390. gDrugMeth,
  1391. gArmsMaterials,
  1392. gArmsPrices[12],
  1393. gDrugPrices[3],
  1394. Text3D:gText[3],
  1395. gPickup,
  1396. gActors[2],
  1397. gAlliance,
  1398. gMatLevel,
  1399. gGunLevel,
  1400. gInvCooldown,
  1401. };
  1402. enum ptEnum
  1403. {
  1404. pExists,
  1405. pName[32],
  1406. pCapturedBy[MAX_PLAYER_NAME],
  1407. pCapturedGang,
  1408. pType,
  1409. pProfits,
  1410. pTime,
  1411. Float:pPointX,
  1412. Float:pPointY,
  1413. Float:pPointZ,
  1414. Float:pMinX,
  1415. Float:pMinY,
  1416. Float:pMaxX,
  1417. Float:pMaxY,
  1418. pGangZone,
  1419. pArea,
  1420. pPointInterior,
  1421. pPointWorld,
  1422. pCaptureTime,
  1423. pCapturer,
  1424. Text3D:pText,
  1425. pPickup
  1426. };
  1427. enum e_Dealership
  1428. {
  1429. dcID,
  1430. dcExists,
  1431. dcCompany,
  1432. dcModel,
  1433. dcPrice
  1434. };
  1435. enum tEnum
  1436. {
  1437. tExists,
  1438. tName[32],
  1439. tCapturedBy[MAX_PLAYER_NAME],
  1440. tCapturedGang,
  1441. tType,
  1442. tTime,
  1443. Float:tMinX,
  1444. Float:tMinY,
  1445. Float:tMaxX,
  1446. Float:tMaxY,
  1447. Float:tHeight,
  1448. tGangZone,
  1449. tArea,
  1450. tCaptureTime,
  1451. tCapturer,
  1452. tCount,
  1453. tBeingCaptured
  1454. };
  1455. enum CriminalRecordEnum {
  1456. mdc_cr_type,
  1457. mdc_cr_description[200],
  1458. mdc_cr_date[15],
  1459. mdc_cr_time[15],
  1460. mdc_cr_officer[MAX_PLAYER_NAME],
  1461. mdc_cr_offender[MAX_PLAYER_NAME],
  1462. mdc_cr_paid,
  1463. mdc_cr_price,
  1464. mdc_cr_served
  1465. }
  1466. enum {
  1467. RECORD_TICKET,
  1468. RECORD_CHARGE
  1469. }
  1470. enum E_GRAFFITI_INFO
  1471. {
  1472. Float:graffitiPosX,
  1473. Float:graffitiPosY,
  1474. Float:graffitiPosZ,
  1475. Float:graffitiRotX,
  1476. Float:graffitiRotY,
  1477. Float:graffitiRotZ,
  1478. }
  1479. // ---------------------------------------
  1480. new connectionID;
  1481. new queryBuffer[1024];
  1482. new Text:AnimationTD;
  1483. new Text:TimeTD;
  1484. new enabledOOC;
  1485. new enabledNewbie = 1;
  1486. new enabledGlobal = 1;
  1487. new enabledReports = 1;
  1488. new pTazerReplace[MAX_PLAYERS];
  1489. new PlayerText:os_logo[MAX_PLAYERS][1];
  1490. new PlayerText:playerfooter[MAX_PLAYERS];
  1491. new Text:Textdraw2;
  1492. new Text:Textdraw3;
  1493. new ListedVehicles[MAX_PLAYERS][MAX_OWNABLE_CARS];
  1494. new ViewCam[MAX_PLAYERS];
  1495. new szMiscArray[4096];
  1496. new IsPlayerSteppingInVehicle[MAX_PLAYERS] = -1;
  1497. new tsstring[2048];
  1498. new Text:Blind;
  1499. new Text:welcomepm;
  1500. new Text:welcomepm1;
  1501. new Text:welcomepm2;
  1502. new Text:welcomepm3;
  1503. new Text:loginwb1;
  1504. new Text:houseLights;
  1505. new PlayerText:TuningBuy[ MAX_PLAYERS ][ 14 ];
  1506. new Obj_Elevator, Obj_ElevatorDoors[2];
  1507. new Obj_FloorDoors[21][2];
  1508. new Text3D:Label_Elevator, Text3D:Label_Floors[21];
  1509. new rentcar[8];
  1510. new Renting[MAX_PLAYERS];
  1511. new firstperson[MAX_PLAYERS];
  1512. new HelmetEnabled[MAX_PLAYERS];
  1513. new CarWindows[MAX_VEHICLES] = 0;
  1514. new PlayerText:_vhudFlash[MAX_PLAYERS];
  1515. new Text3D:fRepfamtext[MAX_PLAYERS];
  1516. new Text:welcomenew;
  1517. new VIPVehicles[50];
  1518. new pObj[MAX_PLAYERS];
  1519. new openedpaycheck[MAX_PLAYERS];
  1520. new CarRadars[MAX_PLAYERS];
  1521. new chosednumber[MAX_PLAYERS];
  1522. new InsideTut[MAX_PLAYERS];
  1523. new TutStep[MAX_PLAYERS];
  1524. new isharvesting[MAX_PLAYERS];
  1525. new PlayerText:_crTextTarget[MAX_PLAYERS];
  1526. new PlayerText:_crTextSpeed[MAX_PLAYERS];
  1527. new PlayerText:_crTickets[MAX_PLAYERS];
  1528. new nextWeather;
  1529. new Text3D:DonatorCallSign[MAX_VEHICLES] = {Text3D:INVALID_3DTEXT_ID, ...};
  1530. new seatbelt[MAX_PLAYERS];
  1531. new g_BoothUsed[MAX_BOOTHS];
  1532. new g_BoothObject[MAX_BOOTHS] = {-1, ...};
  1533. new gWeights[MAX_PLAYERS][2];
  1534. new ElevatorState, ElevatorFloor;
  1535. new ImpoundPoints[MAX_IMPOUNDPOINTS][impoundInfo];
  1536. new GraffitiData[MAX_GRAFFITI_POINTS][graffitiData];
  1537. new PlayerText:LoadingObjects0[MAX_PLAYERS];
  1538. new PlayerText:LoadingObjects1[MAX_PLAYERS];
  1539. new PlayerText:LoadingObjects2[MAX_PLAYERS];
  1540. new PlayerText:LoadingObjects3[MAX_PLAYERS];
  1541. new PlayerText:LoadingObjects4[MAX_PLAYERS];
  1542. new PlayerText:LoadingObjects5[MAX_PLAYERS];
  1543. new pizzaVehicles[6];
  1544. new courierVehicles[7];
  1545. new sweeperVehicles[4];
  1546. new taxiVehicles[4];
  1547. new testVehicles[5];
  1548. new garbageVehicles[6];
  1549. new Text:Tutorial[4];
  1550. new Text:Damage[MAX_PLAYERS];
  1551. new gHour, gWorldTime, gWeather = 13;
  1552. new gCharity, gCharityHealth, gCharityArmor;
  1553. new gPlayerRecord, gRecordDate[24], gServerMOTD[128], gTax, gVault, gNewsVault, gAnticheatBans;
  1554. new Float:WeaponDamages[47];
  1555. new adminMOTD[128], helperMOTD[128];
  1556. new MaxCapCount[2] = { 2 , 1 }; // index: 0 = turfs, 1 = points
  1557. new gacooldown, gConnections, gTotalRegistered, gTotalKills, gTotalDeaths, gTotalHours;
  1558. new gDoubleXP, gDisabledVPN = 1, antiNT = 1, gHReward;
  1559. new gLastAd, gLastMusic, gGMX;
  1560. new gAnticheat = 1, gPaycheck;
  1561. new gVIPHealth, gVIPArmor;
  1562. new gParachutes[2];
  1563. new gSeedsStock = 200, gCocaineStock = 100, gEphedrineStock = 50;
  1564. new Text3D:gSeedsStockText, Text3D:gCocaineText, Text3D:gEphedrineStockText;
  1565. new gPrisonCells[24], gPDDoors[8], gPDGates[2], gFBIGates[2];
  1566. new gFires, gFireObjects[MAX_FIRES] = {INVALID_OBJECT_ID, ...}, Float:gFireHealth[MAX_FIRES];
  1567. new gScriptObject[MAX_OBJECTS char];
  1568. new zone_paintball[2], area_paintball[2];
  1569. new pbNext;
  1570. new FarmerVehicles[19];
  1571. new Harvesting[MAX_PLAYERS];
  1572. new aimWarnings[MAX_PLAYERS];
  1573. new quizQuestion[72];
  1574. new quizAnswer[32];
  1575. new CreateQuiz = -1;
  1576. new gang_tag_font[MAX_PLAYERS][50], gang_tag_chosen[MAX_PLAYERS];
  1577. new gListedItems[MAX_PLAYERS][100], gTargetName[MAX_PLAYERS][MAX_PLAYER_NAME];
  1578. new gPreviewFurniture[MAX_PLAYERS] = {-1, ...};
  1579. new DamageData[MAX_PLAYERS][MAX_DAMAGES][e_Damages];
  1580. new InsideShamal[MAX_PLAYERS];
  1581. new VehicleStatus[MAX_VEHICLES char] = 0; // 0 == none, 1 == vehicle dead about to respawn
  1582. new PlayerText:_Mask[MAX_PLAYERS];
  1583. new RobberyInfo[robberyEnum];
  1584. new MarkedPositions[MAX_PLAYERS][3][mEnum];
  1585. new Timers[MAX_PLAYERS][e_Timers];
  1586. new PlayerData[MAX_PLAYERS+1][pEnum];
  1587. new ATM[MAX_ATMS][e_ATM];
  1588. new Payphones[MAX_PAYPHONES][e_Payphones];
  1589. new PlayerText:LoginTD[ MAX_PLAYERS ][ 14 ];
  1590. new ReportInfo[MAX_REPORTS][rEnum];
  1591. new HouseInfo[MAX_HOUSES][hEnum];
  1592. new GarageInfo[MAX_GARAGES][gEnum];
  1593. new BusinessInfo[MAX_BUSINESSES][bEnum];
  1594. new DealershipCars[MAX_DEALERSHIP_CARS][e_Dealership];
  1595. new EntranceInfo[MAX_ENTRANCES][eEnum];
  1596. new ClothingInfo[MAX_PLAYERS][MAX_PLAYER_CLOTHING][cEnum];
  1597. new VehicleInfo[MAX_VEHICLES][vEnum];
  1598. new FactionInfo[MAX_FACTIONS][fEnum];
  1599. new FactionRanks[MAX_FACTIONS][MAX_FACTION_RANKS][32];
  1600. new FactionDivisions[MAX_FACTIONS][MAX_FACTION_DIVISIONS][32];
  1601. new GangCrews[MAX_GANGS][MAX_GANG_CREWS][32];
  1602. new LockerInfo[MAX_LOCKERS][lkEnum];
  1603. new DeployInfo[MAX_DEPLOYABLES][dEnum];
  1604. new LandInfo[MAX_LANDS][lEnum];
  1605. new GangInfo[MAX_GANGS][gaEnum];
  1606. new GangRanks[MAX_GANGS][7][32];
  1607. new PointInfo[MAX_POINTS][ptEnum];
  1608. new TurfInfo[MAX_TURFS][tEnum];
  1609. new adminVehicle[MAX_VEHICLES char];
  1610. new vehicleFuel[MAX_VEHICLES] = {100, ...};
  1611. new vehicleSiren[MAX_VEHICLES] = {INVALID_OBJECT_ID, ...};
  1612. new vehicleStream[MAX_VEHICLES][128];
  1613. new vehicleColors[MAX_VEHICLES][2];
  1614. new totalDamages[MAX_PLAYERS];
  1615. new ElevatorQueue[21], FloorRequestedBy[21];
  1616. new ElevatorBoostTimer;
  1617. new bool:chattingWith[MAX_PLAYERS][MAX_PLAYERS char];
  1618. new Text3D:vehicleCallsign[MAX_VEHICLES] = {Text3D:INVALID_3DTEXT_ID, ...};
  1619. new PayCheckCode[MAX_PLAYERS];
  1620. new PlayerText:SpeedoMeterTextDraw[MAX_PLAYERS][40];
  1621. new Text:td_mdc_Box = Text:INVALID_TEXT_DRAW;
  1622. new Text:td_mdc_HeaderBox = Text:INVALID_TEXT_DRAW;
  1623. new Text:td_mdc_CitizenBox = Text:INVALID_TEXT_DRAW;
  1624. new Text:td_mdc_DataBox = Text:INVALID_TEXT_DRAW;
  1625. new Text:td_mdc_OptionsBox = Text:INVALID_TEXT_DRAW;
  1626. new Text:td_mdc_HeaderText = Text:INVALID_TEXT_DRAW;
  1627. new Text:td_mdc_Exit = Text:INVALID_TEXT_DRAW;
  1628. new Text:td_mdc_Section[4] = {Text:INVALID_TEXT_DRAW, ...};
  1629. new Text:td_mdc_SectionText[4] = {Text:INVALID_TEXT_DRAW, ...};
  1630. new Text:td_mdc_SectionHeaderText = Text:INVALID_TEXT_DRAW;
  1631. new Text:td_mdc_Gender = Text:INVALID_TEXT_DRAW;
  1632. new Text:td_mdc_Job = Text:INVALID_TEXT_DRAW;
  1633. new Text:td_mdc_DriveLic = Text:INVALID_TEXT_DRAW;
  1634. new Text:td_mdc_GunLic = Text:INVALID_TEXT_DRAW;
  1635. new Text:td_mdc_PhoneNumber = Text:INVALID_TEXT_DRAW;
  1636. new Text:td_mdc_Name = Text:INVALID_TEXT_DRAW;
  1637. new Text:td_mdc_PropertiesArrow = Text:INVALID_TEXT_DRAW;
  1638. new Text:td_mdc_VehiclesArrow = Text:INVALID_TEXT_DRAW;
  1639. new Text:td_mdc_Vehicles = Text:INVALID_TEXT_DRAW;
  1640. new Text:td_mdc_Properties = Text:INVALID_TEXT_DRAW;
  1641. new Text:td_mdc_Age = Text:INVALID_TEXT_DRAW;
  1642. new Text:td_mdc_CriminalRecordArrow = Text:INVALID_TEXT_DRAW;
  1643. new Text:td_mdc_CasesArrow = Text:INVALID_TEXT_DRAW;
  1644. new Text:td_mdc_CriminalRecord = Text:INVALID_TEXT_DRAW;
  1645. new Text:td_mdc_Cases = Text:INVALID_TEXT_DRAW;
  1646. new Text:td_mdc_Browse = Text:INVALID_TEXT_DRAW;
  1647. new PlayerText:td_mdc_Skin = PlayerText:INVALID_TEXT_DRAW;
  1648. new PlayerText:td_mdc_NameValue = PlayerText:INVALID_TEXT_DRAW;
  1649. new PlayerText:td_mdc_AgeValue = PlayerText:INVALID_TEXT_DRAW;
  1650. new PlayerText:td_mdc_GenderValue = PlayerText:INVALID_TEXT_DRAW;
  1651. new PlayerText:td_mdc_JobValue = PlayerText:INVALID_TEXT_DRAW;
  1652. new PlayerText:td_mdc_DriveLicValue = PlayerText:INVALID_TEXT_DRAW;
  1653. new PlayerText:td_mdc_GunLicValue = PlayerText:INVALID_TEXT_DRAW;
  1654. new PlayerText:td_mdc_PhoneNumberValue = PlayerText:INVALID_TEXT_DRAW;
  1655. new Text:td_mdc_cr_Box[7] = {Text:INVALID_TEXT_DRAW, ...};
  1656. new Text:td_mdc_cr_InnerBox[7] = {Text:INVALID_TEXT_DRAW, ...};
  1657. new Text:td_mdc_cr_TypeTitle = Text:INVALID_TEXT_DRAW;
  1658. new Text:td_mdc_cr_DescriptionTitle = Text:INVALID_TEXT_DRAW;
  1659. new Text:td_mdc_cr_DateTitle = Text:INVALID_TEXT_DRAW;
  1660. new Text:td_mdc_cr_Title = Text:INVALID_TEXT_DRAW;
  1661. new Text:td_mdc_cr_ArrowUp = Text:INVALID_TEXT_DRAW;
  1662. new Text:td_mdc_cr_ArrowDown = Text:INVALID_TEXT_DRAW;
  1663. new Text:td_mdc_cr_Info[7] = {Text:INVALID_TEXT_DRAW, ...};
  1664. new PlayerText:td_mdc_cr_Type[7] = {PlayerText:INVALID_TEXT_DRAW, ...};
  1665. new PlayerText:td_mdc_cr_Description[7] = {PlayerText:INVALID_TEXT_DRAW, ...};
  1666. new PlayerText:td_mdc_cr_Date[7] = {PlayerText:INVALID_TEXT_DRAW, ...};
  1667. new Text:td_mdc_veh_Box = Text:INVALID_TEXT_DRAW;
  1668. new Text:td_mdc_veh_InnerBox = Text:INVALID_TEXT_DRAW;
  1669. new Text:td_mdc_veh_Model = Text:INVALID_TEXT_DRAW;
  1670. new PlayerText:td_mdc_veh_ModelValue = PlayerText:INVALID_TEXT_DRAW;
  1671. new PlayerText:td_mdc_veh_VehicleModel = PlayerText:INVALID_TEXT_DRAW;
  1672. new Text:td_mdc_veh_Owner = Text:INVALID_TEXT_DRAW;
  1673. new Text:td_mdc_veh_Plate = Text:INVALID_TEXT_DRAW;
  1674. new Text:td_mdc_veh_Insurance = Text:INVALID_TEXT_DRAW;
  1675. new PlayerText:td_mdc_veh_OwnerValue = PlayerText:INVALID_TEXT_DRAW;
  1676. new PlayerText:td_mdc_veh_PlateValue = PlayerText:INVALID_TEXT_DRAW;
  1677. new PlayerText:td_mdc_veh_InsuranceValue = PlayerText:INVALID_TEXT_DRAW;
  1678. new Text:td_mdc_veh_ArrowRight = Text:INVALID_TEXT_DRAW;
  1679. new Text:td_mdc_veh_Next = Text:INVALID_TEXT_DRAW;
  1680. new Text:td_mdc_veh_Label = Text:INVALID_TEXT_DRAW;
  1681. new Text:td_mdc_veh_BoxNoEnt = Text:INVALID_TEXT_DRAW;
  1682. new Text:td_mdc_veh_InnerBoxNoEnt = Text:INVALID_TEXT_DRAW;
  1683. new Text:td_mdc_veh_TextNoEnt = Text:INVALID_TEXT_DRAW;
  1684. new Iterator:RecordIterator[MAX_PLAYERS]<MAX_CRIMINAL_RECORDS>;
  1685. new CriminalRecordData[MAX_PLAYERS][MAX_CRIMINAL_RECORDS][CriminalRecordEnum];
  1686. // ---------------------------------------
  1687. new g_aGraffitiData[][E_GRAFFITI_INFO] = {
  1688. {2081.867675, -1255.466430, 24.712007, -12.800003, 0.000000, 0.000000},
  1689. {2268.340332, -1031.824707, 53.437198, 0.000000, 0.000000, 135.800155},
  1690. {2652.655517, -1123.089355, 66.999664, 0.000000, 0.000000, 0.399999},
  1691. {2652.727294, -1268.601074, 50.095500, 0.000000, 0.000000, 0.000000},
  1692. {2441.024169, -1215.926757, 32.154163, 0.000000, 0.000000, -179.199768},
  1693. {2352.000488, -1262.450927, 22.958444, 0.000000, 0.000000, 0.000000},
  1694. {2195.268554, -1745.694580, 13.739686, 0.000000, 0.000000, -177.399734},
  1695. {1868.005493, -2038.964843, 15.976880, 0.000000, 0.000000, 179.700088},
  1696. {1832.987426, -2111.634033, 13.946876, 0.000000, 0.000000, 0.000000},
  1697. {1862.723510, -2095.458007, 13.890580, 0.000000, 0.000000, 89.700012},
  1698. {2097.205566, -1258.445434, 24.748823, -16.799999, 0.000000, 87.999984},
  1699. {2135.333984, -1820.317871, 13.748497, 0.000000, 0.000000, 0.000000},
  1700. {2171.669921, -1709.278564, 15.921793, -8.500000, 0.000000, 179.999969},
  1701. {2112.414794, -1500.848632, 11.099428, 0.000000, 0.000000, -109.899978},
  1702. {2129.287841, -1374.363769, 25.878126, 0.000000, 0.000000, 90.400009},
  1703. {2110.260253, -1352.890625, 25.076538, 9.399998, -0.699999, -179.799743},
  1704. {2052.904296, -1322.635498, 24.954380, 0.000000, 0.000000, 179.800018},
  1705. {2159.781494, -1693.122314, 16.025939, 0.000000, 0.000000, -179.099990},
  1706. {2146.816650, -1698.676025, 15.438446, 0.000000, 0.000000, 91.499877},
  1707. {2175.154052, -1732.381713, 14.535001, 0.000000, 0.000000, -178.500061},
  1708. {2231.739501, -1683.644775, 15.479531, 0.000000, 0.000000, -16.500001},
  1709. {2121.155029, -1594.672729, 15.621557, 0.000000, 0.000000, 86.900100},
  1710. {2123.272705, -1593.691284, 15.241566, 0.000000, 0.000000, -179.499893},
  1711. {2112.329345, -1632.425170, 13.739908, 0.000000, -3.200001, -89.700065},
  1712. {2081.344970, -1592.929809, 14.757192, 0.000000, 0.000000, 179.300003},
  1713. {2073.782470, -1597.242553, 14.414111, 0.000000, 0.000000, 90.300033},
  1714. {2031.132568, -1599.088867, 13.910934, 0.000000, 0.000000, -168.799987},
  1715. {1986.863281, -1598.860839, 13.900341, 0.000000, 0.000000, -135.000076},
  1716. {2478.406982, -1705.506347, 13.490673, 0.000000, 0.000000, 176.799804},
  1717. {2478.767578, -1688.184936, 13.487812, 0.000000, 0.000000, -98.600006},
  1718. {2520.675781, -1673.658447, 15.454930, 0.000000, 0.000000, 0.000000},
  1719. {2534.723388, -1665.125732, 15.735736, 0.000000, 0.000000, -178.699966},
  1720. {2431.231689, -1680.935424, 14.411346, 0.000000, 0.000000, -90.199958},
  1721. {2398.518066, -1693.246948, 13.891834, 0.000000, 0.000000, 87.599990},
  1722. {2377.614990, -1707.240112, 14.127936, 0.000000, 0.000000, 0.000000},
  1723. {2440.530517, -1997.948486, 14.406878, 0.000000, 0.000000, 89.199966}, // Willowfield red wall
  1724. {2459.481933, -1975.134521, 14.166885, 0.000000, 0.000000, 0.000000}, // Willowfield alley
  1725. {2459.608642, -2043.951049, 11.091508, 0.000000, 0.000000, 88.000068}, // Willowfield sewer
  1726. {1958.593139, -1742.345336, 13.856878, 0.000000, 0.000000, 90.700050}, // Idlegas [Artsy]
  1727. {1951.642700, -1682.986083, 13.822822, 0.000000, 0.000000, 0.000000}, // North of Idlegas [Artsy],
  1728. {1991.694580, -1683.518676, 13.636877, 0.000000, 0.000000, 178.599838}, // West 4-1-5 [Artsy],
  1729. {2135.621582, -1258.083496, 24.192192, 0.000000, 0.000000, 90.099929} // Jefferson Alley [Fireworks]
  1730. };
  1731. static FloorNames[21][] =
  1732. {
  1733. "Ground Floor",
  1734. "First Floor",
  1735. "Second Floor",
  1736. "Third Floor",
  1737. "Fourth Floor",
  1738. "Fifth Floor",
  1739. "Sixth Floor",
  1740. "Seventh Floor",
  1741. "Eighth Floor",
  1742. "Ninth Floor",
  1743. "Tenth Floor",
  1744. "Eleventh Floor",
  1745. "Twelfth Floor",
  1746. "Thirteenth Floor",
  1747. "Fourteenth Floor",
  1748. "Fifteenth Floor",
  1749. "Sixteenth Floor",
  1750. "Seventeenth Floor",
  1751. "Eighteenth Floor",
  1752. "Nineteenth Floor",
  1753. "Penthouse"
  1754. };
  1755. static Float:FloorZOffsets[21] =
  1756. {
  1757. 0.0, // 0.0,
  1758. 8.5479, // 8.5479,
  1759. 13.99945, // 8.5479 + (5.45155 * 1.0),
  1760. 19.45100, // 8.5479 + (5.45155 * 2.0),
  1761. 24.90255, // 8.5479 + (5.45155 * 3.0),
  1762. 30.35410, // 8.5479 + (5.45155 * 4.0),
  1763. 35.80565, // 8.5479 + (5.45155 * 5.0),
  1764. 41.25720, // 8.5479 + (5.45155 * 6.0),
  1765. 46.70875, // 8.5479 + (5.45155 * 7.0),
  1766. 52.16030, // 8.5479 + (5.45155 * 8.0),
  1767. 57.61185, // 8.5479 + (5.45155 * 9.0),
  1768. 63.06340, // 8.5479 + (5.45155 * 10.0),
  1769. 68.51495, // 8.5479 + (5.45155 * 11.0),
  1770. 73.96650, // 8.5479 + (5.45155 * 12.0),
  1771. 79.41805, // 8.5479 + (5.45155 * 13.0),
  1772. 84.86960, // 8.5479 + (5.45155 * 14.0),
  1773. 90.32115, // 8.5479 + (5.45155 * 15.0),
  1774. 95.77270, // 8.5479 + (5.45155 * 16.0),
  1775. 101.22425, // 8.5479 + (5.45155 * 17.0),
  1776. 106.67580, // 8.5479 + (5.45155 * 18.0),
  1777. 112.12735 // 8.5479 + (5.45155 * 19.0)
  1778. };
  1779. new const Float:g_RepairShops[][] =
  1780. {
  1781. {2074.7122, -1831.3906, 13.5469, 2065.4092, -1831.4474, 13.3643, 90.0000, 2076.0828, -1831.3698, 13.2777, 270.0000},
  1782. {1025.1017, -1032.9968, 31.8545, 1024.9688, -1023.1215, 31.9303, 0.0000, 1024.9032, -1033.9376, 31.6534, 180.0000},
  1783. {488.5583, -1731.2819, 11.2464, 487.3807, -1741.6285, 11.0107, 170.0000, 489.1483, -1730.7385, 11.0434, 350.0000},
  1784. {720.2086, -465.7499, 16.3437, 720.0692, -456.0589, 17.0412, 0.0000, 720.1885, -469.6240, 17.0489, 180.0000},
  1785. {-99.8833, 1109.2959, 19.7422, -100.0493, 1116.5676, 20.3480, 0.0000, -99.8743, 1105.2859, 20.4476, 180.0000},
  1786. {-1420.7378, 2594.0757, 55.7505, -1420.5433, 2585.7573, 56.5724, 180.0000, -1420.6559, 2595.4070, 56.4271, 0.0000}
  1787. };
  1788. new const Float:arrBoothPositions[MAX_BOOTHS][3] = {
  1789. {300.5000, -138.5660, 1004.0625},
  1790. {300.5000, -137.0286, 1004.0625},
  1791. {300.5000, -135.5336, 1004.0625},
  1792. {300.5000, -134.0436, 1004.0625},
  1793. {300.5000, -132.5637, 1004.0625},
  1794. {300.5000, -131.0782, 1004.0625},
  1795. {300.5000, -129.5582, 1004.0625},
  1796. {300.5000, -128.0786, 1004.0625}
  1797. };
  1798. new Float:mdc_coordinates[][] = {
  1799. {119.9457, 1099.4154, 525.3835},
  1800. {119.5122, 1104.5157, 525.3835},
  1801. {126.3413, 1104.4753, 525.3835},
  1802. {133.0562, 1104.4266, 525.3835},
  1803. {133.0896, 1099.6122, 525.3835},
  1804. {135.8935, 1086.3850, 523.9155},
  1805. {131.0782, 1086.3044, 523.9155},
  1806. {152.5857, 1087.8550, 523.9194},
  1807. {135.8161, 1118.6794, 527.4412},
  1808. {136.3128, 1121.1874, 527.4412},
  1809. {130.3078, 1126.9399, 527.4631},
  1810. {130.5233, 1129.0502, 527.4631},
  1811. {133.5209, 1082.4387, 527.4451},
  1812. {137.9823, 1089.4128, 531.2477},
  1813. {128.3578, 1089.4703, 531.2498},
  1814. {119.0285, 1089.4502, 531.2517}
  1815. };
  1816. new const vehicleNames[212][] = {
  1817. "Landstalker", "Bravura", "Buffalo", "Linerunner", "Perrenial", "Sentinel", "Dumper", "Firetruck", "Trashmaster",
  1818. "Stretch", "Manana", "Infernus", "Voodoo", "Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam",
  1819. "Esperanto", "Taxi", "Washington", "Bobcat", "Whoopee", "BF Injection", "Hunter", "Premier", "Enforcer",
  1820. "Securicar", "Banshee", "Predator", "Bus", "Rhino", "Barracks", "Hotknife", "Article Trailer", "Previon", "Coach",
  1821. "Cabbie", "Stallion", "Rumpo", "RC Bandit", "Romero", "Packer", "Monster", "Admiral", "Squalo", "Seasparrow",
  1822. "Pizzaboy", "Tram", "Article Trailer 2", "Turismo", "Speeder", "Reefer", "Tropic", "Flatbed", "Yankee", "Caddy", "Solair",
  1823. "Berkley's RC Van", "Skimmer", "PCJ-600", "Faggio", "Freeway", "RC Baron", "RC Raider", "Glendale", "Oceanic",
  1824. "Sanchez", "Sparrow", "Patriot", "Quad", "Coastguard", "Dinghy", "Hermes", "Sabre", "Rustler", "ZR-350", "Walton",
  1825. "Regina", "Comet", "BMX", "Burrito", "Camper", "Marquis", "Baggage", "Dozer", "Maverick", "News Chopper", "Rancher",
  1826. "FBI Rancher", "Virgo", "Greenwood", "Jetmax", "Hotring", "Sandking", "Blista Compact", "Police Maverick",
  1827. "Boxville", "Benson", "Mesa", "RC Goblin", "Hotring Racer A", "Hotring Racer B", "Bloodring Banger", "Rancher",
  1828. "Super GT", "Elegant", "Journey", "Bike", "Mountain Bike", "Beagle", "Cropduster", "Stuntplane", "Tanker", "Roadtrain",
  1829. "Nebula", "Majestic", "Buccaneer", "Shamal", "Hydra", "FCR-900", "NRG-500", "HPV1000", "Cement Truck", "Tow Truck",
  1830. "Fortune", "Cadrona", "SWAT Truck", "Willard", "Forklift", "Tractor", "Combine", "Feltzer", "Remington", "Slamvan",
  1831. "Blade", "Streak", "Freight", "Vortex", "Vincent", "Bullet", "Clover", "Sadler", "Firetruck", "Hustler", "Intruder",
  1832. "Primo", "Cargobob", "Tampa", "Sunrise", "Merit", "Utility", "Nevada", "Yosemite", "Windsor", "Monster", "Monster",
  1833. "Uranus", "Jester", "Sultan", "Stratum", "Elegy", "Raindance", "RC Tiger", "Flash", "Tahoma", "Savanna", "Bandito",
  1834. "Freight Flat", "Streak Carriage", "Kart", "Mower", "Dune", "Sweeper", "Broadway", "Tornado", "AT-400", "DFT-30",
  1835. "Huntley", "Stafford", "BF-400", "News Van", "Tug", "Petrol Trailer", "Emperor", "Wayfarer", "Euros", "Hotdog", "Club",
  1836. "Freight Box", "Article Trailer 3", "Andromada", "Dodo", "RC Cam", "Launch", "LSPD Car", "SFPD Car", "LVPD Car",
  1837. "Police Rancher", "Picador", "S.W.A.T", "Alpha", "Phoenix", "Glendale", "Sadler", "Luggage", "Luggage", "Stairs",
  1838. "Boxville", "Tiller", "Utility Trailer"
  1839. };
  1840. new const weaponSlotIDs[] = {
  1841. 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 10, 10, 10, 10, 10, 10, 8, 8, 8, 0,
  1842. 0, 0, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 4, 6, 6, 7, 7, 7, 7, 8, 12,
  1843. 9, 9, 9, 11, 11, 11
  1844. };
  1845. new const weaponModelIDs[] = {
  1846. 0, 331, 333, 334, 335, 336, 337, 338, 339, 341, 321, 322, 323, 324,
  1847. 325, 326, 342, 343, 344, 0, 0, 0, 346, 347, 348, 349, 350, 351, 352,
  1848. 353, 355, 356, 372, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
  1849. 367, 368, 368, 371
  1850. };
  1851. ////////////////////////////////////////////////////////////////////////////////
  1852. ///////////
  1853. /////////// Trucking system Declarations
  1854. ///////////
  1855. ////////////////////////////////////////////////////////////////////////////////
  1856. enum pTruckDepotInfo
  1857. {
  1858. Float:pTDPosX,
  1859. Float:pTDPosY,
  1860. Float:pTDPosZ,
  1861. pTDName[128],
  1862. pTDLevel
  1863. }
  1864. #define MAX_TRUCKDEPOTS 34
  1865. new TruckDepotInfo[MAX_TRUCKDEPOTS][pTruckDepotInfo] =
  1866. {
  1867. /* {PosX, PosY, PosZ, Name, Level} */
  1868. {305.7063, -240.2690, 1.5781, "Avery Construction Blueberry", 5},
  1869. {103.3272, -164.9381, 2.3076, "Blueberry Storage", 1},
  1870. {165.2610, -54.6693, 1.5781, "Blueberry Supplies", 7},
  1871. {-37.7563, 59.0440, 3.1172, "Blueberry Farm Supplies", 8},
  1872. {-464.6584, -88.4591, 59.9695, "Blueberry Lumber Yard", 3},
  1873. {-539.4329, -500.4013, 25.5178, "West Basin Supplies", 2},
  1874. {-1016.6616, -692.1517, 32.0078, "Easter Bay Chemicals", 10},
  1875. {-2001.9777, -2413.9561, 30.6250, "Angel Pine Storage", 3},
  1876. {-1610.2825, -2699.3901, 48.5391, "Angel Pine Supplies", 2},
  1877. {17.6697, -2648.5720, 40.4756, "I27 Gas Station", 2},
  1878. {-65.7891, -1120.5729, 1.0781, "RS Haul Depot", 1},
  1879. {1059.4307, -344.1587, 73.9922, "Flint County Supplies", 1},
  1880. {330.7587, 860.1470, 20.4063, "Bone County Quarry", 10},
  1881. {276.1030, 1465.5796, 10.5859, "Bone County Oil", 11},
  1882. {635.5750, 1689.1216, 6.9922, "XOOMER Gas LV", 3},
  1883. {978.7535, 2094.7837, 10.8203, "Whitewood Storage LV", 3},
  1884. {1049.9388, 2087.2122, 10.8203, "Whitewood Supplies LV", 5},
  1885. {1070.3037, 1858.2561, 10.8203, "Blackfield Storage LV", 5},
  1886. {1425.1433, 2334.0872, 10.8203, "Pilson Supplies LV", 7},
  1887. {1635.5356, 2326.2112, 10.8203, "Redsands Storage Center LV", 1},
  1888. {2523.7297, 2817.6379, 10.8203, "KACC Military Fuels LV", 13},
  1889. {2841.6387, 898.4078, 10.7578, "Rockshore East Storage LV", 3},
  1890. {1663.6938, 709.9469, 10.8203, "Reagan Bridge Supplies LV", 3},
  1891. {1437.7786, 977.2987, 10.8130, "Pilson Storage LV", 1},
  1892. {1371.7268, 1158.7609, 10.8203, "LVA Freight Depot", 1},
  1893. {1061.5264, 1276.8601, 10.8203, "Blackfield Supplies LV", 1},
  1894. {2529.3972, -2114.5623, 13.5469, "Trucker Coon Supplies", 1},
  1895. {2700.3110, -2389.3691, 13.6328, "LA Mast Storage", 2},
  1896. {2461.9304, -2551.9141, 13.2245, "LA Docks Storage", 2},
  1897. {2206.4023, -2530.6597, 13.5469, "LA Docks Supplies", 3},
  1898. {2607.9333, -2207.7751, 13.5469, "LA Docks Fuel Storage", 3},
  1899. {990.7799, -920.9680, 42.1797, "Broadway Gas Station", 1},
  1900. {1936.3282, -1790.4540, 13.3828, "Idlewood Gas Station", 1},
  1901. {-174.1096, -278.7843, 1.500000, "Bluberry Truck Depot", 1}
  1902. };
  1903. enum pTruckJobInfo
  1904. {
  1905. pTJModel,
  1906. pTJDesc[100],
  1907. pTJPrice,
  1908. pTJDestDepot
  1909. }
  1910. #define MAX_TRUCKJOBS 525
  1911. new LegalTruckJobInfo[MAX_TRUCKJOBS][pTruckJobInfo] =
  1912. {
  1913. /* {Trailer Model, Description, Price, Destination Depot ID} */
  1914. {435, "Frozen Food", 4000, 1},
  1915. {435, "Frozen Food", 4000, 2},
  1916. {435, "Frozen Food", 4000, 5},
  1917. {435, "Frozen Food", 4000, 7},
  1918. {435, "Frozen Food", 4000, 8},
  1919. {435, "Frozen Food", 4000, 10},
  1920. {435, "Frozen Food", 4000, 16},
  1921. {435, "Frozen Food", 4000, 17},
  1922. {435, "Frozen Food", 4000, 18},
  1923. {435, "Frozen Food", 4000, 19},
  1924. {435, "Frozen Food", 4000, 20},
  1925. {435, "Frozen Food", 4000, 22},
  1926. {435, "Frozen Food", 4000, 23},
  1927. {435, "Frozen Food", 4000, 24},
  1928. {435, "Frozen Food", 4000, 25},
  1929. {435, "Frozen Food", 4000, 26},
  1930. {435, "Frozen Food", 4000, 27},
  1931. {435, "Frozen Food", 4000, 28},
  1932. {435, "Frozen Food", 4000, 29},
  1933. {435, "Frozen Food", 4000, 30},
  1934. {435, "Frozen Food", 4000, 33},
  1935. {435, "Cheap Clothes", 4000, 1},
  1936. {435, "Cheap Clothes", 4000, 2},
  1937. {435, "Cheap Clothes", 4000, 5},
  1938. {435, "Cheap Clothes", 4000, 7},
  1939. {435, "Cheap Clothes", 4000, 8},
  1940. {435, "Cheap Clothes", 4000, 10},
  1941. {435, "Cheap Clothes", 4000, 11},
  1942. {435, "Cheap Clothes", 4000, 16},
  1943. {435, "Cheap Clothes", 4000, 17},
  1944. {435, "Cheap Clothes", 4000, 18},
  1945. {435, "Cheap Clothes", 4000, 19},
  1946. {435, "Cheap Clothes", 4000, 20},
  1947. {435, "Cheap Clothes", 4000, 22},
  1948. {435, "Cheap Clothes", 4000, 23},
  1949. {435, "Cheap Clothes", 4000, 24},
  1950. {435, "Cheap Clothes", 4000, 25},
  1951. {435, "Cheap Clothes", 4000, 26},
  1952. {435, "Cheap Clothes", 4000, 27},
  1953. {435, "Cheap Clothes", 4000, 28},
  1954. {435, "Cheap Clothes", 4000, 29},
  1955. {435, "Cheap Clothes", 4000, 30},
  1956. {435, "Cheap Clothes", 4000, 33},
  1957. {435, "Alcoholic Beverages", 4000, 1},
  1958. {435, "Alcoholic Beverages", 4000, 2},
  1959. {435, "Alcoholic Beverages", 4000, 5},
  1960. {435, "Alcoholic Beverages", 4000, 7},
  1961. {435, "Alcoholic Beverages", 4000, 8},
  1962. {435, "Alcoholic Beverages", 4000, 10},
  1963. {435, "Alcoholic Beverages", 4000, 11},
  1964. {435, "Alcoholic Beverages", 4000, 16},
  1965. {435, "Alcoholic Beverages", 4000, 17},
  1966. {435, "Alcoholic Beverages", 4000, 18},
  1967. {435, "Alcoholic Beverages", 4000, 19},
  1968. {435, "Alcoholic Beverages", 4000, 20},
  1969. {435, "Alcoholic Beverages", 4000, 22},
  1970. {435, "Alcoholic Beverages", 4000, 23},
  1971. {435, "Alcoholic Beverages", 4000, 24},
  1972. {435, "Alcoholic Beverages", 4000, 25},
  1973. {435, "Alcoholic Beverages", 4000, 26},
  1974. {435, "Alcoholic Beverages", 4000, 27},
  1975. {435, "Alcoholic Beverages", 4000, 28},
  1976. {435, "Alcoholic Beverages", 4000, 29},
  1977. {435, "Alcoholic Beverages", 4000, 30},
  1978. {435, "Alcoholic Beverages", 4000, 33},
  1979. {435, "Computer Parts", 7000, 1},
  1980. {435, "Computer Parts", 7000, 2},
  1981. {435, "Computer Parts", 7000, 5},
  1982. {435, "Computer Parts", 7000, 7},
  1983. {435, "Computer Parts", 7000, 8},
  1984. {435, "Computer Parts", 7000, 10},
  1985. {435, "Computer Parts", 7000, 11},
  1986. {435, "Computer Parts", 7000, 16},
  1987. {435, "Computer Parts", 7000, 17},
  1988. {435, "Computer Parts", 7000, 18},
  1989. {435, "Computer Parts", 7000, 19},
  1990. {435, "Computer Parts", 7000, 20},
  1991. {435, "Computer Parts", 7000, 22},
  1992. {435, "Computer Parts", 7000, 23},
  1993. {435, "Computer Parts", 7000, 24},
  1994. {435, "Computer Parts", 7000, 25},
  1995. {435, "Computer Parts", 7000, 26},
  1996. {435, "Computer Parts", 7000, 27},
  1997. {435, "Computer Parts", 7000, 28},
  1998. {435, "Computer Parts", 7000, 29},
  1999. {435, "Computer Parts", 7000, 30},
  2000. {435, "Computer Parts", 7000, 33},
  2001. {435, "Broken Fridges", 8000, 1},
  2002. {435, "Broken Fridges", 8000, 2},
  2003. {435, "Broken Fridges", 8000, 5},
  2004. {435, "Broken Fridges", 8000, 7},
  2005. {435, "Broken Fridges", 8000, 8},
  2006. {435, "Broken Fridges", 8000, 10},
  2007. {435, "Broken Fridges", 8000, 11},
  2008. {435, "Broken Fridges", 8000, 16},
  2009. {435, "Broken Fridges", 8000, 17},
  2010. {435, "Broken Fridges", 8000, 18},
  2011. {435, "Broken Fridges", 8000, 19},
  2012. {435, "Broken Fridges", 8000, 20},
  2013. {435, "Broken Fridges", 8000, 22},
  2014. {435, "Broken Fridges", 8000, 23},
  2015. {435, "Broken Fridges", 8000, 24},
  2016. {435, "Broken Fridges", 8000, 25},
  2017. {435, "Broken Fridges", 8000, 26},
  2018. {435, "Broken Fridges", 8000, 27},
  2019. {435, "Broken Fridges", 8000, 28},
  2020. {435, "Broken Fridges", 8000, 29},
  2021. {435, "Broken Fridges", 8000, 30},
  2022. {435, "Broken Fridges", 8000, 33},
  2023. {435, "Electronics", 4000, 1},
  2024. {435, "Electronics", 4000, 2},
  2025. {435, "Electronics", 4000, 5},
  2026. {435, "Electronics", 4000, 7},
  2027. {435, "Electronics", 4000, 8},
  2028. {435, "Electronics", 4000, 10},
  2029. {435, "Electronics", 4000, 11},
  2030. {435, "Electronics", 4000, 16},
  2031. {435, "Electronics", 4000, 17},
  2032. {435, "Electronics", 4000, 18},
  2033. {435, "Electronics", 4000, 19},
  2034. {435, "Electronics", 4000, 20},
  2035. {435, "Electronics", 4000, 22},
  2036. {435, "Electronics", 4000, 23},
  2037. {435, "Electronics", 4000, 24},
  2038. {435, "Electronics", 4000, 25},
  2039. {435, "Electronics", 4000, 26},
  2040. {435, "Electronics", 4000, 27},
  2041. {435, "Electronics", 4000, 28},
  2042. {435, "Electronics", 4000, 29},
  2043. {435, "Electronics", 4000, 30},
  2044. {435, "Electronics", 4000, 33},
  2045. {435, "Flat Screen TV's", 7000, 1},
  2046. {435, "Flat Screen TV's", 7000, 2},
  2047. {435, "Flat Screen TV's", 7000, 5},
  2048. {435, "Flat Screen TV's", 7000, 7},
  2049. {435, "Flat Screen TV's", 7000, 8},
  2050. {435, "Flat Screen TV's", 7000, 10},
  2051. {435, "Flat Screen TV's", 7000, 11},
  2052. {435, "Flat Screen TV's", 7000, 16},
  2053. {435, "Flat Screen TV's", 7000, 17},
  2054. {435, "Flat Screen TV's", 7000, 18},
  2055. {435, "Flat Screen TV's", 7000, 19},
  2056. {435, "Flat Screen TV's", 7000, 20},
  2057. {435, "Flat Screen TV's", 7000, 22},
  2058. {435, "Flat Screen TV's", 7000, 23},
  2059. {435, "Flat Screen TV's", 7000, 24},
  2060. {435, "Flat Screen TV's", 7000, 25},
  2061. {435, "Flat Screen TV's", 7000, 26},
  2062. {435, "Flat Screen TV's", 7000, 27},
  2063. {435, "Flat Screen TV's", 7000, 28},
  2064. {435, "Flat Screen TV's", 7000, 29},
  2065. {435, "Flat Screen TV's", 7000, 30},
  2066. {435, "Flat Screen TV's", 7000, 33},
  2067. {435, "Furniture", 4000, 1},
  2068. {435, "Furniture", 4000, 2},
  2069. {435, "Furniture", 4000, 5},
  2070. {435, "Furniture", 4000, 7},
  2071. {435, "Furniture", 4000, 8},
  2072. {435, "Furniture", 4000, 10},
  2073. {435, "Furniture", 4000, 11},
  2074. {435, "Furniture", 4000, 16},
  2075. {435, "Furniture", 4000, 17},
  2076. {435, "Furniture", 4000, 18},
  2077. {435, "Furniture", 4000, 19},
  2078. {435, "Furniture", 4000, 20},
  2079. {435, "Furniture", 4000, 22},
  2080. {435, "Furniture", 4000, 23},
  2081. {435, "Furniture", 4000, 24},
  2082. {435, "Furniture", 4000, 25},
  2083. {435, "Furniture", 4000, 26},
  2084. {435, "Furniture", 4000, 27},
  2085. {435, "Furniture", 4000, 28},
  2086. {435, "Furniture", 4000, 29},
  2087. {435, "Furniture", 4000, 30},
  2088. {435, "Furniture", 4000, 33},
  2089. {435, "Timber", 10000, 0},
  2090. {435, "Timber", 10000, 3},
  2091. {435, "Timber", 10000, 4},
  2092. {435, "Timber", 10000, 12},
  2093. {435, "Timber", 10000, 33},
  2094. {591, "Frozen Food", 4000, 1},
  2095. {591, "Frozen Food", 4000, 2},
  2096. {591, "Frozen Food", 4000, 5},
  2097. {591, "Frozen Food", 4000, 7},
  2098. {591, "Frozen Food", 4000, 8},
  2099. {591, "Frozen Food", 4000, 10},
  2100. {591, "Frozen Food", 4000, 16},
  2101. {591, "Frozen Food", 4000, 17},
  2102. {591, "Frozen Food", 4000, 18},
  2103. {591, "Frozen Food", 4000, 19},
  2104. {591, "Frozen Food", 4000, 20},
  2105. {591, "Frozen Food", 4000, 22},
  2106. {591, "Frozen Food", 4000, 23},
  2107. {591, "Frozen Food", 4000, 24},
  2108. {591, "Frozen Food", 4000, 25},
  2109. {591, "Frozen Food", 4000, 26},
  2110. {591, "Frozen Food", 4000, 27},
  2111. {591, "Frozen Food", 4000, 28},
  2112. {591, "Frozen Food", 4000, 29},
  2113. {591, "Frozen Food", 4000, 30},
  2114. {591, "Frozen Food", 4000, 33},
  2115. {591, "Cheap Clothes", 4000, 1},
  2116. {591, "Cheap Clothes", 4000, 2},
  2117. {591, "Cheap Clothes", 4000, 5},
  2118. {591, "Cheap Clothes", 4000, 7},
  2119. {591, "Cheap Clothes", 4000, 8},
  2120. {591, "Cheap Clothes", 4000, 10},
  2121. {591, "Cheap Clothes", 4000, 11},
  2122. {591, "Cheap Clothes", 4000, 16},
  2123. {591, "Cheap Clothes", 4000, 17},
  2124. {591, "Cheap Clothes", 4000, 18},
  2125. {591, "Cheap Clothes", 4000, 19},
  2126. {591, "Cheap Clothes", 4000, 20},
  2127. {591, "Cheap Clothes", 4000, 22},
  2128. {591, "Cheap Clothes", 4000, 23},
  2129. {591, "Cheap Clothes", 4000, 24},
  2130. {591, "Cheap Clothes", 4000, 25},
  2131. {591, "Cheap Clothes", 4000, 26},
  2132. {591, "Cheap Clothes", 4000, 27},
  2133. {591, "Cheap Clothes", 4000, 28},
  2134. {591, "Cheap Clothes", 4000, 29},
  2135. {591, "Cheap Clothes", 4000, 30},
  2136. {591, "Cheap Clothes", 4000, 33},
  2137. {591, "Alcoholic Beverages", 4000, 1},
  2138. {591, "Alcoholic Beverages", 4000, 2},
  2139. {591, "Alcoholic Beverages", 4000, 5},
  2140. {591, "Alcoholic Beverages", 4000, 7},
  2141. {591, "Alcoholic Beverages", 4000, 8},
  2142. {591, "Alcoholic Beverages", 4000, 10},
  2143. {591, "Alcoholic Beverages", 4000, 11},
  2144. {591, "Alcoholic Beverages", 4000, 16},
  2145. {591, "Alcoholic Beverages", 4000, 17},
  2146. {591, "Alcoholic Beverages", 4000, 18},
  2147. {591, "Alcoholic Beverages", 4000, 19},
  2148. {591, "Alcoholic Beverages", 4000, 20},
  2149. {591, "Alcoholic Beverages", 4000, 22},
  2150. {591, "Alcoholic Beverages", 4000, 23},
  2151. {591, "Alcoholic Beverages", 4000, 24},
  2152. {591, "Alcoholic Beverages", 4000, 25},
  2153. {591, "Alcoholic Beverages", 4000, 26},
  2154. {591, "Alcoholic Beverages", 4000, 27},
  2155. {591, "Alcoholic Beverages", 4000, 28},
  2156. {591, "Alcoholic Beverages", 4000, 29},
  2157. {591, "Alcoholic Beverages", 4000, 30},
  2158. {591, "Alcoholic Beverages", 4000, 33},
  2159. {591, "Computer Parts", 7000, 1},
  2160. {591, "Computer Parts", 7000, 2},
  2161. {591, "Computer Parts", 7000, 5},
  2162. {591, "Computer Parts", 7000, 7},
  2163. {591, "Computer Parts", 7000, 8},
  2164. {591, "Computer Parts", 7000, 10},
  2165. {591, "Computer Parts", 7000, 11},
  2166. {591, "Computer Parts", 7000, 16},
  2167. {591, "Computer Parts", 7000, 17},
  2168. {591, "Computer Parts", 7000, 18},
  2169. {591, "Computer Parts", 7000, 19},
  2170. {591, "Computer Parts", 7000, 20},
  2171. {591, "Computer Parts", 7000, 22},
  2172. {591, "Computer Parts", 7000, 23},
  2173. {591, "Computer Parts", 7000, 24},
  2174. {591, "Computer Parts", 7000, 25},
  2175. {591, "Computer Parts", 7000, 26},
  2176. {591, "Computer Parts", 7000, 27},
  2177. {591, "Computer Parts", 7000, 28},
  2178. {591, "Computer Parts", 7000, 29},
  2179. {591, "Computer Parts", 7000, 30},
  2180. {591, "Computer Parts", 7000, 33},
  2181. {591, "Broken Fridges", 8000, 1},
  2182. {591, "Broken Fridges", 8000, 2},
  2183. {591, "Broken Fridges", 8000, 5},
  2184. {591, "Broken Fridges", 8000, 7},
  2185. {591, "Broken Fridges", 8000, 8},
  2186. {591, "Broken Fridges", 8000, 10},
  2187. {591, "Broken Fridges", 8000, 11},
  2188. {591, "Broken Fridges", 8000, 16},
  2189. {591, "Broken Fridges", 8000, 17},
  2190. {591, "Broken Fridges", 8000, 18},
  2191. {591, "Broken Fridges", 8000, 19},
  2192. {591, "Broken Fridges", 8000, 20},
  2193. {591, "Broken Fridges", 8000, 22},
  2194. {591, "Broken Fridges", 8000, 23},
  2195. {591, "Broken Fridges", 8000, 24},
  2196. {591, "Broken Fridges", 8000, 25},
  2197. {591, "Broken Fridges", 8000, 26},
  2198. {591, "Broken Fridges", 8000, 27},
  2199. {591, "Broken Fridges", 8000, 28},
  2200. {591, "Broken Fridges", 8000, 29},
  2201. {591, "Broken Fridges", 8000, 30},
  2202. {591, "Broken Fridges", 8000, 33},
  2203. {591, "Electronics", 4000, 1},
  2204. {591, "Electronics", 4000, 2},
  2205. {591, "Electronics", 4000, 5},
  2206. {591, "Electronics", 4000, 7},
  2207. {591, "Electronics", 4000, 8},
  2208. {591, "Electronics", 4000, 10},
  2209. {591, "Electronics", 4000, 11},
  2210. {591, "Electronics", 4000, 16},
  2211. {591, "Electronics", 4000, 17},
  2212. {591, "Electronics", 4000, 18},
  2213. {591, "Electronics", 4000, 19},
  2214. {591, "Electronics", 4000, 20},
  2215. {591, "Electronics", 4000, 22},
  2216. {591, "Electronics", 4000, 23},
  2217. {591, "Electronics", 4000, 24},
  2218. {591, "Electronics", 4000, 25},
  2219. {591, "Electronics", 4000, 26},
  2220. {591, "Electronics", 4000, 27},
  2221. {591, "Electronics", 4000, 28},
  2222. {591, "Electronics", 4000, 29},
  2223. {591, "Electronics", 4000, 30},
  2224. {591, "Electronics", 4000, 33},
  2225. {591, "Flat Screen TV's", 7000, 1},
  2226. {591, "Flat Screen TV's", 7000, 2},
  2227. {591, "Flat Screen TV's", 7000, 5},
  2228. {591, "Flat Screen TV's", 7000, 7},
  2229. {591, "Flat Screen TV's", 7000, 8},
  2230. {591, "Flat Screen TV's", 7000, 10},
  2231. {591, "Flat Screen TV's", 7000, 11},
  2232. {591, "Flat Screen TV's", 7000, 16},
  2233. {591, "Flat Screen TV's", 7000, 17},
  2234. {591, "Flat Screen TV's", 7000, 18},
  2235. {591, "Flat Screen TV's", 7000, 19},
  2236. {591, "Flat Screen TV's", 7000, 20},
  2237. {591, "Flat Screen TV's", 7000, 22},
  2238. {591, "Flat Screen TV's", 7000, 23},
  2239. {591, "Flat Screen TV's", 7000, 24},
  2240. {591, "Flat Screen TV's", 7000, 25},
  2241. {591, "Flat Screen TV's", 7000, 26},
  2242. {591, "Flat Screen TV's", 7000, 27},
  2243. {591, "Flat Screen TV's", 7000, 28},
  2244. {591, "Flat Screen TV's", 7000, 29},
  2245. {591, "Flat Screen TV's", 7000, 30},
  2246. {591, "Flat Screen TV's", 7000, 33},
  2247. {591, "Furniture", 4000, 1},
  2248. {591, "Furniture", 4000, 2},
  2249. {591, "Furniture", 4000, 5},
  2250. {591, "Furniture", 4000, 7},
  2251. {591, "Furniture", 4000, 8},
  2252. {591, "Furniture", 4000, 10},
  2253. {591, "Furniture", 4000, 11},
  2254. {591, "Furniture", 4000, 16},
  2255. {591, "Furniture", 4000, 17},
  2256. {591, "Furniture", 4000, 18},
  2257. {591, "Furniture", 4000, 19},
  2258. {591, "Furniture", 4000, 20},
  2259. {591, "Furniture", 4000, 22},
  2260. {591, "Furniture", 4000, 23},
  2261. {591, "Furniture", 4000, 24},
  2262. {591, "Furniture", 4000, 25},
  2263. {591, "Furniture", 4000, 26},
  2264. {591, "Furniture", 4000, 27},
  2265. {591, "Furniture", 4000, 28},
  2266. {591, "Furniture", 4000, 29},
  2267. {591, "Furniture", 4000, 30},
  2268. {591, "Furniture", 4000, 33},
  2269. {591, "Food Packages", 4000, 1},
  2270. {591, "Food Packages", 4000, 2},
  2271. {591, "Food Packages", 4000, 5},
  2272. {591, "Food Packages", 4000, 7},
  2273. {591, "Food Packages", 4000, 8},
  2274. {591, "Food Packages", 4000, 10},
  2275. {591, "Food Packages", 4000, 11},
  2276. {591, "Food Packages", 4000, 16},
  2277. {591, "Food Packages", 4000, 17},
  2278. {591, "Food Packages", 4000, 18},
  2279. {591, "Food Packages", 4000, 19},
  2280. {591, "Food Packages", 4000, 20},
  2281. {591, "Food Packages", 4000, 22},
  2282. {591, "Food Packages", 4000, 23},
  2283. {591, "Food Packages", 4000, 24},
  2284. {591, "Food Packages", 4000, 25},
  2285. {591, "Food Packages", 4000, 26},
  2286. {591, "Food Packages", 4000, 27},
  2287. {591, "Food Packages", 4000, 28},
  2288. {591, "Food Packages", 4000, 29},
  2289. {591, "Food Packages", 4000, 30},
  2290. {591, "Food Packages", 4000, 33},
  2291. {591, "Broken Furniture", 6000, 1},
  2292. {591, "Broken Furniture", 6000, 2},
  2293. {591, "Broken Furniture", 6000, 5},
  2294. {591, "Broken Furniture", 6000, 7},
  2295. {591, "Broken Furniture", 6000, 8},
  2296. {591, "Broken Furniture", 6000, 10},
  2297. {591, "Broken Furniture", 6000, 11},
  2298. {591, "Broken Furniture", 6000, 16},
  2299. {591, "Broken Furniture", 6000, 17},
  2300. {591, "Broken Furniture", 6000, 18},
  2301. {591, "Broken Furniture", 6000, 19},
  2302. {591, "Broken Furniture", 6000, 20},
  2303. {591, "Broken Furniture", 6000, 22},
  2304. {591, "Broken Furniture", 6000, 23},
  2305. {591, "Broken Furniture", 6000, 24},
  2306. {591, "Broken Furniture", 6000, 25},
  2307. {591, "Broken Furniture", 6000, 26},
  2308. {591, "Broken Furniture", 6000, 27},
  2309. {591, "Broken Furniture", 6000, 28},
  2310. {591, "Broken Furniture", 6000, 29},
  2311. {591, "Broken Furniture", 6000, 30},
  2312. {591, "Broken Furniture", 6000, 33},
  2313. {591, "Chemistry Instruments", 10000, 1},
  2314. {591, "Chemistry Instruments", 10000, 2},
  2315. {591, "Chemistry Instruments", 10000, 5},
  2316. {591, "Chemistry Instruments", 10000, 7},
  2317. {591, "Chemistry Instruments", 10000, 8},
  2318. {591, "Chemistry Instruments", 10000, 10},
  2319. {591, "Chemistry Instruments", 10000, 11},
  2320. {591, "Chemistry Instruments", 10000, 16},
  2321. {591, "Chemistry Instruments", 10000, 17},
  2322. {591, "Chemistry Instruments", 10000, 18},
  2323. {591, "Chemistry Instruments", 10000, 19},
  2324. {591, "Chemistry Instruments", 10000, 20},
  2325. {591, "Chemistry Instruments", 10000, 22},
  2326. {591, "Chemistry Instruments", 10000, 23},
  2327. {591, "Chemistry Instruments", 10000, 24},
  2328. {591, "Chemistry Instruments", 10000, 25},
  2329. {591, "Chemistry Instruments", 10000, 26},
  2330. {591, "Chemistry Instruments", 10000, 27},
  2331. {591, "Chemistry Instruments", 10000, 28},
  2332. {591, "Chemistry Instruments", 10000, 29},
  2333. {591, "Chemistry Instruments", 10000, 30},
  2334. {591, "Chemistry Instruments", 10000, 33},
  2335. {591, "Timber", 10000, 0},
  2336. {591, "Timber", 10000, 3},
  2337. {591, "Timber", 10000, 4},
  2338. {591, "Timber", 10000, 12},
  2339. {591, "Timber", 10000, 33},
  2340. {591, "PVC Components", 6000, 1},
  2341. {591, "PVC Components", 6000, 2},
  2342. {591, "PVC Components", 6000, 5},
  2343. {591, "PVC Components", 6000, 7},
  2344. {591, "PVC Components", 6000, 8},
  2345. {591, "PVC Components", 6000, 10},
  2346. {591, "PVC Components", 6000, 11},
  2347. {591, "PVC Components", 6000, 16},
  2348. {591, "PVC Components", 6000, 17},
  2349. {591, "PVC Components", 6000, 18},
  2350. {591, "PVC Components", 6000, 19},
  2351. {591, "PVC Components", 6000, 20},
  2352. {591, "PVC Components", 6000, 22},
  2353. {591, "PVC Components", 6000, 23},
  2354. {591, "PVC Components", 6000, 24},
  2355. {591, "PVC Components", 6000, 25},
  2356. {591, "PVC Components", 6000, 26},
  2357. {591, "PVC Components", 6000, 27},
  2358. {591, "PVC Components", 6000, 28},
  2359. {591, "PVC Components", 6000, 29},
  2360. {591, "PVC Components", 6000, 30},
  2361. {591, "PVC Components", 6000, 33},
  2362. {450, "Coal", 8000, 6},
  2363. {450, "Coal", 8000, 8},
  2364. {450, "Coal", 8000, 10},
  2365. {450, "Coal", 8000, 12},
  2366. {450, "Coal", 8000, 13},
  2367. {450, "Coal", 8000, 20},
  2368. {450, "Coal", 8000, 24},
  2369. {450, "Coal", 8000, 30},
  2370. {450, "Coal", 8000, 33},
  2371. {450, "Bricks", 6000, 6},
  2372. {450, "Bricks", 6000, 8},
  2373. {450, "Bricks", 6000, 10},
  2374. {450, "Bricks", 6000, 12},
  2375. {450, "Bricks", 6000, 13},
  2376. {450, "Bricks", 6000, 20},
  2377. {450, "Bricks", 6000, 24},
  2378. {450, "Bricks", 6000, 30},
  2379. {450, "Bricks", 6000, 33},
  2380. {450, "Gravel", 6000, 6},
  2381. {450, "Gravel", 6000, 8},
  2382. {450, "Gravel", 6000, 10},
  2383. {450, "Gravel", 6000, 12},
  2384. {450, "Gravel", 6000, 13},
  2385. {450, "Gravel", 6000, 20},
  2386. {450, "Gravel", 6000, 24},
  2387. {450, "Gravel", 6000, 30},
  2388. {450, "Gravel", 6000, 33},
  2389. {450, "Sand", 6000, 6},
  2390. {450, "Sand", 6000, 8},
  2391. {450, "Sand", 6000, 10},
  2392. {450, "Sand", 6000, 12},
  2393. {450, "Sand", 6000, 13},
  2394. {450, "Sand", 6000, 20},
  2395. {450, "Sand", 6000, 24},
  2396. {450, "Sand", 6000, 30},
  2397. {450, "Sand", 6000, 33},
  2398. {450, "Rubble", 6000, 6},
  2399. {450, "Rubble", 6000, 8},
  2400. {450, "Rubble", 6000, 10},
  2401. {450, "Rubble", 6000, 12},
  2402. {450, "Rubble", 6000, 13},
  2403. {450, "Rubble", 6000, 20},
  2404. {450, "Rubble", 6000, 24},
  2405. {450, "Rubble", 6000, 30},
  2406. {450, "Rubble", 6000, 33},
  2407. {584, "Diesel", 10000, 6},
  2408. {584, "Diesel", 8000, 9},
  2409. {584, "Diesel", 10000, 10},
  2410. {584, "Diesel", 8000, 13},
  2411. {584, "Diesel", 10000, 14},
  2412. {584, "Diesel", 8000, 21},
  2413. {584, "Diesel", 10000, 31},
  2414. {584, "Diesel", 8000, 32},
  2415. {584, "Petrol", 8000, 6},
  2416. {584, "Petrol", 10000, 9},
  2417. {584, "Petrol", 8000, 10},
  2418. {584, "Petrol", 10000, 13},
  2419. {584, "Petrol", 8000, 14},
  2420. {584, "Petrol", 10000, 21},
  2421. {584, "Petrol", 8000, 31},
  2422. {584, "Petrol", 10000, 32},
  2423. {584, "Gas", 10000, 6},
  2424. {584, "Gas", 8000, 9},
  2425. {584, "Gas", 10000, 10},
  2426. {584, "Gas", 8000, 13},
  2427. {584, "Gas", 10000, 14},
  2428. {584, "Gas", 8000, 21},
  2429. {584, "Gas", 10000, 31},
  2430. {584, "Gas", 8000, 32},
  2431. {584, "Oil", 8000, 6},
  2432. {584, "Oil", 10000, 9},
  2433. {584, "Oil", 8000, 10},
  2434. {584, "Oil", 10000, 13},
  2435. {584, "Oil", 8000, 14},
  2436. {584, "Oil", 10000, 21},
  2437. {584, "Oil", 8000, 31},
  2438. {584, "Oil", 10000, 32}
  2439. };
  2440. new IllegalTruckJobInfo[MAX_TRUCKJOBS][pTruckJobInfo] =
  2441. {
  2442. /* {Description, Price, Destination Depot ID} */
  2443. {435, "Overloaded Frozen Food", 4000, 1},
  2444. {435, "Overloaded Frozen Food", 4000, 2},
  2445. {435, "Overloaded Frozen Food", 4000, 5},
  2446. {435, "Overloaded Frozen Food", 4000, 7},
  2447. {435, "Overloaded Frozen Food", 4000, 8},
  2448. {435, "Overloaded Frozen Food", 4000, 10},
  2449. {435, "Overloaded Frozen Food", 4000, 16},
  2450. {435, "Overloaded Frozen Food", 4000, 17},
  2451. {435, "Overloaded Frozen Food", 4000, 18},
  2452. {435, "Overloaded Frozen Food", 4000, 19},
  2453. {435, "Overloaded Frozen Food", 4000, 20},
  2454. {435, "Overloaded Frozen Food", 4000, 22},
  2455. {435, "Overloaded Frozen Food", 4000, 23},
  2456. {435, "Overloaded Frozen Food", 4000, 24},
  2457. {435, "Overloaded Frozen Food", 4000, 25},
  2458. {435, "Overloaded Frozen Food", 4000, 26},
  2459. {435, "Overloaded Frozen Food", 4000, 27},
  2460. {435, "Overloaded Frozen Food", 4000, 28},
  2461. {435, "Overloaded Frozen Food", 4000, 29},
  2462. {435, "Overloaded Frozen Food", 4000, 30},
  2463. {435, "Overloaded Frozen Food", 4000, 33},
  2464. {435, "Overloaded Cheap Clothes", 4000, 1},
  2465. {435, "Overloaded Cheap Clothes", 4000, 2},
  2466. {435, "Overloaded Cheap Clothes", 4000, 5},
  2467. {435, "Overloaded Cheap Clothes", 4000, 7},
  2468. {435, "Overloaded Cheap Clothes", 4000, 8},
  2469. {435, "Overloaded Cheap Clothes", 4000, 10},
  2470. {435, "Overloaded Cheap Clothes", 4000, 11},
  2471. {435, "Overloaded Cheap Clothes", 4000, 16},
  2472. {435, "Overloaded Cheap Clothes", 4000, 17},
  2473. {435, "Overloaded Cheap Clothes", 4000, 18},
  2474. {435, "Overloaded Cheap Clothes", 4000, 19},
  2475. {435, "Overloaded Cheap Clothes", 4000, 20},
  2476. {435, "Overloaded Cheap Clothes", 4000, 22},
  2477. {435, "Overloaded Cheap Clothes", 4000, 23},
  2478. {435, "Overloaded Cheap Clothes", 4000, 24},
  2479. {435, "Overloaded Cheap Clothes", 4000, 25},
  2480. {435, "Overloaded Cheap Clothes", 4000, 26},
  2481. {435, "Overloaded Cheap Clothes", 4000, 27},
  2482. {435, "Overloaded Cheap Clothes", 4000, 28},
  2483. {435, "Overloaded Cheap Clothes", 4000, 29},
  2484. {435, "Overloaded Cheap Clothes", 4000, 30},
  2485. {435, "Overloaded Cheap Clothes", 4000, 33},
  2486. {435, "Illegal Alcoholic Beverages", 4000, 1},
  2487. {435, "Illegal Alcoholic Beverages", 4000, 2},
  2488. {435, "Illegal Alcoholic Beverages", 4000, 5},
  2489. {435, "Illegal Alcoholic Beverages", 4000, 7},
  2490. {435, "Illegal Alcoholic Beverages", 4000, 8},
  2491. {435, "Illegal Alcoholic Beverages", 4000, 10},
  2492. {435, "Illegal Alcoholic Beverages", 4000, 11},
  2493. {435, "Illegal Alcoholic Beverages", 4000, 16},
  2494. {435, "Illegal Alcoholic Beverages", 4000, 17},
  2495. {435, "Illegal Alcoholic Beverages", 4000, 18},
  2496. {435, "Illegal Alcoholic Beverages", 4000, 19},
  2497. {435, "Illegal Alcoholic Beverages", 4000, 20},
  2498. {435, "Illegal Alcoholic Beverages", 4000, 22},
  2499. {435, "Illegal Alcoholic Beverages", 4000, 23},
  2500. {435, "Illegal Alcoholic Beverages", 4000, 24},
  2501. {435, "Illegal Alcoholic Beverages", 4000, 25},
  2502. {435, "Illegal Alcoholic Beverages", 4000, 26},
  2503. {435, "Illegal Alcoholic Beverages", 4000, 27},
  2504. {435, "Illegal Alcoholic Beverages", 4000, 28},
  2505. {435, "Illegal Alcoholic Beverages", 4000, 29},
  2506. {435, "Illegal Alcoholic Beverages", 4000, 30},
  2507. {435, "Illegal Alcoholic Beverages", 4000, 33},
  2508. {435, "Illegal Computer Parts", 7000, 1},
  2509. {435, "Illegal Computer Parts", 7000, 2},
  2510. {435, "Illegal Computer Parts", 7000, 5},
  2511. {435, "Illegal Computer Parts", 7000, 7},
  2512. {435, "Illegal Computer Parts", 7000, 8},
  2513. {435, "Illegal Computer Parts", 7000, 10},
  2514. {435, "Illegal Computer Parts", 7000, 11},
  2515. {435, "Illegal Computer Parts", 7000, 16},
  2516. {435, "Illegal Computer Parts", 7000, 17},
  2517. {435, "Illegal Computer Parts", 7000, 18},
  2518. {435, "Illegal Computer Parts", 7000, 19},
  2519. {435, "Illegal Computer Parts", 7000, 20},
  2520. {435, "Illegal Computer Parts", 7000, 22},
  2521. {435, "Illegal Computer Parts", 7000, 23},
  2522. {435, "Illegal Computer Parts", 7000, 24},
  2523. {435, "Illegal Computer Parts", 7000, 25},
  2524. {435, "Illegal Computer Parts", 7000, 26},
  2525. {435, "Illegal Computer Parts", 7000, 27},
  2526. {435, "Illegal Computer Parts", 7000, 28},
  2527. {435, "Illegal Computer Parts", 7000, 29},
  2528. {435, "Illegal Computer Parts", 7000, 30},
  2529. {435, "Illegal Computer Parts", 7000, 33},
  2530. {435, "Dangerous Broken Fridges", 8000, 1},
  2531. {435, "Dangerous Broken Fridges", 8000, 2},
  2532. {435, "Dangerous Broken Fridges", 8000, 5},
  2533. {435, "Dangerous Broken Fridges", 8000, 7},
  2534. {435, "Dangerous Broken Fridges", 8000, 8},
  2535. {435, "Dangerous Broken Fridges", 8000, 10},
  2536. {435, "Dangerous Broken Fridges", 8000, 11},
  2537. {435, "Dangerous Broken Fridges", 8000, 16},
  2538. {435, "Dangerous Broken Fridges", 8000, 17},
  2539. {435, "Dangerous Broken Fridges", 8000, 18},
  2540. {435, "Dangerous Broken Fridges", 8000, 19},
  2541. {435, "Dangerous Broken Fridges", 8000, 20},
  2542. {435, "Dangerous Broken Fridges", 8000, 22},
  2543. {435, "Dangerous Broken Fridges", 8000, 23},
  2544. {435, "Dangerous Broken Fridges", 8000, 24},
  2545. {435, "Dangerous Broken Fridges", 8000, 25},
  2546. {435, "Dangerous Broken Fridges", 8000, 26},
  2547. {435, "Dangerous Broken Fridges", 8000, 27},
  2548. {435, "Dangerous Broken Fridges", 8000, 28},
  2549. {435, "Dangerous Broken Fridges", 8000, 29},
  2550. {435, "Dangerous Broken Fridges", 8000, 30},
  2551. {435, "Dangerous Broken Fridges", 8000, 33},
  2552. {435, "Dangerous Electronics", 4000, 1},
  2553. {435, "Dangerous Electronics", 4000, 2},
  2554. {435, "Dangerous Electronics", 4000, 5},
  2555. {435, "Dangerous Electronics", 4000, 7},
  2556. {435, "Dangerous Electronics", 4000, 8},
  2557. {435, "Dangerous Electronics", 4000, 10},
  2558. {435, "Dangerous Electronics", 4000, 11},
  2559. {435, "Dangerous Electronics", 4000, 16},
  2560. {435, "Dangerous Electronics", 4000, 17},
  2561. {435, "Dangerous Electronics", 4000, 18},
  2562. {435, "Dangerous Electronics", 4000, 19},
  2563. {435, "Dangerous Electronics", 4000, 20},
  2564. {435, "Dangerous Electronics", 4000, 22},
  2565. {435, "Dangerous Electronics", 4000, 23},
  2566. {435, "Dangerous Electronics", 4000, 24},
  2567. {435, "Dangerous Electronics", 4000, 25},
  2568. {435, "Dangerous Electronics", 4000, 26},
  2569. {435, "Dangerous Electronics", 4000, 27},
  2570. {435, "Dangerous Electronics", 4000, 28},
  2571. {435, "Dangerous Electronics", 4000, 29},
  2572. {435, "Dangerous Electronics", 4000, 30},
  2573. {435, "Dangerous Electronics", 4000, 33},
  2574. {435, "Overloaded Flat Screen TV's", 7000, 1},
  2575. {435, "Overloaded Flat Screen TV's", 7000, 2},
  2576. {435, "Overloaded Flat Screen TV's", 7000, 5},
  2577. {435, "Overloaded Flat Screen TV's", 7000, 7},
  2578. {435, "Overloaded Flat Screen TV's", 7000, 8},
  2579. {435, "Overloaded Flat Screen TV's", 7000, 10},
  2580. {435, "Overloaded Flat Screen TV's", 7000, 11},
  2581. {435, "Overloaded Flat Screen TV's", 7000, 16},
  2582. {435, "Overloaded Flat Screen TV's", 7000, 17},
  2583. {435, "Overloaded Flat Screen TV's", 7000, 18},
  2584. {435, "Overloaded Flat Screen TV's", 7000, 19},
  2585. {435, "Overloaded Flat Screen TV's", 7000, 20},
  2586. {435, "Overloaded Flat Screen TV's", 7000, 22},
  2587. {435, "Overloaded Flat Screen TV's", 7000, 23},
  2588. {435, "Overloaded Flat Screen TV's", 7000, 24},
  2589. {435, "Overloaded Flat Screen TV's", 7000, 25},
  2590. {435, "Overloaded Flat Screen TV's", 7000, 26},
  2591. {435, "Overloaded Flat Screen TV's", 7000, 27},
  2592. {435, "Overloaded Flat Screen TV's", 7000, 28},
  2593. {435, "Overloaded Flat Screen TV's", 7000, 29},
  2594. {435, "Overloaded Flat Screen TV's", 7000, 30},
  2595. {435, "Overloaded Flat Screen TV's", 7000, 33},
  2596. {435, "Overloaded Furniture", 4000, 1},
  2597. {435, "Overloaded Furniture", 4000, 2},
  2598. {435, "Overloaded Furniture", 4000, 5},
  2599. {435, "Overloaded Furniture", 4000, 7},
  2600. {435, "Overloaded Furniture", 4000, 8},
  2601. {435, "Overloaded Furniture", 4000, 10},
  2602. {435, "Overloaded Furniture", 4000, 11},
  2603. {435, "Overloaded Furniture", 4000, 16},
  2604. {435, "Overloaded Furniture", 4000, 17},
  2605. {435, "Overloaded Furniture", 4000, 18},
  2606. {435, "Overloaded Furniture", 4000, 19},
  2607. {435, "Overloaded Furniture", 4000, 20},
  2608. {435, "Overloaded Furniture", 4000, 22},
  2609. {435, "Overloaded Furniture", 4000, 23},
  2610. {435, "Overloaded Furniture", 4000, 24},
  2611. {435, "Overloaded Furniture", 4000, 25},
  2612. {435, "Overloaded Furniture", 4000, 26},
  2613. {435, "Overloaded Furniture", 4000, 27},
  2614. {435, "Overloaded Furniture", 4000, 28},
  2615. {435, "Overloaded Furniture", 4000, 29},
  2616. {435, "Overloaded Furniture", 4000, 30},
  2617. {435, "Overloaded Furniture", 4000, 33},
  2618. {435, "Overloaded Timber", 10000, 0},
  2619. {435, "Overloaded Timber", 10000, 3},
  2620. {435, "Overloaded Timber", 10000, 4},
  2621. {435, "Overloaded Timber", 10000, 12},
  2622. {435, "Overloaded Timber", 10000, 33},
  2623. {591, "Overloaded Frozen Food", 4000, 1},
  2624. {591, "Overloaded Frozen Food", 4000, 2},
  2625. {591, "Overloaded Frozen Food", 4000, 5},
  2626. {591, "Overloaded Frozen Food", 4000, 7},
  2627. {591, "Overloaded Frozen Food", 4000, 8},
  2628. {591, "Overloaded Frozen Food", 4000, 10},
  2629. {591, "Overloaded Frozen Food", 4000, 16},
  2630. {591, "Overloaded Frozen Food", 4000, 17},
  2631. {591, "Overloaded Frozen Food", 4000, 18},
  2632. {591, "Overloaded Frozen Food", 4000, 19},
  2633. {591, "Overloaded Frozen Food", 4000, 20},
  2634. {591, "Overloaded Frozen Food", 4000, 22},
  2635. {591, "Overloaded Frozen Food", 4000, 23},
  2636. {591, "Overloaded Frozen Food", 4000, 24},
  2637. {591, "Overloaded Frozen Food", 4000, 25},
  2638. {591, "Overloaded Frozen Food", 4000, 26},
  2639. {591, "Overloaded Frozen Food", 4000, 27},
  2640. {591, "Overloaded Frozen Food", 4000, 28},
  2641. {591, "Overloaded Frozen Food", 4000, 29},
  2642. {591, "Overloaded Frozen Food", 4000, 30},
  2643. {591, "Overloaded Frozen Food", 4000, 33},
  2644. {591, "Overloaded Cheap Clothes", 4000, 1},
  2645. {591, "Overloaded Cheap Clothes", 4000, 2},
  2646. {591, "Overloaded Cheap Clothes", 4000, 5},
  2647. {591, "Overloaded Cheap Clothes", 4000, 7},
  2648. {591, "Overloaded Cheap Clothes", 4000, 8},
  2649. {591, "Overloaded Cheap Clothes", 4000, 10},
  2650. {591, "Overloaded Cheap Clothes", 4000, 11},
  2651. {591, "Overloaded Cheap Clothes", 4000, 16},
  2652. {591, "Overloaded Cheap Clothes", 4000, 17},
  2653. {591, "Overloaded Cheap Clothes", 4000, 18},
  2654. {591, "Overloaded Cheap Clothes", 4000, 19},
  2655. {591, "Overloaded Cheap Clothes", 4000, 20},
  2656. {591, "Overloaded Cheap Clothes", 4000, 22},
  2657. {591, "Overloaded Cheap Clothes", 4000, 23},
  2658. {591, "Overloaded Cheap Clothes", 4000, 24},
  2659. {591, "Overloaded Cheap Clothes", 4000, 25},
  2660. {591, "Overloaded Cheap Clothes", 4000, 26},
  2661. {591, "Overloaded Cheap Clothes", 4000, 27},
  2662. {591, "Overloaded Cheap Clothes", 4000, 28},
  2663. {591, "Overloaded Cheap Clothes", 4000, 29},
  2664. {591, "Overloaded Cheap Clothes", 4000, 30},
  2665. {591, "Overloaded Cheap Clothes", 4000, 33},
  2666. {591, "Illegal Alcoholic Beverages", 4000, 1},
  2667. {591, "Illegal Alcoholic Beverages", 4000, 2},
  2668. {591, "Illegal Alcoholic Beverages", 4000, 5},
  2669. {591, "Illegal Alcoholic Beverages", 4000, 7},
  2670. {591, "Illegal Alcoholic Beverages", 4000, 8},
  2671. {591, "Illegal Alcoholic Beverages", 4000, 10},
  2672. {591, "Illegal Alcoholic Beverages", 4000, 11},
  2673. {591, "Illegal Alcoholic Beverages", 4000, 16},
  2674. {591, "Illegal Alcoholic Beverages", 4000, 17},
  2675. {591, "Illegal Alcoholic Beverages", 4000, 18},
  2676. {591, "Illegal Alcoholic Beverages", 4000, 19},
  2677. {591, "Illegal Alcoholic Beverages", 4000, 20},
  2678. {591, "Illegal Alcoholic Beverages", 4000, 22},
  2679. {591, "Illegal Alcoholic Beverages", 4000, 23},
  2680. {591, "Illegal Alcoholic Beverages", 4000, 24},
  2681. {591, "Illegal Alcoholic Beverages", 4000, 25},
  2682. {591, "Illegal Alcoholic Beverages", 4000, 26},
  2683. {591, "Illegal Alcoholic Beverages", 4000, 27},
  2684. {591, "Illegal Alcoholic Beverages", 4000, 28},
  2685. {591, "Illegal Alcoholic Beverages", 4000, 29},
  2686. {591, "Illegal Alcoholic Beverages", 4000, 30},
  2687. {591, "Illegal Alcoholic Beverages", 4000, 33},
  2688. {591, "Illegal Computer Parts", 7000, 1},
  2689. {591, "Illegal Computer Parts", 7000, 2},
  2690. {591, "Illegal Computer Parts", 7000, 5},
  2691. {591, "Illegal Computer Parts", 7000, 7},
  2692. {591, "Illegal Computer Parts", 7000, 8},
  2693. {591, "Illegal Computer Parts", 7000, 10},
  2694. {591, "Illegal Computer Parts", 7000, 11},
  2695. {591, "Illegal Computer Parts", 7000, 16},
  2696. {591, "Illegal Computer Parts", 7000, 17},
  2697. {591, "Illegal Computer Parts", 7000, 18},
  2698. {591, "Illegal Computer Parts", 7000, 19},
  2699. {591, "Illegal Computer Parts", 7000, 20},
  2700. {591, "Illegal Computer Parts", 7000, 22},
  2701. {591, "Illegal Computer Parts", 7000, 23},
  2702. {591, "Illegal Computer Parts", 7000, 24},
  2703. {591, "Illegal Computer Parts", 7000, 25},
  2704. {591, "Illegal Computer Parts", 7000, 26},
  2705. {591, "Illegal Computer Parts", 7000, 27},
  2706. {591, "Illegal Computer Parts", 7000, 28},
  2707. {591, "Illegal Computer Parts", 7000, 29},
  2708. {591, "Illegal Computer Parts", 7000, 30},
  2709. {591, "Illegal Computer Parts", 7000, 33},
  2710. {591, "Dangerous Broken Fridges", 8000, 1},
  2711. {591, "Dangerous Broken Fridges", 8000, 2},
  2712. {591, "Dangerous Broken Fridges", 8000, 5},
  2713. {591, "Dangerous Broken Fridges", 8000, 7},
  2714. {591, "Dangerous Broken Fridges", 8000, 8},
  2715. {591, "Dangerous Broken Fridges", 8000, 10},
  2716. {591, "Dangerous Broken Fridges", 8000, 11},
  2717. {591, "Dangerous Broken Fridges", 8000, 16},
  2718. {591, "Dangerous Broken Fridges", 8000, 17},
  2719. {591, "Dangerous Broken Fridges", 8000, 18},
  2720. {591, "Dangerous Broken Fridges", 8000, 19},
  2721. {591, "Dangerous Broken Fridges", 8000, 20},
  2722. {591, "Dangerous Broken Fridges", 8000, 22},
  2723. {591, "Dangerous Broken Fridges", 8000, 23},
  2724. {591, "Dangerous Broken Fridges", 8000, 24},
  2725. {591, "Dangerous Broken Fridges", 8000, 25},
  2726. {591, "Dangerous Broken Fridges", 8000, 26},
  2727. {591, "Dangerous Broken Fridges", 8000, 27},
  2728. {591, "Dangerous Broken Fridges", 8000, 28},
  2729. {591, "Dangerous Broken Fridges", 8000, 29},
  2730. {591, "Dangerous Broken Fridges", 8000, 30},
  2731. {591, "Dangerous Broken Fridges", 8000, 33},
  2732. {591, "Dangerous Electronics", 4000, 1},
  2733. {591, "Dangerous Electronics", 4000, 2},
  2734. {591, "Dangerous Electronics", 4000, 5},
  2735. {591, "Dangerous Electronics", 4000, 7},
  2736. {591, "Dangerous Electronics", 4000, 8},
  2737. {591, "Dangerous Electronics", 4000, 10},
  2738. {591, "Dangerous Electronics", 4000, 11},
  2739. {591, "Dangerous Electronics", 4000, 16},
  2740. {591, "Dangerous Electronics", 4000, 17},
  2741. {591, "Dangerous Electronics", 4000, 18},
  2742. {591, "Dangerous Electronics", 4000, 19},
  2743. {591, "Dangerous Electronics", 4000, 20},
  2744. {591, "Dangerous Electronics", 4000, 22},
  2745. {591, "Dangerous Electronics", 4000, 23},
  2746. {591, "Dangerous Electronics", 4000, 24},
  2747. {591, "Dangerous Electronics", 4000, 25},
  2748. {591, "Dangerous Electronics", 4000, 26},
  2749. {591, "Dangerous Electronics", 4000, 27},
  2750. {591, "Dangerous Electronics", 4000, 28},
  2751. {591, "Dangerous Electronics", 4000, 29},
  2752. {591, "Dangerous Electronics", 4000, 30},
  2753. {591, "Dangerous Electronics", 4000, 33},
  2754. {591, "Overloaded Flat Screen TV's", 7000, 1},
  2755. {591, "Overloaded Flat Screen TV's", 7000, 2},
  2756. {591, "Overloaded Flat Screen TV's", 7000, 5},
  2757. {591, "Overloaded Flat Screen TV's", 7000, 7},
  2758. {591, "Overloaded Flat Screen TV's", 7000, 8},
  2759. {591, "Overloaded Flat Screen TV's", 7000, 10},
  2760. {591, "Overloaded Flat Screen TV's", 7000, 11},
  2761. {591, "Overloaded Flat Screen TV's", 7000, 16},
  2762. {591, "Overloaded Flat Screen TV's", 7000, 17},
  2763. {591, "Overloaded Flat Screen TV's", 7000, 18},
  2764. {591, "Overloaded Flat Screen TV's", 7000, 19},
  2765. {591, "Overloaded Flat Screen TV's", 7000, 20},
  2766. {591, "Overloaded Flat Screen TV's", 7000, 22},
  2767. {591, "Overloaded Flat Screen TV's", 7000, 23},
  2768. {591, "Overloaded Flat Screen TV's", 7000, 24},
  2769. {591, "Overloaded Flat Screen TV's", 7000, 25},
  2770. {591, "Overloaded Flat Screen TV's", 7000, 26},
  2771. {591, "Overloaded Flat Screen TV's", 7000, 27},
  2772. {591, "Overloaded Flat Screen TV's", 7000, 28},
  2773. {591, "Overloaded Flat Screen TV's", 7000, 29},
  2774. {591, "Overloaded Flat Screen TV's", 7000, 30},
  2775. {591, "Overloaded Flat Screen TV's", 7000, 33},
  2776. {591, "Overloaded Furniture", 4000, 1},
  2777. {591, "Overloaded Furniture", 4000, 2},
  2778. {591, "Overloaded Furniture", 4000, 5},
  2779. {591, "Overloaded Furniture", 4000, 7},
  2780. {591, "Overloaded Furniture", 4000, 8},
  2781. {591, "Overloaded Furniture", 4000, 10},
  2782. {591, "Overloaded Furniture", 4000, 11},
  2783. {591, "Overloaded Furniture", 4000, 16},
  2784. {591, "Overloaded Furniture", 4000, 17},
  2785. {591, "Overloaded Furniture", 4000, 18},
  2786. {591, "Overloaded Furniture", 4000, 19},
  2787. {591, "Overloaded Furniture", 4000, 20},
  2788. {591, "Overloaded Furniture", 4000, 22},
  2789. {591, "Overloaded Furniture", 4000, 23},
  2790. {591, "Overloaded Furniture", 4000, 24},
  2791. {591, "Overloaded Furniture", 4000, 25},
  2792. {591, "Overloaded Furniture", 4000, 26},
  2793. {591, "Overloaded Furniture", 4000, 27},
  2794. {591, "Overloaded Furniture", 4000, 28},
  2795. {591, "Overloaded Furniture", 4000, 29},
  2796. {591, "Overloaded Furniture", 4000, 30},
  2797. {591, "Overloaded Furniture", 4000, 33},
  2798. {591, "Overloaded Food Packages", 4000, 1},
  2799. {591, "Overloaded Food Packages", 4000, 2},
  2800. {591, "Overloaded Food Packages", 4000, 5},
  2801. {591, "Overloaded Food Packages", 4000, 7},
  2802. {591, "Overloaded Food Packages", 4000, 8},
  2803. {591, "Overloaded Food Packages", 4000, 10},
  2804. {591, "Overloaded Food Packages", 4000, 11},
  2805. {591, "Overloaded Food Packages", 4000, 16},
  2806. {591, "Overloaded Food Packages", 4000, 17},
  2807. {591, "Overloaded Food Packages", 4000, 18},
  2808. {591, "Overloaded Food Packages", 4000, 19},
  2809. {591, "Overloaded Food Packages", 4000, 20},
  2810. {591, "Overloaded Food Packages", 4000, 22},
  2811. {591, "Overloaded Food Packages", 4000, 23},
  2812. {591, "Overloaded Food Packages", 4000, 24},
  2813. {591, "Overloaded Food Packages", 4000, 25},
  2814. {591, "Overloaded Food Packages", 4000, 26},
  2815. {591, "Overloaded Food Packages", 4000, 27},
  2816. {591, "Overloaded Food Packages", 4000, 28},
  2817. {591, "Overloaded Food Packages", 4000, 29},
  2818. {591, "Overloaded Food Packages", 4000, 30},
  2819. {591, "Overloaded Food Packages", 4000, 33},
  2820. {591, "Dangerous Broken Furniture", 6000, 1},
  2821. {591, "Dangerous Broken Furniture", 6000, 2},
  2822. {591, "Dangerous Broken Furniture", 6000, 5},
  2823. {591, "Dangerous Broken Furniture", 6000, 7},
  2824. {591, "Dangerous Broken Furniture", 6000, 8},
  2825. {591, "Dangerous Broken Furniture", 6000, 10},
  2826. {591, "Dangerous Broken Furniture", 6000, 11},
  2827. {591, "Dangerous Broken Furniture", 6000, 16},
  2828. {591, "Dangerous Broken Furniture", 6000, 17},
  2829. {591, "Dangerous Broken Furniture", 6000, 18},
  2830. {591, "Dangerous Broken Furniture", 6000, 19},
  2831. {591, "Dangerous Broken Furniture", 6000, 20},
  2832. {591, "Dangerous Broken Furniture", 6000, 22},
  2833. {591, "Dangerous Broken Furniture", 6000, 23},
  2834. {591, "Dangerous Broken Furniture", 6000, 24},
  2835. {591, "Dangerous Broken Furniture", 6000, 25},
  2836. {591, "Dangerous Broken Furniture", 6000, 26},
  2837. {591, "Dangerous Broken Furniture", 6000, 27},
  2838. {591, "Dangerous Broken Furniture", 6000, 28},
  2839. {591, "Dangerous Broken Furniture", 6000, 29},
  2840. {591, "Dangerous Broken Furniture", 6000, 30},
  2841. {591, "Dangerous Broken Furniture", 6000, 33},
  2842. {591, "Dangerous Chemistry Instruments", 10000, 1},
  2843. {591, "Dangerous Chemistry Instruments", 10000, 2},
  2844. {591, "Dangerous Chemistry Instruments", 10000, 5},
  2845. {591, "Dangerous Chemistry Instruments", 10000, 7},
  2846. {591, "Dangerous Chemistry Instruments", 10000, 8},
  2847. {591, "Dangerous Chemistry Instruments", 10000, 10},
  2848. {591, "Dangerous Chemistry Instruments", 10000, 11},
  2849. {591, "Dangerous Chemistry Instruments", 10000, 16},
  2850. {591, "Dangerous Chemistry Instruments", 10000, 17},
  2851. {591, "Dangerous Chemistry Instruments", 10000, 18},
  2852. {591, "Dangerous Chemistry Instruments", 10000, 19},
  2853. {591, "Dangerous Chemistry Instruments", 10000, 20},
  2854. {591, "Dangerous Chemistry Instruments", 10000, 22},
  2855. {591, "Dangerous Chemistry Instruments", 10000, 23},
  2856. {591, "Dangerous Chemistry Instruments", 10000, 24},
  2857. {591, "Dangerous Chemistry Instruments", 10000, 25},
  2858. {591, "Dangerous Chemistry Instruments", 10000, 26},
  2859. {591, "Dangerous Chemistry Instruments", 10000, 27},
  2860. {591, "Dangerous Chemistry Instruments", 10000, 28},
  2861. {591, "Dangerous Chemistry Instruments", 10000, 29},
  2862. {591, "Dangerous Chemistry Instruments", 10000, 30},
  2863. {591, "Dangerous Chemistry Instruments", 10000, 33},
  2864. {591, "Overloaded Timber", 10000, 0},
  2865. {591, "Overloaded Timber", 10000, 3},
  2866. {591, "Overloaded Timber", 10000, 4},
  2867. {591, "Overloaded Timber", 10000, 12},
  2868. {591, "Overloaded Timber", 10000, 33},
  2869. {591, "Overloaded PVC Components", 6000, 1},
  2870. {591, "Overloaded PVC Components", 6000, 2},
  2871. {591, "Overloaded PVC Components", 6000, 5},
  2872. {591, "Overloaded PVC Components", 6000, 7},
  2873. {591, "Overloaded PVC Components", 6000, 8},
  2874. {591, "Overloaded PVC Components", 6000, 10},
  2875. {591, "Overloaded PVC Components", 6000, 11},
  2876. {591, "Overloaded PVC Components", 6000, 16},
  2877. {591, "Overloaded PVC Components", 6000, 17},
  2878. {591, "Overloaded PVC Components", 6000, 18},
  2879. {591, "Overloaded PVC Components", 6000, 19},
  2880. {591, "Overloaded PVC Components", 6000, 20},
  2881. {591, "Overloaded PVC Components", 6000, 22},
  2882. {591, "Overloaded PVC Components", 6000, 23},
  2883. {591, "Overloaded PVC Components", 6000, 24},
  2884. {591, "Overloaded PVC Components", 6000, 25},
  2885. {591, "Overloaded PVC Components", 6000, 26},
  2886. {591, "Overloaded PVC Components", 6000, 27},
  2887. {591, "Overloaded PVC Components", 6000, 28},
  2888. {591, "Overloaded PVC Components", 6000, 29},
  2889. {591, "Overloaded PVC Components", 6000, 30},
  2890. {591, "Overloaded PVC Components", 6000, 33},
  2891. {450, "Overloaded Coal", 8000, 6},
  2892. {450, "Overloaded Coal", 8000, 8},
  2893. {450, "Overloaded Coal", 8000, 10},
  2894. {450, "Overloaded Coal", 8000, 12},
  2895. {450, "Overloaded Coal", 8000, 13},
  2896. {450, "Overloaded Coal", 8000, 20},
  2897. {450, "Overloaded Coal", 8000, 24},
  2898. {450, "Overloaded Coal", 8000, 30},
  2899. {450, "Overloaded Coal", 8000, 33},
  2900. {450, "Overloaded Bricks", 6000, 6},
  2901. {450, "Overloaded Bricks", 6000, 8},
  2902. {450, "Overloaded Bricks", 6000, 10},
  2903. {450, "Overloaded Bricks", 6000, 12},
  2904. {450, "Overloaded Bricks", 6000, 13},
  2905. {450, "Overloaded Bricks", 6000, 20},
  2906. {450, "Overloaded Bricks", 6000, 24},
  2907. {450, "Overloaded Bricks", 6000, 30},
  2908. {450, "Overloaded Bricks", 6000, 33},
  2909. {450, "Overloaded Gravel", 6000, 6},
  2910. {450, "Overloaded Gravel", 6000, 8},
  2911. {450, "Overloaded Gravel", 6000, 10},
  2912. {450, "Overloaded Gravel", 6000, 12},
  2913. {450, "Overloaded Gravel", 6000, 13},
  2914. {450, "Overloaded Gravel", 6000, 20},
  2915. {450, "Overloaded Gravel", 6000, 24},
  2916. {450, "Overloaded Gravel", 6000, 30},
  2917. {450, "Overloaded Gravel", 6000, 33},
  2918. {450, "Overloaded Sand", 6000, 6},
  2919. {450, "Overloaded Sand", 6000, 8},
  2920. {450, "Overloaded Sand", 6000, 10},
  2921. {450, "Overloaded Sand", 6000, 12},
  2922. {450, "Overloaded Sand", 6000, 13},
  2923. {450, "Overloaded Sand", 6000, 20},
  2924. {450, "Overloaded Sand", 6000, 24},
  2925. {450, "Overloaded Sand", 6000, 30},
  2926. {450, "Overloaded Sand", 6000, 33},
  2927. {450, "Overloaded Rubble", 6000, 6},
  2928. {450, "Overloaded Rubble", 6000, 8},
  2929. {450, "Overloaded Rubble", 6000, 10},
  2930. {450, "Overloaded Rubble", 6000, 12},
  2931. {450, "Overloaded Rubble", 6000, 13},
  2932. {450, "Overloaded Rubble", 6000, 20},
  2933. {450, "Overloaded Rubble", 6000, 24},
  2934. {450, "Overloaded Rubble", 6000, 30},
  2935. {450, "Overloaded Rubble", 6000, 33},
  2936. {584, "Illegal Diesel", 10000, 6},
  2937. {584, "Illegal Diesel", 8000, 9},
  2938. {584, "Illegal Diesel", 10000, 10},
  2939. {584, "Illegal Diesel", 8000, 13},
  2940. {584, "Illegal Diesel", 10000, 14},
  2941. {584, "Illegal Diesel", 8000, 21},
  2942. {584, "Illegal Diesel", 10000, 31},
  2943. {584, "Illegal Diesel", 8000, 32},
  2944. {584, "Smuggled Petrol", 8000, 6},
  2945. {584, "Smuggled Petrol", 10000, 9},
  2946. {584, "Smuggled Petrol", 8000, 10},
  2947. {584, "Smuggled Petrol", 10000, 13},
  2948. {584, "Smuggled Petrol", 8000, 14},
  2949. {584, "Smuggled Petrol", 10000, 21},
  2950. {584, "Smuggled Petrol", 8000, 31},
  2951. {584, "Smuggled Petrol", 10000, 32},
  2952. {584, "Illegal Gas", 10000, 6},
  2953. {584, "Illegal Gas", 8000, 9},
  2954. {584, "Illegal Gas", 10000, 10},
  2955. {584, "Illegal Gas", 8000, 13},
  2956. {584, "Illegal Gas", 10000, 14},
  2957. {584, "Illegal Gas", 8000, 21},
  2958. {584, "Illegal Gas", 10000, 31},
  2959. {584, "Illegal Gas", 8000, 32},
  2960. {584, "Smuggled Oil", 8000, 6},
  2961. {584, "Smuggled Oil", 10000, 9},
  2962. {584, "Smuggled Oil", 8000, 10},
  2963. {584, "Smuggled Oil", 10000, 13},
  2964. {584, "Smuggled Oil", 8000, 14},
  2965. {584, "Smuggled Oil", 10000, 21},
  2966. {584, "Smuggled Oil", 8000, 31},
  2967. {584, "Smuggled Oil", 10000, 32}
  2968. };
  2969. enum pOnTruckJobInfo
  2970. {
  2971. pTDDestDepot,
  2972. pTDJobID,
  2973. pTDDamage,
  2974. pTDSpeeding,
  2975. pTDActive,
  2976. pTDLegal,
  2977. Float:pTDDistance,
  2978. pTDTrailer
  2979. }
  2980. new PlayerTruckJob[MAX_PLAYERS][pOnTruckJobInfo];
  2981. new const customSkins[] = {
  2982. 25000, 25001, 25002, 25003, 25005, 25006,
  2983. 25008, 25009, 25011, 25013, 25014, 25015,
  2984. 25016, 25020, 25021, 25023, 25027, 25028,
  2985. 25029, 25030, 25031, 25032, 25033, 25034,
  2986. 25035, 25036, 25037, 25038, 25039, 25040,
  2987. 25041, 25042, 25043, 25044, 25045, 25046,
  2988. 25047, 25048, 25049, 25050, 25051, 25052,
  2989. 25053, 25054, 25055, 25056, 25057, 25058,
  2990. 25059, 25060, 25061, 25062, 25063, 25076,
  2991. 25077, 25078, 25079, 25080, 25081, 25082,
  2992. 25083, 25084, 25085, 25086, 25087, 25088,
  2993. 25089, 25090, 25091, 25092, 25093, 25094,
  2994. 25095, 25096, 25099, 25101, 25102, 25103,
  2995. 25104, 25105, 25106, 25107, 25108, 25109,
  2996. 25110, 25116, 25117, 25120, 25121, 25122,
  2997. 25123, 25124, 25125, 25126, 25127, 25128,
  2998. 25129, 25130, 25131, 25132, 25133, 25134,
  2999. 25136, 25137, 25138, 25139, 25142, 25143,
  3000. 25144, 25145, 25148, 25149, 25150, 25151,
  3001. 25153, 25154, 25155, 25156, 25157, 25160,
  3002. 25164
  3003. };
  3004. new const clothesShopSkins[] = {
  3005. 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
  3006. 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
  3007. 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
  3008. 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
  3009. 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
  3010. 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
  3011. 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
  3012. 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
  3013. 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
  3014. 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
  3015. 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
  3016. 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198,
  3017. 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
  3018. 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
  3019. 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
  3020. 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
  3021. 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
  3022. 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
  3023. 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303,
  3024. 304, 305, 306, 307, 308, 309, 310, 311
  3025. };
  3026. new const VipSkins[] = {
  3027. 25023, 25073, 25074, 25097, 25098, 25165, 25055, 25110, 25114
  3028. };
  3029. enum houseInt
  3030. {
  3031. intClass[16],
  3032. intPrice,
  3033. intID,
  3034. Float:intX,
  3035. Float:intY,
  3036. Float:intZ,
  3037. Float:intA
  3038. };
  3039. new const houseInteriors[][houseInt] =
  3040. {
  3041. {"Apartment", 10000, 1, 244.1997, 305.0676, 999.1484, 270.2194}, //1
  3042. {"Apartment", 30000, 2, 1434.0806, -1832.7854, 1313.5573, 270.0000},//2
  3043. {"Apartment", 15000, 10, 2259.7649, -1135.8751, 1050.6328, 270.0000},//3
  3044. {"Apartment", 40000, 8, 2008.8319, -1698.8461, 1165.7001, 90.0000},//4
  3045. {"Apartment", 10000, 5, 2233.6501, -1114.7767, 1050.8828, 0.0000},//5
  3046. {"Apartment", 15000, 1, 2217.9814, -1076.2471, 1050.4844, 90.0000},//6
  3047. {"Low Class", 45000, 9, 1178.3398, -419.0833, 1234.7045, 180.0000},//7
  3048. {"Low Class", 45000, 3, 828.6323, -1014.0038, 799.9664, 270.0000},//8
  3049. {"Low Class", 30000, 5, 1320.1091, -167.6174, 1088.0741, 90.0000},//9
  3050. {"Medium Class", 45000, 3, 1363.7614, -2145.6965, 1050.5886, 0.0000},//10
  3051. {"Medium Class", 75000, 5, 2654.4524, -1023.7827, 929.9266, 180.0000},//11
  3052. {"Medium Class", 30000, 11, 2184.1011, -1130.3905, 1128.7655, 270.0000},//12
  3053. {"Upper Class", 30000, 10, 2269.9143, -1210.5028, 1047.5625, 90.0000},//13
  3054. {"Upper Class", 45000, 6, 1749.6356, -1822.4457, 1000.3405, 0.0000},//14
  3055. {"Upper Class", 15000, 12, 2324.3862, -1148.8784, 1050.7101, 0.0000},//15
  3056. {"Upper Class", 30000, 4, 1282.0646, -1140.2067, 980.0524, 0.0000},//16
  3057. {"Mansion", 350000, 1, 1834.2408, -1278.7684, 832.1602, 180.0000},//17
  3058. {"Mansion", 500000, 7, 925.0102, -496.8101, 843.8953, 90.0000},//18
  3059. {"Mansion", 2500000, 5, 1298.8682, -796.2053, 1084.0078, 0.0000},//19
  3060. {"Special", 3000000, 1, 1412.639892, -1.787510, 1000.924377}//20
  3061. };
  3062. enum garageInt
  3063. {
  3064. intName[16],
  3065. intPrice,
  3066. intID,
  3067. Float:intPX,
  3068. Float:intPY,
  3069. Float:intPZ,
  3070. Float:intPA,
  3071. Float:intVX,
  3072. Float:intVY,
  3073. Float:intVZ,
  3074. Float:intVA
  3075. };
  3076. new const garageInteriors[][garageInt] =
  3077. {
  3078. {"Small", 125000, 1, 1521.2797, -1639.7163, 1124.5045, 180.0000, 1516.8326, -1643.9105, 1124.3364, 180.0000},
  3079. {"Medium", 175000, 2, 1520.6278, -1639.7173, 1374.5045, 180.0000, 1514.9481, -1644.1083, 1374.3365, 180.0000},
  3080. {"Large", 350000, 3, 1672.8816, -2363.5818, 1535.4829, 90.0000, 1660.5437, -2362.9001, 1535.2944, 0.0000}
  3081. };
  3082. enum bizInt
  3083. {
  3084. intType[24],
  3085. intPrice,
  3086. intID,
  3087. Float:intX,
  3088. Float:intY,
  3089. Float:intZ,
  3090. Float:intA
  3091. };
  3092. new const bizInteriors[][bizInt] =
  3093. {
  3094. {"Supermarket", 1800000, 6, -27.4377, -57.6114, 1003.5469, 0.0000},
  3095. {"Gun Shop", 2400000, 6, 316.2873, -169.6470, 999.6010, 0.0000},
  3096. {"Clothes Shop", 2250000, 14, 204.3860, -168.4586, 1000.5234, 0.0000},
  3097. {"Gym", 1800000, 5, 772.4077, -4.7408, 1000.7291, 0.0000},
  3098. {"Restaurant", 2500000, 10, 363.3276, -74.6505, 1001.5078, 315.0000},
  3099. {"Advertisement Agency", 2025000, 3, 834.1517, 7.4096, 1004.1870, 90.0000},
  3100. {"Club/Bar", 1425000, 11, 501.8694, -68.0046, 998.7578, 179.6117},
  3101. {"Tool Shop", 1575000, 6, -2240.6992, 128.3009, 1035.4141, 270.0000},
  3102. {"Dealership", 15000000, 3, 1494.4321, 1304.0353, 1093.2891, 0.0000}
  3103. };
  3104. enum matLIST
  3105. {
  3106. Name[128],
  3107. ModelID,
  3108. TxdName[64],
  3109. TextureName[64],
  3110. Resource[32]
  3111. };
  3112. new MaterialIDs[][matLIST] =
  3113. {
  3114. {"{6EF83C}Reset Material", 0, "none", "none", "None"},
  3115. #define PCOLORS "Material Colors"
  3116. {"Purple", 8839, "vgsecarshow", "lightpurple2_32", PCOLORS},
  3117. {"Blue", 5774, "garag3_lawn", "bluestucco1", PCOLORS},
  3118. {"Bright Blue", 8839, "vgsecarshow", "lightblue2_32", PCOLORS},
  3119. {"Bright Green", 8839, "vgsecarshow", "lightgreen2_32", PCOLORS},
  3120. {"Green", 19271, "MapMarkers", "green-2", PCOLORS},
  3121. {"Lime Green", 18749, "MatTextures", "lime", PCOLORS},
  3122. {"Yellow", 5168, "lashops6_las2", "yellow2_128", PCOLORS},
  3123. {"Brighter Yellow", 18245, "cw_junkyardmachin", "Was_scrpyd_light_yellow", PCOLORS},
  3124. {"Orange", 18250, "cw_junkbuildcs_t", "Was_scrpyd_baler_locker", PCOLORS},
  3125. {"Orange 2", 18749, "MatTextures", "SAMPOrange", PCOLORS},
  3126. {"Pink", 3267, "milbase", "lightred2_32", PCOLORS},
  3127. {"Red", 18856, "MatTextures", "SAMPRed", PCOLORS},
  3128. {"Darker Red", 19184, "MapMarkers", "red-2", PCOLORS},
  3129. {"Deep Red", 5142, "lashops1b_las2", "snpdwhit2", PCOLORS},
  3130. {"Pitch Black", 13816, "lahills_safe1", "black16", PCOLORS},
  3131. {"Smoky Black", 11088, "crackfactdem_sfs", "ws_altz_wall7_top_burn", PCOLORS},
  3132. {"Light Gray", 8839, "vgsecarshow", "lightblue_64", PCOLORS},
  3133. {"Happy Gray", 16109, "des_se1", "parking2plain", PCOLORS},
  3134. {"Eggshell", 8675, "wddngchpl02", "vgschapelwall01_64", PCOLORS},
  3135. {"White", 4833, "airprtrunway_las", "white", PCOLORS},
  3136. #define PFABRICS "Printed Fabrics"
  3137. {"Varied Green Stripes", 17511, "stadium_lae2", "stadt_banner1", PFABRICS},
  3138. {"Varied Purple and Green Stripes", 17511, "stadium_lae2", "stadt_banner2", PFABRICS},
  3139. {"Varied White, Brown and Green Stripes", 17511, "stadium_lae2", "stadt_banner3", PFABRICS},
  3140. {"Blue, White and Red Stripes", 9583, "bigshap_sfw", "boatfunnel1_128", PFABRICS},
  3141. {"Blue and White Stripes", 12850, "cunte_block1", "ablusrip", PFABRICS},
  3142. {"Blue, Green, White and Yellow Stripes", 5142, "lashops1b_las2", "sanpedshpito", PFABRICS},
  3143. {"Red And White Stripes", 3039, "ct_salx", "ct_stall1", PFABRICS},
  3144. {"Black, Gray, Yellow, Red", 3990, "lanroad", "lakerbcol", PFABRICS},
  3145. {"Red and Green Tartan", 3060, "paracx", "parachute_e", PFABRICS},
  3146. {"Multi-colored Squares", 3922, "bistro", "Tablecloth", PFABRICS},
  3147. {"Spongy Red", 10412, "hotel1", "carpet_red_256", PFABRICS},
  3148. {"Spongy Maroon", 14808, "lee_strip2", "WH_carpet1", PFABRICS},
  3149. {"Spongy Blue", 5392, "eastshops1_lae", "blueshop2_LAe", PFABRICS},
  3150. {"Yellow Tartan", 13003, "ce_racestart", "CJ_TARTAN", PFABRICS},
  3151. {"Blue Camouflage", 10631, "queensammo_sfs", "ammu_camo1", PFABRICS},
  3152. {"Blue Patterns", 10226, "sfeship1", "CJ_CUSHION2", PFABRICS},
  3153. {"Blue Patterns 2", 19447, "all_walls", "vgsn_scrollsgn256", PFABRICS},
  3154. {"Brown Flower Pattern", 15034, "genhotelsave", "cj_cushion1", PFABRICS},
  3155. {"Brown Sheets", 16150, "ufo_bar", "Gen_Sacki", PFABRICS},
  3156. {"Floral Print", 2680, "cj_chris", "CJ_Floral", PFABRICS},
  3157. {"White and Blue Mattress", 12954, "sw_furniture", "CJ_MATRESS2", PFABRICS},
  3158. {"Used Mattress", 1637, "od_beachstuff", "lounger_matress", PFABRICS},
  3159. {"Plain Matress", 2575, "cj_hotel_poor", "CJ_mattress", PFABRICS},
  3160. {"Rainbow Stripes", 3853, "gay_xref", "ws_gayflag1", PFABRICS},
  3161. {"American Flag", 12853, "cunte_gas01", "starspangban1_256", PFABRICS},
  3162. {"American Flag 2", 14782, "intring_gymint3", "star_spang", PFABRICS},
  3163. {"Confederate Flag", 12853, "cunte_gas01", "cj_flag2", PFABRICS},
  3164. {"Italian Flag", 5111, "ground2_las2", "sanpedpawn1a", PFABRICS},
  3165. {"Black Carpet", 17946, "carter_mainmap", "mp_carter_carpet", PFABRICS},
  3166. {"Gray Carpet", 14475, "ganghoos", "mp_burn_carpet", PFABRICS},
  3167. {"Red Carpet", 14506, "imy_motel", "mp_motel_carpet1", PFABRICS},
  3168. {"Red Carpet 2", 8463, "vgseland", "triadcarpet2", PFABRICS},
  3169. {"Black Carpet 2", 14700, "vgshs2int2", "carpet-tile", PFABRICS},
  3170. {"Dark Carpet", 14838, "lee_stripclub", "cl_floornew_256", PFABRICS},
  3171. {"Worn Gray Carpet", 14701, "lahss2int2", "HS1_carpet1", PFABRICS},
  3172. {"Blue Rug", 11704, "bdupsnew", "Bdup2_carpet", PFABRICS},
  3173. {"Light Blue Fabric", 14707, "labig3int2", "HS2_3Wall10", PFABRICS},
  3174. {"Light Purple Fabric", 14707, "labig3int2", "HS2_3Wall7", PFABRICS},
  3175. {"Pink Fabric", 14707, "labig3int2", "HS2_3Wall9", PFABRICS},
  3176. {"Old White Fabric", 14756, "smallsfhs", "wall6", PFABRICS},
  3177. {"White Carpet", 14672, "genintintsex", "mp_cop_floor2", PFABRICS},
  3178. {"Black Carpet 3", 14808, "lee_strip2", "strip_carpet2", PFABRICS},
  3179. {"Yellow Carpet", 14590, "mafcastopfoor", "ab_carpet01", PFABRICS},
  3180. {"Old Black Carpet", 18028, "cj_bar2", "GB_nastybar10", PFABRICS},
  3181. {"Dark Carpet 2", 14431, "dr_gsnew", "mp_gs_carpet", PFABRICS},
  3182. {"Light Carpet", 14581, "ab_mafiasuitea", "carp01S", PFABRICS},
  3183. {"Zebra Stripes", 14838, "lee_stripclub", "zebra_skin", PFABRICS},
  3184. {"Light Blue Carpet", 14708, "labig1int2", "GB_rug01", PFABRICS},
  3185. {"Fancy Rug", 11704, "bdupsnew", "Bdup2_Rug", PFABRICS},
  3186. {"Pink Curtain", 11707, "cuntcuts", "AH_pinkcurtain", PFABRICS},
  3187. {"Brown Curtain", 14710, "vgshm3int2", "ah_curtains1", PFABRICS},
  3188. {"Blue Curtain", 14701, "lahss2int2", "HS2_Curt1", PFABRICS},
  3189. {"Light Blue Curtain", 14702, "masmall3int2", "HS2_Curt2", PFABRICS},
  3190. {"Light Blue Curtain 2", 2559, "hospital", "CJ_H_CURTAIN1", PFABRICS},
  3191. {"Orange Curtain", 14701, "lahss2int2", "HS2_Curt4", PFABRICS},
  3192. {"Purple Curtain", 14701, "lahss2int2", "HS2_Curt5", PFABRICS},
  3193. {"Red Curtain", 14808, "lee_strip2", "Strip_curtain", PFABRICS},
  3194. #define WOODS "Wood"
  3195. {"The Standard", 19400, "all_walls", "mp_diner_woodwall", WOODS},
  3196. {"Classy Wood", 16150, "ufo_bar", "sa_wood08_128", WOODS},
  3197. {"Brown Wood", 14581, "ab_mafiasuitea", "walp45S", WOODS},
  3198. {"Red Wood", 13681, "lahillshilhs1e", "woodboards2", WOODS},
  3199. {"Reclaimed Wood", 6094, "canalsg_law", "ws_sheetwood_clean", WOODS},
  3200. {"Light Wood 1", 3881, "apsecurity_sfxrf", "CJ_WOOD1", WOODS},
  3201. {"Light Wood 2", 13003, "ce_racestart", "sa_wood07_128", WOODS},
  3202. {"Light Wood 3", 16377, "des_byofficeint", "CJ_LIGHTWOOD", WOODS},
  3203. {"Dark Wood 1", 1515, "dsfs", "CJ_WOOD6", WOODS},
  3204. {"Dark Wood 2", 11631, "mp_ranchcut", "mpCJ_WOOD_DARK", WOODS},
  3205. {"Dark, Ugly Wood", 18250, "cw_junkbuildcs_t", "Was_scrpyd_shack_wall", WOODS},
  3206. {"Dull, Dark Wood", 17925, "lae2fake_int", "ab_wood1", WOODS},
  3207. {"Rotting Painted Wood 1", 17566, "contachou1_lae2", "comptwall26", WOODS},
  3208. {"Rotting Painted Wood 2", 3193, "cxref_desert", "des_bywall1", WOODS},
  3209. {"Rotting Painted Wood 3", 3355, "cxref_savhus", "des_bywall2", WOODS},
  3210. {"Rotting Painted Wood 4", 14700, "vgshs2int2", "ah_CRAKPLNK", WOODS},
  3211. {"Very Old Wood", 12976, "sw_diner1", "telepole128", WOODS},
  3212. {"Tatty Wood", 5149, "lasground2_las2", "tatty_wood_1", WOODS},
  3213. {"'Fence' Wood", 5122, "ground3_las2", "fence1", WOODS},
  3214. {"Fancy Diner Flooring", 3919, "librest", "DinerFloor", WOODS},
  3215. {"Sleek Wood Flooring", 14771, "int_brothelint3", "GB_nastybar12", WOODS},
  3216. {"Cheap Wood Flooring", 14825, "genintint2_gym", "gym_floor5", WOODS},
  3217. {"Cheap, Scratched Flooring", 14709, "lamidint2", "mp_apt1_floor", WOODS},
  3218. {"Fine Parquet", 14581, "ab_mafiasuitea", "wood02S", WOODS},
  3219. {"Wooden Mosaic", 4004, "civic07_lan", "cityhallroof", WOODS},
  3220. {"Wood Square Panels", 13007, "sw_bankint", "woodfloor1", WOODS},
  3221. {"Wood Planks", 16322, "a51_stores", "des_ghotwood1", WOODS},
  3222. {"Aged Planks", 1219, "woodpanels", "planks01", WOODS},
  3223. {"White Planks", 10152, "sfvictorian2", "pier69_ground1", WOODS},
  3224. {"White Planks 2", 12960, "sw_church", "ws_vic_wood1", WOODS},
  3225. {"White Planks 3", 12911, "sw_farm1", "sw_barnwood1", WOODS},
  3226. {"Old White Planks", 12911, "sw_farm1", "sw_barnwood2", WOODS},
  3227. {"Old White Planks 2", 4849, "ground3_las", "pierboards_la", WOODS},
  3228. {"Gray Planks", 3310, "sw_poorhouse", "GB_nastybar08", WOODS},
  3229. {"Old Gray Planks", 4820, "ground4_las", "adet", WOODS},
  3230. {"Boardwalk", 13809, "lahillsground4", "boardwalk_la" , WOODS},
  3231. {"Wood Boards", 5134, "wasteland_las2", "floorboard256128" , WOODS},
  3232. {"Light Wood Pattern", 3306, "cunte_house1", "des_ntwnwall1", WOODS},
  3233. {"Dark Brown Planks", 17298, "weefarmcuntw", "sjmbigold2", WOODS},
  3234. {"Creepy Planks", 12937, "sw_oldshack", "sw_cabinwall01", WOODS},
  3235. {"Blue Planks", 5766, "capitol_lawn", "lasjmscruffwall3", WOODS},
  3236. {"Bright Blue Planks", 5135, "groundb_las2", "sanpedock8", WOODS},
  3237. {"Bright Yellow Planks", 5113, "lasground_las2", "sanpedpawn1", WOODS},
  3238. {"White and Red Wood", 4830, "airport2", "sw_shedwall02", WOODS},
  3239. {"White and Blue Wood", 12925, "sw_sheds", "sw_shedwall03", WOODS},
  3240. {"Dull Wood Logs", 17067, "cw2_logcabins", "cw2_logwall", WOODS},
  3241. {"Light Wood Logs", 11490, "des_ranch", "des_logwall", WOODS},
  3242. {"Flat Logs", 13711, "mullho03_lahills", "des_flatlogs", WOODS},
  3243. {"Wood Slats", 11501, "des_farmstuff", "des_woodslats1", WOODS},
  3244. {"Walnut 1", 14581, "ab_mafiasuitea", "ab_walnut", WOODS},
  3245. {"Walnut 2", 14581, "ab_mafiasuitea", "ab_walnutLite", WOODS},
  3246. {"Brown Wood Paneling", 9583, "bigshap_sfw", "bridge_walls2_sfw", WOODS},
  3247. {"Tiki Reed", 8536, "tikisign", "tikireed01_128", WOODS},
  3248. {"Bamboo", 3595, "dingbat01_la", "bambowal1_LA", WOODS},
  3249. {"Old Barn", 16146, "des_ufoinn", "shackdoor01", WOODS},
  3250. {"Bloody wood", 12937, "sw_oldshack", "sw_woodflloorsplat", WOODS},
  3251. #define TILES "Tiles"
  3252. {"Shiny White", 10023, "bigwhitesfe", "recessed_light_SF", TILES},
  3253. {"White and Blue", 12841, "cos_pizzaplace", "swimpoolside1_128", TILES},
  3254. {"Yellow and Blue", 5408, "tempstuff_lae", "examball1_LAe", TILES},
  3255. {"Blue Pool Tiles", 13675, "lahillsgrounds", "bevpool", TILES},
  3256. {"Better Times", 4004, "civic07_lan", "Bow_sub_wallshine", TILES},
  3257. {"Small White Tiles", 12853, "cunte_gas01", "sw_floor1", TILES},
  3258. {"Thin Wall Tiles", 17049, "cuntwf", "sw_walltile", TILES},
  3259. {"Thick Wall Tiles", 4558, "lanlacmab_lan2", "sl_gallerywall1", TILES},
  3260. {"Dirty Wall Tiles", 14700, "vgshs2int2", "ah_whitiles", TILES},
  3261. {"The Classic", 3961, "lee_kitch", "dinerfloor01_128", TILES},
  3262. {"The Classic 2", 14771, "int_brothelint3", "bwtilebroth", TILES},
  3263. {"The Classic 3", 18082, "cj_barb", "CJ_TILES_5", TILES},
  3264. {"Aged Classic", 13724, "docg01_lahills", "marbletile8b", TILES},
  3265. {"Classy Blue", 10871, "blacksky_sfse", "ws_slatetiles", TILES},
  3266. {"Dark Blue", 6351, "rodeo02_law2", "helmutwall1_LAw", TILES},
  3267. {"Classic White", 3904, "libertyfar", "subplat", TILES},
  3268. {"Aged Fancy Tiles", 5772, "stationtunnel", "mp_apt1_bathfloor1", TILES},
  3269. {"Fancy Black Tiles", 14388, "dr_gsnew", "mp_gs_kitchfloor", TILES},
  3270. {"Modern White Tiles", 10932, "station_sfse", "ws_stationfloor", TILES},
  3271. {"Modern Yellow Tiles", 10973, "mall_sfse", "mallfloor3", TILES},
  3272. {"Blue And Yellow Tiles", 1594, "chairsntable", "mallfloor6", TILES},
  3273. {"Tile Stone", 1677, "wshxrefhse2", "tilestone256", TILES},
  3274. {"Dirty Tiles", 11389, "hubint1_sfse", "ab_ceiling1", TILES},
  3275. {"Stone Tiles", 16639, "a51_labs", "dam_terazzo" , TILES},
  3276. {"Old Black Tiles", 5815, "lawngrnd", "man_cellarfloor128", TILES},
  3277. {"Dark Tiles", 14700, "vgshs2int2", "AH_rykitiles", TILES},
  3278. {"Terra Cotta Tile", 18020, "genintintfastb2", "ws_terratiles", TILES},
  3279. {"Gray Tiles", 14706, "labig2int2", "ab_tile1", TILES},
  3280. {"Brown/Olive Green Bricks", 14756, "smallsfhs", "mp_carter_tilewall", TILES},
  3281. {"Brown Tiles", 14709, "lamidint2", "mp_apt1_kitchfloor", TILES},
  3282. {"Brown Tiles 2", 18029, "genintintsmallrest", "GB_restaursmll06", TILES},
  3283. {"Light Green Tiles", 18029, "genintintsmallrest", "GB_restaursmll07", TILES},
  3284. {"Dull Red Tiles", 14388, "dr_gsnew", "AH_flroortile12", TILES},
  3285. {"Red Stones", 13675, "lahillsgrounds", "sjmlahus29", TILES},
  3286. {"Blue Mosaic", 17562, "coast_apts", "otb_floor1", TILES},
  3287. {"Green Mosaic", 3595, "dingbat01_la", "mosaic1_LAwn", TILES},
  3288. {"Hexagon Tile Pattern", 14506, "imy_motel", "ab_tilehex2", TILES},
  3289. {"Green Formica", 11704, "cj_kitchen", "FORMICA2", TILES},
  3290. #define MARB "Building"
  3291. {"Black Marble", 3922, "bistro", "Marble", MARB},
  3292. {"Black Marble 2", 10969, "scum_sfse", "Was_scrpyd_floor_hangar", MARB},
  3293. {"Gray Marble", 4830, "airport2", "LASLACMA96", MARB},
  3294. {"White Marble", 3922, "bistro", "Marble2", MARB},
  3295. {"Yellow Marble", 3922, "bistro", "rest_wall4", MARB},
  3296. {"White Marble Block", 16023, "des_trainstuff", "ws_stoneblock", MARB},
  3297. {"Stone Wall 1", 18202, "w_towncs_t", "hatwall256hi", MARB},
  3298. {"Stone Wall 2", 13724, "docg01_lahills", "des_ranchwall1", MARB},
  3299. {"Stone Wall 3", 8839, "vgsecarshow", "sw_wallbrick_06", MARB},
  3300. {"Stone Wall 4", 8565, "vgsebuild01", "ws_stonewall", MARB},
  3301. {"Stone Wall 5", 6056, "venice_law", "stonewall_la", MARB},
  3302. {"Stone Wall 6", 6057, "venicegb02_law", "stonewall3_la", MARB},
  3303. {"Fancy Stones", 5113, "lasground_las2", "adeta", MARB},
  3304. {"Dark Stones", 18029, "genintintsmallrest", "GB_restaursmll05", MARB},
  3305. {"Yellow Stones", 16136, "des_telescopestuff", "stoneclad1", MARB},
  3306. {"White Brick Wall", 8399, "vgs_shops", "vgsclubwall05_128", MARB},
  3307. {"Gray Stone Wall", 8645, "vegashsetx", "badhousewall01_128", MARB},
  3308. {"Concrete Pattern", 4849, "ground3_las", "ws_bigstones", MARB},
  3309. {"Gray Brick Wall", 13823, "lahillsground4cye", "GB_nastybar03", MARB},
  3310. {"Fancy White Bricks", 13675, "lahillsgrounds", "bevr03b_law", MARB},
  3311. {"Red Brick Wall", 8531, "officeground", "ws_redbrickold", MARB},
  3312. {"Old Red Brick Wall", 5180, "lashops93_las2", "ws_oldredbrick", MARB},
  3313. {"Old Red Brick Wall 2", 10864, "bridgeland_sfse", "ws_altz_wall1", MARB},
  3314. {"Brick Wall 1", 8839, "vgsecarshow", "sw_brewbrick01", MARB},
  3315. {"Brick Wall 2", 8390, "vegasemulticar", "ws_mixedbrick", MARB},
  3316. {"Brick Wall 3", 13015, "sw_genstore", "sw_wallbrick_03", MARB},
  3317. {"Brick Wall 4", 12959, "sw_library", "sw_brick05", MARB},
  3318. {"Brick Wall 5", 17049, "cuntwf", "sw_brick04", MARB},
  3319. {"Brick Wall 6", 12853, "cunte_gas01", "sw_brick03", MARB},
  3320. {"Brick Wall 7", 4552, "ammu_lan2", "sl_lavicdtwall1", MARB},
  3321. {"Brick Wall 8", 10769, "docks2_sfse", "ws_sandstone1", MARB},
  3322. {"Brick Wall 9", 9683, "goldengate_sfw", "stonesandkb2_128", MARB},
  3323. {"Brick Wall 10", 5418, "idlewood3_lae", "ws_sandstone2", MARB},
  3324. {"Brick Wall 11", 12988, "sw_fact02", "ws_sandstone2b", MARB},
  3325. {"Brick Wall 12", 18018, "genintintbarb", "GB_midbar01", MARB},
  3326. {"Black Concrete", 3975, "lanbloke", "p_floor3", MARB},
  3327. {"Black Concrete 2", 14771, "int_brothelint3", "GB_midbar15", MARB},
  3328. {"Dark Stone Wall", 17545, "burnsground", "newall1-1128", MARB},
  3329. {"White Concrete", 11089, "cf_metals_sfse", "ws_altz_wall8_top", MARB},
  3330. {"Gray Concrete", 6052, "law_doontoon", "carpark_256128", MARB},
  3331. {"Gray Concrete 2", 14783, "intgarage2aint3", "Bow_Abattoir_Conc2", MARB},
  3332. {"Concrete Block", 1214, "metal", "BLOCK2low", MARB},
  3333. {"Cracked Yellow Concrete", 14700, "vgshs2int2", "ah_yelbadwall", MARB},
  3334. {"Metal Pattern", 12984, "sw_block11", "sw_stairs1", MARB},
  3335. {"Rusted Concrete", 10375, "subshops_sfs", "ws_rooftarmac1", MARB},
  3336. #define METALS "Metals"
  3337. {"Silver Metal", 1560, "7_11_door", "cj_sheetmetal2", METALS},
  3338. {"Red Metal", 2130, "cj_kitchen", "CJ_RED", METALS},
  3339. {"Scratched Metal", 16640, "a51", "scratchedmetal", METALS},
  3340. {"Blue Paneling", 16067, "des_stownmots1", "corugwall1", METALS},
  3341. {"Red Paneling", 16067, "des_stownmots1", "corugwallnew6_128", METALS},
  3342. {"Yellow Paneling", 18265, "w_town3cs_t", "corugwall_sandy", METALS},
  3343. {"Old Purple Metal", 5126, "imrancomp_las2", "ws_oldpaintedblue", METALS},
  3344. {"Old Gray Metal", 12858, "wiresnshit", "ws_oldpainted", METALS},
  3345. {"Old White Metal", 10820, "roadbridge_sfse", "ws_oldpainted2", METALS},
  3346. {"Rusty White Metal", 10820, "roadbridge_sfse", "ws_oldpainted2rusty", METALS},
  3347. {"Dull Green Metal", 1257, "bustopm", "CJ_GREENMETAL", METALS},
  3348. {"Green Metal", 10770, "carrier_sfse", "ws_floor2", METALS},
  3349. {"Gray Metal", 10770, "carrier_sfse", "ws_shipmetal1", METALS},
  3350. {"Black Metal", 10770, "carrier_sfse", "ws_shipmetal3", METALS},
  3351. {"White Metal", 10770, "carrier_sfse", "ws_shipmetal4", METALS},
  3352. {"Light Blue Metal", 11145, "carrierint_sfs", "ws_shipmetal5", METALS},
  3353. {"White Metal Tiles", 3262, "privatesign", "ws_metalpanel1", METALS},
  3354. {"Black Metal Tiles", 9362, "sfn_byofficeint", "CJ_Black_metal", METALS},
  3355. {"Dark Metal", 970, "fences", "blackmetal", METALS},
  3356. {"Light Metal Banding", 12960, "sw_church", "banding3_64HV", METALS},
  3357. {"Brown Metal Banding", 5408, "tempstuff_lae", "sl_metalbndrust1", METALS},
  3358. {"Scratched Metal 2", 3961, "lee_kitch", "metal5", METALS},
  3359. {"Scratched Metal 3", 3961, "lee_kitch", "metal6", METALS},
  3360. {"Clean Metal Plate", 9361, "sfn_office", "des_facmetal", METALS},
  3361. {"Silver Metal 2", 1214, "metal", "CJ_FRAME_Glass", METALS},
  3362. {"Sleek Metal", 14581, "ab_mafiasuitea", "barbersmir1", METALS},
  3363. {"Metal Door", 13022, "sw_block11a", "Bow_abbmetaldoor", METALS},
  3364. {"Metal Door 2", 12980, "sw_block10", "Was_scrpyd_door_dbl_grey", METALS},
  3365. {"Bolted White Metal Panel", 10820, "roadbridge_sfse", "banding9_64HV", METALS},
  3366. {"Bolted Yellow Metal Panel", 5126, "imrancomp_las2", "banding5_64HV", METALS},
  3367. {"Bolted Brown Metal Panel", 3080, "adjumpx", "rustyboltpanel", METALS},
  3368. {"Bolted Black Metal", 16322, "a51_stores", "girder2_grey_64HV", METALS},
  3369. {"Bolted Red Metal", 5126, "imrancomp_las2", "girder2_red_64HV", METALS},
  3370. {"New Bolted White Metal Panel", 16322, "a51_stores", "dish_panel_a", METALS},
  3371. {"Metal Plate", 915, "airconext", "CJ_plating", METALS},
  3372. {"Gray Metal 2", 4833, "airprtrunway_las", "cj_sheetmetal", METALS},
  3373. {"Old Red Metal", 5123, "chemgrnd_las2", "redmetal", METALS},
  3374. {"Old Dark Red Metal", 946, "bskball_standext", "drkbrownmetal", METALS},
  3375. {"Old Brown Metal", 11145, "carrierint_sfs", "Metalox64", METALS},
  3376. {"Brown Rust", 12937, "sw_oldshack", "rustc256128", METALS},
  3377. {"Orange Rust", 11395, "corvinsign_sfse", "rustb256128", METALS},
  3378. {"Red Rust 1", 18247, "cw_junkyarddigcs_t", "Was_scrpyd_rustmetal", METALS},
  3379. {"Red Rust 2", 10844, "genwhse_sfse", "Gen_Gantry_Rust", METALS},
  3380. {"Rusty Sheet", 10140, "frieghter2sfe", "sw_olddrum1", METALS},
  3381. {"Old Light Blue Metal", 4821, "union_las", "bluemetal03", METALS},
  3382. {"Old Dark Blue Metal", 5126, "imrancomp_las2", "bluemetal02", METALS},
  3383. {"Old Gray Metal 2", 9029, "vgetrainfnce", "Metal1_128", METALS},
  3384. {"Rusty Gray Metal", 17001, "factorycuntw", "Gen_Metal", METALS},
  3385. {"Corrugated Sheet", 3246, "cxref_oldwest", "corr_roof1", METALS},
  3386. {"Corrugated Sheet 2", 3925, "weemap", "corrRoof_64HV", METALS},
  3387. {"Old Corrugated Sheet", 5775, "sunset01_lawn", "ws_corr_metal2", METALS},
  3388. {"Rusty Corrugated Sheet", 9680, "tramstatsfw", "ws_corr_metal1", METALS},
  3389. {"Tin Roof Pattern", 16071, "des_quarrybelts", "des_oldtinroof", METALS},
  3390. {"Strange Metal Pattern", 16322, "a51_stores", "a51_metal1", METALS},
  3391. {"Rusty Metal Pattern", 16322, "a51_stores", "Gen_Freight", METALS},
  3392. {"Rusty Metal Pattern 2", 10281, "michgar", "Metal2_256128", METALS},
  3393. {"White and Blue Metal", 3961, "lee_kitch", "metal2", METALS},
  3394. {"Metal Walkway Pattern", 16640, "a51", "sl_metalwalk", METALS},
  3395. {"Perforated Metal Plate", 8954, "vgsespras", "sf_spray_floor2", METALS},
  3396. {"Checker Plate", 9583, "bigshap_sfw", "shipfloor_sfw", METALS},
  3397. {"Checker Plate 2", 5138, "ground_las2", "metpat64" , METALS},
  3398. {"Checker Plate 3", 964, "cj_crate_will", "CJ_FLIGHT_CASE", METALS},
  3399. #define POSTERS "Paintings"
  3400. {"The Discharger", 13761, "lahills_whisky", "discharger", POSTERS},
  3401. {"Slam It In", 4833, "airprtrunway_las", "bobo_2", POSTERS},
  3402. {"MC Club", 5733, "melrose08_lawn", "base5_1", POSTERS},
  3403. {"Mad Dog", 6357, "sunstrans_law2", "dogbill01", POSTERS},
  3404. {"Love Fist Poster", 6354, "sunset03_law2", "billLA01", POSTERS},
  3405. {"Dandell Poster", 6354, "sunset03_law2", "billLA02", POSTERS},
  3406. {"Map of San Andreas", 16644, "a51_detailstuff", "a51_map", POSTERS},
  3407. {"Candy Suxxx", 6357, "sunstrans_law2", "SunBillB05", POSTERS},
  3408. {"Candy Suxxx 2", 2254, "picture_frame_clip", "CJ_PAINTING9", POSTERS},
  3409. {"Inquisitive Man", 1583, "targets", "target1", POSTERS},
  3410. {"Inquisitive Woman", 1583, "targets", "target2", POSTERS},
  3411. {"Inquisitive Woman 2", 1583, "targets", "target3", POSTERS},
  3412. {"Summer Sky", 3925, "weemap", "skyclouds", POSTERS},
  3413. {"Jesus Saves", 17700, "gangblok1_lae2", "mural01_LA", POSTERS},
  3414. {"Gant Bridge", 10434, "hashblock2b_sfs", "ws_mural2", POSTERS},
  3415. {"San Fierro Skyline", 10439, "hashblock3_sfs", "ws_mural1", POSTERS},
  3416. {"Black And White Mural", 5142, "lashops1b_las2", "mural03_LA", POSTERS},
  3417. {"Colored Mural", 5134, "wasteland_las2", "mural05_LA", POSTERS},
  3418. {"Gant Bridge 2", 2254, "picture_frame_clip", "CJ_PAINTING24", POSTERS},
  3419. {"SF Pointy Building", 11631, "mp_ranchcut", "CJ_PAINTING20", POSTERS},
  3420. {"Santa Maria Lifeguard", 2254, "picture_frame_clip", "CJ_PAINTING12", POSTERS},
  3421. {"Seaside Painting", 11631, "mp_ranchcut", "CJ_PAINTING6", POSTERS},
  3422. {"Bone County", 2254, "picture_frame_clip", "CJ_PAINTING26", POSTERS},
  3423. {"Aircraft Photos", 16407, "des_airfieldhus", "plane_photos1", POSTERS},
  3424. {"Yellow Car", 2254, "picture_frame_clip", "CJ_PAINTING2", POSTERS},
  3425. {"Los Santos", 2254, "picture_frame_clip", "CJ_PAINTING3", POSTERS},
  3426. {"Pier Lights", 2254, "picture_frame_clip", "CJ_PAINTING4", POSTERS},
  3427. {"San Fierro", 2267, "picture_frame", "CJ_PAINTING14", POSTERS},
  3428. {"Sunset Bridge", 2267, "picture_frame", "CJ_PAINTING30", POSTERS},
  3429. {"San Fierro Bridge", 2267, "picture_frame", "CJ_PAINTING28", POSTERS},
  3430. {"Landscape 1", 2267, "picture_frame", "CJ_PAINTING11", POSTERS},
  3431. {"Landscape 2", 2267, "picture_frame", "CJ_PAINTING23", POSTERS},
  3432. {"Landscape 3", 2267, "picture_frame", "CJ_PAINTING35", POSTERS},
  3433. {"Landscape 4", 2267, "picture_frame", "CJ_PAINTING37", POSTERS},
  3434. {"Palms", 2254, "picture_frame_clip", "CJ_PAINTING8", POSTERS},
  3435. {"Bowling", 2254, "picture_frame_clip", "CJ_PAINTING27", POSTERS},
  3436. {"Sailships", 2267, "picture_frame", "CJ_PAINTING34", POSTERS},
  3437. {"Ship", 2267, "picture_frame", "CJ_PAINTING19", POSTERS},
  3438. {"Ship 2", 2267, "picture_frame", "CJ_PAINTING36", POSTERS},
  3439. {"Beach Sunset", 14803, "BDupsNew", "Bdup2_poster", POSTERS},
  3440. {"Tropical 1", 11707, "cuntcuts", "GB_canvas17", POSTERS},
  3441. {"Tropical 2", 11707, "cuntcuts", "GB_canvas18", POSTERS},
  3442. {"Water Droplet", 14708, "labig1int2", "GB_restaursmll53", POSTERS},
  3443. {"College Friends", 14708, "labig1int2", "GB_photo01", POSTERS},
  3444. {"Casually Dressed Woman", 14708, "labig1int2", "GB_photo02", POSTERS},
  3445. {"Cat 1", 2267, "picture_frame", "CJ_PAINTING1", POSTERS},
  3446. {"Cat 2", 2267, "picture_frame", "CJ_PAINTING7", POSTERS},
  3447. {"Flowers 1", 2267, "picture_frame", "CJ_PAINTING18", POSTERS},
  3448. {"Flowers 2", 2267, "picture_frame", "CJ_PAINTING29", POSTERS},
  3449. {"Leafs", 2267, "picture_frame", "CJ_PAINTING21", POSTERS},
  3450. {"Strange Mosaic Art", 2267, "picture_frame", "CJ_PAINTING16", POSTERS},
  3451. {"Modern Art", 2254, "picture_frame_clip", "CJ_PAINTING15", POSTERS},
  3452. {"Modern Art 2", 14708, "labig1int2", "HS_art", POSTERS},
  3453. {"Unknown Text", 11631, "mp_ranchcut", "CJ_PAINTING22", POSTERS},
  3454. #define WALLPAPERS "Wallpapers"
  3455. {"Purple Wallpaper", 17925, "lae2fake_int", "burglry_wall4", WALLPAPERS},
  3456. {"Turquoise Wallpaper", 5706, "ci_studio5", "tw@t_wall1", WALLPAPERS},
  3457. {"White Wall With Blue Border", 8391, "ballys01", "ballywall01_64", WALLPAPERS},
  3458. {"Dirty White Wall", 5135, "groundb_las2", "snpedwar2", WALLPAPERS},
  3459. {"Yellow and Orange Wall", 8639, "chinatownmall", "ctmall15_128", WALLPAPERS},
  3460. {"Cheap Blue Paint", 5787, "melrose02_lawn", "LAbluewall", WALLPAPERS},
  3461. {"Cheap Green Paint", 5787, "melrose02_lawn", "LAgreenwall", WALLPAPERS},
  3462. {"Cheap Red Paint", 5787, "melrose02_lawn", "LAredwall", WALLPAPERS},
  3463. {"White Concrete Wall", 8675, "wddngchpl02", "vgschapelwall01_64", WALLPAPERS},
  3464. {"Pink Concrete wall", 8401, "vgshpground", "vegaspawnwall_128", WALLPAPERS},
  3465. {"Brown Concrete wall", 16150, "ufo_bar", "brwall_128", WALLPAPERS},
  3466. {"Grey Concrete wall", 6286, "santamonhus1", "studwalltop_law", WALLPAPERS},
  3467. {"Light Gray Concrete Wall", 4981, "wiresetc2_las", "lasunion7", WALLPAPERS},
  3468. {"Peeling Paint 1", 11389, "hubint1_sfse", "ws_peeling_ceiling1_BIG", WALLPAPERS},
  3469. {"Peeling Paint 2", 17566, "contachou1_lae2", "comptwall27", WALLPAPERS},
  3470. {"Peeling Paint 3", 17566, "contachou1_lae2", "ws_peeling2", WALLPAPERS},
  3471. {"Peeling Paint 4", 11092, "burgalrystore_sfse", "ws_peeling_ceiling2", WALLPAPERS},
  3472. {"Painted Concrete 1", 14783, "intgarage2aint3", "comptwall3", WALLPAPERS},
  3473. {"Painted Concrete 2", 14700, "vgshs2int2", "ah_BADCEIL", WALLPAPERS},
  3474. {"Painted Concrete 3", 14700, "vgshs2int2", "ah_RFPLSTR", WALLPAPERS},
  3475. {"Painted Concrete 4", 14700, "vgshs2int2", "ah_grnplstr", WALLPAPERS},
  3476. {"Painted Tiles", 14701, "lahss2int2", "HS1_Kwall2", WALLPAPERS},
  3477. {"Low Wood Paneling", 14708, "labig1int2", "GB_restaursmll32", WALLPAPERS},
  3478. {"Low Green Tile Paneling", 14709, "lamidint2", "mp_apt1_bathtiles", WALLPAPERS},
  3479. {"Wood Paneling 1", 14709, "lamidint2", "mp_apt1_roomwall", WALLPAPERS},
  3480. {"Wood Paneling 2", 14709, "lamidint2", "mp_apt1_woodpanel", WALLPAPERS},
  3481. {"Wood Paneling 3", 14777, "int_casinoint3", "GB_midbar09", WALLPAPERS},
  3482. {"Wood Paneling 4", 18029, "genintintsmallrest", "GB_restaursmll09", WALLPAPERS},
  3483. {"Crosses w/ Wood Border", 18018, "genintintbarb", "GB_midbar07", WALLPAPERS},
  3484. {"Fancy Paneling", 14431, "dr_gsnew", "mp_gs_wall", WALLPAPERS},
  3485. {"Painted Concrete 5", 14388, "dr_gsnew", "mp_gs_wall1", WALLPAPERS},
  3486. {"Dark Bordered Wallpaper", 14388, "dr_gsnew", "mp_gs_libwall", WALLPAPERS},
  3487. {"Orange Wallaper", 14710, "vgshm3int2", "HSV_2carpet1", WALLPAPERS},
  3488. {"Red Wallpaper", 14703, "vghsb3int2", "HS2_3Carpet1", WALLPAPERS},
  3489. {"Bright Artex Pattern", 11704, "bdupsnew", "Bdup2_Artex", WALLPAPERS},
  3490. {"Fancy Red Dragon Design", 3533, "triadprops_lvs", "walpaper_dragn", WALLPAPERS},
  3491. {"Slight Purple Artex Pattern", 14710, "vgshm3int2", "HS2_Artex2", WALLPAPERS},
  3492. {"Green Artex Pattern", 14701, "lahss2int2", "HS2_Artex6", WALLPAPERS},
  3493. {"White Artex Pattern", 14701, "lahss2int2", "HS2_Artex3", WALLPAPERS},
  3494. {"Green Stripes", 1675, "wshxrefhse", "washdecowall3256", WALLPAPERS},
  3495. {"Wallpaper 1", 11704, "bdupsnew", "Bdup2_wallpaper", WALLPAPERS},
  3496. {"Wallpaper 2", 11704, "bdupsnew", "Bdup2_wallpaperB", WALLPAPERS},
  3497. {"Wallpaper 3", 11707, "cuntcuts", "GB_tile01", WALLPAPERS},
  3498. {"Wallpaper 4", 14710, "vgshm3int2", "HSV_3wall3", WALLPAPERS},
  3499. {"Wallpaper 5", 14701, "lahss2int2", "HS1_wall2", WALLPAPERS},
  3500. {"Wallpaper 6", 14701, "lahss2int2", "HS1_wall3", WALLPAPERS},
  3501. {"Wallpaper 7", 14701, "lahss2int2", "HS1_wall4", WALLPAPERS},
  3502. {"Wallpaper 8", 14712, "lahss2bint2", "HS3_wall2", WALLPAPERS},
  3503. {"Wallpaper 9", 14712, "lahss2bint2", "HS1_2Wall2", WALLPAPERS},
  3504. {"Wallpaper 10", 14702, "masmall3int2", "HS3_wall3", WALLPAPERS},
  3505. {"Wallpaper 11", 14702, "masmall3int2", "HS3_wall5", WALLPAPERS},
  3506. {"Wallpaper 12", 14702, "masmall3int2", "HS3_wall6", WALLPAPERS},
  3507. {"Wallpaper 13", 14703, "vghsb3int2", "HS2_2Wall2", WALLPAPERS},
  3508. {"Wallpaper 14", 14703, "vghsb3int2", "HS2_3Wall1", WALLPAPERS},
  3509. {"Wallpaper 15", 14703, "vghsb3int2", "HS4_Wall7", WALLPAPERS},
  3510. {"Wallpaper 16", 14709, "lamidint2", "mp_apt1_kitchwallpaper", WALLPAPERS},
  3511. {"Wallpaper 17", 14707, "labig3int2", "WH_walls", WALLPAPERS},
  3512. {"Wallpaper 18", 14711, "vgshm2int2", "HS2_4wall1", WALLPAPERS},
  3513. {"Wallpaper 19", 15034, "genhotelsave", "HS2_2Wall4", WALLPAPERS},
  3514. {"Wallpaper 20", 14590, "mafcastopfoor", "donut_wall1", WALLPAPERS},
  3515. {"Wallpaper 21", 5727, "sunrise04_lawn", "fredwall2_LAwN", WALLPAPERS},
  3516. {"Wallpaper 22", 14702, "masmall3int2", "HS3_wall4", WALLPAPERS},
  3517. #define MISC "Misc"
  3518. {"Graffiti", 18200, "w_town2cs_t", "Bow_door_graffiti_128", MISC},
  3519. {"Chinese paint", 5716, "sunrise02_lawn", "manndoor_law", MISC},
  3520. {"Phone Sign", 1229, "signs", "phonesign_128", MISC},
  3521. {"Parking Sign", 1229, "signs", "NoParking2_128", MISC},
  3522. {"Pro Laps", 6351, "rodeo02_law2", "prolsign01_LA", MISC},
  3523. {"SPAVCEY", 5771, "melrose11_lawn", "melrsign08_LA", MISC},
  3524. {"US Flag", 9593, "hosbibalsfw", "dt_cops_US_flag", MISC},
  3525. {"Presidio", 9259, "presidio01_sfn", "stainwin_law", MISC},
  3526. {"Fading Yellow", 9494, "chinatownsfe", "chtown4_sf", MISC},
  3527. {"Fading Blue", 9494, "chinatownsfe", "chtown6_sf", MISC},
  3528. {"Fading Green", 9494, "chinatownsfe", "chtown8_sf", MISC},
  3529. {"Hay", 12911, "sw_farm1", "forestfloorbranch256", MISC},
  3530. {"Hay and Wood", 12911, "sw_farm1", "sw_barnfloor1", MISC},
  3531. {"Garage Door", 5138, "ground_las2", "alleydoor8", MISC},
  3532. {"Flamingos", 8488, "flamingo1", "flmngo01_256", MISC},
  3533. {"Wood Framed Windows", 14771, "int_brothelint3", "GB_nastybar13", MISC},
  3534. {"White Framed Windows", 14710, "vgshm3int2", "kit_windo_12", MISC},
  3535. {"Creepy Old Window", 14700, "vgshs2int2", "ah_FLKWIN", MISC},
  3536. {"Fancy Window", 14710, "vgshm3int2", "windo_blinds", MISC},
  3537. {"Blue Material", 14770, "genintgenintint3", "GB_midbar04", MISC},
  3538. {"Blue Material 2", 14771, "int_brothelint3", "GB_midbar10", MISC},
  3539. {"Black Material", 15046, "svcunthoose", "csGarageTrolley01psd", MISC},
  3540. {"Bordered Black Material", 15046, "svcunthoose", "csheistbox01", MISC},
  3541. {"Red Cushions", 14838, "lee_stripclub", "Strip_bar_wall1", MISC},
  3542. {"Funky 1", 14808, "lee_strip2", "strip_neon_Curtain", MISC},
  3543. {"Funky 2", 14808, "lee_strip2", "strip_neon_flat", MISC},
  3544. {"Glass Wall 1", 16639, "a51_labs", "ws_trainstationwin1", MISC},
  3545. {"Glass Wall 2", 10973, "mall_sfse", "ws_trainstationwin2", MISC},
  3546. {"Glass 1", 1649, "wglass", "carshowwin2", MISC},
  3547. {"Glass 2", 5722, "sunrise01_lawn", "plainglass", MISC},
  3548. {"Water", 3947, "rczero_track", "waterclear256", MISC},
  3549. {"Snow", 3914, "snow", "mp_snow", MISC},
  3550. {"Blank", 1337, "none", "none", MISC},
  3551. {"Classic Window", 15048, "labigsave", "AH_windows", MISC},
  3552. {"Wood Framed Simple Window", 14661, "int_tatoo", "mp_shop_window", MISC},
  3553. {"Metal Framed Window", 14495, "sweetshall", "mcstraps_window", MISC},
  3554. {"Metal Framed Black Windows", 14736, "whorerooms", "AH_cheapwindow", MISC},
  3555. {"Door 'Males Only'", 18008, "intclothesa", "CJ_VICT_DOOR", MISC},
  3556. {"Door 'Females Only'", 18008, "intclothesa", "CJ_VICT_DOOR2", MISC},
  3557. {"Gold", 14707, "labig3int2", "gold128", MISC},
  3558. {"Gold 2", 14607, "triad_main", "buddha_gold", MISC},
  3559. {"Booger Green ", 19527, "Cauldron1", "AlienLiquid1", MISC},
  3560. {"Fading Dark Blue", 14639, "traidman", "ab_aquarium", MISC},
  3561. {"Glass 3", 14755, "sfhss2", "CJ_FRAME_Glass", MISC},
  3562. {"Glass 4", 1978, "kbroul1", "shelf_glas", MISC},
  3563. {"Dirty Glass", 914, "industrialext", "CJ_GEN_GLASS2", MISC},
  3564. {"Dirty Glass 2", 10713, "gayclub_sfs", "CJ_GEN_GLASS2", MISC},
  3565. {"Black Rubber", 18018, "genintintbarb", "CJ_BLACK_RUB2", MISC},
  3566. {"White Formica", 1770, "cj_tables", "FORMICA1", MISC},
  3567. {"Water 2", 18742, "MatTextures", "waterclear256", MISC},
  3568. {"Water 3", 19841, "vegaswaterfall", "newaterfal1_256", MISC},
  3569. {"Unnamed Mesh", 3280, "country_breakable", "ws_castironwalk", MISC},
  3570. {"Camouflage Net", 2068, "cj_ammo_net", "CJ_cammonet", MISC},
  3571. {"Fading Yellow Glass" , 19197,"EnExMarkers", "enex", MISC},
  3572. {"Basket Pattern 1", 8534, "tikimotel", "sa_wood01_128", MISC},
  3573. {"Basket Pattern 2", 8534, "tikimotel", "sa_wood03_128", MISC},
  3574. {"Basket Pattern 3", 8534, "tikimotel", "sa_wood04_128", MISC},
  3575. {"Transperancy", 18888, "ForceFields", "white", MISC},
  3576. {"Unnamed Ceiling 1", 11312, "carshow_sfse", "ws_officy_ceiling", MISC},
  3577. {"Unnamed Ceiling 2", 18007, "int_cutbar3", "ceilingtile1_128", MISC},
  3578. {"Unnamed Ceiling 3", 18026, "scummy", "ceiling_256", MISC},
  3579. {"Unnamed Ceiling 4", 18038, "vegas_munation", "gun_ceiling1", MISC},
  3580. {"Unnamed Ceiling 5", 18038, "vegas_munation", "gun_ceiling2", MISC},
  3581. {"Unnamed Ceiling 6", 18038, "vegas_munation", "gun_ceiling3", MISC},
  3582. {"Unnamed Ceiling 7", 14534, "ab_wooziea", "dt_office_roof", MISC},
  3583. {"Unnamed Ceiling 8", 14526, "sweetsmain", "ah_whitpanelceil", MISC},
  3584. {"Unnamed Ceiling 9", 15042, "svsfsm", "AH_walltile2", MISC},
  3585. {"Unnamed Ceiling 10", 18045, "gen_munation", "mp_diner_ceilingdirt", MISC},
  3586. {"Dark Wood Border", 14431, "dr_gsnew", "mp_gs_border", MISC},
  3587. {"Light Wood Border", 14431, "dr_gsnew", "mp_gs_border1", MISC},
  3588. {"Old Wood Panel", 14700, "vgshs2int2", "AH_oldwdpan", MISC},
  3589. {"Wood Panel", 14431, "dr_gsnew", "mp_gs_woodpanel", MISC},
  3590. {"Wood Panel 2", 14750, "sfhsm2", "ah_pnwainscot3", MISC},
  3591. {"Wood Panel 3", 15048, "labigsave", "AH_barpanelM", MISC},
  3592. {"Wood Panel 4", 14748, "sfhsm1", "ah_pnwainscot", MISC},
  3593. {"Wood Panel 5", 14735, "newcrak", "AH_wdpanscum", MISC},
  3594. {"Wood Panel 6", 14853, "gen_pol_vegas", "mp_cop_panel", MISC},
  3595. {"Wood Panel 7", 14789, "ab_sfgymmain", "ab_panelWall1", MISC},
  3596. {"Wood Panel 8", 14789, "ab_sfgymmain", "ab_panelWall2", MISC},
  3597. {"Perforated Wood", 18026, "scummy", "CJ_BACK_BOARD", MISC},
  3598. {"Funky 3", 14832, "lee_stripclub", "mirror_ref1", MISC},
  3599. {"Unnamed something 2", 1389, "cranes_dyn2", "ws_sheetsteel", MISC},
  3600. {"Unnamed something 3", 1824, "gamingtble", "crapside_128", MISC},
  3601. {"Unnamed Something 4", 2788, "pizza_furn", "CJ_CORD", MISC},
  3602. {"Black Leather", 1753, "cj_sofa", "CJ-COUCHL2", MISC},
  3603. {"Brown Leather", 1753, "cj_sofa", "CJ-COUCHL1", MISC},
  3604. {"Red Leather", 1770, "cj_tables", "CJ_RED_LEATHER", MISC},
  3605. {"Pink 'Leather'", 2487, "rc_shop_hanger", "CJ_kite2", MISC},
  3606. {"Blue 'Leather'", 2487, "rc_shop_hanger", "CJ_kite3", MISC},
  3607. {"Unnamed Concrete Wall 1", 17925, "lae2fake_int", "ab_wall3", MISC},
  3608. {"Unnamed Concrete Wall 2", 18060, "mp_diner2", "mp_diner_wall", MISC},
  3609. {"Unnamed Material", 13594, "kickstart", "ah_bluBADWL", MISC},
  3610. {"Red Square", 1898, "kb_wheel1", "wheel_o_2", MISC},
  3611. {"Green Square", 1898, "kb_wheel1", "wheel_o_2f", MISC},
  3612. {"Light Green Square", 1898, "kb_wheel1", "wheel_o_2b", MISC},
  3613. {"Blue Square", 1898, "kb_wheel1", "wheel_o_2c", MISC},
  3614. {"Light Blue Square", 1898, "kb_wheel1", "wheel_o_2d", MISC},
  3615. {"Yellow Square", 1898, "kb_wheel1", "wheel_o_2e", MISC},
  3616. {"Unnamed Asian Wall", 14620, "triad_bar", "triad_decor1", MISC},
  3617. {"Unnamed Red Something", 6989, "vgnfremnt1", "casinolights4_128", MISC},
  3618. {"Unnamed Blue Something", 6989, "vgnfremnt1", "casinolightsblu_128", MISC},
  3619. {"Unnamed Yellow Something", 6989, "vgnfremnt1", "casinolightsyel_128", MISC},
  3620. {"Funky Red Tiles", 6989, "vgnfremnt1", "casinolights9_256", MISC},
  3621. {"Unnamed PC Screen 1", 9822, "ship_brijsfw", "ship_screen1sfw", MISC},
  3622. {"Unnamed PC Screen 2", 9822, "ship_brijsfw", "ship_greenscreen1", MISC},
  3623. {"TV Screen", 1781, "cj_tv", "CJ_TV_SCREEN", MISC},
  3624. {"TV Noise", 14640, "chinese_furn", "ab_tv_noise", MISC},
  3625. {"Empty Golden Frame", 6989, "vgnfremnt1", "goldframe_256", MISC},
  3626. {"Blood", 19836, "particle", "bloodpool_64", MISC},
  3627. {"Blood 2", 18067, "intclothes_acc", "mp_cloth_vicrug", MISC},
  3628. {"Unnamed Creepy Concrete", 14888, "gf6", "mp_gimp_basewall", MISC},
  3629. {"Seeing Eye", 14839, "lee_strippriv", "Strip_Sign12", MISC},
  3630. {"Unnamed Glass 1", 2176, "casino_props", "flameOptic", MISC},
  3631. {"Unnamed Glass 2", 2176, "casino_props", "tubelite", MISC}
  3632. };
  3633. enum MAT_COLORS
  3634. {
  3635. ColorHex,
  3636. ColorName[32]
  3637. };
  3638. new const MaterialColors[][MAT_COLORS] =
  3639. {
  3640. {0, "none"},
  3641. {0xFFF0F8FF, "Alice Blue"},
  3642. {0xFFFAEBD7, "Antique White"},
  3643. {0xFF00FFFF, "Aqua"},
  3644. {0xFF7FFFD4, "Aquamarine"},
  3645. {0xFFF0FFFF, "Azure"},
  3646. {0xFFF5F5DC, "Beige"},
  3647. {0xFFFFE4C4, "Bisque"},
  3648. {0xFF000000, "Black"},
  3649. {0xFFFFEBCD, "Blanched Almond"},
  3650. {0xFF0000FF, "Blue"},
  3651. {0xFF8A2BE2, "Blue Violet"},
  3652. {0xFFA52A2A, "Brown"},
  3653. {0xFFDEB887, "Burly Wood"},
  3654. {0xFF5F9EA0, "Cadet Blue"},
  3655. {0xFF7FFF00, "Chartreuse"},
  3656. {0xFFD2691E, "Chocolate"},
  3657. {0xFFFF7F50, "Coral"},
  3658. {0xFF6495ED, "Cornflower Blue"},
  3659. {0xFFFFF8DC, "Cornsilk"},
  3660. {0xFFDC143C, "Crimson"},
  3661. {0xFF00FFFF, "Cyan"},
  3662. {0xFF00008B, "Dark Blue"},
  3663. {0xFF008B8B, "Dark Cyan"},
  3664. {0xFFB8860B, "Dark Goldenrod"},
  3665. {0xFFA9A9A9, "Dark Gray"},
  3666. {0xFF006400, "Dark Green"},
  3667. {0xFFBDB76B, "Dark Khaki"},
  3668. {0xFF8B008B, "Dark Magenta"},
  3669. {0xFF556B2F, "Dark Olive Green"},
  3670. {0xFFFF8C00, "Dark Orange"},
  3671. {0xFF9932CC, "Dark Orchid"},
  3672. {0xFF8B0000, "Dark Red"},
  3673. {0xFFE9967A, "Dark Salmon"},
  3674. {0xFF8FBC8F, "Dark Sea Green"},
  3675. {0xFF483D8B, "Dark Slate Blue"},
  3676. {0xFF2F4F4F, "Dark Slate Gray"},
  3677. {0xFF00CED1, "Dark Turquoise"},
  3678. {0xFF9400D3, "Dark Violet"},
  3679. {0xFFFF1493, "Deep Pink"},
  3680. {0xFF00BFFF, "Deep Sky Blue"},
  3681. {0xFF696969, "Dim Gray"},
  3682. {0xFF1E90FF, "Dodger Blue"},
  3683. {0xFFB22222, "Firebrick"},
  3684. {0xFFFFFAF0, "Floral White"},
  3685. {0xFF228B22, "Forest Green"},
  3686. {0xFFFF00FF, "Fuchsia"},
  3687. {0xFFDCDCDC, "Gainsboro"},
  3688. {0xFFF8F8FF, "Ghost White"},
  3689. {0xFFFFD700, "Gold"},
  3690. {0xFFDAA520, "Goldenrod"},
  3691. {0xFF808080, "Gray"},
  3692. {0xFF008000, "Green"},
  3693. {0xFFADFF2F, "Green Yellow"},
  3694. {0xFFF0FFF0, "Honeydew"},
  3695. {0xFFFF69B4, "Hot Pink"},
  3696. {0xFFCD5C5C, "Indian Red"},
  3697. {0xFF4B0082, "Indigo"},
  3698. {0xFFFFFFF0, "Ivory"},
  3699. {0xFFF0E68C, "Khaki"},
  3700. {0xFFE6E6FA, "Lavender"},
  3701. {0xFFFFF0F5, "Lavender Blush"},
  3702. {0xFF7CFC00, "Lawn Green"},
  3703. {0xFFFFFACD, "Lemon Chiffon"},
  3704. {0xFFADD8E6, "Light Blue"},
  3705. {0xFFF08080, "Light Coral"},
  3706. {0xFFE0FFFF, "Light Cyan"},
  3707. {0xFFFAFAD2, "Light Goldenrod Yellow"},
  3708. {0xFFD3D3D3, "Light Gray"},
  3709. {0xFF90EE90, "Light Green"},
  3710. {0xFFFFB6C1, "Light Pink"},
  3711. {0xFFFFA07A, "Light Salmon"},
  3712. {0xFF20B2AA, "Light Sea Green"},
  3713. {0xFF87CEFA, "Light Sky Blue"},
  3714. {0xFF778899, "Light Slate Gray"},
  3715. {0xFFB0C4DE, "Light Steel Blue"},
  3716. {0xFFFFFFE0, "Light Yellow"},
  3717. {0xFF00FF00, "Lime"},
  3718. {0xFF32CD32, "Lime Green"},
  3719. {0xFFFAF0E6, "Linen"},
  3720. {0xFFFF00FF, "Magenta"},
  3721. {0xFF800000, "Maroon"},
  3722. {0xFF66CDAA, "Medium Aquamarine"},
  3723. {0xFF0000CD, "Medium Blue"},
  3724. {0xFFBA55D3, "Medium Orchid"},
  3725. {0xFF9370DB, "Medium Purple"},
  3726. {0xFF3CB371, "Medium Sea Green"},
  3727. {0xFF7B68EE, "Medium Slate Blue"},
  3728. {0xFF00FA9A, "Medium Spring Green"},
  3729. {0xFF48D1CC, "Medium Turquoise"},
  3730. {0xFFC71585, "Medium Violet Red"},
  3731. {0xFF191970, "Midnight Blue"},
  3732. {0xFFF5FFFA, "Mint Cream"},
  3733. {0xFFFFE4E1, "Misty Rose"},
  3734. {0xFFFFE4B5, "Moccasin"},
  3735. {0xFFFFDEAD, "Navajo White"},
  3736. {0xFF000080, "Navy"},
  3737. {0xFFFDF5E6, "Old Lace"},
  3738. {0xFF808000, "Olive"},
  3739. {0xFF6B8E23, "Olive Drab"},
  3740. {0xFFFFA500, "Orange"},
  3741. {0xFFFF4500, "Orange Red"},
  3742. {0xFFDA70D6, "Orchid"},
  3743. {0xFFEEE8AA, "Pale Goldenrod"},
  3744. {0xFF98FB98, "Pale Green"},
  3745. {0xFFAFEEEE, "Pale Turquoise"},
  3746. {0xFFDB7093, "Pale Violet Red"},
  3747. {0xFFFFEFD5, "Papaya Whip"},
  3748. {0xFFFFDAB9, "Peach Puff"},
  3749. {0xFFCD853F, "Peru"},
  3750. {0xFFFFC0CB, "Pink"},
  3751. {0xFFDDA0DD, "Plum"},
  3752. {0xFFB0E0E6, "Powder Blue"},
  3753. {0xFF800080, "Purple"},
  3754. {0xFFFF0000, "Red"},
  3755. {0xFFBC8F8F, "Rosy Brown"},
  3756. {0xFF4169E1, "Royal Blue"},
  3757. {0xFF8B4513, "Saddle Brown"},
  3758. {0xFFFA8072, "Salmon"},
  3759. {0xFFF4A460, "Sandy Brown"},
  3760. {0xFF2E8B57, "Sea Green"},
  3761. {0xFFFFF5EE, "SeaShell"},
  3762. {0xFFA0522D, "Sienna"},
  3763. {0xFFC0C0C0, "Silver"},
  3764. {0xFF87CEEB, "Sky Blue"},
  3765. {0xFF6A5ACD, "Slate Blue"},
  3766. {0xFF708090, "Slate Gray"},
  3767. {0xFFFFFAFA, "Snow"},
  3768. {0xFF00FF7F, "Spring Green"},
  3769. {0xFF4682B4, "Steel Blue"},
  3770. {0xFFD2B48C, "Tan"},
  3771. {0xFF008080, "Teal"},
  3772. {0xFFD8BFD8, "Thistle"},
  3773. {0xFFFF6347, "Tomato"},
  3774. {0xFF40E0D0, "Turquoise"},
  3775. {0xFFEE82EE, "Violet"},
  3776. {0xFFF5DEB3, "Wheat"},
  3777. {0xFFFFFFFF, "White"},
  3778. {0xFFF5F5F5, "White Smoke"},
  3779. {0xFFFFFF00, "Yellow"},
  3780. {0xFF9ACD32, "Yellow Green"}
  3781. };
  3782. new const g_FurnitureTypes[][] = {
  3783. "Kitchen",
  3784. "Tables",
  3785. "Chairs/Couches",
  3786. "Shelves",
  3787. "Bathroom",
  3788. "Bedroom",
  3789. "Cabinets",
  3790. "Electronics",
  3791. "Plants",
  3792. "Trashcans",
  3793. "Doors",
  3794. "Carpets",
  3795. "Frames",
  3796. "Miscellaneous",
  3797. "Wall",
  3798. "Special"
  3799. };
  3800. enum e_Furniture
  3801. {
  3802. fID,
  3803. fExists,
  3804. fHouseID,
  3805. fModel,
  3806. Float:fSpawn[6],
  3807. fInterior,
  3808. fWorld,
  3809. fCode, // Safe code
  3810. fMoney, // Safe money
  3811. fSafeOpen,
  3812. fDoorOpen,
  3813. fObject,
  3814. fEdit,
  3815. Text3D:fText,
  3816. fMaterial[3],
  3817. fMatColour[3],
  3818. };
  3819. enum e_FurnitureList
  3820. {
  3821. e_ModelCategory,
  3822. e_ModelName[32],
  3823. e_ModelID,
  3824. e_ModelPrice
  3825. };
  3826. new Furniture[MAX_FURNITURE][e_Furniture];
  3827. enum {
  3828. FURNITURE_KITCHEN,
  3829. FURNITURE_TABLES,
  3830. FURNITURE_CHAIRS,
  3831. FURNITURE_SHELVES,
  3832. FURNITURE_BATHROOM,
  3833. FURNITURE_BEDROOM,
  3834. FURNITURE_CABINETS,
  3835. FURNITURE_ELECTRIC,
  3836. FURNITURE_PLANTS,
  3837. FURNITURE_TRASH,
  3838. FURNITURE_DOORS,
  3839. FURNITURE_CARPETS,
  3840. FURNITURE_FRAMES,
  3841. FURNITURE_MISC,
  3842. FURNITURE_WALL,
  3843. FURNITURE_SPECIAL,
  3844. FURNITURE_EFFECT
  3845. };
  3846. new const g_FurnitureList[][e_FurnitureList] =
  3847. {
  3848. {FURNITURE_KITCHEN, "CJ_KITCH1_FRIDGE", 2147, 2000},
  3849. {FURNITURE_KITCHEN, "CJ_KITCH1_COOKER", 2170, 1000},
  3850. {FURNITURE_KITCHEN, "CJ_KITCH1_SINK", 2336, 550},
  3851. {FURNITURE_KITCHEN, "CJ_KITCH1_WASHER", 2337, 400},
  3852. {FURNITURE_KITCHEN, "CJ_KITCH1_L", 2158, 550},
  3853. {FURNITURE_KITCHEN, "CJ_KITCH1_M", 2334, 550},
  3854. {FURNITURE_KITCHEN, "CJ_KITCH1_R", 2335, 550},
  3855. {FURNITURE_KITCHEN, "CJ_KITCH1_CORNER", 2338, 550},
  3856. {FURNITURE_KITCHEN, "CJ_KITCH2_FRIDGE", 2131, 450},
  3857. {FURNITURE_KITCHEN, "CJ_KITCH2_SINK", 2132, 550},
  3858. {FURNITURE_KITCHEN, "CJ_KITCH2_COOKER", 2339, 1000},
  3859. {FURNITURE_KITCHEN, "CJ_KITCH2_WASHER", 2340, 400},
  3860. {FURNITURE_KITCHEN, "CJ_KITCH2_L", 2141, 1000},
  3861. {FURNITURE_KITCHEN, "CJ_KITCH2_M", 2134, 1000},
  3862. {FURNITURE_KITCHEN, "CJ_KITCH2_R", 2133, 1000},
  3863. {FURNITURE_KITCHEN, "CJ_KITCH2_CORNER", 2341, 550},
  3864. {FURNITURE_KITCHEN, "CJ_K3_COOKER", 2135, 2000},
  3865. {FURNITURE_KITCHEN, "CJ_K3_SINK", 2136, 450},
  3866. {FURNITURE_KITCHEN, "CJ_K3_LOW_UNIT1", 2138, 1000},
  3867. {FURNITURE_KITCHEN, "CJ_K3_LOW_UNIT2", 2139, 1000},
  3868. {FURNITURE_KITCHEN, "CJ_K3_LOW_UNIT3", 2137, 1000},
  3869. {FURNITURE_KITCHEN, "CJ_K3_TALL_UNIT1", 2140, 400},
  3870. {FURNITURE_KITCHEN, "CJ_K3_C_UNIT", 2305, 400},
  3871. {FURNITURE_KITCHEN, "CJ_K3_WASH_MAC", 2303, 550},
  3872. {FURNITURE_KITCHEN, "CJ_K3_UNIT06", 2145, 450},
  3873. {FURNITURE_KITCHEN, "CJ_K1_FRIDGE_UNIT", 2127, 400},
  3874. {FURNITURE_KITCHEN, "CJ_K1_SINK", 2130, 1000},
  3875. {FURNITURE_KITCHEN, "CJ_K1_TALL_UNIT", 2128, 1000},
  3876. {FURNITURE_KITCHEN, "CJ_K1_LOW_UNIT", 2129, 550},
  3877. {FURNITURE_KITCHEN, "CJ_K1_LOW_CORNER", 2304, 550},
  3878. {FURNITURE_KITCHEN, "CJ_THIN_FRIGE", 1780, 550},
  3879. {FURNITURE_KITCHEN, "CJ_FF_CONTER_5", 2446, 600},
  3880. {FURNITURE_KITCHEN, "CJ_FF_CONTER_5c", 2447, 600},
  3881. {FURNITURE_KITCHEN, "CJ_FF_CONTER_5d", 2448, 600},
  3882. {FURNITURE_KITCHEN, "CJ_FF_CONTER_5e", 2449, 2000},
  3883. {FURNITURE_KITCHEN, "CJ_FF_CONTER_5b", 2450, 450},
  3884. {FURNITURE_KITCHEN, "CJ_FF_CONTER_8b", 2454, 400},
  3885. {FURNITURE_KITCHEN, "CJ_FF_CONTER_8c", 2457, 400},
  3886. {FURNITURE_KITCHEN, "CJ_FF_COFFEE", 2500, 250},
  3887. {FURNITURE_KITCHEN, "CJ_FF_FRYER", 2415, 550},
  3888. {FURNITURE_KITCHEN, "CJ_FF_COOKER", 2417, 550},
  3889. {FURNITURE_KITCHEN, "CJ_FF_MICROW", 2421, 250},
  3890. {FURNITURE_KITCHEN, "CJ_MICROWAVE1", 2149, 800},
  3891. {FURNITURE_KITCHEN, "CJ_FF_PIZZA_OVEN", 2426, 1500},
  3892. {FURNITURE_KITCHEN, "CJ_FF_FRIDGE2", 2452, 400},
  3893. {FURNITURE_KITCHEN, "CJ_FF_DISP", 2416, 9000},
  3894. {FURNITURE_KITCHEN, "CJ_FF_JUICE_L", 2427, 550},
  3895. {FURNITURE_KITCHEN, "CJ_FF_CUP_DISP", 2429, 2000},
  3896. {FURNITURE_KITCHEN, "CJ_OFF2_LIC_2_R", 2530, 550},
  3897. {FURNITURE_KITCHEN, "CJ_OFF2_LIC_1_R", 2532, 550},
  3898. {FURNITURE_KITCHEN, "MarcosFryingPan1", 19581, 500},
  3899. {FURNITURE_KITCHEN, "MarcosSteak1", 19582, 500},
  3900. {FURNITURE_KITCHEN, "MarcosKnife1", 19583, 500},
  3901. {FURNITURE_KITCHEN, "MarcosSaucepan1", 19584, 500},
  3902. {FURNITURE_KITCHEN, "MarcosPan1", 19585, 500},
  3903. {FURNITURE_KITCHEN, "MarcosSpatula1", 19586, 500},
  3904. {FURNITURE_TABLES, "parktable1", 1281, 600},
  3905. {FURNITURE_TABLES, "DYN_TABLE_1", 1433, 600},
  3906. {FURNITURE_TABLES, "DYN_TABLE_2", 1432, 7500},
  3907. {FURNITURE_TABLES, "craps_table", 1824, 9000},
  3908. {FURNITURE_TABLES, "wheel_table", 1896, 6500},
  3909. {FURNITURE_TABLES, "k_pooltablesm", 2964, 2000},
  3910. {FURNITURE_TABLES, "pokertable01", 19474, 400},
  3911. {FURNITURE_TABLES, "officedesk1l", 1998, 2000},
  3912. {FURNITURE_TABLES, "officedesk2", 1999, 400},
  3913. {FURNITURE_TABLES, "officedesk1", 2008, 4500},
  3914. {FURNITURE_TABLES, "officedesk2l", 2009, 2000},
  3915. {FURNITURE_TABLES, "MED_OFFICE_DESK_1", 2165, 400},
  3916. {FURNITURE_TABLES, "MED_OFFICE_DESK_2", 2166, 4500},
  3917. {FURNITURE_TABLES, "MED_OFFICE_DESK_3", 2173, 400},
  3918. {FURNITURE_TABLES, "MED_OFFICE2_DESK_1", 2172, 400},
  3919. {FURNITURE_TABLES, "MED_OFFICE3_DESK_1", 2169, 1000},
  3920. {FURNITURE_TABLES, "MED_OFFICE4_DESK_1", 2171, 4500},
  3921. {FURNITURE_TABLES, "MED_OFFICE4_DESK_2", 2174, 400},
  3922. {FURNITURE_TABLES, "MED_OFFICE4_DESK_3", 2175, 400},
  3923. {FURNITURE_TABLES, "MED_OFFICE5_DESK_3", 2180, 2500},
  3924. {FURNITURE_TABLES, "MED_OFFICE5_DESK_2", 2181, 550},
  3925. {FURNITURE_TABLES, "MED_OFFICE5_DESK_1", 2182, 400},
  3926. {FURNITURE_TABLES, "MED_OFFICE3_DESK_09", 2183, 6000},
  3927. {FURNITURE_TABLES, "MED_OFFICE6_DESK_2", 2184, 6500},
  3928. {FURNITURE_TABLES, "MED_OFFICE6_DESK_1", 2185, 2000},
  3929. {FURNITURE_TABLES, "MED_OFFICE2_DESK_2", 2193, 7000},
  3930. {FURNITURE_TABLES, "MED_OFFICE2_DESK_3", 2198, 2000},
  3931. {FURNITURE_TABLES, "MED_OFFICE8_DESK_1", 2205, 550},
  3932. {FURNITURE_TABLES, "MED_OFFICE8_DESK_02", 2206, 2500},
  3933. {FURNITURE_TABLES, "MED_OFFICE7_DESK_1", 2207, 550},
  3934. {FURNITURE_TABLES, "MED_OFFICE9_DESK_1", 2209, 5500},
  3935. {FURNITURE_TABLES, "MED_OFFICE4_DESK_4", 2308, 6000},
  3936. {FURNITURE_TABLES, "CJ_FF_WORKTOP", 2418, 400},
  3937. {FURNITURE_TABLES, "CJ_FF_WORKTOP_2", 2419, 400},
  3938. {FURNITURE_TABLES, "CJ_FF_WORKTOP_3", 2451, 2000},
  3939. {FURNITURE_TABLES, "CJ_DF_WORKTOP_2", 936, 1000},
  3940. {FURNITURE_TABLES, "CJ_DF_WORKTOP", 937, 400},
  3941. {FURNITURE_TABLES, "CJ_DF_WORKTOP_3", 941, 1000},
  3942. {FURNITURE_TABLES, "CJ_TV_TABLE2", 2311, 2000},
  3943. {FURNITURE_TABLES, "CJ_TV_TABLE1", 2313, 2500},
  3944. {FURNITURE_TABLES, "CJ_TV_TABLE3", 2314, 550},
  3945. {FURNITURE_TABLES, "CJ_TV_TABLE4", 2315, 550},
  3946. {FURNITURE_TABLES, "CJ_TV_TABLE5", 2319, 2500},
  3947. {FURNITURE_TABLES, "CJ_TV_TABLE6", 2321, 2000},
  3948. {FURNITURE_TABLES, "CJ_HIFI_TABLE", 2346, 2500},
  3949. {FURNITURE_TABLES, "Shop_set_1_Table", 2370, 1000},
  3950. {FURNITURE_TABLES, "POLCE_DESK1", 2605, 1500},
  3951. {FURNITURE_TABLES, "POLCE_DESK2", 2607, 2000},
  3952. {FURNITURE_TABLES, "CJ_PIZZA_TABLE", 2635, 2500},
  3953. {FURNITURE_TABLES, "CJ_PIZZA_TABLE2", 2637, 2500},
  3954. {FURNITURE_TABLES, "CJ_BURG_TABLE", 2644, 2500},
  3955. {FURNITURE_TABLES, "CJ_donut_TABLE", 2747, 2000},
  3956. {FURNITURE_TABLES, "CJ_CHICK_TABLE", 2762, 2000},
  3957. {FURNITURE_TABLES, "CJ_CHICK_TABLE_2", 2763, 2000},
  3958. {FURNITURE_TABLES, "CJ_PIZZA_TABLE03", 2764, 2500},
  3959. {FURNITURE_TABLES, "MED_DINNING_6", 2119, 2500},
  3960. {FURNITURE_TABLES, "SWANK_DINNING_6", 2118, 2000},
  3961. {FURNITURE_TABLES, "SWANK_DINNING_5", 2117, 2500},
  3962. {FURNITURE_TABLES, "LOW_DINNING_6", 2116, 1500},
  3963. {FURNITURE_TABLES, "LOW_DINNING_1", 2115, 1500},
  3964. {FURNITURE_TABLES, "castable1", 2802, 400},
  3965. {FURNITURE_TABLES, "a51_labtable1_", 3383, 2000},
  3966. {FURNITURE_CHAIRS, "Stonebench1", 1256, 2000},
  3967. {FURNITURE_CHAIRS, "parkbench1", 1280, 2500},
  3968. {FURNITURE_CHAIRS, "CJ_BLOCKER_BENCH", 1368, 2500},
  3969. {FURNITURE_CHAIRS, "swivelchair_B", 1663, 1500},
  3970. {FURNITURE_CHAIRS, "swivelchair_A", 1671, 1500},
  3971. {FURNITURE_CHAIRS, "kb_swivelchair1", 1714, 1500},
  3972. {FURNITURE_CHAIRS, "kb_swivelchair2", 1715, 1500},
  3973. {FURNITURE_CHAIRS, "kb_slot_stool", 1716, 1000},
  3974. {FURNITURE_CHAIRS, "est_chair1", 1721, 1000},
  3975. {FURNITURE_CHAIRS, "kb_chair03", 1704, 2000},
  3976. {FURNITURE_CHAIRS, "kb_chair04", 1705, 2000},
  3977. {FURNITURE_CHAIRS, "kb_chair02", 1708, 2000},
  3978. {FURNITURE_CHAIRS, "kb_chair01", 1711, 2000},
  3979. {FURNITURE_CHAIRS, "mrk_seating1", 1723, 550},
  3980. {FURNITURE_CHAIRS, "mrk_seating1b", 1724, 200},
  3981. {FURNITURE_CHAIRS, "mrk_seating2", 1726, 550},
  3982. {FURNITURE_CHAIRS, "mrk_seating2b", 1727, 2000},
  3983. {FURNITURE_CHAIRS, "mrk_seating3", 1728, 1000},
  3984. {FURNITURE_CHAIRS, "mrk_seating3b", 1729, 2500},
  3985. {FURNITURE_CHAIRS, "CJ_EASYCHAIR1", 1735, 2000},
  3986. {FURNITURE_CHAIRS, "SWANK_DIN_CHAIR_5", 1739, 1000},
  3987. {FURNITURE_CHAIRS, "SWANK_1_FootStool", 1746, 500},
  3988. {FURNITURE_CHAIRS, "CJ_BARSTOOL", 1805, 1000},
  3989. {FURNITURE_CHAIRS, "MED_OFFICE_CHAIR", 1806, 2500},
  3990. {FURNITURE_CHAIRS, "CJ_FOLDCHAIR", 1810, 500},
  3991. {FURNITURE_CHAIRS, "MED_DIN_CHAIR_5", 1811, 1500},
  3992. {FURNITURE_CHAIRS, "SWANK_DIN_CHAIR_2", 2079, 1000},
  3993. {FURNITURE_CHAIRS, "MED_DIN_CHAIR_4", 2120, 1500},
  3994. {FURNITURE_CHAIRS, "LOW_DIN_CHAIR_2", 2121, 500},
  3995. {FURNITURE_CHAIRS, "SWANK_DIN_CHAIR_4", 2123, 1000},
  3996. {FURNITURE_CHAIRS, "SWANK_DIN_CHAIR_1", 2124, 1500},
  3997. {FURNITURE_CHAIRS, "MED_DIN_CHAIR_1", 2125, 500},
  3998. {FURNITURE_CHAIRS, "MED_OFFICE_CHAIR2", 2309, 1000},
  3999. {FURNITURE_CHAIRS, "CJ_PIZZA_CHAIR2", 2638, 400},
  4000. {FURNITURE_CHAIRS, "CJ_PIZZA_CHAIR3", 2639, 550},
  4001. {FURNITURE_CHAIRS, "LEE_stripCHAIR2", 2776, 1000},
  4002. {FURNITURE_CHAIRS, "CJ_BURG_CHAIR", 2788, 1000},
  4003. {FURNITURE_CHAIRS, "SWK_COUCH_1", 2290, 400},
  4004. {FURNITURE_CHAIRS, "LOW_COUCH_3", 1768, 400},
  4005. {FURNITURE_CHAIRS, "MED_COUCH_1", 1766, 400},
  4006. {FURNITURE_CHAIRS, "LOW_COUCH_2", 1764, 400},
  4007. {FURNITURE_CHAIRS, "LOW_COUCH_1", 1763, 400},
  4008. {FURNITURE_CHAIRS, "SWANK_COUCH_2", 1761, 400},
  4009. {FURNITURE_CHAIRS, "MED_COUCH_2", 1760, 400},
  4010. {FURNITURE_CHAIRS, "LOW_COUCH_5", 1757, 400},
  4011. {FURNITURE_CHAIRS, "LOW_COUCH_4", 1756, 400},
  4012. {FURNITURE_CHAIRS, "SWANK_COUCH_1", 1753, 2000},
  4013. {FURNITURE_CHAIRS, "kb_couch04", 1713, 400},
  4014. {FURNITURE_CHAIRS, "kb_couch05", 1712, 400},
  4015. {FURNITURE_CHAIRS, "kb_couch07", 1710, 6000},
  4016. {FURNITURE_CHAIRS, "kb_couch08", 1709, 8000},
  4017. {FURNITURE_CHAIRS, "kb_couch01", 1707, 400},
  4018. {FURNITURE_CHAIRS, "kb_couch03", 1706, 400},
  4019. {FURNITURE_CHAIRS, "kb_couch02", 1703, 400},
  4020. {FURNITURE_CHAIRS, "kb_couch06", 1702, 400},
  4021. {FURNITURE_SHELVES, "CJ_BEDROOM1", 2323, 2000},
  4022. {FURNITURE_SHELVES, "CJ_BEDROOM1_W", 2330, 6000},
  4023. {FURNITURE_SHELVES, "mrk_wrobe_tmp", 2025, 5500},
  4024. {FURNITURE_SHELVES, "MED_SHELF", 1744, 1500},
  4025. {FURNITURE_SHELVES, "DYN_CUPBOARD", 1417, 1000},
  4026. {FURNITURE_SHELVES, "MED_OFFICE_UNIT_4", 2161, 400},
  4027. {FURNITURE_SHELVES, "MED_OFFICE_UNIT_1", 2162, 400},
  4028. {FURNITURE_SHELVES, "MED_OFFICE_UNIT_2", 2163, 4500},
  4029. {FURNITURE_SHELVES, "MED_OFFICE_UNIT_5", 2164, 400},
  4030. {FURNITURE_SHELVES, "MED_OFFICE_UNIT_7", 2167, 400},
  4031. {FURNITURE_SHELVES, "MED_OFFICE6_MC_1", 2199, 2500},
  4032. {FURNITURE_SHELVES, "CJ_HOBBY_SHELF", 2462, 550},
  4033. {FURNITURE_SHELVES, "CJ_HOBBY_SHELF_2", 2463, 550},
  4034. {FURNITURE_SHELVES, "CJ_HOBBY_SHELF_3", 2475, 1000},
  4035. {FURNITURE_SHELVES, "CJ_HOBBY_SHELF_4", 2482, 400},
  4036. {FURNITURE_SHELVES, "CJ_HOBBY_SHELF_5", 2502, 550},
  4037. {FURNITURE_SHELVES, "CJ_HOBBY_SHELF_6", 2509, 550},
  4038. {FURNITURE_SHELVES, "Med_BOOKSHELF", 1742, 2500},
  4039. {FURNITURE_SHELVES, "CJ_M_FILEING1", 2065, 1000},
  4040. {FURNITURE_SHELVES, "CJ_M_FILEING2", 2066, 1000},
  4041. {FURNITURE_SHELVES, "CJ_M_FILEING3", 2067, 1000},
  4042. {FURNITURE_BATHROOM, "CJ_TOILET_BS", 2738, 2000},
  4043. {FURNITURE_BATHROOM, "CJ_TOILET1", 2514, 2000},
  4044. {FURNITURE_BATHROOM, "CJ_TOILET2", 2521, 2500},
  4045. {FURNITURE_BATHROOM, "CJ_TOILET3", 2528, 2000},
  4046. {FURNITURE_BATHROOM, "CJ_TOILET4", 2525, 550},
  4047. {FURNITURE_BATHROOM, "CJ_SHOWER1", 2517, 1000},
  4048. {FURNITURE_BATHROOM, "CJ_SHOWER2", 2520, 550},
  4049. {FURNITURE_BATHROOM, "CJ_SHOWER4", 2527, 550},
  4050. {FURNITURE_BATHROOM, "CJ_BATH1", 2516, 550},
  4051. {FURNITURE_BATHROOM, "CJ_BATH2", 2519, 2500},
  4052. {FURNITURE_BATHROOM, "CJ_BATH3", 2522, 400},
  4053. {FURNITURE_BATHROOM, "CJ_BATH4", 2526, 550},
  4054. {FURNITURE_BATHROOM, "CJ_BATH5", 2097, 2000},
  4055. {FURNITURE_BATHROOM, "CJ_B_SINK1", 2739, 2000},
  4056. {FURNITURE_BATHROOM, "CJ_B_SINK2", 2518, 2000},
  4057. {FURNITURE_BATHROOM, "CJ_B_SINK3", 2523, 550},
  4058. {FURNITURE_BATHROOM, "CJ_B_SINK4", 2524, 2500},
  4059. {FURNITURE_BEDROOM, "kb_bed_test1", 1700, 550},
  4060. {FURNITURE_BEDROOM, "kb_bed_test2", 1701, 550},
  4061. {FURNITURE_BEDROOM, "MED_BED_3", 1745, 550},
  4062. {FURNITURE_BEDROOM, "LOW_BED_2", 1793, 550},
  4063. {FURNITURE_BEDROOM, "LOW_BED_3", 1794, 550},
  4064. {FURNITURE_BEDROOM, "SWANK_BED_2", 1795, 550},
  4065. {FURNITURE_BEDROOM, "LOW_BED_4", 1796, 550},
  4066. {FURNITURE_BEDROOM, "SWANK_BED_3", 1797, 550},
  4067. {FURNITURE_BEDROOM, "SWANK_BED_1", 1798, 550},
  4068. {FURNITURE_BEDROOM, "MED_BED_4", 1799, 550},
  4069. {FURNITURE_BEDROOM, "LOW_BED_1", 1800, 550},
  4070. {FURNITURE_BEDROOM, "SWANK_BED_4", 1801, 550},
  4071. {FURNITURE_BEDROOM, "MED_BED_2", 1802, 550},
  4072. {FURNITURE_BEDROOM, "LOW_BED_5", 1812, 550},
  4073. {FURNITURE_BEDROOM, "SWANK_BED_5", 2090, 550},
  4074. {FURNITURE_BEDROOM, "SWANK_BED_7", 2298, 550},
  4075. {FURNITURE_BEDROOM, "SWANK_BED_6", 2299, 550},
  4076. {FURNITURE_BEDROOM, "MED_BED_8", 2300, 550},
  4077. {FURNITURE_BEDROOM, "MED_BED_9", 2301, 550},
  4078. {FURNITURE_BEDROOM, "LOW_BED_06", 2302, 550},
  4079. {FURNITURE_CABINETS, "SWANK_CABINET_3", 1730, 550},
  4080. {FURNITURE_CABINETS, "LOW_CABINET_3", 1740, 1000},
  4081. {FURNITURE_CABINETS, "LOW_CABINET_1", 1741, 1000},
  4082. {FURNITURE_CABINETS, "MED_CABINET_3", 1743, 550},
  4083. {FURNITURE_CABINETS, "SWANK_CABINET_1", 2078, 550},
  4084. {FURNITURE_CABINETS, "MED_CABINET_1", 2084, 2000},
  4085. {FURNITURE_CABINETS, "MED_CABINET_2", 2087, 2500},
  4086. {FURNITURE_CABINETS, "LOW_CABINET_4", 2088, 550},
  4087. {FURNITURE_CABINETS, "SWANK_CABINET_2", 2089, 400},
  4088. {FURNITURE_CABINETS, "SWANK_CABINET_4", 2094, 1000},
  4089. {FURNITURE_CABINETS, "LOW_CABINET_2", 2095, 550},
  4090. {FURNITURE_CABINETS, "MED_OFFICE8_CABINET", 2204, 1000},
  4091. {FURNITURE_CABINETS, "SWANK_CABINET_4D", 2306, 550},
  4092. {FURNITURE_CABINETS, "SWANK_CABINET_4b", 2307, 550},
  4093. {FURNITURE_CABINETS, "LOW_CABINET_1_S", 2328, 550},
  4094. {FURNITURE_CABINETS, "LOW_CABINET_1_L", 2329, 400},
  4095. {FURNITURE_CABINETS, "ZEROWARDROBE", 14556, 2000},
  4096. {FURNITURE_ELECTRIC, "LCDTVBig1", 19786, 10000},
  4097. {FURNITURE_ELECTRIC, "LCDTV1", 19787, 8000},
  4098. {FURNITURE_ELECTRIC, "Telephone1", 19807, 500},
  4099. {FURNITURE_ELECTRIC, "Keyboard1", 19808, 500},
  4100. {FURNITURE_ELECTRIC, "TV_WARD_Low", 2093, 6000},
  4101. {FURNITURE_ELECTRIC, "TV_UNIT_1", 2296, 5500},
  4102. {FURNITURE_ELECTRIC, "TV_UNIT_1", 2297, 2000},
  4103. {FURNITURE_ELECTRIC, "tv_stand_driv", 14532, 550},
  4104. {FURNITURE_ELECTRIC, "DYN_TV", 1429, 550},
  4105. {FURNITURE_ELECTRIC, "LOW_TV_2", 1747, 550},
  4106. {FURNITURE_ELECTRIC, "LOW_TV_3", 1748, 550},
  4107. {FURNITURE_ELECTRIC, "MED_TV_3", 1749, 550},
  4108. {FURNITURE_ELECTRIC, "MED_TV_2", 1750, 550},
  4109. {FURNITURE_ELECTRIC, "MED_TV_4", 1751, 550},
  4110. {FURNITURE_ELECTRIC, "SWANK_TV_3", 1752, 550},
  4111. {FURNITURE_ELECTRIC, "SWANK_TV_4", 1786, 550},
  4112. {FURNITURE_ELECTRIC, "CJ_Sphere_TV", 2224, 550},
  4113. {FURNITURE_ELECTRIC, "PHOTOCOPIER_1", 2186, 2000},
  4114. {FURNITURE_ELECTRIC, "PHOTOCOPIER_2", 2202, 4500},
  4115. {FURNITURE_ELECTRIC, "DYN_FF_TILL", 1514, 400},
  4116. {FURNITURE_ELECTRIC, "CJ_FF_TILL", 2422, 4500},
  4117. {FURNITURE_ELECTRIC, "PC_1", 2190, 550},
  4118. {FURNITURE_ELECTRIC, "CJ_WATERCOOLER2", 1808, 400},
  4119. {FURNITURE_ELECTRIC, "water_coolnu", 2002, 1000},
  4120. {FURNITURE_ELECTRIC, "washer", 1208, 550},
  4121. {FURNITURE_ELECTRIC, "DYN_BAR_B_Q", 1481, 400},
  4122. {FURNITURE_ELECTRIC, "gym_treadmill", 2627, 12000},
  4123. {FURNITURE_ELECTRIC, "gym_bench2", 2628, 400},
  4124. {FURNITURE_ELECTRIC, "gym_bench1", 2629, 400},
  4125. {FURNITURE_ELECTRIC, "gym_bike", 2630, 400},
  4126. {FURNITURE_ELECTRIC, "snesish", 1718, 2000},
  4127. {FURNITURE_ELECTRIC, "LOW_CONSOLE", 1719, 2000},
  4128. {FURNITURE_ELECTRIC, "SWANK_CONSOLE", 2028, 550},
  4129. {FURNITURE_ELECTRIC, "MED_VIDEO_2", 1782, 1000},
  4130. {FURNITURE_ELECTRIC, "SWANK_VIDEO_2", 1783, 1000},
  4131. {FURNITURE_ELECTRIC, "LOW_VIDEO_1", 1785, 1000},
  4132. {FURNITURE_ELECTRIC, "SWANK_VIDEO_1", 1788, 1000},
  4133. {FURNITURE_ELECTRIC, "SWANK_VIDEO_3", 1790, 1000},
  4134. {FURNITURE_ELECTRIC, "LOW_HI_FI_2", 2102, 550},
  4135. {FURNITURE_ELECTRIC, "LOW_HI_FI_1", 2103, 550},
  4136. {FURNITURE_ELECTRIC, "LOW_HI_FI_3", 2226, 2500},
  4137. {FURNITURE_ELECTRIC, "MED_HI_FI_1", 2099, 400},
  4138. {FURNITURE_ELECTRIC, "MED_HI_FI_2", 2100, 400},
  4139. {FURNITURE_ELECTRIC, "MED_HI_FI_3", 2101, 400},
  4140. {FURNITURE_ELECTRIC, "SWANK_SPEAKER", 2229, 4500},
  4141. {FURNITURE_ELECTRIC, "SWANK_SPEAKER_2", 2230, 400},
  4142. {FURNITURE_ELECTRIC, "SWANK_SPEAKER_3", 2231, 400},
  4143. {FURNITURE_ELECTRIC, "MED_SPEAKER_4", 2232, 400},
  4144. {FURNITURE_PLANTS, "veg_palmkb1", 625, 2000},
  4145. {FURNITURE_PLANTS, "veg_palmkb2", 626, 2000},
  4146. {FURNITURE_PLANTS, "veg_palmkb3", 627, 2000},
  4147. {FURNITURE_PLANTS, "veg_palmkb4", 628, 2000},
  4148. {FURNITURE_PLANTS, "veg_palmkb8", 630, 2000},
  4149. {FURNITURE_PLANTS, "veg_palmkb9", 631, 2000},
  4150. {FURNITURE_PLANTS, "veg_palmkb7", 632, 2000},
  4151. {FURNITURE_PLANTS, "veg_palmkb10", 633, 2000},
  4152. {FURNITURE_PLANTS, "kb_planter+bush", 638, 2000},
  4153. {FURNITURE_PLANTS, "pot_02", 644, 2000},
  4154. {FURNITURE_PLANTS, "veg_palmkb14", 646, 2000},
  4155. {FURNITURE_PLANTS, "Plant_Pot_10", 948, 2000},
  4156. {FURNITURE_PLANTS, "Plant_Pot_4", 949, 2000},
  4157. {FURNITURE_PLANTS, "Plant_Pot_12", 950, 2000},
  4158. {FURNITURE_PLANTS, "CJ_BUSH_PROP3", 1360, 2000},
  4159. {FURNITURE_PLANTS, "CJ_BUSH_PROP2", 1361, 2000},
  4160. {FURNITURE_PLANTS, "CJ_BUSH_PROP", 1364, 2000},
  4161. {FURNITURE_PLANTS, "nu_plant_ofc", 2001, 200},
  4162. {FURNITURE_PLANTS, "nu_plant3_ofc", 2010, 200},
  4163. {FURNITURE_PLANTS, "nu_plant2_ofc", 2011, 200},
  4164. {FURNITURE_PLANTS, "Plant_Pot_2", 2194, 200},
  4165. {FURNITURE_PLANTS, "Plant_Pot_3", 2195, 200},
  4166. {FURNITURE_PLANTS, "Plant_Pot_1", 2203, 100},
  4167. {FURNITURE_PLANTS, "Plant_Pot_8", 2240, 500},
  4168. {FURNITURE_PLANTS, "Plant_Pot_5", 2241, 200},
  4169. {FURNITURE_PLANTS, "Plant_Pot_7", 2242, 200},
  4170. {FURNITURE_PLANTS, "Plant_Pot_9", 2244, 200},
  4171. {FURNITURE_PLANTS, "Plant_Pot_11", 2245, 200},
  4172. {FURNITURE_PLANTS, "Plant_Pot_14", 2246, 200},
  4173. {FURNITURE_PLANTS, "Plant_Pot_16", 2248, 200},
  4174. {FURNITURE_PLANTS, "Plant_Pot_21", 2252, 200},
  4175. {FURNITURE_PLANTS, "Plant_Pot_22", 2253, 2000},
  4176. {FURNITURE_PLANTS, "GB_romanpot01", 2811, 2000},
  4177. {FURNITURE_PLANTS, "sfx_plant03", 3802, 2000},
  4178. {FURNITURE_PLANTS, "sfx_winplant07", 3806, 2000},
  4179. {FURNITURE_PLANTS, "sfx_plant04", 3810, 2000},
  4180. {FURNITURE_TRASH, "CJ_Dump1_LOW01", 1430, 1500},
  4181. {FURNITURE_TRASH, "DYN_DUMPSTER", 1415, 1000},
  4182. {FURNITURE_TRASH, "CJ_HIPPO_BIN", 1371, 2000},
  4183. {FURNITURE_TRASH, "CJ_BIN1", 1359, 1500},
  4184. {FURNITURE_TRASH, "CJ_WASTEBIN", 1347, 500},
  4185. {FURNITURE_TRASH, "BinNt09_LA", 1339, 1500},
  4186. {FURNITURE_TRASH, "BinNt07_LA", 1337, 1500},
  4187. {FURNITURE_TRASH, "bin1", 1300, 1500},
  4188. {FURNITURE_TRASH, "wastebin", 1235, 1000},
  4189. {FURNITURE_TRASH, "BinNt14_LA", 1330, 1000},
  4190. {FURNITURE_TRASH, "BinNt13_LA", 1329, 1000},
  4191. {FURNITURE_TRASH, "BinNt10_LA", 1328, 1500},
  4192. {FURNITURE_TRASH, "dump1", 1227, 400},
  4193. {FURNITURE_TRASH, "BinNt06_LA", 1336, 2000},
  4194. {FURNITURE_TRASH, "BinNt04_LA", 1334, 2000},
  4195. {FURNITURE_TRASH, "BinNt03_LA", 1333, 2000},
  4196. {FURNITURE_TRASH, "TrashcanChicken", 2770, 2000},
  4197. {FURNITURE_TRASH, "CJ_FF_BUCKET", 2420, 2000},
  4198. {FURNITURE_TRASH, "gunbox", 1271, 400},
  4199. {FURNITURE_TRASH, "k_smashboxes", 2971, 550},
  4200. {FURNITURE_TRASH, "temp_cardbox", 2900, 500},
  4201. {FURNITURE_TRASH, "cardboardbox4", 1221, 500},
  4202. {FURNITURE_TRASH, "cardboardbox2", 1220, 500},
  4203. {FURNITURE_DOORS, "GenDoorINT04Static", 19802, 1000},
  4204. {FURNITURE_DOORS, "Gen_doorEXT03", 1498, 1600},
  4205. {FURNITURE_DOORS, "chinaTgate", 2930, 1400},
  4206. {FURNITURE_DOORS, "kmb_petroldoor", 2911, 1600},
  4207. {FURNITURE_DOORS, "ad_flatdoor", 3061, 500},
  4208. {FURNITURE_DOORS, "Gen_wardrobe", 1567, 600},
  4209. {FURNITURE_DOORS, "Gen_doorINT01", 1491, 400},
  4210. {FURNITURE_DOORS, "Gen_doorINT02", 1492, 400},
  4211. {FURNITURE_DOORS, "Gen_doorSHOP01", 1493, 400},
  4212. {FURNITURE_DOORS, "Gen_doorINT03", 1494, 400},
  4213. {FURNITURE_DOORS, "Gen_doorEXT01", 1495, 400},
  4214. {FURNITURE_DOORS, "Gen_doorSHOP02", 1496, 400},
  4215. {FURNITURE_DOORS, "Gen_doorEXT02", 1497, 400},
  4216. {FURNITURE_DOORS, "Gen_doorEXT03", 1498, 400},
  4217. {FURNITURE_DOORS, "Gen_doorINT05", 1499, 400},
  4218. {FURNITURE_DOORS, "Gen_doorEXT05", 1500, 400},
  4219. {FURNITURE_DOORS, "Gen_doorEXT04", 1501, 400},
  4220. {FURNITURE_DOORS, "Gen_doorINT04", 1502, 400},
  4221. {FURNITURE_DOORS, "Gen_doorEXT06", 1504, 400},
  4222. {FURNITURE_DOORS, "Gen_doorEXT07", 1505, 400},
  4223. {FURNITURE_DOORS, "Gen_doorEXT08", 1506, 400},
  4224. {FURNITURE_DOORS, "Gen_doorEXT09", 1507, 400},
  4225. {FURNITURE_DOORS, "Gen_doorEXT10", 1523, 400},
  4226. {FURNITURE_DOORS, "vgsEspdr01", 8957, 2500},
  4227. {FURNITURE_DOORS, "vgwspry1", 7891, 2000},
  4228. {FURNITURE_DOORS, "imy_la_door", 3109, 400},
  4229. {FURNITURE_DOORS, "ab_casdorLok", 3089, 3000},
  4230. {FURNITURE_DOORS, "ad_flatdoor", 3061, 550},
  4231. {FURNITURE_DOORS, "warehouse_door2b", 3037, 2000},
  4232. {FURNITURE_DOORS, "cr1_door", 3029, 550},
  4233. {FURNITURE_DOORS, "dts_bbdoor", 2970, 550},
  4234. {FURNITURE_DOORS, "kmb_lockeddoor", 2949, 400},
  4235. {FURNITURE_DOORS, "cr_door_02", 2948, 400},
  4236. {FURNITURE_DOORS, "cr_door_01", 2947, 400},
  4237. {FURNITURE_DOORS, "cr_door_03", 2946, 400},
  4238. {FURNITURE_DOORS, "freight_SFW_door", 2944, 550},
  4239. {FURNITURE_DOORS, "newtowerdoor1", 977, 550},
  4240. {FURNITURE_CARPETS, "man_sdr_rug", 1828, 1000},
  4241. {FURNITURE_CARPETS, "gb_livingrug01", 2815, 1000},
  4242. {FURNITURE_CARPETS, "gb_bedrug01", 2817, 1000},
  4243. {FURNITURE_CARPETS, "gb_bedrug02", 2818, 1000},
  4244. {FURNITURE_CARPETS, "gb_livingrug02", 2833, 1000},
  4245. {FURNITURE_CARPETS, "gb_livingrug03", 2834, 1000},
  4246. {FURNITURE_CARPETS, "gb_livingrug04", 2835, 1000},
  4247. {FURNITURE_CARPETS, "gb_livingrug05", 2836, 1000},
  4248. {FURNITURE_CARPETS, "gb_bedrug03", 2841, 1000},
  4249. {FURNITURE_CARPETS, "gb_bedrug04", 2842, 1000},
  4250. {FURNITURE_CARPETS, "gb_bedrug05", 2847, 1000},
  4251. {FURNITURE_CARPETS, "gym_mat1", 2631, 1000},
  4252. {FURNITURE_CARPETS, "gym_mat02", 2632, 1000},
  4253. {FURNITURE_FRAMES, "SAMPPicture1", 19172, 500},
  4254. {FURNITURE_FRAMES, "Frame_2", 2289, 1000},
  4255. {FURNITURE_FRAMES, "Frame_3", 2288, 1000},
  4256. {FURNITURE_FRAMES, "Frame_4", 2287, 1000},
  4257. {FURNITURE_FRAMES, "Frame_5", 2286, 1000},
  4258. {FURNITURE_FRAMES, "Frame_1", 2285, 1000},
  4259. {FURNITURE_FRAMES, "Frame_6", 2284, 1000},
  4260. {FURNITURE_FRAMES, "Frame_Thick_3", 2283, 100},
  4261. {FURNITURE_FRAMES, "Frame_Thick_4", 2282, 100},
  4262. {FURNITURE_FRAMES, "Frame_Thick_5", 2281, 100},
  4263. {FURNITURE_FRAMES, "Frame_Thick_1", 2280, 100},
  4264. {FURNITURE_FRAMES, "Frame_Thick_6", 2279, 100},
  4265. {FURNITURE_FRAMES, "Frame_Thick_2", 2278, 100},
  4266. {FURNITURE_FRAMES, "Frame_Fab_2", 2277, 100},
  4267. {FURNITURE_FRAMES, "Frame_Fab_3", 2276, 100},
  4268. {FURNITURE_FRAMES, "Frame_Fab_4", 2275, 100},
  4269. {FURNITURE_FRAMES, "Frame_Fab_6", 2274, 100},
  4270. {FURNITURE_FRAMES, "Frame_Fab_1", 2273, 100},
  4271. {FURNITURE_FRAMES, "Frame_Fab_5", 2272, 100},
  4272. {FURNITURE_FRAMES, "Frame_WOOD_1", 2271, 100},
  4273. {FURNITURE_FRAMES, "Frame_WOOD_6", 2270, 100},
  4274. {FURNITURE_FRAMES, "Frame_WOOD_4", 2269, 100},
  4275. {FURNITURE_FRAMES, "Frame_WOOD_2", 2268, 100},
  4276. {FURNITURE_FRAMES, "Frame_WOOD_3", 2267, 100},
  4277. {FURNITURE_FRAMES, "Frame_WOOD_5", 2266, 100},
  4278. {FURNITURE_FRAMES, "Frame_SLIM_6", 2265, 100},
  4279. {FURNITURE_FRAMES, "Frame_SLIM_5", 2264, 100},
  4280. {FURNITURE_FRAMES, "Frame_SLIM_4", 2263, 100},
  4281. {FURNITURE_FRAMES, "Frame_SLIM_3", 2262, 100},
  4282. {FURNITURE_FRAMES, "Frame_SLIM_2", 2261, 100},
  4283. {FURNITURE_FRAMES, "Frame_SLIM_1", 2260, 100},
  4284. {FURNITURE_FRAMES, "Frame_Clip_6", 2259, 100},
  4285. {FURNITURE_FRAMES, "Frame_Clip_5", 2258, 100},
  4286. {FURNITURE_FRAMES, "Frame_Clip_4", 2257, 100},
  4287. {FURNITURE_FRAMES, "Frame_Clip_3", 2256, 100},
  4288. {FURNITURE_FRAMES, "Frame_Clip_2", 2255, 100},
  4289. {FURNITURE_FRAMES, "Frame_Clip_1", 2254, 100},
  4290. //Spraytag
  4291. {FURNITURE_MISC, "Tag [GSF]", 18659, 100},
  4292. {FURNITURE_MISC, "Tag [SBF]", 18660, 100},
  4293. {FURNITURE_MISC, "Tag [VLA]", 18661, 100},
  4294. {FURNITURE_MISC, "Tag [KTB]", 18662, 100},
  4295. {FURNITURE_MISC, "Tag [SFR]", 18663, 100},
  4296. {FURNITURE_MISC, "Tag [TBD]", 18664, 100},
  4297. {FURNITURE_MISC, "Tag [LSV]", 18665, 100},
  4298. {FURNITURE_MISC, "Tag [FYB]", 18666, 100},
  4299. {FURNITURE_MISC, "Tag [RHB]", 18667, 100},
  4300. //
  4301. {FURNITURE_MISC, "Wine Glass", 19818, 300},
  4302. {FURNITURE_MISC, "Cocktail Glass", 19819, 300},
  4303. {FURNITURE_MISC, "Propbeer Glass", 1666, 300},
  4304. {FURNITURE_MISC, "Big Cock", 19823, 300},
  4305. {FURNITURE_MISC, "Red rum", 19820, 300},
  4306. {FURNITURE_MISC, "Vodka", 19821, 300},
  4307. {FURNITURE_MISC, "X.O", 19824, 300},
  4308. {FURNITURE_MISC, "Damaged crate", 924, 300},
  4309. {FURNITURE_MISC, "Top crate", 1355, 300},
  4310. {FURNITURE_MISC, "Empty crate", 19639, 300},
  4311. {FURNITURE_MISC, "Paper Messes", 2674, 300},
  4312. {FURNITURE_MISC, "Fisinh Rod", 18632, 600},
  4313. {FURNITURE_MISC, "Rope1", 19087, 100},
  4314. {FURNITURE_MISC, "CJ_FLAG1", 2047, 100},
  4315. {FURNITURE_MISC, "kmb_packet", 2891, 500},
  4316. {FURNITURE_MISC, "craigpackage", 1279, 1000},
  4317. {FURNITURE_MISC, "drug_white", 1575, 500},
  4318. {FURNITURE_MISC, "drug_orange", 1576, 500},
  4319. {FURNITURE_MISC, "drug_yellow", 1577, 500},
  4320. {FURNITURE_MISC, "drug_green", 1578, 500},
  4321. {FURNITURE_MISC, "drug_blue", 1579, 500},
  4322. {FURNITURE_MISC, "drug_red", 1580, 500},
  4323. {FURNITURE_MISC, "kmb_marijuana", 2901, 2000},
  4324. {FURNITURE_MISC, "grassplant", 3409, 1000},
  4325. {FURNITURE_MISC, "DYN_ASHTRY", 1510, 500},
  4326. {FURNITURE_MISC, "propashtray1", 1665, 500},
  4327. {FURNITURE_MISC, "WoodenStage1", 19608, 2000},
  4328. {FURNITURE_MISC, "DrumKit1", 19609, 1000},
  4329. {FURNITURE_MISC, "Microphone1", 19610, 1000},
  4330. {FURNITURE_MISC, "MicrophoneStand1", 19611, 2000},
  4331. {FURNITURE_MISC, "GuitarAmp1", 19612, 1000},
  4332. {FURNITURE_MISC, "GuitarAmp2", 19613, 2000},
  4333. {FURNITURE_MISC, "GuitarAmp3", 19614, 2000},
  4334. {FURNITURE_MISC, "GuitarAmp4", 19615, 1000},
  4335. {FURNITURE_MISC, "GuitarAmp5", 19616, 1000},
  4336. {FURNITURE_MISC, "GoldRecord1", 19617, 550},
  4337. {FURNITURE_MISC, "CJ_Stags_head", 1736, 2000},
  4338. {FURNITURE_MISC, "CJ_Radiator_old", 1738, 1000},
  4339. {FURNITURE_MISC, "CJ_MOP_PAIL", 1778, 1000},
  4340. {FURNITURE_MISC, "CJ_chambermaid", 1789, 2000},
  4341. {FURNITURE_MISC, "cj_bucket", 2713, 1000},
  4342. {FURNITURE_MISC, "des_blackbags", 16444, 2000},
  4343. {FURNITURE_MISC, "nf_blackboard", 3077, 2000},
  4344. {FURNITURE_MISC, "kmb_dumbbell_L", 3072, 1000},
  4345. {FURNITURE_MISC, "kmb_dumbbell_R", 3071, 1000},
  4346. {FURNITURE_MISC, "portaloo", 2984, 550},
  4347. {FURNITURE_MISC, "CJ_TARGET6", 2056, 500},
  4348. {FURNITURE_MISC, "CJ_TARGET5", 2055, 500},
  4349. {FURNITURE_MISC, "CJ_TARGET4", 2051, 500},
  4350. {FURNITURE_MISC, "CJ_TARGET2", 2050, 500},
  4351. {FURNITURE_MISC, "CJ_TARGET1", 2049, 500},
  4352. {FURNITURE_MISC, "hos_trolley", 1997, 1000},
  4353. {FURNITURE_MISC, "shop_sec_cam", 1886, 1000},
  4354. {FURNITURE_MISC, "nt_firehose_01", 1613, 1000},
  4355. {FURNITURE_MISC, "lsmall_window01", 19325, 2000},
  4356. {FURNITURE_MISC, "window001", 19466, 550},
  4357. {FURNITURE_MISC, "wglasssmash", 1649, 1000},
  4358. {FURNITURE_MISC, "Orange1", 19574, 500},
  4359. {FURNITURE_MISC, "Apple1", 19575, 500},
  4360. {FURNITURE_MISC, "Apple2", 19576, 500},
  4361. {FURNITURE_MISC, "Tomato1", 19577, 500},
  4362. {FURNITURE_MISC, "Banana1", 19578, 500},
  4363. {FURNITURE_MISC, "gb_bedclothes01", 2819, 100},
  4364. {FURNITURE_MISC, "gb_bedclothes02", 2843, 100},
  4365. {FURNITURE_MISC, "gb_bedclothes03", 2844, 100},
  4366. {FURNITURE_MISC, "gb_bedclothes04", 2845, 100},
  4367. {FURNITURE_MISC, "gb_bedclothes05", 2846, 100},
  4368. {FURNITURE_MISC, "GB_platedirty01", 2812, 100},
  4369. {FURNITURE_MISC, "GB_kitchplatecln01", 2822, 100},
  4370. {FURNITURE_MISC, "GB_platedirty02", 2829, 100},
  4371. {FURNITURE_MISC, "GB_platedirty04", 2830, 100},
  4372. {FURNITURE_MISC, "GB_platedirty03", 2831, 100},
  4373. {FURNITURE_MISC, "GB_platedirty05", 2832, 100},
  4374. {FURNITURE_MISC, "GB_kitchplatecln02", 2862, 100},
  4375. {FURNITURE_MISC, "GB_kitchplatecln03", 2863, 100},
  4376. {FURNITURE_MISC, "GB_kitchplatecln04", 2864, 100},
  4377. {FURNITURE_MISC, "GB_kitchplatecln05", 2865, 100},
  4378. {FURNITURE_MISC, "Angel", 3935, 5000},
  4379. {FURNITURE_MISC, "Carter Statue", 14467, 5000},
  4380. {FURNITURE_MISC, "Broken Statue", 2743, 5000},
  4381. {FURNITURE_MISC, "Rocking Horse", 11733, 5000},
  4382. {FURNITURE_MISC, "Clothes Hanger", 2373, 500},
  4383. {FURNITURE_WALL, "wall016", 19368, 450},
  4384. {FURNITURE_WALL, "wall087", 19447, 550},
  4385. {FURNITURE_WALL, "wall015", 19367, 450},
  4386. {FURNITURE_WALL, "wall014", 19366, 550},
  4387. {FURNITURE_WALL, "wall018", 19370, 450},
  4388. {FURNITURE_WALL, "wall010", 19362, 550},
  4389. {FURNITURE_WALL, "wall035", 19387, 450},
  4390. {FURNITURE_WALL, "wall059", 19411, 550},
  4391. {FURNITURE_WALL, "wall017", 19369, 450},
  4392. {FURNITURE_WALL, "wall073", 19433, 550},
  4393. {FURNITURE_WALL, "wall077", 19437, 450},
  4394. {FURNITURE_WALL, "wall040", 19392, 550},
  4395. {FURNITURE_WALL, "wall096", 19456, 450},
  4396. {FURNITURE_WALL, "wall043", 19395, 550},
  4397. {FURNITURE_WALL, "wall037", 19389, 450},
  4398. {FURNITURE_WALL, "wall038", 19390, 550},
  4399. {FURNITURE_WALL, "wall039", 19391, 450},
  4400. {FURNITURE_WALL, "wall041", 19393, 550},
  4401. {FURNITURE_WALL, "wall042", 19394, 450},
  4402. {FURNITURE_WALL, "wall042", 19397, 550},
  4403. {FURNITURE_WALL, "wall044", 19396, 450},
  4404. {FURNITURE_WALL, "wall102", 19462, 550},
  4405. {FURNITURE_WALL, "wall046", 19398, 450},
  4406. {FURNITURE_WALL, "wall024", 19376, 550},
  4407. {FURNITURE_WALL, "wall105", 19465, 450},
  4408. {FURNITURE_WALL, "wall020", 19372, 550},
  4409. {FURNITURE_WALL, "wall104", 19464, 450},
  4410. {FURNITURE_SPECIAL, "Chemistry Dryer", 3287, 1200},
  4411. {FURNITURE_SPECIAL, "Centrifuge", 19830, 3500},
  4412. {FURNITURE_SPECIAL, "Mixer", 19585, 2500},
  4413. {FURNITURE_SPECIAL, "Reactor", 2360, 2000},
  4414. {FURNITURE_SPECIAL, "Dehydrater", 2002, 900},
  4415. {FURNITURE_SPECIAL, "Pickup Pump", 1244, 6000},
  4416. {FURNITURE_SPECIAL, "Pickup Pump (Small)", 1008, 1000},
  4417. {FURNITURE_SPECIAL, "Bike Pedal", 2798, 500},
  4418. {FURNITURE_SPECIAL, "Long Exhaust", 1114, 700},
  4419. {FURNITURE_EFFECT, "Smoke Flare", 18728, 3000},
  4420. {FURNITURE_EFFECT, "Puke", 18722, 3000},
  4421. {FURNITURE_EFFECT, "Molotov Fire", 18701, 3000},
  4422. {FURNITURE_EFFECT, "Coke Trail", 18676, 3000},
  4423. {FURNITURE_EFFECT, "Cam Flash (Once)", 18670, 3000},
  4424. {FURNITURE_EFFECT, "Flasher", 345, 3000}
  4425. };
  4426. enum landEnum
  4427. {
  4428. fCategory[24],
  4429. fName[32],
  4430. fModel,
  4431. fPrice
  4432. };
  4433. new const landCategories[][] =
  4434. {
  4435. {"Appliances"},
  4436. {"Bathroom"},
  4437. {"Bedroom"},
  4438. {"Carpets"},
  4439. {"Kitchen"},
  4440. {"Tables"},
  4441. {"Chairs"},
  4442. {"Posters/Frames"},
  4443. {"Storage"},
  4444. {"Plants"},
  4445. {"Trash"},
  4446. {"Doors & Gates"},
  4447. {"Walls"},
  4448. {"Decor"},
  4449. {"Weapons"}
  4450. };
  4451. new const landArray[][landEnum] =
  4452. {
  4453. {"Appliances", "Blender", 19830, 500},
  4454. {"Appliances", "Coffee machine", 11743, 500},
  4455. {"Appliances", "Grill", 19831, 500},
  4456. {"Appliances", "Electrical outlet", 19813, 50},
  4457. {"Appliances", "Light switch", 19829, 50},
  4458. {"Appliances", "Keyboard", 19808, 50},
  4459. {"Appliances", "White telephone", 19807, 50},
  4460. {"Appliances", "Black telephone", 11705, 50},
  4461. {"Appliances", "Large LCD television", 19786, 1000},
  4462. {"Appliances", "Small LCD television", 19787, 750},
  4463. {"Appliances", "Round gold TV", 2224, 1500},
  4464. {"Appliances", "TV on wheels", 14532, 250},
  4465. {"Appliances", "Flat screen TV", 1792, 400},
  4466. {"Appliances", "Wide screen TV", 1786, 400},
  4467. {"Appliances", "Surveillance TV", 1749, 400},
  4468. {"Appliances", "Regular TV", 1518, 250},
  4469. {"Appliances", "Grey sided TV", 2322, 200},
  4470. {"Appliances", "Wood sided TV", 1429, 200},
  4471. {"Appliances", "Microwave", 2149, 100},
  4472. {"Appliances", "Pizza rack", 2453, 50},
  4473. {"Appliances", "Wide sprunk fridge", 2452, 100},
  4474. {"Appliances", "Small sprunk fridge", 2533, 50},
  4475. {"Appliances", "Duality game", 2779, 500},
  4476. {"Appliances", "Bee Bee Gone game", 2778, 500},
  4477. {"Appliances", "Space Monkeys game", 2681, 500},
  4478. {"Appliances", "Sprunk machine", 1775, 1000},
  4479. {"Appliances", "Candy machine", 1776, 1000},
  4480. {"Appliances", "Water machine", 1808, 100},
  4481. {"Appliances", "Radiator", 1738, 50},
  4482. {"Appliances", "Metal fridge", 1780, 100},
  4483. {"Appliances", "Pizza cooker", 2426, 50},
  4484. {"Appliances", "Deep fryer", 2415, 100},
  4485. {"Appliances", "Soda dispenser", 2427, 100},
  4486. {"Appliances", "Aluminum stove", 2417, 100},
  4487. {"Appliances", "Lamp", 2105, 50},
  4488. {"Appliances", "Diagnostic machine", 19903, 4000},
  4489. {"Appliances", "VHS player", 1785, 200},
  4490. {"Appliances", "Playstation console", 2028, 500},
  4491. {"Appliances", "Retro gaming console", 1718, 500},
  4492. {"Appliances", "Hi-Fi speaker", 1839, 250},
  4493. {"Appliances", "Black subwoofer", 2232, 250},
  4494. {"Appliances", "Subwoofer", 1840, 250},
  4495. {"Appliances", "Small black speaker", 2229, 250},
  4496. {"Appliances", "Speaker on a stand", 2233, 100},
  4497. {"Appliances", "Speaker & stereo system", 2099, 500},
  4498. {"Appliances", "Surveillance camera", 1886, 50},
  4499. {"Appliances", "Security camera", 1622, 50},
  4500. {"Appliances", "Exercise bike", 2630, 500},
  4501. {"Appliances", "Treadmill", 2627, 500},
  4502. {"Appliances", "Lift bench", 2629, 250},
  4503. {"Appliances", "Pull up machine", 2628, 500},
  4504. {"Appliances", "White turntable", 1954, 500},
  4505. {"Appliances", "Open laptop", 19893, 1000},
  4506. {"Appliances", "Closed laptop", 19894, 500},
  4507. {"Appliances", "Drum Kit", 19609, 1000},
  4508. {"Appliances", "Microphone", 19610, 500},
  4509. {"Appliances", "Microphone Stand", 19611, 250},
  4510. {"Appliances", "Guitar amp 1", 19612, 500},
  4511. {"Appliances", "Guitar amp 2", 19613, 500},
  4512. {"Appliances", "Guitar amp 3", 19614, 500},
  4513. {"Appliances", "Guitar amp 4", 19615, 500},
  4514. {"Appliances", "Guitar amp 5", 19616, 500},
  4515. {"Bathroom", "Toilet", 2514, 250},
  4516. {"Bathroom", "Bathtub", 2519, 500},
  4517. {"Bathroom", "Toilet paper", 19873, 50},
  4518. {"Bathroom", "Towel rack", 11707, 100},
  4519. {"Bathroom", "Toilet with rug", 2528, 500},
  4520. {"Bathroom", "Toilet with rolls", 2525, 500},
  4521. {"Bathroom", "Sink top", 2515, 100},
  4522. {"Bathroom", "Dual sink top", 2150, 200},
  4523. {"Bathroom", "Wood sided bathtub", 2526, 500},
  4524. {"Bathroom", "Sprunk bathtub", 2097, 1000},
  4525. {"Bathroom", "Shower curtains", 14481, 100},
  4526. {"Bathroom", "Metal shower cabin", 2520, 500},
  4527. {"Bathroom", "Glass shower cabin", 2517, 500},
  4528. {"Bathroom", "Shower with curtains", 2527, 500},
  4529. {"Bathroom", "Wall sink", 2518, 250},
  4530. {"Bathroom", "Plain sink", 2739, 250},
  4531. {"Bathroom", "Sink with extra soap", 2524, 250},
  4532. {"Bathroom", "Sink with rug", 2523, 250},
  4533. {"Bathroom", "Industrial sink", 11709, 500},
  4534. {"Bedroom", "Prison bed", 1800, 100},
  4535. {"Bedroom", "Folding bed", 1812, 100},
  4536. {"Bedroom", "Red double bed", 11720, 500},
  4537. {"Bedroom", "Wood double bed", 14866, 500},
  4538. {"Bedroom", "Double plaid bed", 1794, 500},
  4539. {"Bedroom", "Brown bed", 2299, 500},
  4540. {"Bedroom", "Blue striped bed", 2302, 500},
  4541. {"Bedroom", "Dark blue striped bed", 2298, 500},
  4542. {"Bedroom", "White striped bed", 2090, 500},
  4543. {"Bedroom", "Bed with cabinet", 2300, 500},
  4544. {"Bedroom", "Pink & blue striped bed", 2301, 500},
  4545. {"Bedroom", "Zebra print bed", 14446, 500},
  4546. {"Bedroom", "Low striped bed", 1795, 500},
  4547. {"Bedroom", "Low dark striped bed", 1798, 500},
  4548. {"Bedroom", "Single plaid bed", 1796, 500},
  4549. {"Bedroom", "Plain striped mattress", 1793, 500},
  4550. {"Bedroom", "Silk sheeted bed", 1701, 500},
  4551. {"Bedroom", "Framed striped bed", 1801, 500},
  4552. {"Bedroom", "Framed brown bed", 1802, 500},
  4553. {"Bedroom", "Wooden cabinet", 2330, 250},
  4554. {"Bedroom", "Cabinet with TV", 2296, 500},
  4555. {"Bedroom", "Dresser", 1416, 250},
  4556. {"Bedroom", "Small dresser", 2095, 250},
  4557. {"Bedroom", "Medium dresser", 1743, 250},
  4558. {"Bedroom", "Wide dresser", 2087, 250},
  4559. {"Bedroom", "Small wardrobe", 2307, 250},
  4560. {"Bedroom", "Huge open wardrobe", 14556, 500},
  4561. {"Bedroom", "Busted cabinet", 913, 500},
  4562. {"Bedroom", "Busted dresser", 911, 250},
  4563. {"Bedroom", "Dresser with no drawers", 912, 100},
  4564. {"Carpets", "Rockstar carpet", 11737, 250},
  4565. {"Carpets", "Plain red carpet", 2631, 250},
  4566. {"Carpets", "Plain green carpet", 2632, 250},
  4567. {"Carpets", "Patterned carpet", 2842, 250},
  4568. {"Carpets", "Zig-zag patterned carpet", 2836, 250},
  4569. {"Carpets", "Brown red striped carpet", 2847, 250},
  4570. {"Carpets", "Old timer's carpet", 2833, 250},
  4571. {"Carpets", "Red checkered carpet", 2818, 250},
  4572. {"Carpets", "Green circled carpet", 2817, 250},
  4573. {"Carpets", "Plain polkadot carpet", 2834, 250},
  4574. {"Carpets", "Tiger rug", 1828, 1000},
  4575. {"Carpets", "Plain round rug", 2835, 250},
  4576. {"Carpets", "Round green rug", 2841, 250},
  4577. {"Kitchen", "CJ's kitchen", 14384, 3000},
  4578. {"Kitchen", "Whole kitchen", 14720, 3000},
  4579. {"Kitchen", "White kitchen sink", 2132, 500},
  4580. {"Kitchen", "White kitchen counter", 2134, 500},
  4581. {"Kitchen", "White kitchen fridge", 2131, 500},
  4582. {"Kitchen", "White kitchen drawers", 2133, 500},
  4583. {"Kitchen", "White kitchen corner", 2341, 500},
  4584. {"Kitchen", "White kitchen cupboard", 2141, 500},
  4585. {"Kitchen", "Green kitchen sink", 2336, 500},
  4586. {"Kitchen", "Green kitchen counter", 2334, 500},
  4587. {"Kitchen", "Green kitchen fridge", 2147, 500},
  4588. {"Kitchen", "Green kitchen corner", 2338, 500},
  4589. {"Kitchen", "Green kitchen washer", 2337, 500},
  4590. {"Kitchen", "Green kitchen cupboard", 2158, 500},
  4591. {"Kitchen", "Green kitchen stove", 2170, 500},
  4592. {"Kitchen", "Red kitchen sink", 2130, 500},
  4593. {"Kitchen", "Red kitchen fridge", 2127, 500},
  4594. {"Kitchen", "Red kitchen cupboard", 2128, 500},
  4595. {"Kitchen", "Red kitchen corner", 2304, 500},
  4596. {"Kitchen", "Red kitchen counter", 2129, 500},
  4597. {"Kitchen", "Wood kitchen sink", 2136, 500},
  4598. {"Kitchen", "Wood kitchen counter", 2139, 500},
  4599. {"Kitchen", "Wood kitchen cupboard", 2140, 500},
  4600. {"Kitchen", "Wood kitchen washer", 2303, 500},
  4601. {"Kitchen", "Wood kitchen unit", 2138, 500},
  4602. {"Kitchen", "Wood kitchen corner", 2305, 500},
  4603. {"Kitchen", "Wood kitchen stove", 2135, 500},
  4604. {"Kitchen", "Modern stove", 19923, 1000},
  4605. {"Kitchen", "Old timer's stove", 19915, 1000},
  4606. {"Kitchen", "Fork", 11715, 50},
  4607. {"Kitchen", "Butter knife", 11716, 50},
  4608. {"Kitchen", "Steak knife", 19583, 50},
  4609. {"Kitchen", "Spatula", 19586, 50},
  4610. {"Kitchen", "Double handled pan", 19585, 100},
  4611. {"Kitchen", "Single handled pan", 19584, 100},
  4612. {"Kitchen", "Frying pan", 19581, 100},
  4613. {"Kitchen", "Tall striped saucepan", 11719, 100},
  4614. {"Kitchen", "Striped saucepan", 11718, 100},
  4615. {"Kitchen", "Cooked steak", 19882, 50},
  4616. {"Kitchen", "Raw steak", 19582, 50},
  4617. {"Kitchen", "Green apple", 19576, 50},
  4618. {"Kitchen", "Red apple", 19575, 50},
  4619. {"Kitchen", "Orange", 19574, 50},
  4620. {"Kitchen", "Banana", 19578, 50},
  4621. {"Kitchen", "Tomato", 19577, 50},
  4622. {"Tables", "Lab table", 3383, 2000},
  4623. {"Tables", "Pool table", 2964, 2000},
  4624. {"Tables", "Blackjack table", 2188, 2000},
  4625. {"Tables", "Betting table", 1824, 2000},
  4626. {"Tables", "Roulette table", 1896, 2000},
  4627. {"Tables", "Poker table", 19474, 1000},
  4628. {"Tables", "Burger shot table", 2644, 500},
  4629. {"Tables", "Cluckin' bell table", 2763, 500},
  4630. {"Tables", "Wide cluckin' bell table", 2762, 500},
  4631. {"Tables", "Square coffee table", 2370, 500},
  4632. {"Tables", "Donut shop table", 2747, 500},
  4633. {"Tables", "Pizza table", 2764, 500},
  4634. {"Tables", "Wide coffee table", 2319, 500},
  4635. {"Tables", "Rectangular green table", 11691, 500},
  4636. {"Tables", "Squared green table", 11690, 500},
  4637. {"Tables", "Round glass table", 1827, 500},
  4638. {"Tables", "Round wooden table", 2111, 500},
  4639. {"Tables", "Wide dining table", 2357, 500},
  4640. {"Tables", "Plain wooden table", 2115, 500},
  4641. {"Tables", "Plain brown wooden table", 1516, 500},
  4642. {"Tables", "White polkadot table", 1770, 500},
  4643. {"Tables", "Brown dining table", 1737, 500},
  4644. {"Tables", "Round stone table", 2030, 500},
  4645. {"Tables", "Wooden table with rim", 2699, 500},
  4646. {"Tables", "Low coffee table", 1814, 500},
  4647. {"Tables", "Low brown wooden table", 1433, 500},
  4648. {"Tables", "Bedroom table", 2333, 500},
  4649. {"Tables", "Round table with chairs", 1432, 500},
  4650. {"Tables", "Table with benches", 1281, 500},
  4651. {"Tables", "Checkered table & chairs", 1594, 500},
  4652. {"Tables", "Wooden workshop table", 19922, 500},
  4653. {"Tables", "Hexagon shaped table", 2725, 500},
  4654. {"Tables", "Table with VCR", 2313, 500},
  4655. {"Tables", "Low wooden TV stand", 2314, 500},
  4656. {"Tables", "Low brown TV stand", 2315, 500},
  4657. {"Tables", "Plain brown office desk", 2206, 500},
  4658. {"Tables", "Office desk with computer", 2181, 1000},
  4659. {"Tables", "Plain wooden office desk", 2185, 1000},
  4660. {"Tables", "Computer desk", 2008, 1000},
  4661. {"Chairs", "Blue swivel chair", 2356, 250},
  4662. {"Chairs", "Brown dining chair", 1811, 250},
  4663. {"Chairs", "Red folding chair", 2121, 250},
  4664. {"Chairs", "Upholstered chair", 2748, 1000},
  4665. {"Chairs", "Folding office chair", 1721, 250},
  4666. {"Chairs", "Round black chair", 2776, 250},
  4667. {"Chairs", "Black stool", 1716, 250},
  4668. {"Chairs", "Brown stool", 2350, 250},
  4669. {"Chairs", "Red stool", 2125, 250},
  4670. {"Chairs", "Tall wooden dining chair", 2124, 250},
  4671. {"Chairs", "Tall brown dining chair", 1739, 250},
  4672. {"Chairs", "Checkered dining chair", 2807, 250},
  4673. {"Chairs", "Plain office chair", 1671, 250},
  4674. {"Chairs", "Brown folding chair", 19996, 250},
  4675. {"Chairs", "Light brown chair", 19994, 250},
  4676. {"Chairs", "Black lounge chair", 1704, 500},
  4677. {"Chairs", "Beige lounge chair", 1705, 500},
  4678. {"Chairs", "Dark blue reclining chair", 1708, 500},
  4679. {"Chairs", "Brown corner chair", 11682, 500},
  4680. {"Chairs", "Old timer's lounge chair", 1711, 500},
  4681. {"Chairs", "Old timer's rocking chair", 1735, 500},
  4682. {"Chairs", "Two chairs and a table", 2571, 500},
  4683. {"Chairs", "Dark brown foot stool", 2293, 500},
  4684. {"Chairs", "Rocking chair", 11734, 250},
  4685. {"Chairs", "Plaid sofa", 1764, 750},
  4686. {"Chairs", "Long black sofa", 1723, 750},
  4687. {"Chairs", "Beige sofa", 1702, 750},
  4688. {"Chairs", "Brown couch", 1757, 750},
  4689. {"Chairs", "Old timer's sofa", 1728, 750},
  4690. {"Chairs", "Brown corner couch piece", 2292, 500},
  4691. {"Chairs", "White & grey couch", 1761, 750},
  4692. {"Chairs", "Patterned couch", 1760, 750},
  4693. {"Chairs", "Plaid couch", 1764, 750},
  4694. {"Chairs", "Dark blue couch", 1768, 750},
  4695. {"Chairs", "Wide brown couch", 2290, 750},
  4696. {"Chairs", "Green couch", 1766, 750},
  4697. {"Chairs", "Patterned armrest couch", 1763, 750},
  4698. {"Chairs", "Red couch", 11717, 750},
  4699. {"Chairs", "Very wide beige couch", 1710, 1500},
  4700. {"Chairs", "Ultra wide beige couch", 1709, 2000},
  4701. {"Chairs", "Red and white couch", 1707, 750},
  4702. {"Posters/Frames", "Burger shot poster", 2641, 50},
  4703. {"Posters/Frames", "Cluckin' bell poster", 2766, 50},
  4704. {"Posters/Frames", "Wash wands poster", 2685, 50},
  4705. {"Posters/Frames", "For lease poster", 11289, 50},
  4706. {"Posters/Frames", "Monkey juice poster", 19328, 50},
  4707. {"Posters/Frames", "Ring donuts poster", 2715, 50},
  4708. {"Posters/Frames", "Battered ring posterr", 2716, 50},
  4709. {"Posters/Frames", "Pizza poster", 2668, 50},
  4710. {"Posters/Frames", "T-Shirt poster", 2729, 50},
  4711. {"Posters/Frames", "Suburban poster", 2658, 50},
  4712. {"Posters/Frames", "Zip poster", 2736, 50},
  4713. {"Posters/Frames", "Binco poster", 2722, 50},
  4714. {"Posters/Frames", "99c binco poster", 2719, 50},
  4715. {"Posters/Frames", "Binco sale poster", 2721, 50},
  4716. {"Posters/Frames", "Heat poster", 2661, 50},
  4717. {"Posters/Frames", "Eris poster", 2655, 50},
  4718. {"Posters/Frames", "Bobo poster", 2662, 50},
  4719. {"Posters/Frames", "Base 5 poster", 2691, 50},
  4720. {"Posters/Frames", "Base 5 cutout #1", 2693, 50},
  4721. {"Posters/Frames", "Base 5 cutout #2", 2692, 50},
  4722. {"Posters/Frames", "Long base 5 poster #1", 2695, 50},
  4723. {"Posters/Frames", "Long base 5 poster #2", 2696, 50},
  4724. {"Posters/Frames", "White prolaps poster", 2697, 50},
  4725. {"Posters/Frames", "Black prolaps poster", 2656, 50},
  4726. {"Posters/Frames", "San Fierro frame", 19175, 100},
  4727. {"Posters/Frames", "Flint County frame", 19174, 100},
  4728. {"Posters/Frames", "Gant Bridge frame", 19173, 100},
  4729. {"Posters/Frames", "Los Santos frame", 19172, 100},
  4730. {"Posters/Frames", "City View frame", 2289, 100},
  4731. {"Posters/Frames", "Los Angeles frame", 2258, 100},
  4732. {"Posters/Frames", "Wooden frame", 2288, 100},
  4733. {"Posters/Frames", "Sail Boat frame", 2287, 100},
  4734. {"Posters/Frames", "Ship frame", 2286, 100},
  4735. {"Posters/Frames", "Water frame", 2285, 100},
  4736. {"Posters/Frames", "Church frame", 2284, 100},
  4737. {"Posters/Frames", "Rural frame", 2282, 100},
  4738. {"Posters/Frames", "Sunset frame", 2281, 100},
  4739. {"Posters/Frames", "Coast frame", 2280, 100},
  4740. {"Posters/Frames", "Mount chiliad frame", 2279, 100},
  4741. {"Posters/Frames", "Cargo ship frame", 2278, 100},
  4742. {"Posters/Frames", "Cat frame", 2277, 100},
  4743. {"Posters/Frames", "Bridge frame", 2276, 100},
  4744. {"Posters/Frames", "Fruit Bowl frame", 2275, 100},
  4745. {"Posters/Frames", "Flower frame", 2274, 100},
  4746. {"Posters/Frames", "Bouquet frame", 2273, 100},
  4747. {"Posters/Frames", "Landscape frame", 2272, 100},
  4748. {"Posters/Frames", "Paper frame", 2271, 100},
  4749. {"Posters/Frames", "Leaves frame", 2270, 100},
  4750. {"Posters/Frames", "Lake frame", 2269, 100},
  4751. {"Posters/Frames", "Black cat frame", 2268, 100},
  4752. {"Posters/Frames", "Cruise ship frame", 2267, 100},
  4753. {"Posters/Frames", "Night downtown frame", 2266, 100},
  4754. {"Posters/Frames", "Dseert rocks frame", 2265, 100},
  4755. {"Posters/Frames", "Beach frame", 2264, 100},
  4756. {"Posters/Frames", "Dock frame", 2263, 100},
  4757. {"Posters/Frames", "Downtown frame", 2262, 100},
  4758. {"Posters/Frames", "Golden gate frame", 2261, 100},
  4759. {"Posters/Frames", "Old Boat frame", 2260, 100},
  4760. {"Posters/Frames", "Bowling frame", 2259, 100},
  4761. {"Posters/Frames", "Pattern frame", 2283, 100},
  4762. {"Posters/Frames", "Squares frame", 2257, 100},
  4763. {"Posters/Frames", "Palm trees frame", 2256, 100},
  4764. {"Posters/Frames", "Erotic frame", 2255, 100},
  4765. {"Posters/Frames", "Yellow car frame", 2254, 10},
  4766. {"Storage", "Book shelf", 1742, 500},
  4767. {"Storage", "Wardrobe", 2307, 400},
  4768. {"Storage", "Wooden crate", 1217, 150},
  4769. {"Storage", "Metal crate", 964, 150},
  4770. {"Storage", "Wide office cabinet", 2200, 150},
  4771. {"Storage", "Yellow cabinet", 1730, 150},
  4772. {"Storage", "Open gym locker", 11730, 250},
  4773. {"Storage", "Closed gym locker", 11729, 250},
  4774. {"Storage", "Toolbox", 19921, 500},
  4775. {"Storage", "Chest", 19918, 100},
  4776. {"Storage", "Dresser", 2094, 250},
  4777. {"Storage", "Warehouse rack", 3761, 150},
  4778. {"Storage", "Barrel rack", 925, 250},
  4779. {"Storage", "Sex toy rack", 2581, 250},
  4780. {"Storage", "Sex magazine rack #1", 2578, 250},
  4781. {"Storage", "Sex magazine rack #2", 2579, 250},
  4782. {"Storage", "Rack with no shelves", 2509, 250},
  4783. {"Storage", "Rack with 3 shelves", 2482, 250},
  4784. {"Storage", "Rack with 4 shelves", 2475, 250},
  4785. {"Storage", "Small rack", 2463, 250},
  4786. {"Storage", "Wide rack", 2462, 250},
  4787. {"Storage", "Dresser with drawers", 1743, 250},
  4788. {"Storage", "Wide dresser", 2087, 250},
  4789. {"Storage", "Tall dresser", 2088, 250},
  4790. {"Storage", "Brown dresser", 2089, 250},
  4791. {"Storage", "Single dresser", 2095, 250},
  4792. {"Storage", "White filing cabinet", 2197, 250},
  4793. {"Storage", "Green filing cabinet", 2610, 250},
  4794. {"Storage", "Dual filing cabinets", 2007, 250},
  4795. {"Storage", "Black shelf", 2078, 250},
  4796. {"Storage", "Brown shelf", 2204, 250},
  4797. {"Storage", "Tool shelf", 19899, 250},
  4798. {"Storage", "Tool cabinet", 19900, 250},
  4799. {"Storage", "Wall mounted shelf", 19940, 250},
  4800. {"Storage", "Clothes shelf", 2708, 250},
  4801. {"Storage", "Gun rack", 2046, 250},
  4802. {"Storage", "Shop shelf", 19640, 250},
  4803. {"Storage", "Blue office shelf", 2191, 250},
  4804. {"Storage", "Wooden office shelf", 2199, 250},
  4805. {"Storage", "Office book shelf", 2161, 250},
  4806. {"Storage", "Tall office cabinet", 2167, 100},
  4807. {"Storage", "Wide office cabinet", 2163, 100},
  4808. {"Plants", "Palm plant #1", 625, 100},
  4809. {"Plants", "Palm plant #2", 626, 100},
  4810. {"Plants", "Palm plant #3", 627, 100},
  4811. {"Plants", "Palm plant #4", 628, 100},
  4812. {"Plants", "Palm plant #5", 630, 100},
  4813. {"Plants", "Palm plant #6", 631, 100},
  4814. {"Plants", "Palm plant #7", 632, 100},
  4815. {"Plants", "Palm plant #8", 633, 100},
  4816. {"Plants", "Palm plant #9", 646, 100},
  4817. {"Plants", "Palm plant #10", 644, 100},
  4818. {"Plants", "Palm plant #11", 2001, 100},
  4819. {"Plants", "Palm plant #12", 2010, 100},
  4820. {"Plants", "Palm plant #13", 2011, 150},
  4821. {"Plants", "Potted plant #1", 948, 150},
  4822. {"Plants", "Potted plant #2", 949, 150},
  4823. {"Plants", "Potted plant #3", 950, 150},
  4824. {"Plants", "Potted plant #4", 2194, 150},
  4825. {"Plants", "Potted plant #5", 2195, 150},
  4826. {"Plants", "Potted plant #6", 2203, 150},
  4827. {"Plants", "Potted plant #7", 2240, 150},
  4828. {"Plants", "Potted plant #8", 2241, 150},
  4829. {"Plants", "Potted plant #9", 2242, 150},
  4830. {"Plants", "Potted plant #10", 2244, 150},
  4831. {"Plants", "Potted plant #11", 2245, 150},
  4832. {"Plants", "Potted plant #12", 2246, 150},
  4833. {"Plants", "Potted plant #13", 2248, 150},
  4834. {"Plants", "Potted plant #14", 2252, 150},
  4835. {"Plants", "Potted plant #15", 2253, 150},
  4836. {"Plants", "Potted plant #16", 2811, 150},
  4837. {"Plants", "Wide plant", 638, 250},
  4838. {"Plants", "Single bush plant", 1361, 250},
  4839. {"Plants", "Wide bush plant", 1360, 250},
  4840. {"Plants", "Bush plant and bench", 1364, 500},
  4841. {"Plants", "Window plant #1", 3802, 200},
  4842. {"Plants", "Window plant #2", 3810, 200},
  4843. {"Trash", "Wastebin", 11706, 50},
  4844. {"Trash", "Blue trashcan on wheels", 1339, 50},
  4845. {"Trash", "Blue trashcan", 1430, 50},
  4846. {"Trash", "Trashcan with holes", 1359, 50},
  4847. {"Trash", "Cluckin' bell trashcan", 2770, 50},
  4848. {"Trash", "Burger shot trashcan", 2420, 50},
  4849. {"Trash", "Round bagged trashcan", 1330, 50},
  4850. {"Trash", "Round white trashcan", 1329, 50},
  4851. {"Trash", "Metal trashcan", 1328, 50},
  4852. {"Trash", "Full dumpster", 1415, 50},
  4853. {"Trash", "Closed dumpster", 1227, 50},
  4854. {"Trash", "Bottle disposal unit", 1336, 50},
  4855. {"Trash", "Blue dumpster", 1334, 50},
  4856. {"Trash", "Red dumpster", 1333, 50},
  4857. {"Trash", "Hippo trashcan", 1371, 50},
  4858. {"Trash", "Poor trashcan", 1347, 50},
  4859. {"Trash", "Cement trashcan", 1300, 50},
  4860. {"Trash", "Trashcan filled with wood", 1442, 50},
  4861. {"Trash", "Two pallets & trash", 1450, 50},
  4862. {"Trash", "Single pallet", 1448, 50},
  4863. {"Trash", "Garbage bag", 1265, 50},
  4864. {"Trash", "Burger shot bag", 2663, 50},
  4865. {"Trash", "Pile of boxes", 1440, 50},
  4866. {"Trash", "Cardboard box", 1221, 50},
  4867. {"Trash", "Open pizza box", 2860, 50},
  4868. {"Trash", "Takeaway trash", 2866, 50},
  4869. {"Trash", "Burger shot trash", 2840, 50},
  4870. {"Trash", "Dirty dishes #1", 2812, 50},
  4871. {"Trash", "Dirty dishes #2", 2822, 50},
  4872. {"Trash", "Dirty dishes #3", 2829, 50},
  4873. {"Trash", "Dirty dishes #4", 2830, 50},
  4874. {"Trash", "Dirty dishes #5", 2831, 50},
  4875. {"Trash", "Dirty dishes #6", 2832, 50},
  4876. {"Trash", "Clean dishes #1", 2862, 50},
  4877. {"Trash", "Clean dishes #2", 2863, 50},
  4878. {"Trash", "Clean dishes #3", 2864, 50},
  4879. {"Trash", "Clean dishes #4", 2865, 50},
  4880. {"Trash", "Assorted trash #1", 2672, 50},
  4881. {"Trash", "Assorted trash #2", 2677, 50},
  4882. {"Trash", "Assorted trash #3", 2675, 50},
  4883. {"Trash", "Assorted trash #4", 2676, 50},
  4884. {"Trash", "Assorted trash #5", 2674, 50},
  4885. {"Trash", "Assorted trash #6", 2673, 50},
  4886. {"Trash", "Assorted trash #7", 2670, 50},
  4887. {"Doors & Gates", "Door with bars", 2930, 100},
  4888. {"Doors & Gates", "Petrol door", 2911, 100},
  4889. {"Doors & Gates", "Flat door", 3061, 100},
  4890. {"Doors & Gates", "Wardrobe door", 1567, 100},
  4891. {"Doors & Gates", "Green push door", 1492, 100},
  4892. {"Doors & Gates", "Red windowed door", 1493, 100},
  4893. {"Doors & Gates", "Black wooden door", 1494, 100},
  4894. {"Doors & Gates", "Brown windowed door", 3089, 100},
  4895. {"Doors & Gates", "Wooden farm door", 1497, 100},
  4896. {"Doors & Gates", "White wooden door", 1498, 100},
  4897. {"Doors & Gates", "Warehouse door", 1499, 100},
  4898. {"Doors & Gates", "Red door", 1504, 100},
  4899. {"Doors & Gates", "Blue door", 1505, 100},
  4900. {"Doors & Gates", "White door", 1506, 100},
  4901. {"Doors & Gates", "Yellow door", 1507, 100},
  4902. {"Doors & Gates", "Kitchen door", 1523, 100},
  4903. {"Doors & Gates", "Motel door", 1535, 100},
  4904. {"Doors & Gates", "Blue motel door", 2970, 100},
  4905. {"Doors & Gates", "24/7 door", 1560, 100},
  4906. {"Doors & Gates", "Barred door", 3061, 100},
  4907. {"Doors & Gates", "Red motel door", 3029, 100},
  4908. {"Doors & Gates", "Security door", 2949, 100},
  4909. {"Doors & Gates", "Tall white door", 2948, 100},
  4910. {"Doors & Gates", "Bank door", 2946, 100},
  4911. {"Doors & Gates", "Ship door", 2944, 100},
  4912. {"Doors & Gates", "Tower door", 977, 100},
  4913. {"Doors & Gates", "Maintenance doors", 11714, 100},
  4914. {"Doors & Gates", "Dual office door", 19176, 100},
  4915. {"Doors & Gates", "Screen door #1", 1495, 100},
  4916. {"Doors & Gates", "Screen door #2", 1500, 100},
  4917. {"Doors & Gates", "Screen door #3", 1501, 100},
  4918. {"Doors & Gates", "Shop door #1", 1532, 100},
  4919. {"Doors & Gates", "Shop door #2", 1496, 100},
  4920. {"Doors & Gates", "Shop door #3", 1533, 100},
  4921. {"Doors & Gates", "Shop door #4", 1537, 100},
  4922. {"Doors & Gates", "Shop door #5", 1538, 100},
  4923. {"Doors & Gates", "Office door #1", 1566, 100},
  4924. {"Doors & Gates", "Office door #2", 1569, 100},
  4925. {"Doors & Gates", "Office door #3", 1536, 100},
  4926. {"Doors & Gates", "Office door #4", 1557, 100},
  4927. {"Doors & Gates", "Office door #5", 1556, 100},
  4928. {"Doors & Gates", "Wooden push door #1", 1491, 100},
  4929. {"Doors & Gates", "Wooden push door #2", 1502, 100},
  4930. {"Doors & Gates", "Garage door #1", 8957, 100},
  4931. {"Doors & Gates", "Garage door #2", 7891, 100},
  4932. {"Doors & Gates", "Garage door #3", 3037, 100},
  4933. {"Doors & Gates", "Garage door #4", 19861, 100},
  4934. {"Doors & Gates", "Garage door #5", 19864, 100},
  4935. {"Doors & Gates", "Plain metal bar gate", 19912, 1000},
  4936. {"Doors & Gates", "Tall metal bar gate", 971, 1000},
  4937. {"Doors & Gates", "Long metal bar gate", 975, 1000},
  4938. {"Doors & Gates", "Los Santos Airport gate", 980, 1000},
  4939. {"Doors & Gates", "Fenced gate", 985, 1000},
  4940. {"Doors & Gates", "No parking gate", 19870, 1000},
  4941. {"Doors & Gates", "Fenced gate on wheels", 988, 1000},
  4942. {"Walls", "wall001", 19353, 100},
  4943. {"Walls", "wall002", 19354, 100},
  4944. {"Walls", "wall003", 19355, 100},
  4945. {"Walls", "wall004", 19356, 100},
  4946. {"Walls", "wall005", 19357, 100},
  4947. {"Walls", "wall006", 19358, 100},
  4948. {"Walls", "wall007", 19359, 100},
  4949. {"Walls", "wall008", 19360, 100},
  4950. {"Walls", "wall009", 19361, 100},
  4951. {"Walls", "wall010", 19362, 100},
  4952. {"Walls", "wall011", 19363, 100},
  4953. {"Walls", "wall012", 19364, 100},
  4954. {"Walls", "wall013", 19365, 100},
  4955. {"Walls", "wall014", 19366, 100},
  4956. {"Walls", "wall015", 19367, 100},
  4957. {"Walls", "wall016", 19368, 100},
  4958. {"Walls", "wall017", 19369, 100},
  4959. {"Walls", "wall018", 19370, 100},
  4960. {"Walls", "wall019", 19371, 100},
  4961. {"Walls", "wall020", 19372, 100},
  4962. {"Walls", "wall021", 19373, 100},
  4963. {"Walls", "wall023", 19375, 100},
  4964. {"Walls", "wall024", 19376, 100},
  4965. {"Walls", "wall025", 19377, 100},
  4966. {"Walls", "wall026", 19378, 100},
  4967. {"Walls", "wall027", 19379, 100},
  4968. {"Walls", "wall028", 19380, 100},
  4969. {"Walls", "wall029", 19381, 100},
  4970. {"Walls", "wall031", 19383, 100},
  4971. {"Walls", "wall032", 19384, 100},
  4972. {"Walls", "wall033", 19385, 100},
  4973. {"Walls", "wall034", 19386, 100},
  4974. {"Walls", "wall035", 19387, 100},
  4975. {"Walls", "wall036", 19388, 100},
  4976. {"Walls", "wall037", 19389, 100},
  4977. {"Walls", "wall038", 19390, 100},
  4978. {"Walls", "wall039", 19391, 100},
  4979. {"Walls", "wall040", 19392, 100},
  4980. {"Walls", "wall041", 19393, 100},
  4981. {"Walls", "wall042", 19394, 100},
  4982. {"Walls", "wall043", 19395, 100},
  4983. {"Walls", "wall044", 19396, 100},
  4984. {"Walls", "wall045", 19397, 100},
  4985. {"Walls", "wall046", 19398, 100},
  4986. {"Walls", "wall047", 19399, 100},
  4987. {"Walls", "wall048", 19400, 100},
  4988. {"Walls", "wall049", 19401, 100},
  4989. {"Walls", "wall050", 19402, 100},
  4990. {"Walls", "wall051", 19403, 100},
  4991. {"Walls", "wall052", 19404, 100},
  4992. {"Walls", "wall053", 19405, 100},
  4993. {"Walls", "wall054", 19406, 100},
  4994. {"Walls", "wall055", 19407, 100},
  4995. {"Walls", "wall056", 19408, 100},
  4996. {"Walls", "wall057", 19409, 100},
  4997. {"Walls", "wall058", 19410, 100},
  4998. {"Walls", "wall059", 19411, 100},
  4999. {"Walls", "wall060", 19412, 100},
  5000. {"Walls", "wall061", 19413, 100},
  5001. {"Walls", "wall062", 19414, 100},
  5002. {"Walls", "wall063", 19415, 100},
  5003. {"Walls", "wall064", 19416, 100},
  5004. {"Walls", "wall065", 19417, 100},
  5005. {"Walls", "wall066", 19426, 100},
  5006. {"Walls", "wall067", 19427, 100},
  5007. {"Walls", "wall068", 19428, 100},
  5008. {"Walls", "wall069", 19429, 100},
  5009. {"Walls", "wall070", 19430, 100},
  5010. {"Walls", "wall071", 19431, 100},
  5011. {"Walls", "wall072", 19432, 100},
  5012. {"Walls", "wall073", 19433, 100},
  5013. {"Walls", "wall074", 19434, 100},
  5014. {"Walls", "wall075", 19435, 100},
  5015. {"Walls", "wall076", 19436, 100},
  5016. {"Walls", "wall077", 19437, 100},
  5017. {"Walls", "wall078", 19438, 100},
  5018. {"Walls", "wall079", 19439, 100},
  5019. {"Walls", "wall080", 19440, 100},
  5020. {"Walls", "wall081", 19441, 100},
  5021. {"Walls", "wall082", 19442, 100},
  5022. {"Walls", "wall083", 19443, 100},
  5023. {"Walls", "wall084", 19444, 100},
  5024. {"Walls", "wall085", 19445, 100},
  5025. {"Walls", "wall086", 19446, 100},
  5026. {"Walls", "wall087", 19447, 100},
  5027. {"Walls", "wall088", 19448, 100},
  5028. {"Walls", "wall089", 19449, 100},
  5029. {"Walls", "wall090", 19450, 100},
  5030. {"Walls", "wall091", 19451, 100},
  5031. {"Walls", "wall092", 19452, 100},
  5032. {"Walls", "wall093", 19453, 100},
  5033. {"Walls", "wall094", 19454, 100},
  5034. {"Walls", "wall095", 19455, 100},
  5035. {"Walls", "wall096", 19456, 100},
  5036. {"Walls", "wall097", 19457, 100},
  5037. {"Walls", "wall098", 19458, 100},
  5038. {"Walls", "wall099", 19459, 100},
  5039. {"Walls", "wall100", 19460, 100},
  5040. {"Walls", "wall101", 19461, 100},
  5041. {"Walls", "wall102", 19462, 100},
  5042. {"Walls", "wall103", 19463, 100},
  5043. {"Walls", "wall104", 19464, 100},
  5044. {"Walls", "wall105", 19465, 100},
  5045. {"Decor", "Guard tower", 3279, 5000},
  5046. {"Decor", "Dance floor", 19128, 1000},
  5047. {"Decor", "Tool board", 19815, 50},
  5048. {"Decor", "Mailbox", 19867, 50},
  5049. {"Decor", "Single key", 11746, 50},
  5050. {"Decor", "Oxygen cylinder", 19816, 50},
  5051. {"Decor", "Cauldron", 19527, 50},
  5052. {"Decor", "Valve", 2983, 50},
  5053. {"Decor", "Writing board", 19805, 50},
  5054. {"Decor", "Punching bag", 1985, 50},
  5055. {"Decor", "Desk fan", 2192, 50},
  5056. {"Decor", "Satellite dish", 3031, 50},
  5057. {"Decor", "Shopping cart", 1349, 50},
  5058. {"Decor", "Fireplace logs", 19632, 50},
  5059. {"Decor", "Telescope", 2600, 50},
  5060. {"Decor", "Ladder", 1428, 50},
  5061. {"Decor", "Plank", 2937, 50},
  5062. {"Decor", "Blue curtains", 2558, 50},
  5063. {"Decor", "Old curtains", 14443, 50},
  5064. {"Decor", "Blinds", 18084, 50},
  5065. {"Decor", "United states flag", 11245, 50},
  5066. {"Decor", "Double US flag", 2614, 50},
  5067. {"Decor", "Confederate flag", 2048, 50},
  5068. {"Decor", "Basketball court", 946, 50},
  5069. {"Decor", "Basketball", 2114, 50},
  5070. {"Decor", "Fire exit sign", 11710, 50},
  5071. {"Decor", "Fire extinguisher", 2690, 50},
  5072. {"Decor", "Fire extinguisher panel", 11713, 50},
  5073. {"Decor", "Fire alarm", 11713, 50},
  5074. {"Decor", "Fire hydrant", 1211, 50},
  5075. {"Decor", "Cocaine packet", 2891, 50},
  5076. {"Decor", "Drug bundle", 1279, 50},
  5077. {"Decor", "White package", 1575, 50},
  5078. {"Decor", "Orange package", 1576, 50},
  5079. {"Decor", "Yellow package", 1577, 50},
  5080. {"Decor", "Green package", 1578, 50},
  5081. {"Decor", "Blue package", 1579, 50},
  5082. {"Decor", "Red package", 1580, 50},
  5083. {"Decor", "Marijuana bundle", 2901, 50},
  5084. {"Decor", "Marijuana plant", 3409, 50},
  5085. {"Decor", "Ashtray", 1510, 50},
  5086. {"Decor", "Ashtray with cigar", 1665, 50},
  5087. {"Decor", "Pumpkin", 19320, 50},
  5088. {"Decor", "Christmas tree", 19076, 50},
  5089. {"Decor", "Stage", 19608, 250},
  5090. {"Decor", "Gold record", 19617, 100},
  5091. {"Decor", "Moose head", 1736, 300},
  5092. {"Decor", "Cow", 19833, 500},
  5093. {"Decor", "Rocking horse", 11733, 50},
  5094. {"Decor", "Deer", 19315, 50},
  5095. {"Decor", "Boot", 11735, 50},
  5096. {"Decor", "Old radiator", 1738, 50},
  5097. {"Decor", "Radiator", 11721, 50},
  5098. {"Decor", "Round light", 11727, 50},
  5099. {"Decor", "Mop & pail", 1778, 50},
  5100. {"Decor", "Chambermaid", 1789, 50},
  5101. {"Decor", "Bucket", 2713, 50},
  5102. {"Decor", "Trolley", 2994, 50},
  5103. {"Decor", "Body bags", 16444, 50},
  5104. {"Decor", "Beach ball", 1598, 50},
  5105. {"Decor", "Blackboard", 3077, 50},
  5106. {"Decor", "Dumbell", 3072, 50},
  5107. {"Decor", "Sports bag", 11745, 50},
  5108. {"Decor", "Portable toilet", 2984, 50},
  5109. {"Decor", "Round burger shot sign", 2643, 50},
  5110. {"Decor", "Stretcher", 1997, 50},
  5111. {"Decor", "Hospital bed", 2146, 50},
  5112. {"Decor", "Work lamp", 2196, 50},
  5113. {"Decor", "Fire bell", 1613, 50},
  5114. {"Decor", "Sword", 19590, 50},
  5115. {"Decor", "Wooden bat", 19914, 50},
  5116. {"Decor", "Hand fan", 19591, 50},
  5117. {"Decor", "Shop basket", 19592, 50},
  5118. {"Decor", "Safe door", 19619, 50},
  5119. {"Decor", "Safe enclosure", 19618, 50},
  5120. {"Decor", "Bag of money", 1550, 50},
  5121. {"Decor", "Oil can", 19621, 50},
  5122. {"Decor", "Wrench", 19627, 50},
  5123. {"Decor", "Engine", 19917, 50},
  5124. {"Decor", "Broom", 19622, 50},
  5125. {"Decor", "Briefcase", 19624, 50},
  5126. {"Decor", "Cigarette", 19625, 50},
  5127. {"Decor", "Rolled joint", 3027, 50},
  5128. {"Decor", "Fire wood", 19632, 50},
  5129. {"Decor", "Compacted trash", 19772, 50},
  5130. {"Decor", "Medic kit", 11738, 50},
  5131. {"Decor", "Clip", 19995, 50},
  5132. {"Decor", "Dippo lighter", 19998, 50},
  5133. {"Decor", "Briquettes", 19573, 50},
  5134. {"Decor", "Meat Sack", 2805, 50},
  5135. {"Decor", "Small meat sack", 2803, 50},
  5136. {"Decor", "Stack of magazines", 2855, 50},
  5137. {"Decor", "Scattered magazines", 2852, 50},
  5138. {"Decor", "Scattered books", 2854, 50},
  5139. {"Decor", "Wooden stairs", 3361, 50},
  5140. {"Decor", "Long concrete stairs", 14410, 50},
  5141. {"Decor", "Short concrete stairs", 14416, 50},
  5142. {"Decor", "Short stairs", 14877, 50},
  5143. {"Decor", "Big window", 19325, 100},
  5144. {"Decor", "Small window", 19466, 50},
  5145. {"Decor", "Breakable window", 1649, 75},
  5146. {"Decor", "Red neon tube", 18647, 100},
  5147. {"Decor", "Blue neon tune", 18648, 100},
  5148. {"Decor", "Green neon tube", 18649, 100},
  5149. {"Decor", "Yellow neon tube", 18650, 100},
  5150. {"Decor", "Pink neon tube", 18651, 100},
  5151. {"Decor", "White neon tube", 18652, 100},
  5152. {"Decor", "Beer bottle", 1543, 10},
  5153. {"Decor", "Yellow beer bottle", 1544, 10},
  5154. {"Decor", "Medicine bottle", 1950, 10},
  5155. {"Decor", "Green beer bottle", 19818, 10},
  5156. {"Decor", "Whiskey bottle", 19823, 10},
  5157. {"Decor", "Wine bottle", 19820, 10},
  5158. {"Decor", "Red wine bottle", 19822, 10},
  5159. {"Decor", "Champagne bottle", 19824, 10},
  5160. {"Decor", "Beer", 19821, 10},
  5161. {"Decor", "Target #1", 2056, 50},
  5162. {"Decor", "Target #2", 2055, 50},
  5163. {"Decor", "Target #3", 2051, 50},
  5164. {"Decor", "Target #4", 2050, 50},
  5165. {"Decor", "Target #5", 2049, 50},
  5166. {"Decor", "Clothes pile #1", 2819, 50},
  5167. {"Decor", "Clothes pile #2", 2843, 50},
  5168. {"Decor", "Clothes pile #3", 2844, 50},
  5169. {"Decor", "Clothes pile #4", 2845, 50},
  5170. {"Decor", "Clothes pile #5", 2846, 50},
  5171. {"Decor", "Light #0", 3877, 50},
  5172. {"Decor", "Light #1", 3524, 50},
  5173. {"Decor", "Light #2", 3461, 50},
  5174. {"Decor", "Dragon Head", 3528, 150},
  5175. {"Decor", "Fountain", 9833, 150},
  5176. {"Decor", "Military RPG", 3267, 150},
  5177. {"Decor", "Light", 1231, 150},
  5178. {"Decor", "Blue Light", 19122, 150},
  5179. {"Decor", "Green Light", 19123, 150},
  5180. {"Decor", "Red Light", 19124, 150},
  5181. {"Decor", "HeliPad", 3928, 200},
  5182. {"Weapons", "9mm", 346, 50},
  5183. {"Weapons", "Deagle", 348, 50},
  5184. {"Weapons", "Shotgun", 349, 50},
  5185. {"Weapons", "Ak-47", 355, 50},
  5186. {"Weapons", "UZI", 352, 50},
  5187. {"Weapons", "Camera", 367, 50}
  5188. };
  5189. enum entranceEnum
  5190. {
  5191. eName[32],
  5192. eInterior,
  5193. eWorld,
  5194. eMapIcon,
  5195. eFreeze,
  5196. Float:ePosX,
  5197. Float:ePosY,
  5198. Float:ePosZ,
  5199. Float:ePosA,
  5200. Float:eIntX,
  5201. Float:eIntY,
  5202. Float:eIntZ,
  5203. Float:eIntA
  5204. };
  5205. new const staticEntrances[][entranceEnum] =
  5206. {
  5207. {"County General", 1, 1, 22, true, 2034.2003, -1402.1976, 17.2951, 180.0000, -2330.0376,111.4688,-5.3942, 180.0000},
  5208. {"All Saints Hospital", 1, 2, 22, true, 1172.5100, -1325.3057, 15.4045, 270.0000, -2330.0376,111.4688,-5.3942, 180.0000},
  5209. {"Mulholland Bank", 5, 3, 52, true, 1465.1348, -1010.5063, 26.8438, 180.0000, 1667.3536, -995.3700, 683.6913, 0.0000},
  5210. // {"City Hall", 3, 4, 0, false, 1482.6517, -1771.6108, 18.7958, 0.0000, 390.1344, 173.7334, 1008.3828, 90.0000},
  5211. {"Police Department", 2, 5, 30, true, 1554.8918, -1675.6486, 16.1953, 90.0000, 1553.2065,-1674.0422,2110.5356, 270.0000},
  5212. {"Licensing department", 3, 6, 55, false, 1219.2590, -1812.1093, 16.5938, 180.0000, -2029.7135, -119.2240, 1035.1719, 0.0000},
  5213. // {"Police Department", 2, 5, 30, true, 1552.7358, -1675.8599, 16.1953, 90.0000, 1553.2065,-1674.0422,2110.5356, 270.0000},
  5214. // {"Licensing department", 3, 6, 55, false, 1219.1294, -1811.7042, 16.5938, 180.0000, -2029.7135, -119.2240, 1035.1719, 0.0000},
  5215. {"VIP Lounge", 3, 7, 59, true, 1310.2443, -1367.5555, 13.5376, 270.0000, 3094.7078, 216.8377, 1053.4829, 0.0000},
  5216. {"Drug den", 5, 8, 23, false, 2160.9736, -1700.7681, 15.0859, 225.0000, 318.6025, 1114.9443, 1083.8828, 0.0000},
  5217. {"Crack house", 5, 9, 23, false, 2351.9138, -1170.1725, 28.0507, 0.0000, 2352.3337, -1180.9257, 1027.9766, 90.0000},
  5218. {"Heisenberg's trailer", 2, 10, 37, false, -65.0972, -1574.3820, 2.6107, 180.0000, 1.6362, -3.0563, 999.4284, 90.0000},
  5219. {"FBI headquarters", 1, 11, 30, true, 330.6662, -1509.9915, 36.0391, 225.0000, -501.1844, 286.8678, 2001.0950, 0.0000},
  5220. {"Los Santos Casino", 0, 0, 25, true, 1603.5885,-1170.0281,24.0781, 180.0000, 1603.5900,-1173.1576,24.3658, 180.0000}
  5221. // {"Rodeo Bank", 5, 13, 52, true, 593.5599, -1250.8365, 18.2484, 20.0000, 1667.3536, -995.3700, 683.6913, 0.0000}
  5222. };
  5223. enum locEnum
  5224. {
  5225. locID,
  5226. locName[32],
  5227. bool:locExists,
  5228. Float:locPosX,
  5229. Float:locPosY,
  5230. Float:locPosZ
  5231. };
  5232. new LocationInfo[MAX_LOCATIONS][locEnum];
  5233. enum impoundData {
  5234. impoundID,
  5235. impoundExists,
  5236. Float:impoundLot[3],
  5237. Float:impoundRelease[4],
  5238. Text3D:impoundText3D,
  5239. impoundPickup
  5240. };
  5241. new ImpoundData[MAX_IMPOUND_LOTS][impoundData];
  5242. enum jobEnum
  5243. {
  5244. jobName[32],
  5245. Float:jobX,
  5246. Float:jobY,
  5247. Float:jobZ,
  5248. jobActor,
  5249. Float:actorangle
  5250. };
  5251. new const jobLocations[][jobEnum] =
  5252. {
  5253. {"Pizzaman", 2104.7771, -1805.1772, 13.5547, 155, 89.429504},
  5254. {"Courier", 1767.2609, -2042.0455, 13.5316, 236, 265.8613},
  5255. {"Fisherman", 393.2632, -2070.5837, 7.8359, 261, 77.575897},
  5256. {"Bodyguard", 2227.4705, -1715.9694, 13.5302, 25, 93.977127},
  5257. {"Weapons Dealer", 1365.9685, -1274.6963, 13.5469, 30, 138.5629},
  5258. {"Mechanic", 1957.9480, -1578.8147, 13.7161, 8, 182.397354},
  5259. {"Miner", 1262.5063, -1265.6266, 13.3809, 260, 0.892628},
  5260. {"Street Sweeper", 2194.4561, -1973.1625, 13.5592, 67, 162.154998},
  5261. {"Taxi Driver", 1748.1373, -1863.0981, 13.5755, 7, 356.196624},
  5262. {"Drug Dealer", 2160.2219, -1698.5747, 15.0859, 28, 88.8670},
  5263. {"Lawyer", 1381.0668, -1086.6857, 27.3906, 17, 98.304618},
  5264. {"Detective", 1547.6234, -1680.8387, 13.5601, 147, 90.0000}, //xd
  5265. // {"Thief", 1577.1469, -1475.1631, 14.2195, 29, 85.531280},
  5266. {"Garbage Man", 2441.6909, -2115.9131, 13.5469, 142, 35.699779},
  5267. {"Farmer", -366.3515, -1412.8286, 25.7266, 131, 36.728786},
  5268. {"Lumber Jack", 2359.1599,-650.2137,128.0523, 16, 276.390838}
  5269. // {"Forklift", 2424.3030,-2098.8564,13.7151}
  5270. };
  5271. enum atmEnum
  5272. {
  5273. Float:atmX,
  5274. Float:atmY,
  5275. Float:atmZ,
  5276. Float:atmA
  5277. };
  5278. new const atmMachines[][atmEnum] =
  5279. {
  5280. {2228.394775, -1714.255126, 13.158315, 270.000000},
  5281. {1928.599975, -1779.941650, 13.136871, 90.000000},
  5282. // {1493.294677, -1772.306640, 18.385747, 180.000000},
  5283. {1102.299438, -1438.380981, 15.396868, 90.000000},
  5284. {563.902526, -1293.948730, 16.858232, 180.000000},
  5285. {2233.269042, -1158.040527, 25.540679, 270.000000},
  5286. {827.125183, -1345.751220, 13.182147, 270.000000},
  5287. {827.125183, -1346.811157, 13.182147, 270.000000},
  5288. {1093.036621, 29.262479, 1000.309509, 0.000000},
  5289. {-14.377381, -180.600250, 1003.186889, 180.000000},
  5290. {9.334012, -31.044189, 1003.159179, 270.000000},
  5291. {-24.413511, -91.806381, 1003.126708, 180.000000},
  5292. {-21.125793, -140.438766, 1003.166564, 180.000000},
  5293. {-24.290849, -57.946674, 1003.176574, 180.000000}
  5294. };
  5295. enum fireEnum
  5296. {
  5297. fireIndex,
  5298. Float:fireX,
  5299. Float:fireY,
  5300. Float:fireZ,
  5301. Float:fireA,
  5302. };
  5303. new const randomFireSpawns[][fireEnum] =
  5304. {
  5305. {0, 1720.231079, -1740.936889, 11.432815, 180.922180},
  5306. {0, 1723.581298, -1740.882934, 11.432815, 180.922180},
  5307. {0, 1726.050537, -1740.842773, 11.432815, 180.922180},
  5308. {0, 1716.479858, -1740.926757, 11.432815, 180.922180},
  5309. {0, 1713.465332, -1740.676391, 11.432815, 180.922180},
  5310. {0, 1723.581298, -1740.882934, 13.742803, 180.922180},
  5311. {0, 1726.050537, -1740.842773, 14.072817, 180.922180},
  5312. {0, 1720.231079, -1740.936889, 14.142808, 180.922180},
  5313. {0, 1716.479858, -1740.926757, 14.642818, 180.922180},
  5314. {0, 1713.465332, -1740.676391, 14.992820, 180.922180},
  5315. {0, 1729.405151, -1742.339111, 11.432815, 180.922180},
  5316. {0, 1729.405883, -1742.379028, 14.632813, 180.922180},
  5317. {0, 1729.453002, -1745.278564, 11.432815, 180.922180},
  5318. {0, 1729.452514, -1745.258789, 14.632813, 180.922180},
  5319. {0, 1729.500610, -1748.218139, 11.432815, 180.922180},
  5320. {0, 1729.497314, -1748.038085, 14.632813, 180.922180},
  5321. {0, 1729.548095, -1751.127929, 11.432815, 180.922180},
  5322. {0, 1729.547485, -1751.098022, 14.632813, 180.922180},
  5323. {0, 1729.587524, -1753.567871, 11.432815, 180.922180},
  5324. {0, 1729.587280, -1753.588500, 14.632813, 180.922180},
  5325. {0, 1710.109741, -1740.329467, 11.432815, 180.922180},
  5326. {0, 1707.230224, -1740.376220, 11.432815, 180.922180},
  5327. {0, 1704.329956, -1740.422607, 11.432815, 180.922180},
  5328. {0, 1710.109741, -1740.329467, 14.922813, 180.922180},
  5329. {0, 1707.150390, -1740.377075, 14.922813, 180.922180},
  5330. {0, 1704.710327, -1740.416137, 14.922813, 180.922180},
  5331. {1, 1972.983886, -1923.633544, 11.286870, 358.727569},
  5332. {1, 1975.173583, -1923.682617, 11.286870, 358.727569},
  5333. {1, 1977.542724, -1923.735229, 11.286870, 358.727569},
  5334. {1, 1979.951782, -1923.788696, 11.286870, 358.727569},
  5335. {1, 1982.091552, -1923.836547, 11.286870, 358.727569},
  5336. {1, 1984.420532, -1923.887817, 11.286870, 358.727569},
  5337. {1, 1986.800292, -1923.941040, 11.286870, 358.727569},
  5338. {1, 1989.079589, -1923.991821, 11.286870, 358.727569},
  5339. {1, 1991.318847, -1924.041625, 11.286870, 358.727569},
  5340. {1, 1993.569335, -1924.091918, 11.286870, 358.727569},
  5341. {1, 1995.939086, -1924.143676, 11.286870, 358.727569},
  5342. {1, 1998.008422, -1924.189697, 11.286870, 358.727569},
  5343. {1, 1998.008422, -1924.189697, 14.286870, 358.727569},
  5344. {1, 1995.939086, -1924.143676, 14.286870, 358.727569},
  5345. {1, 1993.569335, -1924.091918, 14.286870, 358.727569},
  5346. {1, 1991.318847, -1924.041625, 14.286870, 358.727569},
  5347. {1, 1989.079589, -1923.991821, 14.286870, 358.727569},
  5348. {1, 1986.800292, -1923.941040, 14.286870, 358.727569},
  5349. {1, 1984.420532, -1923.887817, 14.286870, 358.727569},
  5350. {1, 1982.091552, -1923.836547, 14.286870, 358.727569},
  5351. {1, 1979.951782, -1923.788696, 14.286870, 358.727569},
  5352. {1, 1977.542724, -1923.735229, 14.286870, 358.727569},
  5353. {1, 1975.173583, -1923.682617, 14.286870, 358.727569},
  5354. {1, 1972.983886, -1923.633544, 14.286870, 358.727569},
  5355. {2, 2422.197753, -1963.760864, 11.329407, 270.000000},
  5356. {2, 2422.197753, -1965.961059, 11.329407, 270.000000},
  5357. {2, 2422.538085, -1968.141479, 11.329407, 270.000000},
  5358. {2, 2422.437988, -1970.161865, 11.329407, 270.000000},
  5359. {2, 2422.488037, -1972.322143, 11.329407, 270.000000},
  5360. {2, 2422.488037, -1974.422363, 11.329407, 270.000000},
  5361. {2, 2422.488037, -1976.602905, 11.329407, 270.000000},
  5362. {2, 2422.568115, -1978.533569, 11.329407, 270.000000},
  5363. {2, 2422.678222, -1980.704101, 11.329407, 270.000000},
  5364. {2, 2422.197753, -1963.760864, 13.829407, 270.000000},
  5365. {2, 2422.197753, -1965.961059, 13.829407, 270.000000},
  5366. {2, 2422.538085, -1968.141479, 13.829407, 270.000000},
  5367. {2, 2422.437988, -1970.161865, 13.829407, 270.000000},
  5368. {2, 2422.488037, -1972.322143, 13.829407, 270.000000},
  5369. {2, 2422.488037, -1974.422363, 13.829407, 270.000000},
  5370. {2, 2422.488037, -1976.602905, 13.829407, 270.000000},
  5371. {2, 2422.568115, -1978.533569, 13.829407, 270.000000},
  5372. {2, 2422.678222, -1980.704101, 13.829407, 270.000000},
  5373. {3, 855.264770, -1038.802124, 23.446907, 215.000000},
  5374. {3, 853.698852, -1040.191894, 23.446907, 215.000000},
  5375. {3, 851.837646, -1041.666137, 23.446907, 215.000000},
  5376. {3, 850.262207, -1042.989501, 23.446907, 215.000000},
  5377. {3, 848.620910, -1044.236816, 23.446907, 215.000000},
  5378. {3, 846.878112, -1045.530883, 23.446907, 215.000000},
  5379. {3, 844.986694, -1046.648193, 23.446907, 215.000000},
  5380. {3, 843.184570, -1048.032226, 23.446907, 215.000000},
  5381. {3, 841.548889, -1049.287597, 23.446907, 215.000000},
  5382. {3, 839.740478, -1050.627563, 23.446907, 215.000000},
  5383. {4, 512.298522, -1522.487792, 12.252450, 90.000000},
  5384. {4, 512.298522, -1520.456787, 12.252450, 90.000000},
  5385. {4, 512.298522, -1518.425903, 12.252450, 90.000000},
  5386. {4, 512.298522, -1516.165405, 12.252450, 90.000000},
  5387. {4, 512.298522, -1514.245239, 12.252450, 90.000000},
  5388. {4, 512.068359, -1511.944091, 12.252450, 90.000000},
  5389. {4, 512.068359, -1509.814208, 12.252450, 90.000000},
  5390. {4, 512.298522, -1507.425292, 12.252450, 90.000000},
  5391. {4, 512.298522, -1505.304931, 12.252450, 90.000000},
  5392. {4, 512.298522, -1503.384521, 12.252450, 90.000000},
  5393. {4, 512.298522, -1501.624389, 12.252450, 90.000000},
  5394. {4, 512.298522, -1499.298339, 12.252450, 90.000000},
  5395. {4, 512.298522, -1522.487792, 13.752450, 90.000000},
  5396. {4, 512.298522, -1520.456787, 13.752450, 90.000000},
  5397. {4, 512.298522, -1518.425903, 13.752450, 90.000000},
  5398. {4, 512.298522, -1516.165405, 13.752450, 90.000000},
  5399. {4, 512.298522, -1514.245239, 13.752450, 90.000000},
  5400. {4, 512.068359, -1511.944091, 13.752450, 90.000000},
  5401. {4, 512.068359, -1509.814208, 13.752450, 90.000000},
  5402. {4, 512.298522, -1507.425292, 13.752450, 90.000000},
  5403. {4, 512.298522, -1505.304931, 13.752450, 90.000000},
  5404. {4, 512.298522, -1503.384521, 13.752450, 90.000000},
  5405. {4, 512.298522, -1501.624389, 13.752450, 90.000000},
  5406. {4, 512.298522, -1499.298339, 13.752450, 90.000000},
  5407. {5, 2012.939208, -1282.796264, 21.760301, 179.226959},
  5408. {5, 2010.718627, -1282.766845, 21.760301, 179.226959},
  5409. {5, 2008.219238, -1282.732910, 21.760301, 179.226959},
  5410. {5, 2005.989379, -1282.702880, 21.760301, 179.226959},
  5411. {5, 2003.889770, -1282.674316, 21.760301, 179.226959},
  5412. {5, 2001.719848, -1282.645507, 21.760301, 179.226959},
  5413. {5, 1999.509765, -1282.615966, 21.760301, 179.226959},
  5414. {5, 1997.539794, -1282.589599, 21.760301, 179.226959},
  5415. {5, 1995.449462, -1282.561889, 21.760301, 179.226959},
  5416. {5, 1993.546508, -1282.786621, 21.760301, 179.226959},
  5417. {5, 1991.387695, -1282.647827, 21.760301, 179.226959},
  5418. {5, 1989.187133, -1282.638427, 21.760301, 179.226959},
  5419. {5, 1987.196044, -1282.701660, 21.760301, 179.226959},
  5420. {5, 1985.255126, -1282.785278, 21.760301, 179.226959},
  5421. {5, 1983.203491, -1282.928100, 21.760301, 179.226959},
  5422. {5, 1981.183105, -1282.901489, 21.760301, 179.226959},
  5423. {5, 1979.322875, -1282.876708, 21.760301, 179.226959},
  5424. {5, 1977.321655, -1282.920288, 21.760301, 179.226959},
  5425. {5, 1975.070434, -1282.950805, 21.760301, 179.226959},
  5426. {5, 1973.359741, -1282.997802, 21.760301, 179.226959},
  5427. {6, 2520.653076, -1268.459106, 32.786579, 268.202911},
  5428. {6, 2520.595947, -1270.278076, 32.786579, 268.202911},
  5429. {6, 2520.631347, -1272.040527, 32.786579, 268.202911},
  5430. {6, 2520.779785, -1273.676757, 32.786579, 268.202911},
  5431. {6, 2520.882080, -1275.182128, 32.786579, 268.202911},
  5432. {6, 2520.826904, -1276.951538, 32.786579, 268.202911},
  5433. {6, 2520.767822, -1278.821655, 32.786579, 268.202911},
  5434. {6, 2520.811035, -1280.303833, 32.786579, 268.202911},
  5435. {6, 2520.782958, -1281.844604, 32.786579, 268.202911},
  5436. {6, 2520.734863, -1283.715209, 32.786579, 268.202911},
  5437. {6, 2521.593261, -1265.743408, 32.543724, 178.275573},
  5438. {6, 2520.653076, -1268.459106, 34.286579, 268.202911},
  5439. {6, 2520.595947, -1270.278076, 34.286579, 268.202911},
  5440. {6, 2520.631347, -1272.040527, 34.286579, 268.202911},
  5441. {6, 2520.779785, -1273.676757, 34.286579, 268.202911},
  5442. {6, 2520.882080, -1275.182128, 34.286579, 268.202911},
  5443. {6, 2520.826904, -1276.951538, 34.286579, 268.202911},
  5444. {6, 2520.767822, -1278.821655, 34.286579, 268.202911},
  5445. {6, 2520.811035, -1280.303833, 34.286579, 268.202911},
  5446. {6, 2520.782958, -1281.844604, 34.286579, 268.202911},
  5447. {6, 2520.734863, -1283.715209, 34.286579, 268.202911},
  5448. {6, 2521.593261, -1265.743408, 34.043724, 178.275573},
  5449. {7, 2420.582031, -1510.028320, 22.002197, 87.980613},
  5450. {7, 2420.656494, -1507.899536, 22.002197, 87.980613},
  5451. {7, 2420.729248, -1505.820434, 22.002197, 87.980613},
  5452. {7, 2420.797607, -1503.861328, 22.002197, 87.980613},
  5453. {7, 2420.706298, -1501.856079, 22.002197, 87.980613},
  5454. {7, 2420.772460, -1499.967163, 22.002197, 87.980613},
  5455. {7, 2420.558349, -1498.327880, 22.002197, 87.980613},
  5456. {7, 2420.629638, -1496.288818, 22.002197, 87.980613},
  5457. {7, 2420.637451, -1494.617797, 22.002197, 87.980613},
  5458. {7, 2418.689453, -1511.844482, 21.619995, 0.000000},
  5459. {7, 2416.989501, -1511.844482, 21.619995, 0.000000},
  5460. {7, 2415.138427, -1511.844482, 21.619995, 0.000000},
  5461. {7, 2413.137939, -1511.844482, 21.619995, 0.000000},
  5462. {7, 2411.336914, -1511.844482, 21.619995, 0.000000},
  5463. {7, 2409.695800, -1511.844482, 21.619995, 0.000000},
  5464. {7, 2408.024169, -1511.844482, 21.619995, 0.000000},
  5465. {7, 2406.803466, -1511.844482, 21.619995, 0.000000},
  5466. {7, 2405.712890, -1511.844482, 21.619995, 0.000000},
  5467. {8, 1769.756469, -1721.183105, 11.426870, 0.000000},
  5468. {8, 1771.825805, -1721.219238, 11.426870, 0.000000},
  5469. {8, 1774.065917, -1721.219238, 11.426870, 0.000000},
  5470. {8, 1776.336303, -1721.219238, 11.426870, 0.000000},
  5471. {8, 1778.396972, -1721.219238, 11.426870, 0.000000},
  5472. {8, 1780.507202, -1721.219238, 11.426870, 0.000000},
  5473. {8, 1782.597290, -1721.219238, 11.426870, 0.000000},
  5474. {8, 1784.728027, -1721.219238, 11.426870, 0.000000},
  5475. {8, 1786.797851, -1721.219238, 11.426870, 0.000000},
  5476. {8, 1788.677001, -1721.219238, 11.426870, 0.000000},
  5477. {8, 1790.987304, -1721.219238, 11.426870, 0.000000},
  5478. {8, 1792.916625, -1721.219238, 11.426870, 0.000000},
  5479. {8, 1794.967285, -1721.219238, 11.426870, 0.000000},
  5480. {8, 1796.447021, -1721.219238, 11.426870, 0.000000},
  5481. {8, 1798.347534, -1721.219238, 11.426870, 0.000000},
  5482. {9, 2723.256591, -2020.687255, 11.477196, 0.000000},
  5483. {9, 2723.196289, -2022.766357, 11.477196, 0.000000},
  5484. {9, 2723.316894, -2024.821044, 11.477196, 0.000000},
  5485. {9, 2723.316894, -2026.461547, 11.477196, 0.000000},
  5486. {9, 2723.316894, -2028.431030, 11.477196, 0.000000},
  5487. {9, 2723.316894, -2030.141479, 11.477196, 0.000000},
  5488. {9, 2723.316894, -2031.961547, 11.477196, 0.000000},
  5489. {9, 2723.316894, -2033.631713, 11.477196, 0.000000},
  5490. {9, 2723.316894, -2035.612060, 11.477196, 0.000000},
  5491. {9, 2723.316894, -2037.552978, 11.477196, 0.000000},
  5492. {9, 2723.316894, -2038.973632, 11.477196, 0.000000}
  5493. };
  5494. new const Float:minerPositions[][] =
  5495. {
  5496. {1276.6024, -1252.0608, 13.8471},
  5497. {1264.3618, -1240.3776, 16.0091},
  5498. {1255.6558, -1242.5010, 17.6045},
  5499. {1255.5265, -1251.3208, 13.8461}
  5500. };
  5501. new const Float:paintballTSpawns[][] =
  5502. { // TDM Arena
  5503. // X Y Z R
  5504. {1303.8156, 1.8952, 1001.0244, 146.4729}, // Team 1
  5505. {1260.6339, -66.3295, 1002.4949, 318.4712} // Team 2
  5506. };
  5507. new const Float:paintballDSpawns[][] =
  5508. { // Deagle Arena
  5509. // X Y Z R
  5510. {1299.0728, 2103.4670, 11.0234, 10.4824},
  5511. {1298.5331, 2196.3188, 11.0234, 2.9623},
  5512. {1397.0685, 2101.0967, 11.0234, 260.1884},
  5513. {1315.7385, 2206.4363, 16.8045, 205.3078},
  5514. {1388.1871, 2206.5242, 16.7969, 267.3483},
  5515. {1407.4728, 2140.1846, 17.6797, 195.9077},
  5516. {1411.0127, 2107.6167, 12.0156, 172.0940},
  5517. {1399.2078, 2206.6550, 12.0156, 213.8402},
  5518. {1301.0807, 2212.7083, 12.0156, 92.1932}
  5519. };
  5520. new const Float:paintballSSpawns[][] =
  5521. { // Sniper Arena
  5522. // X Y Z R
  5523. {-2233.8169, -1743.4373, 480.8561, 37.9961},
  5524. //{-2386.9824, -1841.8787, 441.4585, 356.9490},
  5525. {-2351.9800, -1714.6760, 479.6617, 27.9689},
  5526. {-2344.3889, -1703.7188, 483.6255, 326.3146},
  5527. {-2425.2998, -1623.8129, 524.8774, 212.5245}
  5528. };
  5529. new const Float:paintballFSpawns[][] =
  5530. {// FFA Arena
  5531. // X Y Z R
  5532. {1291.2968, -0.1334, 1001.0228, 180.0000},
  5533. {1304.6259, -28.7442, 1001.0326, 90.0000},
  5534. {1260.6687, -0.6802, 1001.0234, 180.0000},
  5535. {1251.9862, -26.3548, 1001.0340, 270.0000},
  5536. {1278.8584, -44.1545, 1001.0236, 0.0000},
  5537. {1256.5944, -61.9047, 1002.4999, 0.0000},
  5538. {1297.3204, -61.4144, 1002.4980, 0.0000}
  5539. };
  5540. new const Float:drivingTestCPs[][] =
  5541. {
  5542. {1257.5657, -1849.3583, 13.0332},
  5543. {1128.2242, -1849.8821, 13.0332},
  5544. {1063.3004, -1839.3625, 13.0332},
  5545. {987.0623, -1784.1073, 14.0711},
  5546. {920.1835, -1758.3966, 13.3804},
  5547. {919.8111, -1656.9091, 13.3828},
  5548. {919.9860, -1560.1482, 13.3828},
  5549. {930.4203, -1492.2578, 13.3754},
  5550. {980.7775, -1492.2339, 13.3828},
  5551. {1054.2943, -1491.7645, 13.3828},
  5552. {1065.0643, -1416.5730, 13.3828},
  5553. {1115.0032, -1408.2512, 13.3828},
  5554. {1178.4860, -1408.3331, 13.3828},
  5555. {1268.5947, -1408.8792, 13.3828},
  5556. {1339.5221, -1416.9095, 13.3828},
  5557. {1320.8999, -1494.4954, 13.3828},
  5558. {1295.2820, -1573.4578, 13.3828},
  5559. {1294.6698, -1666.3483, 13.3828},
  5560. {1284.0913, -1709.6714, 13.3828},
  5561. {1212.7543, -1709.5531, 13.3828},
  5562. {1172.5828, -1724.7937, 13.6049},
  5563. {1172.4504, -1783.9113, 13.3984},
  5564. {1179.8055, -1855.1219, 13.3984},
  5565. {1213.0060, -1842.1384, 13.3984}
  5566. };
  5567. new const Float:cellPositions[][] =
  5568. {
  5569. {1205.69995117, -1328.09997559, 797.00000000, 1205.699951, -1326.500000, 797.000000},
  5570. {1205.69995117, -1331.30004883, 797.00000000, 1205.699951, -1329.700073, 797.000000},
  5571. {1205.69995117, -1331.30004883, 800.50000000, 1205.699951, -1329.700073, 800.500000},
  5572. {1205.69995117, -1328.09997559, 800.50000000, 1205.699951, -1326.500000, 800.500000},
  5573. {1215.30004883, -1328.09997559, 797.00000000, 1215.300048, -1326.500000, 797.000000},
  5574. {1215.30004883, -1331.30004883, 797.00000000, 1215.300048, -1329.700073, 797.000000},
  5575. {1215.30004883, -1331.30004883, 800.50000000, 1215.300048, -1329.700073, 800.500000},
  5576. {1215.30004883, -1328.09997559, 800.50000000, 1215.300048, -1326.500000, 800.500000},
  5577. {1215.30004883, -1334.50000000, 797.00000000, 1215.300048, -1332.900024, 797.000000},
  5578. {1215.29980469, -1337.69921875, 797.00000000, 1215.299804, -1336.099243, 797.000000},
  5579. {1215.30004883, -1340.90002441, 797.00000000, 1215.300048, -1339.300048, 797.000000},
  5580. {1215.30004883, -1340.90002441, 800.50000000, 1215.300048, -1339.300048, 800.500000},
  5581. {1215.30004883, -1337.69995117, 800.50000000, 1215.300048, -1336.099975, 800.500000},
  5582. {1215.30004883, -1334.50000000, 800.50000000, 1215.300048, -1332.900024, 800.500000},
  5583. {1205.69995117, -1334.50000000, 800.50000000, 1205.699951, -1332.900024, 800.500000},
  5584. {1205.69995117, -1337.69995117, 800.50000000, 1205.699951, -1336.099975, 800.500000},
  5585. {1205.69995117, -1340.90002441, 800.50000000, 1205.699951, -1339.300048, 800.500000},
  5586. {1205.69995117, -1334.50000000, 797.00000000, 1205.699951, -1332.900024, 797.000000},
  5587. {1205.69995117, -1337.69995117, 797.00000000, 1205.699951, -1336.099975, 797.000000},
  5588. {1205.69995117, -1340.90002441, 797.00000000, 1205.699951, -1339.300048, 797.000000},
  5589. {1215.30004883, -1344.09997559, 800.50000000, 1215.300048, -1342.500000, 800.500000},
  5590. {1215.30004883, -1344.09997559, 797.00000000, 1215.300048, -1342.500000, 797.000000},
  5591. {1205.69995117, -1344.09997559, 800.50000000, 1205.699951, -1342.500000, 800.500000},
  5592. {1205.69995117, -1344.09997559, 797.00000000, 1205.699951, -1342.500000, 797.000000}
  5593. };
  5594. new const Float:cellSpawns[][] =
  5595. {
  5596. {1599.5602, -1660.2219, 2107.0806, 359.7994},
  5597. {1602.2844, -1659.9176, 2107.0808, 359.7994},
  5598. {1606.7863, -1659.4351, 2107.0813, 0.6927},
  5599. {1203.2362, -1333.9489, 796.7505, 270.0000}
  5600. };
  5601. new const Float:arrestPoints[][] =
  5602. {
  5603. {1229.3544, -1311.8627, 796.7859}, // PD interior
  5604. {1528.5728, -1677.8324, 5.8906}, // PD garage
  5605. {1564.6931, -1662.1338, 28.3956}, // PD roof
  5606. {310.3752, -1515.3691, 24.9219}, // FBI garage
  5607. {1382.0898, -1393.6364, -33.7034} // army garage
  5608. };
  5609. new Float:SpawnBolnica[ 3 ][ 3 ] = {
  5610. { -2272.7239, 98.7313, -4.6833 },
  5611. { -2272.9255, 101.8626, -4.6833 },
  5612. { -2272.8877, 105.0981, -4.6833 }
  5613. };
  5614. new const factionTypes[][] =
  5615. {
  5616. {"Civilian"},
  5617. {"Law enforcement"},
  5618. {"Medical & fire"},
  5619. {"News agency"},
  5620. {"Government"},
  5621. {"Hitman agency"},
  5622. {"Federal police"},
  5623. {"Armed Forces"}
  5624. };
  5625. new const deployableItems[][] =
  5626. {
  5627. {"Spikestrip"},
  5628. {"Traffic cone"},
  5629. {"Roadblock"},
  5630. {"Barrel"},
  5631. {"Smoke flare"}
  5632. };
  5633. new const clothingTypes[][] =
  5634. {
  5635. {"Glasses"},
  5636. {"Bandanas & masks"},
  5637. {"Hats & caps"},
  5638. {"Misc clothing"}
  5639. };
  5640. enum clothingEnum
  5641. {
  5642. clothingType[20],
  5643. clothingName[32],
  5644. clothingModel,
  5645. clothingBone,
  5646. clothingPrice
  5647. };
  5648. new const clothingArray[][clothingEnum] =
  5649. {
  5650. {"Glasses", "Red tinted shades", 19006, 2, 500},
  5651. {"Glasses", "Brown tinted shades", 19007, 2, 500},
  5652. {"Glasses", "Green tinted shades", 19008, 2, 500},
  5653. {"Glasses", "Blue tinted shades", 19009, 2, 500},
  5654. {"Glasses", "Pink tinted shades", 19010, 2, 500},
  5655. {"Glasses", "Spiralled shades", 19011, 2, 500},
  5656. {"Glasses", "Black tinted shades", 19012, 2, 500},
  5657. {"Glasses", "Gag glasses", 19013, 2, 500},
  5658. {"Glasses", "Checkered shades", 19014, 2, 500},
  5659. {"Glasses", "Reading glasses", 19015, 2, 500},
  5660. {"Glasses", "X-Ray glasses", 19016, 2, 500},
  5661. {"Glasses", "Plastic black shades", 19017, 2, 500},
  5662. {"Glasses", "Plastic orange shades", 19018, 2, 500},
  5663. {"Glasses", "Plastic red shades", 19019, 2, 500},
  5664. {"Glasses", "Plastic blue shades", 19020, 2, 500},
  5665. {"Glasses", "Plastic green shades", 19021, 2, 500},
  5666. {"Glasses", "Clear sunglasses", 19022, 2, 500},
  5667. {"Glasses", "Blue sunglasses", 19023, 2, 500},
  5668. {"Glasses", "Purple sunglasses", 19024, 2, 500},
  5669. {"Glasses", "Pink sunglasses", 19025, 2, 500},
  5670. {"Glasses", "Red sunglasses", 19026, 2, 500},
  5671. {"Glasses", "Brown sunglasses", 19027, 2, 500},
  5672. {"Glasses", "Yellow sunglasses", 19028, 2, 500},
  5673. {"Glasses", "Green sunglasses", 19029, 2, 500},
  5674. {"Glasses", "Plain brown shades", 19030, 2, 500},
  5675. {"Glasses", "Plain yellow shades", 19031, 2, 500},
  5676. {"Glasses", "Plain red shades", 19032, 2, 500},
  5677. {"Glasses", "Plain black shades", 19033, 2, 500},
  5678. {"Glasses", "Checkered glasses", 19034, 2, 500},
  5679. {"Glasses", "Wavy glasses", 19035, 2, 500},
  5680. {"Bandanas & masks", "Balaclava", 19801, 2, 375},
  5681. {"Bandanas & masks", "Dark blue bandana", 18891, 2, 375},
  5682. {"Bandanas & masks", "Red bandana", 18892, 2, 375},
  5683. {"Bandanas & masks", "Red & white bandana", 18893, 2, 375},
  5684. {"Bandanas & masks", "Orange star bandana", 18894, 2, 375},
  5685. {"Bandanas & masks", "Skull bandana", 18895, 2, 375},
  5686. {"Bandanas & masks", "Black bandana", 18896, 2, 375},
  5687. {"Bandanas & masks", "Blue bandana", 18897, 2, 375},
  5688. {"Bandanas & masks", "Green bandana", 18898, 2, 375},
  5689. {"Bandanas & masks", "Pink bandana", 18899, 2, 375},
  5690. {"Bandanas & masks", "Hippie bandana", 18900, 2, 375},
  5691. {"Bandanas & masks", "Tiger bandana", 18901, 2, 375},
  5692. {"Bandanas & masks", "Yellow bandana", 18902, 2, 375},
  5693. {"Bandanas & masks", "Purple bandana", 18903, 2, 375},
  5694. {"Bandanas & masks", "Cool blue bandana", 18904, 2, 375},
  5695. {"Bandanas & masks", "Brown bandana", 18905, 2, 375},
  5696. {"Bandanas & masks", "Skull bandana mask", 18911, 2, 375},
  5697. {"Bandanas & masks", "Black bandana mask", 18912, 2, 375},
  5698. {"Bandanas & masks", "Grove bandana mask", 18913, 2, 375},
  5699. {"Bandanas & masks", "Camo bandana mask", 18914, 2, 375},
  5700. {"Bandanas & masks", "Hippie bandana mask", 18915, 2, 375},
  5701. {"Bandanas & masks", "Yellow bandana mask", 18916, 2, 375},
  5702. {"Bandanas & masks", "Blue bandana mask", 18917, 2, 375},
  5703. {"Bandanas & masks", "Green bandana mask", 18918, 2, 375},
  5704. {"Bandanas & masks", "White bandana mask", 18919, 2, 375},
  5705. {"Bandanas & masks", "Flower bandana mask", 18920, 2, 375},
  5706. {"Bandanas & masks", "White hockey mask", 19036, 2, 375},
  5707. {"Bandanas & masks", "Red hockey mask", 19037, 2, 375},
  5708. {"Bandanas & masks", "Green hockey mask", 19038, 2, 375},
  5709. {"Bandanas & masks", "Sexy mask", 19557, 2, 375},
  5710. {"Bandanas & masks", "Devil mask", 11704, 2, 375},
  5711. {"Bandanas & masks", "Gas mask", 19472, 2, 375},
  5712. {"Bandanas & masks", "Zorro mask", 18974, 2, 375},
  5713. {"Bandanas & masks", "Gimp mask", 19163, 2, 375},
  5714. {"Hats & caps", "Santa hat", 19064, 2, 240},
  5715. {"Hats & caps", "Dude hat", 19160, 2, 240},
  5716. {"Hats & caps", "Top hat", 19352, 2, 240},
  5717. {"Hats & caps", "Witch hat", 19528, 2, 240},
  5718. {"Hats & caps", "Yellow fire hat", 19330, 2, 240},
  5719. {"Hats & caps", "Black fire hat", 19331, 2, 240},
  5720. {"Hats & caps", "Black beret", 18921, 2, 240},
  5721. {"Hats & caps", "Brown beret", 18922, 2, 240},
  5722. {"Hats & caps", "Blue beret", 18923, 2, 240},
  5723. {"Hats & caps", "Camo beret", 18924, 2, 240},
  5724. {"Hats & caps", "Red beret", 18925, 2, 240},
  5725. {"Hats & caps", "Camo cap", 18926, 2, 240},
  5726. {"Hats & caps", "Wave cap", 18927, 2, 240},
  5727. {"Hats & caps", "Hippy cap", 18928, 2, 240},
  5728. {"Hats & caps", "Green cap", 18929, 2, 240},
  5729. {"Hats & caps", "Red cap", 18930, 2, 240},
  5730. {"Hats & caps", "Blue cap", 18931, 2, 240},
  5731. {"Hats & caps", "Orange cap", 18932, 2, 240},
  5732. {"Hats & caps", "White cap", 18933, 2, 240},
  5733. {"Hats & caps", "Plain pink cap", 18934, 2, 240},
  5734. {"Hats & caps", "Plain yellow cap", 18935, 2, 240},
  5735. {"Hats & caps", "Blue back cap", 18939, 2, 240},
  5736. {"Hats & caps", "Wave back cap", 18940, 2, 240},
  5737. {"Hats & caps", "Black back cap", 18941, 2, 240},
  5738. {"Hats & caps", "White back cap", 18942, 2, 240},
  5739. {"Hats & caps", "Green back cap", 18943, 2, 240},
  5740. {"Hats & caps", "Red boater hat", 18944, 2, 240},
  5741. {"Hats & caps", "Green boater hat", 18945, 2, 240},
  5742. {"Hats & caps", "Striped boater hat", 18946, 2, 240},
  5743. {"Hats & caps", "Black bowler hat", 18947, 2, 240},
  5744. {"Hats & caps", "White bowler hat", 19488, 2, 240},
  5745. {"Hats & caps", "Blue bowler hat", 18948, 2, 240},
  5746. {"Hats & caps", "Green bowler hat", 18949, 2, 240},
  5747. {"Hats & caps", "Red bowler hat", 18950, 2, 240},
  5748. {"Hats & caps", "Yellow bowler hat", 18951, 2, 240},
  5749. {"Hats & caps", "Black knit cap", 18953, 2, 240},
  5750. {"Hats & caps", "White knit cap", 18954, 2, 240},
  5751. {"Hats & caps", "Hippie hat", 18960, 2, 240},
  5752. {"Hats & caps", "Born 2 truck hat", 18961, 2, 240},
  5753. {"Hats & caps", "Brown cowboy hat", 19098, 2, 240},
  5754. {"Hats & caps", "Black cowboy hat", 19096, 2, 240},
  5755. {"Hats & caps", "Skully cap", 18964, 2, 240},
  5756. {"Hats & caps", "Black bucket hat", 18967, 2, 240},
  5757. {"Hats & caps", "Plaid bucket hat", 18968, 2, 240},
  5758. {"Hats & caps", "Zig-Zag bucket hat", 18969, 2, 240},
  5759. {"Hats & caps", "Camo bucket hat", 19106, 2, 240},
  5760. {"Hats & caps", "Hippy hat", 19113, 2, 240},
  5761. {"Hats & caps", "Don't shoot me hat", 19114, 2, 240},
  5762. {"Hats & caps", "Skull hat", 19115, 2, 240},
  5763. {"Hats & caps", "Tiger hat", 18970, 2, 240},
  5764. {"Hats & caps", "Hard hat", 18638, 2, 240},
  5765. {"Hats & caps", "Straw hat", 19553, 2, 240},
  5766. {"Hats & caps", "Pizza hat", 19558, 2, 240},
  5767. {"Hats & caps", "Beanie hat", 19554, 2, 240},
  5768. {"Hats & caps", "Checkered fedora", 18971, 2, 240},
  5769. {"Hats & caps", "Orange fedora", 18972, 2, 240},
  5770. {"Hats & caps", "Yellow fedora", 18973, 2, 240},
  5771. {"Hats & caps", "Camoflauge helmet", 19101, 2, 240},
  5772. {"Hats & caps", "Black helmet", 19116, 2, 240},
  5773. {"Hats & caps", "Red helmet", 19117, 2, 240},
  5774. {"Hats & caps", "Green helmet", 19118, 2, 240},
  5775. {"Hats & caps", "Blue helmet", 19119, 2, 240},
  5776. {"Hats & caps", "Yellow helmet", 19120, 2, 240},
  5777. {"Hats & caps", "Boxing helmet", 18952, 2, 240},
  5778. {"Hats & caps", "Motorcycle helmet", 18645, 2, 240},
  5779. {"Misc clothing", "Gold watch", 19039, 6, 500},
  5780. {"Misc clothing", "Silver watch", 19040, 6, 500},
  5781. {"Misc clothing", "Bronze watch", 19041, 6, 500},
  5782. {"Misc clothing", "Yellow watch", 19042, 6, 500},
  5783. {"Misc clothing", "White watch", 19043, 6, 500},
  5784. {"Misc clothing", "Purple watch", 19044, 6, 500},
  5785. {"Misc clothing", "Pink watch", 19045, 6, 500},
  5786. {"Misc clothing", "Green watch", 19046, 6, 500},
  5787. {"Misc clothing", "Blue watch", 19047, 6, 500},
  5788. {"Misc clothing", "Camo watch", 19053, 6, 500},
  5789. {"Misc clothing", "White headphones", 19421, 2, 500},
  5790. {"Misc clothing", "Black headphones", 19422, 2, 500},
  5791. {"Misc clothing", "Orange headphones", 19423, 2, 500},
  5792. {"Misc clothing", "Blue headphones", 19424, 2, 500},
  5793. {"Misc clothing", "Red clown hair", 19274, 2, 500},
  5794. {"Misc clothing", "Grey clown hair", 19518, 2, 500},
  5795. {"Misc clothing", "Black hair", 19077, 2, 500},
  5796. {"Misc clothing", "Grey hair", 19517, 2, 500},
  5797. {"Misc clothing", "Bass guitar", 19317, 1, 500},
  5798. {"Misc clothing", "White guitar", 19318, 1, 500},
  5799. {"Misc clothing", "Black guitar", 19319, 1, 500},
  5800. {"Misc clothing", "Pilot hat", 19520, 2, 500},
  5801. {"Misc clothing", "Bag of money", 1550, 1, 500},
  5802. {"Misc clothing", "Shop basket", 19592, 6, 500},
  5803. {"Misc clothing", "Oil can", 19621, 6, 500},
  5804. {"Misc clothing", "Broom", 19622, 1, 500},
  5805. {"Misc clothing", "Camera", 19623, 6, 500},
  5806. {"Misc clothing", "Briefcase", 19624, 6, 500},
  5807. {"Misc clothing", "Cigarette", 19625, 2, 500},
  5808. {"Misc clothing", "Spade", 19626, 1, 500},
  5809. {"Misc clothing", "Left boxing glove", 19555, 5, 500},
  5810. {"Misc clothing", "Right boxing glove", 19556, 6, 500},
  5811. {"Misc clothing", "Scarf", 19469, 2, 500},
  5812. {"Misc clothing", "Eye patch", 19085, 2, 500},
  5813. {"Misc clothing", "Hiker backpack", 19559, 1, 500},
  5814. {"Misc clothing", "Construction vest", 19904, 1, 500},
  5815. {"Misc clothing", "Police radio", 19942, 1, 500},
  5816. {"Misc clothing", "Bodybag", 19944, 1, 500},
  5817. {"Misc clothing", "Sports bag", 11745, 1, 500},
  5818. {"Misc clothing", "Holster", 19773, 8, 500},
  5819. {"Misc clothing", "Fedora", 18639, 2, 500},
  5820. {"Misc clothing", "Afro", 18640, 2, 500},
  5821. {"Misc clothing", "Flashlight", 18641, 6, 500},
  5822. {"Misc clothing", "Hammer", 18635, 6, 500},
  5823. {"Misc clothing", "Wrench", 18633, 2, 500},
  5824. {"Misc clothing", "Backpack", 3026, 9, 500}
  5825. };
  5826. enum copEnum
  5827. {
  5828. cModel,
  5829. cBone,
  5830. cName[24]
  5831. };
  5832. new const copClothing[][copEnum] =
  5833. {
  5834. {18636, 2, "Police cap"},
  5835. {19521, 2, "Police hat"},
  5836. {19099, 2, "Black rim hat"},
  5837. {19100, 2, "Brown rim hat"},
  5838. {19139, 2, "Red shades"},
  5839. {19140, 2, "Blue shades"},
  5840. {19138, 2, "Black shades"},
  5841. {19774, 1, "Badge"},
  5842. {19942, 1, "Radio"},
  5843. {19162, 2, "Blue cap"},
  5844. {19161, 2, "Black cap"},
  5845. {19200, 2, "Bike helmet"},
  5846. {18637, 1, "Riot shield"},
  5847. {19141, 2, "SWAT helmet"},
  5848. {19142, 1, "SWAT armor"},
  5849. {19515, 1, "Grey armor"},
  5850. {19514, 2, "Grey helmet"},
  5851. {19777, 1, "FBI insignia"},
  5852. {19776, 1, "FBI ID card"},
  5853. {18642, 1, "Taser"},
  5854. {18641, 1, "Flashlight"},
  5855. {11749, 1, "Handcuffs"},
  5856. {11750, 1, "Closed cuff"},
  5857. {19783, 1, "Police badge"},
  5858. {19784, 1, "Police badge 2"},
  5859. {19785, 1, "Senior Ld. badge"},
  5860. {19778, 1, "Detective badge"},
  5861. {19779, 1, "Detective badge 2"},
  5862. {19780, 1, "Detective badge 3"},
  5863. {19781, 1, "Sergeant badge"},
  5864. {19782, 1, "Sergeant badge 2"}
  5865. };
  5866. enum achievementEnum
  5867. {
  5868. aName[24],
  5869. aDescription[64]
  5870. };
  5871. new const achievementInfo[][achievementEnum] =
  5872. {
  5873. {"First wheels", "Purchase a vehicle for the first time."},
  5874. {"Working class", "Earn $20,000 on your paycheck."},
  5875. {"Legal driver", "Acquire your drivers license at the DMV."},
  5876. {"Meeting people", "Shake a hand for the first time."},
  5877. {"Regular", "Play a total of 20 playing hours."},
  5878. {"Addicted", "Play a total of 40 playing hours."},
  5879. {"Five stars", "Achieve level 5 on your account."},
  5880. {"Top tier", "Achieve level 10 on your account."},
  5881. {"Dress up", "Attach up to 5 clothing items at once."},
  5882. {"Dirty deeds", "Complete a drug deal with someone."},
  5883. {"Dedication", "Complete an entire matrun onfoot."},
  5884. {"Obamacare", "Spawn at a hospital while insured."},
  5885. {"High roller", "Earn $500,000 in total money."},
  5886. {"I'm rich!", "Spend $500,000 in total money."},
  5887. {"Benefits", "Fully - a perk for the first time."},
  5888. {"Experienced", "Fully maximize your skill level for any job."},
  5889. {"High times", "Get stoned for the first time."},
  5890. {"Party hard", "Buy alcohol at a bar and get drunk."},
  5891. {"Flash mob", "Dance with five other people at once."},
  5892. {"Cookie jar", "Earn a total of five cookies."},
  5893. {"Diamond!", "Mine a diamond."}
  5894. /* {"Acme Dinamyte", "Get Exploded by an Admin."},
  5895. {"A black Hole", "Get Admin Killed."},
  5896. {"Illegal Weapon", "Buy a Weapon in the Ammunation."},
  5897. {"Fitness", "Train yourself in a Gym."},
  5898. {"At the End", "Finish your Tutorial."},
  5899. {"Finally, A Job", "Get your First Job."},
  5900. {"Home Sweet Home", "Buy Your First House."},
  5901. {"A Dirty Mind", "Wanking."},
  5902. {"You're a hooker", "Make a Blowjob"}
  5903. */
  5904. };
  5905. enum bizInts
  5906. {
  5907. intName[32],
  5908. intID,
  5909. Float:intX,
  5910. Float:intY,
  5911. Float:intZ,
  5912. Float:intA
  5913. };
  5914. new const bizInteriorArray[][bizInts] =
  5915. {
  5916. {"24/7 (version 1)", 17, -25.9733, -187.8952, 1003.5468, 0.0000},
  5917. {"24/7 (version 2)", 10, 6.0159, -31.0345, 1003.5493, 0.0000},
  5918. {"24/7 (version 3)", 18, -30.9967, -91.4492, 1003.5468, 0.0000},
  5919. {"24/7 (version 4)", 16, -25.9416, -140.6656, 1003.5468, 0.0000},
  5920. {"24/7 (version 5)", 4, -27.3069, -30.8341, 1003.5573, 0.0000},
  5921. {"24/7 (version 6)", 6, -27.4368, -57.4361, 1003.5468, 0.0000},
  5922. {"Ammunation (version 1)", 7, 315.7398, -143.1958, 999.6016, 0.0000},
  5923. {"Ammunation (version 2)", 1, 285.3190, -41.1576, 1001.5156, 0.0000},
  5924. {"Ammunation (version 3)", 4, 285.7825, -85.9860, 1001.5228, 0.0000},
  5925. {"Ammunation (version 4)", 6, 296.7723, -111.6399, 1001.5156, 0.0000},
  5926. {"Ammunation (version 5)", 6, 316.2890, -169.7619, 999.6010, 0.0000},
  5927. {"Binco", 15, 207.6329, -110.7673, 1005.1328, 0.0000},
  5928. {"Pro-Laps", 3, 206.9459, -139.5319, 1003.5078, 0.0000},
  5929. {"Didier Sachs", 14, 204.2969, -168.3488, 1000.5233, 0.0000},
  5930. {"Victim", 5, 226.7738, -8.2257, 1002.2108, 90.0000},
  5931. {"Zip", 18, 161.3670, -96.4953, 1001.8046, 0.0000},
  5932. {"SubUrban", 1, 203.7149, -50.2200, 1001.8046, 0.0000},
  5933. {"Betting (version 1)", 3, 834.1848, 7.3453, 1004.1870, 90.0000},
  5934. {"Betting (version 2)", 1, -2170.3428, 640.7771, 1052.3817, 0.0000},
  5935. {"Donut Shop", 17, 377.0733, -193.0574, 1000.6400, 0.0000},
  5936. {"Burger Shot", 10, 363.1346, -74.8441, 1001.5078, 315.0000},
  5937. {"Pizza Stack", 5, 372.3019, -133.1221, 1001.4921, 0.0000},
  5938. {"Cluckin' Bell", 9, 364.8536, -11.1400, 1001.8516, 0.0000},
  5939. {"Marco's Bistro", 1, -795.0334, 489.8574, 1376.1953, 0.0000},
  5940. {"Cafeteria", 4, 459.7685, -88.6637, 999.5547, 90.0000},
  5941. {"Barber Shop", 3, 418.5545, -83.9392, 1001.8046, 0.0000},
  5942. {"Tattoo Shop", 3, -204.4362, -43.8119, 1002.2733, 0.0000},
  5943. {"Ganton Gym", 5, 772.2800, -4.7154, 1000.7288, 0.0000},
  5944. {"Las Venturas Gym", 7, 773.8508, -78.3952, 1000.6621, 0.0000},
  5945. {"San Fierro Gym", 6, 774.1206, -49.9538, 1000.5858, 0.0000},
  5946. {"Sex Shop", 3, -100.3628, -24.4456, 1000.7188, 0.0000},
  5947. {"RC Shop", 6, -2240.3610, 128.2816, 1035.4210, 270.0000},
  5948. {"Four Dragons Casino", 10, 2018.2132, 1017.7788, 996.8750, 90.0000},
  5949. {"Caligulas Casino", 1, 2234.0485, 1714.1568, 1012.3596, 180.0000},
  5950. {"Red Sands Casino", 12, 1133.1075, -15.3114, 1000.6796, 0.0000},
  5951. {"Alhambra", 17, 493.3728, -23.9953, 1000.6796, 0.0000},
  5952. {"Pig Pen", 2, 1204.7922, -13.2587, 1000.9218, 0.0000},
  5953. {"Big Spread Ranch", 3, 1212.1400, -26.3005, 1000.9531, 180.0000},
  5954. {"Ten Green Bottles", 11, 501.9559, -67.9867, 998.7578, 180.0000},
  5955. {"Lil' Probe Inn", 18, -228.7570, 1401.2421, 27.7656, 270.0000},
  5956. {"Warehouse", 18, 1307.0178, 4.1193, 1001.0289, 90.0000}
  5957. };
  5958. enum intEnum
  5959. {
  5960. intName[32],
  5961. intID,
  5962. Float:intX,
  5963. Float:intY,
  5964. Float:intZ,
  5965. Float:intA
  5966. }
  5967. new const interiorArray[][intEnum] =
  5968. {
  5969. {"24/7 (version 1)", 17, -25.7220, -187.8215, 1003.5468, 5.0760},
  5970. {"24/7 (version 2)", 10, 6.0854, -28.8966, 1003.5493, 5.0363},
  5971. {"24/7 (version 3)", 18, -30.9874, -89.6806, 1003.5468, 359.8399},
  5972. {"24/7 (version 4)", 16, -26.1856, -140.9163, 1003.5468, 2.9086},
  5973. {"24/7 (version 5)", 4, -27.8439, -26.6737, 1003.5573, 184.3117},
  5974. {"24/7 (version 6)", 6, -26.8339, -55.5844, 1003.5468, 3.9528},
  5975. {"8-Track Stadium", 7, -1403.0114, -250.4526, 1043.5340, 355.8576},
  5976. {"Abandoned AC Tower", 10, 419.8934, 2537.1154, 10.0000, 67.6537},
  5977. {"Ammunation (version 1)", 7, 315.2438, -140.8858, 999.6016, 7.4225},
  5978. {"Ammunation (version 2)", 1, 285.8359, -39.0166, 1001.5156, 0.7529},
  5979. {"Ammunation (version 3)", 4, 291.7626, -80.1305, 1001.5156, 290.2195},
  5980. {"Ammunation (version 4)", 6, 297.1440, -109.8702, 1001.5156, 20.2254},
  5981. {"Ammunation (version 5)", 6, 316.5025, -167.6271, 999.5938, 10.3030},
  5982. {"Andromada", 9, 315.4544, 976.5972, 1960.8509, 359.6368},
  5983. {"Angel Pine Trailer", 2, 1.1851, -3.2386, 999.4284, 87.5718},
  5984. {"Area 69", 0, 215.1515, 1874.0577, 13.1406, 177.5538},
  5985. {"Atrium", 18, 1727.2851, -1642.9449, 20.2254, 172.4192},
  5986. {"B Dup's Apartment", 3, 1527.0467, -12.0235, 1002.0971, 350.0013},
  5987. {"B Dup's Crack Palace", 2, 1523.5096, -47.8209, 1002.2697, 262.7037},
  5988. {"Bar", 11, 501.9577, -70.5646, 998.7578, 171.5706},
  5989. {"Barbara's Love nest", 5, 322.5014, 303.6906, 999.1483, 8.1745},
  5990. {"Barber Shop (version 1)", 3, 418.4666, -80.4595, 1001.8046, 343.2358},
  5991. {"Barber Shop (version 2)", 12, 411.9707, -51.9216, 1001.8983, 173.3448},
  5992. {"Barber Shop (version 3)", 2, 414.2987, -18.8043, 1001.8046, 41.4263},
  5993. {"Big Smoke's Crack Palace", 2, 2536.5322, -1294.8425, 1044.1250, 254.9548},
  5994. {"Bike School (version 1)", 3, 1494.8587, 1306.4798, 1093.2951, 196.0650},
  5995. {"Bike School (version 2)", 0, 1168.5118, 1360.1145, 10.9293, 196.5933},
  5996. {"Binco", 15, 207.5218, -109.7446, 1005.1328, 358.6199},
  5997. {"Blastin' Fools Records", 3, 1037.8276, 0.3970, 1001.2844, 353.9335},
  5998. {"Blood Bowl Stadium", 15, -1417.8927, 932.4481, 1041.5312, 0.7013},
  5999. {"Blueberry Liquor Store", 0, 255.2082, -59.6753, 1.5701, 1.4644},
  6000. {"Brothel 1", 3, 974.0177, -9.5937, 1001.1483, 22.6044},
  6001. {"Brothel 2", 3, 961.9307, -51.9071, 1001.1171, 95.5381},
  6002. {"Budget Inn Motel Room", 12, 446.3247, 509.9660, 1001.4193, 330.5671},
  6003. {"Burger Shot", 10, 366.0248, -73.3478, 1001.5078, 292.0083},
  6004. {"Burglary House 1", 15, 295.1390, 1473.3719, 1080.2578, 352.9526},
  6005. {"Burglary House 2", 3, 234.6087, 1187.8194, 1080.2578, 349.4844},
  6006. {"Burglary House 3", 5, 227.7559, 1114.3842, 1080.9920, 266.2622},
  6007. {"Burglary House 4", 4, 261.1163, 1287.2197, 1080.2578, 178.9149},
  6008. {"Burglary House 5", 4, 221.6766, 1142.4962, 1082.6092, 184.9618},
  6009. {"Burglary House 6", 10, 24.3768, 1341.1827, 1084.3750, 8.3304},
  6010. {"Burglary House 7", 4, -262.1759, 1456.6158, 1084.3670, 82.4589},
  6011. {"Burglary House 8", 5, 22.8610, 1404.9165, 1084.4295, 349.6158},
  6012. {"Burglary House 9", 5, 140.3679, 1367.8835, 1083.8620, 349.2372},
  6013. {"Burglary House 10", 6, 234.2825, 1065.2290, 1084.2099, 4.3864},
  6014. {"Burglary House 11", 6, -68.5145, 1353.8485, 1080.2109, 3.5741},
  6015. {"Burglary House 12", 2, 225.5706, 1240.0643, 1082.1406, 96.2852},
  6016. {"Burglary House 13", 15, -285.2510, 1471.1970, 1084.3750, 85.6547},
  6017. {"Burglary House 14", 8, -42.5265, 1408.2298, 1084.4295, 172.0679},
  6018. {"Burglary House 15", 9, 84.9244, 1324.2983, 1083.8592, 159.5581},
  6019. {"Burglary House 16", 9, 260.7420, 1238.2259, 1084.2578, 84.3084},
  6020. {"Burglary House 17", 1, 224.2879, 1289.1905, 1082.1406, 359.8680},
  6021. {"Burglary House 18", 5, 239.2819, 1114.1989, 1080.9920, 270.2654},
  6022. {"Burglary House 19", 2, 446.6260, 1397.7380, 1084.3045, 343.9645},
  6023. {"Burning Desire Building", 5, 2350.1596, -1181.0656, 1027.9764, 99.1864},
  6024. {"Caligula's Casino", 1, 2233.9362, 1711.8038, 1011.6312, 184.3890},
  6025. {"Caligula's Roof", 1, 2268.5156, 1647.7680, 1084.2342, 99.7331},
  6026. {"Casino (Redsands West)", 12, 1133.3498, -7.8460, 1000.6796, 165.8482},
  6027. {"Cemetary", 0, 818.7714, -1102.8687, 25.7940, 91.1437},
  6028. {"Club", 17, 493.1441, -24.2607, 1000.6796, 356.9862},
  6029. {"Cluckin' Bell", 9, 366.0002, -9.4336, 1001.8516, 160.5278},
  6030. {"Cobra Gym", 6, 773.8886, -47.7696, 1000.5858, 10.7159},
  6031. {"Colonel Furhberger's", 8, 2807.3603, -1171.7048, 1025.5703, 193.7117},
  6032. {"Crack Den", 5, 227.3921, 1114.6572, 1080.9985, 267.4590},
  6033. {"Denise's Bedroom", 1, 245.2306, 304.7632, 999.1483, 273.4364},
  6034. {"Didier Sachs", 14, 204.1658, -165.7678, 1000.5233, 181.7583},
  6035. {"Dillimore Gas Station", 0, 663.0587, -573.6273, 16.3358, 264.9829},
  6036. {"Diner 1", 5, 454.9851, -107.2546, 999.4376, 309.0195},
  6037. {"Dirtbike Stadium", 4, -1421.5616, -663.8261, 1059.5567, 170.9340},
  6038. {"Driving School", 3, -2031.1196, -115.8285, 1035.1717, 190.1876},
  6039. {"Fanny Batter's Whore House", 6, 748.4622, 1438.2376, 1102.9531, 0.6068},
  6040. {"Four Dragons", 10, 2016.1156, 1017.1541, 996.8750, 88.0055},
  6041. {"Francis International Airport", 14, -1813.2130, -58.0120, 1058.9641, 335.3197},
  6042. {"Ganton Gym", 5, 770.8032, -0.7031, 1000.7266, 22.8598},
  6043. {"Helena's Barn", 3, 290.6228, 309.0621, 999.1483, 89.9162},
  6044. {"Inside Track Betting", 3, 830.6016, 5.9404, 1004.1796, 125.8149},
  6045. {"Jay's Diner", 4, 449.0172, -88.9894, 999.5546, 89.6606},
  6046. {"Jefferson Motel", 15, 2217.2810, -1150.5349, 1025.7967, 273.7326},
  6047. {"Jet Interior", 1, 1.5491, 23.3183, 1199.5937, 359.9053},
  6048. {"K.A.C.C. Military Fuels Depot", 0, 2548.4807, 2823.7429, 10.8203, 270.6003},
  6049. {"Katie's Lovenest", 2, 269.6405, 305.9512, 999.1483, 215.6625},
  6050. {"Kickstart Stadium", 14, -1420.4277, 1616.9221, 1052.5312, 159.1255},
  6051. {"Las Venturas Gym", 7, 773.7318, -74.6957, 1000.6541, 5.2304},
  6052. {"Las Venturas Police Department", 3, 288.4721, 170.0646, 1007.1793, 22.0477},
  6053. {"Las Venturas Tattoo parlor", 3, -201.2236, -43.2463, 1002.2733, 45.8613},
  6054. {"Liberty City", 1, -741.8494, 493.0036, 1371.9764, 71.7780},
  6055. {"Lil' Probe Inn", 18, -227.5702, 1401.5544, 27.7656, 269.2976},
  6056. {"Loco Low Co", 2, 611.3535, -77.5574, 997.9995, 320.9263},
  6057. {"Los Santos Airport", 14, -1864.9433, 55.7323, 1055.5274, 85.8541},
  6058. {"Los Santos Police Department", 6, 246.6694, 65.8039, 1003.6406, 7.9562},
  6059. {"Los Santos Tattoo Parlor", 16, -202.8419, -24.0324, 1002.2733, 252.8153},
  6060. {"Lost San Fierro Tattoo parlor", 17, -202.9380, -6.7006, 1002.2733, 204.2693},
  6061. {"Madd Dogg's Mansion", 5, 1267.8405, -776.9586, 1091.9062, 231.3417},
  6062. {"Michelle's Love Nest", 4, 306.1965, 307.8190, 1003.3046, 203.1354},
  6063. {"Millie's Bedroom", 6, 344.9984, 307.1824, 999.1557, 193.6430},
  6064. {"OG Loc's House", 3, 512.9290, -11.6927, 1001.5653, 198.7669},
  6065. {"Old Venturas Strip Casino", 2, 2236.6997, -1078.9477, 1049.0234, 2.5706},
  6066. {"Otto's Autos", 0, -1658.1656, 1215.0002, 7.2500, 103.9074},
  6067. {"Oval Stadium", 1, -1402.6612, 106.3897, 1032.2734, 105.1354},
  6068. {"Palamino Bank", 0, 2306.3825, -15.2363, 26.7495, 274.4898},
  6069. {"Palamino Diner", 0, 2331.8984, 6.7814, 26.5032, 100.2357},
  6070. {"Pizza Stack", 5, 372.5563, -131.3607, 1001.4921, 354.2283},
  6071. {"Planning Department", 3, 386.5259, 173.6381, 1008.3828, 63.7397},
  6072. {"Pro-Laps", 3, 206.4627, -137.7075, 1003.0938, 10.9347},
  6073. {"RC Battlefield", 10, -1129.8907, 1057.5423, 1346.4139, 274.5267},
  6074. {"Rosenberg's Office", 2, 2182.2016, 1628.5848, 1043.8723, 224.8601},
  6075. {"Rusty Brown's Donuts", 17, 378.0260, -190.5155, 1000.6328, 141.0245},
  6076. {"Ryder's House", 2, 2447.8703, -1704.4509, 1013.5078, 314.5252},
  6077. {"Safe House (version 1)", 5, 2233.6918, -1112.8105, 1050.8828, 8.6483},
  6078. {"Safe House (version 2)", 9, 2319.1271, -1023.9561, 1050.2109, 167.3959},
  6079. {"Safe House (version 3)", 10, 2261.0976, -1137.8833, 1050.6328, 266.8800},
  6080. {"San Fierro Garage", 1, -2041.2332, 178.3968, 28.8465, 156.2153},
  6081. {"San Fierro Police Department", 10, 246.0688, 108.9701, 1003.2188, 0.2921},
  6082. {"Secret Valley Diner", 6, 442.1293, -52.4780, 999.7166, 177.9394},
  6083. {"Sex Shop", 3, -100.2674, -22.9375, 1000.7188, 17.2849},
  6084. {"Sherman Dam", 17, -944.2401, 1886.1534, 5.0050, 179.8547},
  6085. {"Sindacco Abatoir", 1, 963.0584, 2159.7563, 1011.0302, 175.3130},
  6086. {"SubUrban", 1, 204.1174, -46.8045, 1001.8046, 357.5776},
  6087. {"Sweet's House", 1, 2527.0175, -1679.2076, 1015.4984, 260.9707},
  6088. {"The Big Spread Ranch", 3, 1212.1489, -28.5387, 1000.9531, 170.5691},
  6089. {"The Camel's Toe Safehouse", 1, 2216.1281, -1076.3050, 1050.4842, 86.4280},
  6090. {"The Johnson House", 3, 2496.0549, -1695.1749, 1014.7421, 179.2174},
  6091. {"The Pig Pen (strip club 2)", 2, 1204.6689, -13.5429, 1000.9218, 350.0202},
  6092. {"The Pleasure Domes", 3, -2638.8232, 1407.3393, 906.4608, 94.6792},
  6093. {"The Welcome Pump", 1, 681.6215, -451.8933, -25.6172, 166.1660},
  6094. {"Torreno's Ranch", 0, -688.1494, 942.0825, 13.6328, 177.6573},
  6095. {"Transfenders", 1, 621.4528, -23.7289, 1000.9218, 15.6787},
  6096. {"Unused Safe House", 12, 2323.7062, -1147.6507, 1050.7099, 206.5352},
  6097. {"Verdant Bluffs Safehouse", 8, 2365.1088, -1133.0793, 1050.8750, 177.3946},
  6098. {"Vice Stadium", 16, -1401.0670, 1265.3706, 1039.8670, 178.6483},
  6099. {"Victim", 5, 225.0305, -9.1836, 1002.2180, 85.5322},
  6100. {"Wang Cars", 0, -1961.6280, 295.2377, 35.4687, 264.4891},
  6101. {"Wardrobe/Changing room", 14, 256.9046, -41.6537, 1002.0233, 85.8774},
  6102. {"Warehouse 1", 18, 1290.4106, 1.9512, 1001.0200, 179.9418},
  6103. {"Warehouse 2", 1, 1412.1472, -2.2836, 1000.9240, 114.6610},
  6104. {"Warehouse 3", 0, 2135.2004, -2276.2814, 20.6718, 318.5899},
  6105. {"Wheel Arch Angels", 3, 612.2191, -123.9028, 997.9921, 266.5704},
  6106. {"Willowfield Safehouse", 11, 2283.3117, 1139.3070, 1050.8984, 19.7031},
  6107. {"World of Coq", 1, 445.6003, -6.9822, 1000.7343, 172.2104},
  6108. {"Wu-Zi Mu's", 1, -2158.6730, 642.0900, 1052.3750, 86.5401},
  6109. {"Zero's RC Shop", 6, -2240.1027, 136.9730, 1035.4139, 269.0953},
  6110. {"Zip", 18, 161.4048, -94.2416, 1001.8046, 0.7936},
  6111. {"Zombotech", 0, -1916.1268, 714.8615, 46.5625, 152.2839}
  6112. };
  6113. enum radioEnum
  6114. {
  6115. rGenre[32],
  6116. rSubgenre[32]
  6117. };
  6118. new const radioGenreList[][radioEnum] =
  6119. {
  6120. {"Alternative", "Alternative"},
  6121. {"Alternative", "Adult Alternative"},
  6122. {"Alternative", "Britpop"},
  6123. {"Alternative", "Classic Alternative"},
  6124. {"Alternative", "College"},
  6125. {"Alternative", "Dancepunk"},
  6126. {"Alternative", "Dream Pop"},
  6127. {"Alternative", "Emo"},
  6128. {"Alternative", "Goth"},
  6129. {"Alternative", "Grunge"},
  6130. {"Alternative", "Hardcore"},
  6131. {"Alternative", "Indie Pop"},
  6132. {"Alternative", "Indie Rock"},
  6133. {"Alternative", "Industrial"},
  6134. {"Alternative", "LoFi"},
  6135. {"Alternative", "Modern Rock"},
  6136. {"Alternative", "New Wave"},
  6137. {"Alternative", "Noise Pop"},
  6138. {"Alternative", "Post Punk"},
  6139. {"Alternative", "Power Pop"},
  6140. {"Alternative", "Punk"},
  6141. {"Alternative", "Ska"},
  6142. {"Alternative", "Xtreme"},
  6143. {"Blues", "Blues"},
  6144. {"Blues", "Acoustic Blues"},
  6145. {"Blues", "Cajun and Zydeco"},
  6146. {"Blues", "Chicago Blues"},
  6147. {"Blues", "Contemporary Blues"},
  6148. {"Blues", "Country Blues"},
  6149. {"Blues", "Delta Blues"},
  6150. {"Blues", "Electric Blues"},
  6151. {"Classical", "Classical"},
  6152. {"Classical", "Baroque"},
  6153. {"Classical", "Chamber"},
  6154. {"Classical", "Choral"},
  6155. {"Classical", "Classical Period"},
  6156. {"Classical", "Early Classical"},
  6157. {"Classical", "Impressionist"},
  6158. {"Classical", "Modern"},
  6159. {"Classical", "Opera"},
  6160. {"Classical", "Piano"},
  6161. {"Classical", "Romantic"},
  6162. {"Classical", "Symphony"},
  6163. {"Country", "Country"},
  6164. {"Country", "Alt Country"},
  6165. {"Country", "Americana"},
  6166. {"Country", "Bluegrass"},
  6167. {"Country", "Classic Country"},
  6168. {"Country", "Contemporary Country"},
  6169. {"Country", "Honky Tonk"},
  6170. {"Country", "Hot Country Hits"},
  6171. {"Country", "Western"},
  6172. {"Decades", "Decades"},
  6173. {"Decades", "00s"},
  6174. {"Decades", "30s"},
  6175. {"Decades", "40s"},
  6176. {"Decades", "50s"},
  6177. {"Decades", "60s"},
  6178. {"Decades", "70s"},
  6179. {"Decades", "80s"},
  6180. {"Decades", "90s"},
  6181. {"Easy Listening", "Easy Listening"},
  6182. {"Easy Listening", "Exotica"},
  6183. {"Easy Listening", "Light Rock"},
  6184. {"Easy Listening", "Lounge"},
  6185. {"Easy Listening", "Orchestral Pop"},
  6186. {"Easy Listening", "Polka"},
  6187. {"Easy Listening", "Space Age Pop"},
  6188. {"Electronic", "Electronic"},
  6189. {"Electronic", "Acid House"},
  6190. {"Electronic", "Ambient"},
  6191. {"Electronic", "Big Beat"},
  6192. {"Electronic", "Breakbeat"},
  6193. {"Electronic", "Dance"},
  6194. {"Electronic", "Demo"},
  6195. {"Electronic", "Disco"},
  6196. {"Electronic", "Downtempo"},
  6197. {"Electronic", "Drum and Bass"},
  6198. {"Electronic", "Dubstep"},
  6199. {"Electronic", "Electro"},
  6200. {"Electronic", "Garage"},
  6201. {"Electronic", "Hard House"},
  6202. {"Electronic", "House"},
  6203. {"Electronic", "IDM"},
  6204. {"Electronic", "Jungle"},
  6205. {"Electronic", "Progressive"},
  6206. {"Electronic", "Techno"},
  6207. {"Electronic", "Trance"},
  6208. {"Electronic", "Tribal"},
  6209. {"Electronic", "Trip Hop"},
  6210. {"Folk", "Folk"},
  6211. {"Folk", "Alternative Folk"},
  6212. {"Folk", "Contemporary Folk"},
  6213. {"Folk", "Folk Rock"},
  6214. {"Folk", "New Acoustic"},
  6215. {"Folk", "Old Time"},
  6216. {"Folk", "Traditional Folk"},
  6217. {"Folk", "World Folk"},
  6218. {"Inspirational", "Inspirational"},
  6219. {"Inspirational", "Christian"},
  6220. {"Inspirational", "Christian Metal"},
  6221. {"Inspirational", "Christian Rap"},
  6222. {"Inspirational", "Christian Rock"},
  6223. {"Inspirational", "Classic Christian"},
  6224. {"Inspirational", "Contemporary Gospel"},
  6225. {"Inspirational", "Gospel"},
  6226. {"Inspirational", "Praise and Worship"},
  6227. {"Inspirational", "Sermon and Services"},
  6228. {"Inspirational", "Southern Gospel"},
  6229. {"Inspirational", "Traditional Gospel"},
  6230. {"International", "International"},
  6231. {"International", "African"},
  6232. {"International", "Afrikaans"},
  6233. {"International", "Arabic"},
  6234. {"International", "Asian"},
  6235. {"International", "Bollywood"},
  6236. {"International", "Brazilian"},
  6237. {"International", "Caribbean"},
  6238. {"International", "Celtic"},
  6239. {"International", "Chinese"},
  6240. {"International", "Creole"},
  6241. {"International", "European"},
  6242. {"International", "Filipino"},
  6243. {"International", "French"},
  6244. {"International", "German"},
  6245. {"International", "Greek"},
  6246. {"International", "Hawaiian & Pacific"},
  6247. {"International", "Hebrew"},
  6248. {"International", "Hindi"},
  6249. {"International", "Indian"},
  6250. {"International", "Islamic"},
  6251. {"International", "Japanese"},
  6252. {"International", "Korean"},
  6253. {"International", "Mediterranean"},
  6254. {"International", "Middle Eastern"},
  6255. {"International", "North American"},
  6256. {"International", "Russian"},
  6257. {"International", "Soca"},
  6258. {"International", "South American"},
  6259. {"International", "Tamil"},
  6260. {"International", "Turkish"},
  6261. {"International", "Worldbeat"},
  6262. {"International", "Zouk"},
  6263. {"Jazz", "Jazz"},
  6264. {"Jazz", "Acid Jazz"},
  6265. {"Jazz", "Avant Garde"},
  6266. {"Jazz", "Big Band"},
  6267. {"Jazz", "Bop"},
  6268. {"Jazz", "Classic Jazz"},
  6269. {"Jazz", "Cool Jazz"},
  6270. {"Jazz", "Fusion"},
  6271. {"Jazz", "Hard Bop"},
  6272. {"Jazz", "Latin Jazz"},
  6273. {"Jazz", "Smooth Jazz"},
  6274. {"Jazz", "Swing"},
  6275. {"Jazz", "Vocal Jazz"},
  6276. {"Jazz", "World Fusion"},
  6277. {"Latin", "Latin"},
  6278. {"Latin", "Bachata"},
  6279. {"Latin", "Banda"},
  6280. {"Latin", "Bossa Nova"},
  6281. {"Latin", "Cumbia"},
  6282. {"Latin", "Flamenco"},
  6283. {"Latin", "Latin Dance"},
  6284. {"Latin", "Latin Pop"},
  6285. {"Latin", "Latin Rap"},
  6286. {"Latin", "Latin Rock"},
  6287. {"Latin", "Mariachi"},
  6288. {"Latin", "Merengue"},
  6289. {"Latin", "Ranchera"},
  6290. {"Latin", "Reggaeton"},
  6291. {"Latin", "Regional Mexican"},
  6292. {"Latin", "Salsa"},
  6293. {"Latin", "Samba"},
  6294. {"Latin", "Tango"},
  6295. {"Latin", "Tejano"},
  6296. {"Latin", "Tropicalia"},
  6297. {"Metal", "Metal"},
  6298. {"Metal", "Black Metal"},
  6299. {"Metal", "Classic Metal"},
  6300. {"Metal", "Death Metal"},
  6301. {"Metal", "Extreme Metal"},
  6302. {"Metal", "Grindcore"},
  6303. {"Metal", "Hair Metal"},
  6304. {"Metal", "Heavy Metal"},
  6305. {"Metal", "Metalcore"},
  6306. {"Metal", "Power Metal"},
  6307. {"Metal", "Progressive Metal"},
  6308. {"Metal", "Thrash Metal"},
  6309. {"Misc", "Misc"},
  6310. {"New Age", "New Age"},
  6311. {"New Age", "Environmental"},
  6312. {"New Age", "Ethnic Fusion"},
  6313. {"New Age", "Healing"},
  6314. {"New Age", "Meditation"},
  6315. {"New Age", "Spiritual"},
  6316. {"Pop", "Pop"},
  6317. {"Pop", "Adult Contemporary"},
  6318. {"Pop", "Barbershop"},
  6319. {"Pop", "Bubblegum Pop"},
  6320. {"Pop", "Dance Pop"},
  6321. {"Pop", "Idols"},
  6322. {"Pop", "JPOP"},
  6323. {"Pop", "KPOP"},
  6324. {"Pop", "Oldies"},
  6325. {"Pop", "Soft Rock"},
  6326. {"Pop", "Teen Pop"},
  6327. {"Pop", "Top 40"},
  6328. {"Pop", "World Pop"},
  6329. {"Public Radio", "Public Radio"},
  6330. {"Public Radio", "College"},
  6331. {"Public Radio", "News"},
  6332. {"Public Radio", "Sports"},
  6333. {"Public Radio", "Talk"},
  6334. {"Public Radio", "Weather"},
  6335. {"R&B and Urban", "R&B and Urban"},
  6336. {"R&B and Urban", "Classic R&B"},
  6337. {"R&B and Urban", "Contemporary R&B"},
  6338. {"R&B and Urban", "Funk"},
  6339. {"R&B and Urban", "Motown"},
  6340. {"R&B and Urban", "Neo Soul"},
  6341. {"R&B and Urban", "Quiet Storm"},
  6342. {"R&B and Urban", "Soul"},
  6343. {"R&B and Urban", "Urban Contemporary"},
  6344. {"Rap", "Rap"},
  6345. {"Rap", "Alternative Rap"},
  6346. {"Rap", "Dirty South"},
  6347. {"Rap", "East Coast Rap"},
  6348. {"Rap", "Freestyle"},
  6349. {"Rap", "Gangsta Rap"},
  6350. {"Rap", "Hip Hop"},
  6351. {"Rap", "Mixtapes"},
  6352. {"Rap", "Old School"},
  6353. {"Rap", "Turntablism"},
  6354. {"Rap", "Underground Hip Hop"},
  6355. {"Rap", "West Coast Rap"},
  6356. {"Reggae", "Reggae"},
  6357. {"Reggae", "Contemporary Reggae"},
  6358. {"Reggae", "Dancehall"},
  6359. {"Reggae", "Dub"},
  6360. {"Reggae", "Pop Reggae"},
  6361. {"Reggae", "Ragga"},
  6362. {"Reggae", "Reggae Roots"},
  6363. {"Reggae", "Rock Steady"},
  6364. {"Rock", "Rock"},
  6365. {"Rock", "Adult Alternative"},
  6366. {"Rock", "Celtic Rock"},
  6367. {"Rock", "Classic Rock"},
  6368. {"Rock", "Garage Rock"},
  6369. {"Rock", "Glam"},
  6370. {"Rock", "Hard Rock"},
  6371. {"Rock", "Jam Bands"},
  6372. {"Rock", "JROCK"},
  6373. {"Rock", "Progressive Rock"},
  6374. {"Rock", "Psychedelic"},
  6375. {"Rock", "Rock & Roll"},
  6376. {"Rock", "Rockabilly"},
  6377. {"Rock", "Singer & Songwriter"},
  6378. {"Rock", "Surf"},
  6379. {"Seasonal and Holiday", "Seasonal and Holiday"},
  6380. {"Seasonal and Holiday", "Birthday"},
  6381. {"Seasonal and Holiday", "Christmas"},
  6382. {"Seasonal and Holiday", "Halloween"},
  6383. {"Seasonal and Holiday", "Kwanzaa"},
  6384. {"Seasonal and Holiday", "Valentine"},
  6385. {"Seasonal and Holiday", "Winter"},
  6386. {"Soundtracks", "Soundtracks"},
  6387. {"Soundtracks", "Anime"},
  6388. {"Soundtracks", "Kids"},
  6389. {"Soundtracks", "Original Score"},
  6390. {"Soundtracks", "Showtunes"},
  6391. {"Soundtracks", "Video Game Music"},
  6392. {"Talk", "Talk"},
  6393. {"Talk", "BlogTalk"},
  6394. {"Talk", "Comedy"},
  6395. {"Talk", "Community"},
  6396. {"Talk", "Educational"},
  6397. {"Talk", "Government"},
  6398. {"Talk", "News"},
  6399. {"Talk", "Old Time Radio"},
  6400. {"Talk", "Other Talk"},
  6401. {"Talk", "Political"},
  6402. {"Talk", "Scanner"},
  6403. {"Talk", "Spoken Word"},
  6404. {"Talk", "Sports"},
  6405. {"Talk", "Technology"},
  6406. {"Themes", "Themes"},
  6407. {"Themes", "Adult"},
  6408. {"Themes", "Best Of"},
  6409. {"Themes", "Chill"},
  6410. {"Themes", "Eclectic"},
  6411. {"Themes", "Experimental"},
  6412. {"Themes", "Female"},
  6413. {"Themes", "Heartache"},
  6414. {"Themes", "Instrumental"},
  6415. {"Themes", "LGBT"},
  6416. {"Themes", "Love and Romance"},
  6417. {"Themes", "Party Mix"},
  6418. {"Themes", "Patriotic"},
  6419. {"Themes", "Rainy Day Mix"},
  6420. {"Themes", "Reality"},
  6421. {"Themes", "Sexy"},
  6422. {"Themes", "Shuffle"},
  6423. {"Themes", "Travel Mix"},
  6424. {"Themes", "Trippy"},
  6425. {"Themes", "Work Mix"}
  6426. };
  6427. enum zoneEnum
  6428. {
  6429. zoneName[32],
  6430. Float:zoneMinX,
  6431. Float:zoneMinY,
  6432. Float:zoneMinZ,
  6433. Float:zoneMaxX,
  6434. Float:zoneMaxY,
  6435. Float:zoneMaxZ
  6436. };
  6437. new const zoneArray[][zoneEnum] =
  6438. {
  6439. {"The Big Ear", -410.00, 1403.30, -3.00, -137.90, 1681.20, 200.00},
  6440. {"Aldea Malvada", -1372.10, 2498.50, 0.00, -1277.50, 2615.30, 200.00},
  6441. {"Angel Pine", -2324.90, -2584.20, -6.10, -1964.20, -2212.10, 200.00},
  6442. {"Arco del Oeste", -901.10, 2221.80, 0.00, -592.00, 2571.90, 200.00},
  6443. {"Avispa Country Club", -2646.40, -355.40, 0.00, -2270.00, -222.50, 200.00},
  6444. {"Avispa Country Club", -2831.80, -430.20, -6.10, -2646.40, -222.50, 200.00},
  6445. {"Avispa Country Club", -2361.50, -417.10, 0.00, -2270.00, -355.40, 200.00},
  6446. {"Avispa Country Club", -2667.80, -302.10, -28.80, -2646.40, -262.30, 71.10},
  6447. {"Avispa Country Club", -2470.00, -355.40, 0.00, -2270.00, -318.40, 46.10},
  6448. {"Avispa Country Club", -2550.00, -355.40, 0.00, -2470.00, -318.40, 39.70},
  6449. {"Back o Beyond", -1166.90, -2641.10, 0.00, -321.70, -1856.00, 200.00},
  6450. {"Battery Point", -2741.00, 1268.40, -4.50, -2533.00, 1490.40, 200.00},
  6451. {"Bayside", -2741.00, 2175.10, 0.00, -2353.10, 2722.70, 200.00},
  6452. {"Bayside Marina", -2353.10, 2275.70, 0.00, -2153.10, 2475.70, 200.00},
  6453. {"Beacon Hill", -399.60, -1075.50, -1.40, -319.00, -977.50, 198.50},
  6454. {"Blackfield", 964.30, 1203.20, -89.00, 1197.30, 1403.20, 110.90},
  6455. {"Blackfield", 964.30, 1403.20, -89.00, 1197.30, 1726.20, 110.90},
  6456. {"Blackfield Chapel", 1375.60, 596.30, -89.00, 1558.00, 823.20, 110.90},
  6457. {"Blackfield Chapel", 1325.60, 596.30, -89.00, 1375.60, 795.00, 110.90},
  6458. {"Blackfield Intersection", 1197.30, 1044.60, -89.00, 1277.00, 1163.30, 110.90},
  6459. {"Blackfield Intersection", 1166.50, 795.00, -89.00, 1375.60, 1044.60, 110.90},
  6460. {"Blackfield Intersection", 1277.00, 1044.60, -89.00, 1315.30, 1087.60, 110.90},
  6461. {"Blackfield Intersection", 1375.60, 823.20, -89.00, 1457.30, 919.40, 110.90},
  6462. {"Blueberry", 104.50, -220.10, 2.30, 349.60, 152.20, 200.00},
  6463. {"Blueberry", 19.60, -404.10, 3.80, 349.60, -220.10, 200.00},
  6464. {"Blueberry Acres", -319.60, -220.10, 0.00, 104.50, 293.30, 200.00},
  6465. {"Caligula's Palace", 2087.30, 1543.20, -89.00, 2437.30, 1703.20, 110.90},
  6466. {"Caligula's Palace", 2137.40, 1703.20, -89.00, 2437.30, 1783.20, 110.90},
  6467. {"Calton Heights", -2274.10, 744.10, -6.10, -1982.30, 1358.90, 200.00},
  6468. {"Chinatown", -2274.10, 578.30, -7.60, -2078.60, 744.10, 200.00},
  6469. {"City Hall", -2867.80, 277.40, -9.10, -2593.40, 458.40, 200.00},
  6470. {"Come-A-Lot", 2087.30, 943.20, -89.00, 2623.10, 1203.20, 110.90},
  6471. {"Commerce", 1323.90, -1842.20, -89.00, 1701.90, -1722.20, 110.90},
  6472. {"Commerce", 1323.90, -1722.20, -89.00, 1440.90, -1577.50, 110.90},
  6473. {"Commerce", 1370.80, -1577.50, -89.00, 1463.90, -1384.90, 110.90},
  6474. {"Commerce", 1463.90, -1577.50, -89.00, 1667.90, -1430.80, 110.90},
  6475. {"Commerce", 1583.50, -1722.20, -89.00, 1758.90, -1577.50, 110.90},
  6476. {"Commerce", 1667.90, -1577.50, -89.00, 1812.60, -1430.80, 110.90},
  6477. {"Conference Center", 1046.10, -1804.20, -89.00, 1323.90, -1722.20, 110.90},
  6478. {"Conference Center", 1073.20, -1842.20, -89.00, 1323.90, -1804.20, 110.90},
  6479. {"Cranberry Station", -2007.80, 56.30, 0.00, -1922.00, 224.70, 100.00},
  6480. {"Creek", 2749.90, 1937.20, -89.00, 2921.60, 2669.70, 110.90},
  6481. {"Dillimore", 580.70, -674.80, -9.50, 861.00, -404.70, 200.00},
  6482. {"Doherty", -2270.00, -324.10, -0.00, -1794.90, -222.50, 200.00},
  6483. {"Doherty", -2173.00, -222.50, -0.00, -1794.90, 265.20, 200.00},
  6484. {"Downtown", -1982.30, 744.10, -6.10, -1871.70, 1274.20, 200.00},
  6485. {"Downtown", -1871.70, 1176.40, -4.50, -1620.30, 1274.20, 200.00},
  6486. {"Downtown", -1700.00, 744.20, -6.10, -1580.00, 1176.50, 200.00},
  6487. {"Downtown", -1580.00, 744.20, -6.10, -1499.80, 1025.90, 200.00},
  6488. {"Downtown", -2078.60, 578.30, -7.60, -1499.80, 744.20, 200.00},
  6489. {"Downtown", -1993.20, 265.20, -9.10, -1794.90, 578.30, 200.00},
  6490. {"Downtown Los Santos", 1463.90, -1430.80, -89.00, 1724.70, -1290.80, 110.90},
  6491. {"Downtown Los Santos", 1724.70, -1430.80, -89.00, 1812.60, -1250.90, 110.90},
  6492. {"Downtown Los Santos", 1463.90, -1290.80, -89.00, 1724.70, -1150.80, 110.90},
  6493. {"Downtown Los Santos", 1370.80, -1384.90, -89.00, 1463.90, -1170.80, 110.90},
  6494. {"Downtown Los Santos", 1724.70, -1250.90, -89.00, 1812.60, -1150.80, 110.90},
  6495. {"Downtown Los Santos", 1370.80, -1170.80, -89.00, 1463.90, -1130.80, 110.90},
  6496. {"Downtown Los Santos", 1378.30, -1130.80, -89.00, 1463.90, -1026.30, 110.90},
  6497. {"Downtown Los Santos", 1391.00, -1026.30, -89.00, 1463.90, -926.90, 110.90},
  6498. {"Downtown Los Santos", 1507.50, -1385.20, 110.90, 1582.50, -1325.30, 335.90},
  6499. {"East Beach", 2632.80, -1852.80, -89.00, 2959.30, -1668.10, 110.90},
  6500. {"East Beach", 2632.80, -1668.10, -89.00, 2747.70, -1393.40, 110.90},
  6501. {"East Beach", 2747.70, -1668.10, -89.00, 2959.30, -1498.60, 110.90},
  6502. {"East Beach", 2747.70, -1498.60, -89.00, 2959.30, -1120.00, 110.90},
  6503. {"East Los Santos", 2421.00, -1628.50, -89.00, 2632.80, -1454.30, 110.90},
  6504. {"East Los Santos", 2222.50, -1628.50, -89.00, 2421.00, -1494.00, 110.90},
  6505. {"East Los Santos", 2266.20, -1494.00, -89.00, 2381.60, -1372.00, 110.90},
  6506. {"East Los Santos", 2381.60, -1494.00, -89.00, 2421.00, -1454.30, 110.90},
  6507. {"East Los Santos", 2281.40, -1372.00, -89.00, 2381.60, -1135.00, 110.90},
  6508. {"East Los Santos", 2381.60, -1454.30, -89.00, 2462.10, -1135.00, 110.90},
  6509. {"East Los Santos", 2462.10, -1454.30, -89.00, 2581.70, -1135.00, 110.90},
  6510. {"Easter Basin", -1794.90, 249.90, -9.10, -1242.90, 578.30, 200.00},
  6511. {"Easter Basin", -1794.90, -50.00, -0.00, -1499.80, 249.90, 200.00},
  6512. {"Easter Bay Airport", -1499.80, -50.00, -0.00, -1242.90, 249.90, 200.00},
  6513. {"Easter Bay Airport", -1794.90, -730.10, -3.00, -1213.90, -50.00, 200.00},
  6514. {"Easter Bay Airport", -1213.90, -730.10, 0.00, -1132.80, -50.00, 200.00},
  6515. {"Easter Bay Airport", -1242.90, -50.00, 0.00, -1213.90, 578.30, 200.00},
  6516. {"Easter Bay Airport", -1213.90, -50.00, -4.50, -947.90, 578.30, 200.00},
  6517. {"Easter Bay Airport", -1315.40, -405.30, 15.40, -1264.40, -209.50, 25.40},
  6518. {"Easter Bay Airport", -1354.30, -287.30, 15.40, -1315.40, -209.50, 25.40},
  6519. {"Easter Bay Airport", -1490.30, -209.50, 15.40, -1264.40, -148.30, 25.40},
  6520. {"Easter Bay Chemicals", -1132.80, -768.00, 0.00, -956.40, -578.10, 200.00},
  6521. {"Easter Bay Chemicals", -1132.80, -787.30, 0.00, -956.40, -768.00, 200.00},
  6522. {"El Castillo del Diablo", -464.50, 2217.60, 0.00, -208.50, 2580.30, 200.00},
  6523. {"El Castillo del Diablo", -208.50, 2123.00, -7.60, 114.00, 2337.10, 200.00},
  6524. {"El Castillo del Diablo", -208.50, 2337.10, 0.00, 8.40, 2487.10, 200.00},
  6525. {"El Corona", 1812.60, -2179.20, -89.00, 1970.60, -1852.80, 110.90},
  6526. {"El Corona", 1692.60, -2179.20, -89.00, 1812.60, -1842.20, 110.90},
  6527. {"El Quebrados", -1645.20, 2498.50, 0.00, -1372.10, 2777.80, 200.00},
  6528. {"Esplanade East", -1620.30, 1176.50, -4.50, -1580.00, 1274.20, 200.00},
  6529. {"Esplanade East", -1580.00, 1025.90, -6.10, -1499.80, 1274.20, 200.00},
  6530. {"Esplanade East", -1499.80, 578.30, -79.60, -1339.80, 1274.20, 20.30},
  6531. {"Esplanade North", -2533.00, 1358.90, -4.50, -1996.60, 1501.20, 200.00},
  6532. {"Esplanade North", -1996.60, 1358.90, -4.50, -1524.20, 1592.50, 200.00},
  6533. {"Esplanade North", -1982.30, 1274.20, -4.50, -1524.20, 1358.90, 200.00},
  6534. {"Fallen Tree", -792.20, -698.50, -5.30, -452.40, -380.00, 200.00},
  6535. {"Fallow Bridge", 434.30, 366.50, 0.00, 603.00, 555.60, 200.00},
  6536. {"Fern Ridge", 508.10, -139.20, 0.00, 1306.60, 119.50, 200.00},
  6537. {"Financial", -1871.70, 744.10, -6.10, -1701.30, 1176.40, 300.00},
  6538. {"Fisher's Lagoon", 1916.90, -233.30, -100.00, 2131.70, 13.80, 200.00},
  6539. {"Flint Intersection", -187.70, -1596.70, -89.00, 17.00, -1276.60, 110.90},
  6540. {"Flint Range", -594.10, -1648.50, 0.00, -187.70, -1276.60, 200.00},
  6541. {"Fort Carson", -376.20, 826.30, -3.00, 123.70, 1220.40, 200.00},
  6542. {"Foster Valley", -2270.00, -430.20, -0.00, -2178.60, -324.10, 200.00},
  6543. {"Foster Valley", -2178.60, -599.80, -0.00, -1794.90, -324.10, 200.00},
  6544. {"Foster Valley", -2178.60, -1115.50, 0.00, -1794.90, -599.80, 200.00},
  6545. {"Foster Valley", -2178.60, -1250.90, 0.00, -1794.90, -1115.50, 200.00},
  6546. {"Frederick Bridge", 2759.20, 296.50, 0.00, 2774.20, 594.70, 200.00},
  6547. {"Gant Bridge", -2741.40, 1659.60, -6.10, -2616.40, 2175.10, 200.00},
  6548. {"Gant Bridge", -2741.00, 1490.40, -6.10, -2616.40, 1659.60, 200.00},
  6549. {"Ganton", 2222.50, -1852.80, -89.00, 2632.80, -1722.30, 110.90},
  6550. {"Ganton", 2222.50, -1722.30, -89.00, 2632.80, -1628.50, 110.90},
  6551. {"Garcia", -2411.20, -222.50, -0.00, -2173.00, 265.20, 200.00},
  6552. {"Garcia", -2395.10, -222.50, -5.30, -2354.00, -204.70, 200.00},
  6553. {"Garver Bridge", -1339.80, 828.10, -89.00, -1213.90, 1057.00, 110.90},
  6554. {"Garver Bridge", -1213.90, 950.00, -89.00, -1087.90, 1178.90, 110.90},
  6555. {"Garver Bridge", -1499.80, 696.40, -179.60, -1339.80, 925.30, 20.30},
  6556. {"Glen Park", 1812.60, -1449.60, -89.00, 1996.90, -1350.70, 110.90},
  6557. {"Glen Park", 1812.60, -1100.80, -89.00, 1994.30, -973.30, 110.90},
  6558. {"Glen Park", 1812.60, -1350.70, -89.00, 2056.80, -1100.80, 110.90},
  6559. {"Green Palms", 176.50, 1305.40, -3.00, 338.60, 1520.70, 200.00},
  6560. {"Greenglass College", 964.30, 1044.60, -89.00, 1197.30, 1203.20, 110.90},
  6561. {"Greenglass College", 964.30, 930.80, -89.00, 1166.50, 1044.60, 110.90},
  6562. {"Hampton Barns", 603.00, 264.30, 0.00, 761.90, 366.50, 200.00},
  6563. {"Hankypanky Point", 2576.90, 62.10, 0.00, 2759.20, 385.50, 200.00},
  6564. {"Harry Gold Parkway", 1777.30, 863.20, -89.00, 1817.30, 2342.80, 110.90},
  6565. {"Hashbury", -2593.40, -222.50, -0.00, -2411.20, 54.70, 200.00},
  6566. {"Hilltop Farm", 967.30, -450.30, -3.00, 1176.70, -217.90, 200.00},
  6567. {"Hunter Quarry", 337.20, 710.80, -115.20, 860.50, 1031.70, 203.70},
  6568. {"Idlewood", 1812.60, -1852.80, -89.00, 1971.60, -1742.30, 110.90},
  6569. {"Idlewood", 1812.60, -1742.30, -89.00, 1951.60, -1602.30, 110.90},
  6570. {"Idlewood", 1951.60, -1742.30, -89.00, 2124.60, -1602.30, 110.90},
  6571. {"Idlewood", 1812.60, -1602.30, -89.00, 2124.60, -1449.60, 110.90},
  6572. {"Idlewood", 2124.60, -1742.30, -89.00, 2222.50, -1494.00, 110.90},
  6573. {"Idlewood", 1971.60, -1852.80, -89.00, 2222.50, -1742.30, 110.90},
  6574. {"Jefferson", 1996.90, -1449.60, -89.00, 2056.80, -1350.70, 110.90},
  6575. {"Jefferson", 2124.60, -1494.00, -89.00, 2266.20, -1449.60, 110.90},
  6576. {"Jefferson", 2056.80, -1372.00, -89.00, 2281.40, -1210.70, 110.90},
  6577. {"Jefferson", 2056.80, -1210.70, -89.00, 2185.30, -1126.30, 110.90},
  6578. {"Jefferson", 2185.30, -1210.70, -89.00, 2281.40, -1154.50, 110.90},
  6579. {"Jefferson", 2056.80, -1449.60, -89.00, 2266.20, -1372.00, 110.90},
  6580. {"Julius Thruway East", 2623.10, 943.20, -89.00, 2749.90, 1055.90, 110.90},
  6581. {"Julius Thruway East", 2685.10, 1055.90, -89.00, 2749.90, 2626.50, 110.90},
  6582. {"Julius Thruway East", 2536.40, 2442.50, -89.00, 2685.10, 2542.50, 110.90},
  6583. {"Julius Thruway East", 2625.10, 2202.70, -89.00, 2685.10, 2442.50, 110.90},
  6584. {"Julius Thruway North", 2498.20, 2542.50, -89.00, 2685.10, 2626.50, 110.90},
  6585. {"Julius Thruway North", 2237.40, 2542.50, -89.00, 2498.20, 2663.10, 110.90},
  6586. {"Julius Thruway North", 2121.40, 2508.20, -89.00, 2237.40, 2663.10, 110.90},
  6587. {"Julius Thruway North", 1938.80, 2508.20, -89.00, 2121.40, 2624.20, 110.90},
  6588. {"Julius Thruway North", 1534.50, 2433.20, -89.00, 1848.40, 2583.20, 110.90},
  6589. {"Julius Thruway North", 1848.40, 2478.40, -89.00, 1938.80, 2553.40, 110.90},
  6590. {"Julius Thruway North", 1704.50, 2342.80, -89.00, 1848.40, 2433.20, 110.90},
  6591. {"Julius Thruway North", 1377.30, 2433.20, -89.00, 1534.50, 2507.20, 110.90},
  6592. {"Julius Thruway South", 1457.30, 823.20, -89.00, 2377.30, 863.20, 110.90},
  6593. {"Julius Thruway South", 2377.30, 788.80, -89.00, 2537.30, 897.90, 110.90},
  6594. {"Julius Thruway West", 1197.30, 1163.30, -89.00, 1236.60, 2243.20, 110.90},
  6595. {"Julius Thruway West", 1236.60, 2142.80, -89.00, 1297.40, 2243.20, 110.90},
  6596. {"Juniper Hill", -2533.00, 578.30, -7.60, -2274.10, 968.30, 200.00},
  6597. {"Juniper Hollow", -2533.00, 968.30, -6.10, -2274.10, 1358.90, 200.00},
  6598. {"K.A.C.C. Military Fuels", 2498.20, 2626.50, -89.00, 2749.90, 2861.50, 110.90},
  6599. {"Kincaid Bridge", -1339.80, 599.20, -89.00, -1213.90, 828.10, 110.90},
  6600. {"Kincaid Bridge", -1213.90, 721.10, -89.00, -1087.90, 950.00, 110.90},
  6601. {"Kincaid Bridge", -1087.90, 855.30, -89.00, -961.90, 986.20, 110.90},
  6602. {"King's", -2329.30, 458.40, -7.60, -1993.20, 578.30, 200.00},
  6603. {"King's", -2411.20, 265.20, -9.10, -1993.20, 373.50, 200.00},
  6604. {"King's", -2253.50, 373.50, -9.10, -1993.20, 458.40, 200.00},
  6605. {"LVA Freight Depot", 1457.30, 863.20, -89.00, 1777.40, 1143.20, 110.90},
  6606. {"LVA Freight Depot", 1375.60, 919.40, -89.00, 1457.30, 1203.20, 110.90},
  6607. {"LVA Freight Depot", 1277.00, 1087.60, -89.00, 1375.60, 1203.20, 110.90},
  6608. {"LVA Freight Depot", 1315.30, 1044.60, -89.00, 1375.60, 1087.60, 110.90},
  6609. {"LVA Freight Depot", 1236.60, 1163.40, -89.00, 1277.00, 1203.20, 110.90},
  6610. {"Las Barrancas", -926.10, 1398.70, -3.00, -719.20, 1634.60, 200.00},
  6611. {"Las Brujas", -365.10, 2123.00, -3.00, -208.50, 2217.60, 200.00},
  6612. {"Las Colinas", 1994.30, -1100.80, -89.00, 2056.80, -920.80, 110.90},
  6613. {"Las Colinas", 2056.80, -1126.30, -89.00, 2126.80, -920.80, 110.90},
  6614. {"Las Colinas", 2185.30, -1154.50, -89.00, 2281.40, -934.40, 110.90},
  6615. {"Las Colinas", 2126.80, -1126.30, -89.00, 2185.30, -934.40, 110.90},
  6616. {"Las Colinas", 2747.70, -1120.00, -89.00, 2959.30, -945.00, 110.90},
  6617. {"Las Colinas", 2632.70, -1135.00, -89.00, 2747.70, -945.00, 110.90},
  6618. {"Las Colinas", 2281.40, -1135.00, -89.00, 2632.70, -945.00, 110.90},
  6619. {"Las Payasadas", -354.30, 2580.30, 2.00, -133.60, 2816.80, 200.00},
  6620. {"Las Venturas Airport", 1236.60, 1203.20, -89.00, 1457.30, 1883.10, 110.90},
  6621. {"Las Venturas Airport", 1457.30, 1203.20, -89.00, 1777.30, 1883.10, 110.90},
  6622. {"Las Venturas Airport", 1457.30, 1143.20, -89.00, 1777.40, 1203.20, 110.90},
  6623. {"Las Venturas Airport", 1515.80, 1586.40, -12.50, 1729.90, 1714.50, 87.50},
  6624. {"Last Dime Motel", 1823.00, 596.30, -89.00, 1997.20, 823.20, 110.90},
  6625. {"Leafy Hollow", -1166.90, -1856.00, 0.00, -815.60, -1602.00, 200.00},
  6626. {"Liberty City", -1000.00, 400.00, 1300.00, -700.00, 600.00, 1400.00},
  6627. {"Lil' Probe Inn", -90.20, 1286.80, -3.00, 153.80, 1554.10, 200.00},
  6628. {"Linden Side", 2749.90, 943.20, -89.00, 2923.30, 1198.90, 110.90},
  6629. {"Linden Station", 2749.90, 1198.90, -89.00, 2923.30, 1548.90, 110.90},
  6630. {"Linden Station", 2811.20, 1229.50, -39.50, 2861.20, 1407.50, 60.40},
  6631. {"Little Mexico", 1701.90, -1842.20, -89.00, 1812.60, -1722.20, 110.90},
  6632. {"Little Mexico", 1758.90, -1722.20, -89.00, 1812.60, -1577.50, 110.90},
  6633. {"Los Flores", 2581.70, -1454.30, -89.00, 2632.80, -1393.40, 110.90},
  6634. {"Los Flores", 2581.70, -1393.40, -89.00, 2747.70, -1135.00, 110.90},
  6635. {"Los Santos International", 1249.60, -2394.30, -89.00, 1852.00, -2179.20, 110.90},
  6636. {"Los Santos International", 1852.00, -2394.30, -89.00, 2089.00, -2179.20, 110.90},
  6637. {"Los Santos International", 1382.70, -2730.80, -89.00, 2201.80, -2394.30, 110.90},
  6638. {"Los Santos International", 1974.60, -2394.30, -39.00, 2089.00, -2256.50, 60.90},
  6639. {"Los Santos International", 1400.90, -2669.20, -39.00, 2189.80, -2597.20, 60.90},
  6640. {"Los Santos International", 2051.60, -2597.20, -39.00, 2152.40, -2394.30, 60.90},
  6641. {"Marina", 647.70, -1804.20, -89.00, 851.40, -1577.50, 110.90},
  6642. {"Marina", 647.70, -1577.50, -89.00, 807.90, -1416.20, 110.90},
  6643. {"Marina", 807.90, -1577.50, -89.00, 926.90, -1416.20, 110.90},
  6644. {"Market", 787.40, -1416.20, -89.00, 1072.60, -1310.20, 110.90},
  6645. {"Market", 952.60, -1310.20, -89.00, 1072.60, -1130.80, 110.90},
  6646. {"Market", 1072.60, -1416.20, -89.00, 1370.80, -1130.80, 110.90},
  6647. {"Market", 926.90, -1577.50, -89.00, 1370.80, -1416.20, 110.90},
  6648. {"Market Station", 787.40, -1410.90, -34.10, 866.00, -1310.20, 65.80},
  6649. {"Martin Bridge", -222.10, 293.30, 0.00, -122.10, 476.40, 200.00},
  6650. {"Missionary Hill", -2994.40, -811.20, 0.00, -2178.60, -430.20, 200.00},
  6651. {"Montgomery", 1119.50, 119.50, -3.00, 1451.40, 493.30, 200.00},
  6652. {"Montgomery", 1451.40, 347.40, -6.10, 1582.40, 420.80, 200.00},
  6653. {"Montgomery Intersection", 1546.60, 208.10, 0.00, 1745.80, 347.40, 200.00},
  6654. {"Montgomery Intersection", 1582.40, 347.40, 0.00, 1664.60, 401.70, 200.00},
  6655. {"Mulholland", 1414.00, -768.00, -89.00, 1667.60, -452.40, 110.90},
  6656. {"Mulholland", 1281.10, -452.40, -89.00, 1641.10, -290.90, 110.90},
  6657. {"Mulholland", 1269.10, -768.00, -89.00, 1414.00, -452.40, 110.90},
  6658. {"Mulholland", 1357.00, -926.90, -89.00, 1463.90, -768.00, 110.90},
  6659. {"Mulholland", 1318.10, -910.10, -89.00, 1357.00, -768.00, 110.90},
  6660. {"Mulholland", 1169.10, -910.10, -89.00, 1318.10, -768.00, 110.90},
  6661. {"Mulholland", 768.60, -954.60, -89.00, 952.60, -860.60, 110.90},
  6662. {"Mulholland", 687.80, -860.60, -89.00, 911.80, -768.00, 110.90},
  6663. {"Mulholland", 737.50, -768.00, -89.00, 1142.20, -674.80, 110.90},
  6664. {"Mulholland", 1096.40, -910.10, -89.00, 1169.10, -768.00, 110.90},
  6665. {"Mulholland", 952.60, -937.10, -89.00, 1096.40, -860.60, 110.90},
  6666. {"Mulholland", 911.80, -860.60, -89.00, 1096.40, -768.00, 110.90},
  6667. {"Mulholland", 861.00, -674.80, -89.00, 1156.50, -600.80, 110.90},
  6668. {"Mulholland Intersection", 1463.90, -1150.80, -89.00, 1812.60, -768.00, 110.90},
  6669. {"North Rock", 2285.30, -768.00, 0.00, 2770.50, -269.70, 200.00},
  6670. {"Ocean Docks", 2373.70, -2697.00, -89.00, 2809.20, -2330.40, 110.90},
  6671. {"Ocean Docks", 2201.80, -2418.30, -89.00, 2324.00, -2095.00, 110.90},
  6672. {"Ocean Docks", 2324.00, -2302.30, -89.00, 2703.50, -2145.10, 110.90},
  6673. {"Ocean Docks", 2089.00, -2394.30, -89.00, 2201.80, -2235.80, 110.90},
  6674. {"Ocean Docks", 2201.80, -2730.80, -89.00, 2324.00, -2418.30, 110.90},
  6675. {"Ocean Docks", 2703.50, -2302.30, -89.00, 2959.30, -2126.90, 110.90},
  6676. {"Ocean Docks", 2324.00, -2145.10, -89.00, 2703.50, -2059.20, 110.90},
  6677. {"Ocean Flats", -2994.40, 277.40, -9.10, -2867.80, 458.40, 200.00},
  6678. {"Ocean Flats", -2994.40, -222.50, -0.00, -2593.40, 277.40, 200.00},
  6679. {"Ocean Flats", -2994.40, -430.20, -0.00, -2831.80, -222.50, 200.00},
  6680. {"Octane Springs", 338.60, 1228.50, 0.00, 664.30, 1655.00, 200.00},
  6681. {"Old Venturas Strip", 2162.30, 2012.10, -89.00, 2685.10, 2202.70, 110.90},
  6682. {"Palisades", -2994.40, 458.40, -6.10, -2741.00, 1339.60, 200.00},
  6683. {"Palomino Creek", 2160.20, -149.00, 0.00, 2576.90, 228.30, 200.00},
  6684. {"Paradiso", -2741.00, 793.40, -6.10, -2533.00, 1268.40, 200.00},
  6685. {"Pershing Square", 1440.90, -1722.20, -89.00, 1583.50, -1577.50, 110.90},
  6686. {"Pilgrim", 2437.30, 1383.20, -89.00, 2624.40, 1783.20, 110.90},
  6687. {"Pilgrim", 2624.40, 1383.20, -89.00, 2685.10, 1783.20, 110.90},
  6688. {"Pilson Intersection", 1098.30, 2243.20, -89.00, 1377.30, 2507.20, 110.90},
  6689. {"Pirates in Men's Pants", 1817.30, 1469.20, -89.00, 2027.40, 1703.20, 110.90},
  6690. {"Playa del Seville", 2703.50, -2126.90, -89.00, 2959.30, -1852.80, 110.90},
  6691. {"Prickle Pine", 1534.50, 2583.20, -89.00, 1848.40, 2863.20, 110.90},
  6692. {"Prickle Pine", 1117.40, 2507.20, -89.00, 1534.50, 2723.20, 110.90},
  6693. {"Prickle Pine", 1848.40, 2553.40, -89.00, 1938.80, 2863.20, 110.90},
  6694. {"Prickle Pine", 1938.80, 2624.20, -89.00, 2121.40, 2861.50, 110.90},
  6695. {"Queens", -2533.00, 458.40, 0.00, -2329.30, 578.30, 200.00},
  6696. {"Queens", -2593.40, 54.70, 0.00, -2411.20, 458.40, 200.00},
  6697. {"Queens", -2411.20, 373.50, 0.00, -2253.50, 458.40, 200.00},
  6698. {"Randolph Industrial Estate", 1558.00, 596.30, -89.00, 1823.00, 823.20, 110.90},
  6699. {"Redsands East", 1817.30, 2011.80, -89.00, 2106.70, 2202.70, 110.90},
  6700. {"Redsands East", 1817.30, 2202.70, -89.00, 2011.90, 2342.80, 110.90},
  6701. {"Redsands East", 1848.40, 2342.80, -89.00, 2011.90, 2478.40, 110.90},
  6702. {"Redsands West", 1236.60, 1883.10, -89.00, 1777.30, 2142.80, 110.90},
  6703. {"Redsands West", 1297.40, 2142.80, -89.00, 1777.30, 2243.20, 110.90},
  6704. {"Redsands West", 1377.30, 2243.20, -89.00, 1704.50, 2433.20, 110.90},
  6705. {"Redsands West", 1704.50, 2243.20, -89.00, 1777.30, 2342.80, 110.90},
  6706. {"Regular Tom", -405.70, 1712.80, -3.00, -276.70, 1892.70, 200.00},
  6707. {"Richman", 647.50, -1118.20, -89.00, 787.40, -954.60, 110.90},
  6708. {"Richman", 647.50, -954.60, -89.00, 768.60, -860.60, 110.90},
  6709. {"Richman", 225.10, -1369.60, -89.00, 334.50, -1292.00, 110.90},
  6710. {"Richman", 225.10, -1292.00, -89.00, 466.20, -1235.00, 110.90},
  6711. {"Richman", 72.60, -1404.90, -89.00, 225.10, -1235.00, 110.90},
  6712. {"Richman", 72.60, -1235.00, -89.00, 321.30, -1008.10, 110.90},
  6713. {"Richman", 321.30, -1235.00, -89.00, 647.50, -1044.00, 110.90},
  6714. {"Richman", 321.30, -1044.00, -89.00, 647.50, -860.60, 110.90},
  6715. {"Richman", 321.30, -860.60, -89.00, 687.80, -768.00, 110.90},
  6716. {"Richman", 321.30, -768.00, -89.00, 700.70, -674.80, 110.90},
  6717. {"Robada Intersection", -1119.00, 1178.90, -89.00, -862.00, 1351.40, 110.90},
  6718. {"Roca Escalante", 2237.40, 2202.70, -89.00, 2536.40, 2542.50, 110.90},
  6719. {"Roca Escalante", 2536.40, 2202.70, -89.00, 2625.10, 2442.50, 110.90},
  6720. {"Rockshore East", 2537.30, 676.50, -89.00, 2902.30, 943.20, 110.90},
  6721. {"Rockshore West", 1997.20, 596.30, -89.00, 2377.30, 823.20, 110.90},
  6722. {"Rockshore West", 2377.30, 596.30, -89.00, 2537.30, 788.80, 110.90},
  6723. {"Rodeo", 72.60, -1684.60, -89.00, 225.10, -1544.10, 110.90},
  6724. {"Rodeo", 72.60, -1544.10, -89.00, 225.10, -1404.90, 110.90},
  6725. {"Rodeo", 225.10, -1684.60, -89.00, 312.80, -1501.90, 110.90},
  6726. {"Rodeo", 225.10, -1501.90, -89.00, 334.50, -1369.60, 110.90},
  6727. {"Rodeo", 334.50, -1501.90, -89.00, 422.60, -1406.00, 110.90},
  6728. {"Rodeo", 312.80, -1684.60, -89.00, 422.60, -1501.90, 110.90},
  6729. {"Rodeo", 422.60, -1684.60, -89.00, 558.00, -1570.20, 110.90},
  6730. {"Rodeo", 558.00, -1684.60, -89.00, 647.50, -1384.90, 110.90},
  6731. {"Rodeo", 466.20, -1570.20, -89.00, 558.00, -1385.00, 110.90},
  6732. {"Rodeo", 422.60, -1570.20, -89.00, 466.20, -1406.00, 110.90},
  6733. {"Rodeo", 466.20, -1385.00, -89.00, 647.50, -1235.00, 110.90},
  6734. {"Rodeo", 334.50, -1406.00, -89.00, 466.20, -1292.00, 110.90},
  6735. {"Royal Casino", 2087.30, 1383.20, -89.00, 2437.30, 1543.20, 110.90},
  6736. {"San Andreas Sound", 2450.30, 385.50, -100.00, 2759.20, 562.30, 200.00},
  6737. {"Santa Flora", -2741.00, 458.40, -7.60, -2533.00, 793.40, 200.00},
  6738. {"Santa Maria Beach", 342.60, -2173.20, -89.00, 647.70, -1684.60, 110.90},
  6739. {"Santa Maria Beach", 72.60, -2173.20, -89.00, 342.60, -1684.60, 110.90},
  6740. {"Shady Cabin", -1632.80, -2263.40, -3.00, -1601.30, -2231.70, 200.00},
  6741. {"Shady Creeks", -1820.60, -2643.60, -8.00, -1226.70, -1771.60, 200.00},
  6742. {"Shady Creeks", -2030.10, -2174.80, -6.10, -1820.60, -1771.60, 200.00},
  6743. {"Sobell Rail Yards", 2749.90, 1548.90, -89.00, 2923.30, 1937.20, 110.90},
  6744. {"Spinybed", 2121.40, 2663.10, -89.00, 2498.20, 2861.50, 110.90},
  6745. {"Starfish Casino", 2437.30, 1783.20, -89.00, 2685.10, 2012.10, 110.90},
  6746. {"Starfish Casino", 2437.30, 1858.10, -39.00, 2495.00, 1970.80, 60.90},
  6747. {"Starfish Casino", 2162.30, 1883.20, -89.00, 2437.30, 2012.10, 110.90},
  6748. {"Temple", 1252.30, -1130.80, -89.00, 1378.30, -1026.30, 110.90},
  6749. {"Temple", 1252.30, -1026.30, -89.00, 1391.00, -926.90, 110.90},
  6750. {"Temple", 1252.30, -926.90, -89.00, 1357.00, -910.10, 110.90},
  6751. {"Temple", 952.60, -1130.80, -89.00, 1096.40, -937.10, 110.90},
  6752. {"Temple", 1096.40, -1130.80, -89.00, 1252.30, -1026.30, 110.90},
  6753. {"Temple", 1096.40, -1026.30, -89.00, 1252.30, -910.10, 110.90},
  6754. {"The Camel's Toe", 2087.30, 1203.20, -89.00, 2640.40, 1383.20, 110.90},
  6755. {"The Clown's Pocket", 2162.30, 1783.20, -89.00, 2437.30, 1883.20, 110.90},
  6756. {"The Emerald Isle", 2011.90, 2202.70, -89.00, 2237.40, 2508.20, 110.90},
  6757. {"The Farm", -1209.60, -1317.10, 114.90, -908.10, -787.30, 251.90},
  6758. {"The Four Dragons Casino", 1817.30, 863.20, -89.00, 2027.30, 1083.20, 110.90},
  6759. {"The High Roller", 1817.30, 1283.20, -89.00, 2027.30, 1469.20, 110.90},
  6760. {"The Mako Span", 1664.60, 401.70, 0.00, 1785.10, 567.20, 200.00},
  6761. {"The Panopticon", -947.90, -304.30, -1.10, -319.60, 327.00, 200.00},
  6762. {"The Pink Swan", 1817.30, 1083.20, -89.00, 2027.30, 1283.20, 110.90},
  6763. {"The Sherman Dam", -968.70, 1929.40, -3.00, -481.10, 2155.20, 200.00},
  6764. {"The Strip", 2027.40, 863.20, -89.00, 2087.30, 1703.20, 110.90},
  6765. {"The Strip", 2106.70, 1863.20, -89.00, 2162.30, 2202.70, 110.90},
  6766. {"The Strip", 2027.40, 1783.20, -89.00, 2162.30, 1863.20, 110.90},
  6767. {"The Strip", 2027.40, 1703.20, -89.00, 2137.40, 1783.20, 110.90},
  6768. {"The Visage", 1817.30, 1863.20, -89.00, 2106.70, 2011.80, 110.90},
  6769. {"The Visage", 1817.30, 1703.20, -89.00, 2027.40, 1863.20, 110.90},
  6770. {"Unity Station", 1692.60, -1971.80, -20.40, 1812.60, -1932.80, 79.50},
  6771. {"Valle Ocultado", -936.60, 2611.40, 2.00, -715.90, 2847.90, 200.00},
  6772. {"Verdant Bluffs", 930.20, -2488.40, -89.00, 1249.60, -2006.70, 110.90},
  6773. {"Verdant Bluffs", 1073.20, -2006.70, -89.00, 1249.60, -1842.20, 110.90},
  6774. {"Verdant Bluffs", 1249.60, -2179.20, -89.00, 1692.60, -1842.20, 110.90},
  6775. {"Verdant Meadows", 37.00, 2337.10, -3.00, 435.90, 2677.90, 200.00},
  6776. {"Verona Beach", 647.70, -2173.20, -89.00, 930.20, -1804.20, 110.90},
  6777. {"Verona Beach", 930.20, -2006.70, -89.00, 1073.20, -1804.20, 110.90},
  6778. {"Verona Beach", 851.40, -1804.20, -89.00, 1046.10, -1577.50, 110.90},
  6779. {"Verona Beach", 1161.50, -1722.20, -89.00, 1323.90, -1577.50, 110.90},
  6780. {"Verona Beach", 1046.10, -1722.20, -89.00, 1161.50, -1577.50, 110.90},
  6781. {"Vinewood", 787.40, -1310.20, -89.00, 952.60, -1130.80, 110.90},
  6782. {"Vinewood", 787.40, -1130.80, -89.00, 952.60, -954.60, 110.90},
  6783. {"Vinewood", 647.50, -1227.20, -89.00, 787.40, -1118.20, 110.90},
  6784. {"Vinewood", 647.70, -1416.20, -89.00, 787.40, -1227.20, 110.90},
  6785. {"Whitewood Estates", 883.30, 1726.20, -89.00, 1098.30, 2507.20, 110.90},
  6786. {"Whitewood Estates", 1098.30, 1726.20, -89.00, 1197.30, 2243.20, 110.90},
  6787. {"Willowfield", 1970.60, -2179.20, -89.00, 2089.00, -1852.80, 110.90},
  6788. {"Willowfield", 2089.00, -2235.80, -89.00, 2201.80, -1989.90, 110.90},
  6789. {"Willowfield", 2089.00, -1989.90, -89.00, 2324.00, -1852.80, 110.90},
  6790. {"Willowfield", 2201.80, -2095.00, -89.00, 2324.00, -1989.90, 110.90},
  6791. {"Willowfield", 2541.70, -1941.40, -89.00, 2703.50, -1852.80, 110.90},
  6792. {"Willowfield", 2324.00, -2059.20, -89.00, 2541.70, -1852.80, 110.90},
  6793. {"Willowfield", 2541.70, -2059.20, -89.00, 2703.50, -1941.40, 110.90},
  6794. {"Yellow Bell Station", 1377.40, 2600.40, -21.90, 1492.40, 2687.30, 78.00},
  6795. {"Los Santos", 44.60, -2892.90, -242.90, 2997.00, -768.00, 900.00},
  6796. {"Las Venturas", 869.40, 596.30, -242.90, 2997.00, 2993.80, 900.00},
  6797. {"Bone County", -480.50, 596.30, -242.90, 869.40, 2993.80, 900.00},
  6798. {"Tierra Robada", -2997.40, 1659.60, -242.90, -480.50, 2993.80, 900.00},
  6799. {"Tierra Robada", -1213.90, 596.30, -242.90, -480.50, 1659.60, 900.00},
  6800. {"San Fierro", -2997.40, -1115.50, -242.90, -1213.90, 1659.60, 900.00},
  6801. {"Red County", -1213.90, -768.00, -242.90, 2997.00, 596.30, 900.00},
  6802. {"Flint County", -1213.90, -2892.90, -242.90, 44.60, -768.00, 900.00},
  6803. {"Whetstone", -2997.40, -2892.90, -242.90, -1213.90, -1115.50, 900.00}
  6804. };
  6805. // ---------------------------------------
  6806. native WP_Hash(buffer[], len, const str[]);
  6807. native IsValidVehicle(vehicleid);
  6808. // ---------------------------------------
  6809. main(){}
  6810. AntiDeAMX()
  6811. {
  6812. new a[][] =
  6813. {
  6814. "Unarmed (Fist)",
  6815. "Brass K"
  6816. };
  6817. #pragma unused a
  6818. print("Get shit on by Anti-DeAMX");
  6819. }
  6820. GetDate()
  6821. {
  6822. new date[5], string[24];
  6823. getdate(date[0], date[1], date[2]);
  6824. gettime(date[3], date[4]);
  6825. format(string, sizeof(string), "%i-%02d-%02d %02d:%02d", date[0], date[1], date[2], date[3], date[4]);
  6826. return string;
  6827. }
  6828. GetDateStats()
  6829. {
  6830. new date[5], string[24];
  6831. getdate(date[0], date[1], date[2]);
  6832. gettime(date[3], date[4]);
  6833. format(string, sizeof(string), "%02d:%02d %02d-%02d-%i", date[3], date[4], date[2], date[1], date[0]);
  6834. return string;
  6835. }
  6836. GetDateFromTimestamp(timestamp, _form=0)
  6837. {
  6838. new year=1970, day=0, month=0, hourt=0, mins=0, sec=0;
  6839. new days_of_month[12] = { 31,28,31,30,31,30,31,31,30,31,30,31 };
  6840. new names_of_month[12][10] = {"January","February","March","April","May","June","July","August","September","October","November","December"};
  6841. new returnstring[32];
  6842. while(timestamp>31622400){
  6843. timestamp -= 31536000;
  6844. if ( ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0) ) timestamp -= 86400;
  6845. year++;
  6846. }
  6847. if ( ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0) )
  6848. days_of_month[1] = 29;
  6849. else
  6850. days_of_month[1] = 28;
  6851. while(timestamp>86400){
  6852. timestamp -= 86400, day++;
  6853. if(day==days_of_month[month]) day=0, month++;
  6854. }
  6855. while(timestamp>60){
  6856. timestamp -= 60, mins++;
  6857. if( mins == 60) mins=0, hourt++;
  6858. }
  6859. sec=timestamp;
  6860. switch( _form ){
  6861. case 1: format(returnstring, 31, "%02d/%02d/%d %02d:%02d:%02d", day+1, month+1, year, hourt, mins, sec);
  6862. case 2: format(returnstring, 31, "%s %02d, %d, %02d:%02d:%02d", names_of_month[month],day+1,year, hourt, mins, sec);
  6863. case 3: format(returnstring, 31, "%d %c%c%c %d, %02d:%02d", day+1,names_of_month[month][0],names_of_month[month][1],names_of_month[month][2], year,hourt,mins);
  6864. case 4: format(returnstring, 31, "%s %02d, %d", names_of_month[month],day+1,year);
  6865. default: format(returnstring, 31, "%02d.%02d.%d-%02d:%02d:%02d", day+1, month+1, year, hourt, mins, sec);
  6866. }
  6867. return returnstring;
  6868. }
  6869. FormatNumber(number, money = 1)
  6870. {
  6871. new length, value[32];
  6872. format(value, sizeof(value), "%i", (number < 0) ? (-number) : (number));
  6873. length = strlen(value);
  6874. if(length > 3)
  6875. {
  6876. for(new l = 0, i = length; --i >= 0; l ++)
  6877. {
  6878. if((l % 3 == 0) && l > 0)
  6879. {
  6880. strins(value, ",", i + 1);
  6881. }
  6882. }
  6883. }
  6884. if(money)
  6885. strins(value, "$", 0);
  6886. if(number < 0)
  6887. strins(value, "-", 0);
  6888. return value;
  6889. }
  6890. GetAdminDivision(playerid)
  6891. {
  6892. new division[4];
  6893. if(PlayerData[playerid][pAdminPersonnel])
  6894. {
  6895. division = "AP";
  6896. }
  6897. else if(PlayerData[playerid][pHumanResources])
  6898. {
  6899. division = "HR";
  6900. }
  6901. else if(PlayerData[playerid][pGameAffairs])
  6902. {
  6903. division = "DGA";
  6904. }
  6905. else if(PlayerData[playerid][pWebDev])
  6906. {
  6907. division = "BM";
  6908. }
  6909. else if(PlayerData[playerid][pFactionMod])
  6910. {
  6911. division = "FM";
  6912. }
  6913. else if(PlayerData[playerid][pGangMod])
  6914. {
  6915. division = "GM";
  6916. }
  6917. else if(PlayerData[playerid][pBanAppealer])
  6918. {
  6919. division = "BA";
  6920. }
  6921. else if(PlayerData[playerid][pComplaintMod])
  6922. {
  6923. division = "CM";
  6924. }
  6925. else if(PlayerData[playerid][pHelperManager])
  6926. {
  6927. division = "PR";
  6928. }
  6929. else if(PlayerData[playerid][pDynamicAdmin])
  6930. {
  6931. division = "DA";
  6932. }
  6933. else if(PlayerData[playerid][pDeveloper])
  6934. {
  6935. division = "DEV";
  6936. }
  6937. else
  6938. {
  6939. division = "";
  6940. }
  6941. return division;
  6942. }
  6943. GetStaffRank(playerid)
  6944. {
  6945. new string[24];
  6946. if(PlayerData[playerid][pAdmin] > 1 && !PlayerData[playerid][pAdminHide])
  6947. {
  6948. switch(PlayerData[playerid][pAdmin])
  6949. {
  6950. case 2: string = "Trial Admin";
  6951. case 3: string = "Junior Admin";
  6952. case 4: string = "General Admin";
  6953. case 5: string = "Senior Admin";
  6954. case 6: string = "Head Admin";
  6955. case 7: string = "Lead Head Admin";
  6956. case 8: string = "Executive Admin";
  6957. case 9: string = "Assistant Management";
  6958. case 10: string = "Management";
  6959. }
  6960. return string;
  6961. }
  6962. if(PlayerData[playerid][pHelper] > 0)
  6963. {
  6964. switch(PlayerData[playerid][pHelper])
  6965. {
  6966. case 1: string = "Junior Helper";
  6967. case 2: string = "Senior Helper";
  6968. case 3: string = "Ast Head Helper";
  6969. case 4: string = "Head Helper";
  6970. case 5: string = "Junior Advisor";
  6971. case 6: string = "Senior Advisor";
  6972. case 7: string = "Chief Advisor";
  6973. }
  6974. }
  6975. else if(PlayerData[playerid][pFormerAdmin])
  6976. {
  6977. string = "Former Admin";
  6978. }
  6979. else
  6980. {
  6981. string = "Undercover Admin";
  6982. }
  6983. return string;
  6984. }
  6985. GetAdminRank(playerid)
  6986. {
  6987. new string[24];
  6988. switch(PlayerData[playerid][pAdmin])
  6989. {
  6990. case 0:
  6991. {
  6992. if(PlayerData[playerid][pFormerAdmin])
  6993. string = "Former Admin";
  6994. else
  6995. string = "None";
  6996. }
  6997. case 1: string = "Secret Admin";
  6998. case 2: string = "Trial Admin";
  6999. case 3: string = "Junior Admin";
  7000. case 4: string = "General Admin";
  7001. case 5: string = "Senior Admin";
  7002. case 6: string = "Head Admin";
  7003. case 7: string = "Lead Head Admin";
  7004. case 8: string = "Executive Admin";
  7005. case 9: string = "Assistant Management";
  7006. case 10: string = "Management";
  7007. }
  7008. return string;
  7009. }
  7010. GetAdmCmdRank(playerid)
  7011. {
  7012. new string[64];
  7013. switch(PlayerData[playerid][pAdmin])
  7014. {
  7015. case 1: string = "Secret Admin";
  7016. case 2: string = "{00FF00}Trial Admin{FF6347}";
  7017. case 3: string = "{00AA00}Junior Admin{FF6347}";
  7018. case 4: string = "{00AA00}General Admin{FF6347}";
  7019. case 5: string = "{FFA500}Senior Admin{FF6347}";
  7020. case 6: string = "{FF0000}Head Admin{FF6347}";
  7021. case 7: string = "{298EFF}Lead Head Admin{FF6347}";
  7022. case 8: string = "{298EFF}Executive Admin{FF6347}";
  7023. case 9: string = "{D909D9}Asst Management{FF6347}";
  7024. case 10: string = "{D909D9}Management{FF6347}";
  7025. }
  7026. return string;
  7027. }
  7028. GetAdminRank1(playerid)
  7029. {
  7030. new string[24];
  7031. switch(PlayerData[playerid][pAdmin])
  7032. {
  7033. case 0:
  7034. {
  7035. if(PlayerData[playerid][pFormerAdmin])
  7036. string = "Former Admin";
  7037. else if(PlayerData[playerid][pDeveloper])
  7038. string = "Developer";
  7039. else
  7040. string = "None";
  7041. }
  7042. case 1: string = "Secret Admin";
  7043. case 2: string = "{00FF00}Trial Admin";
  7044. case 3: string = "{00AA00}Junior Admin";
  7045. case 4: string = "{00AA00}General Admin";
  7046. case 5: string = "{FFA500}Senior Admin";
  7047. case 6: string = "{FF0000}Head Admin";
  7048. case 7: string = "{298EFF}Lead Head Admin";
  7049. case 8: string = "{298EFF}Executive Admin";
  7050. case 9: string = "{D909D9}Asst Management";
  7051. case 10: string = "{D909D9}Management";
  7052. }
  7053. return string;
  7054. }
  7055. GetHelperRank(playerid)
  7056. {
  7057. new string[24];
  7058. switch(PlayerData[playerid][pHelper])
  7059. {
  7060. case 0: string = "None";
  7061. case 1: string = "Junior Helper";
  7062. case 2: string = "Senior Helper";
  7063. case 3: string = "Ast Head Helper";
  7064. case 4: string = "Head Helper";
  7065. case 5: string = "Junior Advisor";
  7066. case 6: string = "Senior Advisor";
  7067. case 7: string = "Chief Advisor";
  7068. }
  7069. return string;
  7070. }
  7071. GetPlayerIP(playerid)
  7072. {
  7073. new
  7074. ip[16];
  7075. GetPlayerIp(playerid, ip, sizeof(ip));
  7076. return ip;
  7077. }
  7078. GetPlayerIPRange(playerid, ch = '*')
  7079. {
  7080. new string[16], part[2];
  7081. if(!sscanf(GetPlayerIP(playerid), "p<.>ii{ii}", part[0], part[1]))
  7082. {
  7083. format(string, sizeof(string), "%i.%i.%c.%c", part[0], part[1], ch, ch);
  7084. }
  7085. return string;
  7086. }
  7087. /*GetBoneName(boneid)
  7088. {
  7089. new
  7090. string[16];
  7091. switch(boneid)
  7092. {
  7093. case 1: string = "Spine";
  7094. case 2: string = "Head";
  7095. case 3: string = "Left upper arm";
  7096. case 4: string = "Right upper arm";
  7097. case 5: string = "Left hand";
  7098. case 6: string = "Right hand";
  7099. case 7: string = "Left thigh";
  7100. case 8: string = "Right thigh";
  7101. case 9: string = "Left foot";
  7102. case 10: string = "Right foot";
  7103. case 11: string = "Right calf";
  7104. case 12: string = "Left calf";
  7105. case 13: string = "Left forearm";
  7106. case 14: string = "Right forearm";
  7107. case 15: string = "Left shoulder";
  7108. case 16: string = "Right shoulder";
  7109. case 17: string = "Neck";
  7110. case 18: string = "Jaw";
  7111. }
  7112. return string;
  7113. }*/
  7114. GetDeathReason(reason)
  7115. {
  7116. new
  7117. string[24];
  7118. switch(reason)
  7119. {
  7120. case 0: string = "Fists";
  7121. case 18: string = "Molotov Cocktail";
  7122. case 44: string = "Nightvision Goggles";
  7123. case 45: string = "Infrared Goggles";
  7124. case 49: string = "Vehicle";
  7125. case 50: string = "Helicopter Blades";
  7126. case 51: string = "Explosion";
  7127. case 53: string = "Drowned";
  7128. case 54: string = "Splat";
  7129. default: GetWeaponName(reason, string, sizeof(string));
  7130. }
  7131. return string;
  7132. }
  7133. stock ReturnBodypartName(bodypart)
  7134. {
  7135. new bodyname[20] = EOS;
  7136. switch(bodypart)
  7137. {
  7138. case BODY_PART_CHEST:bodyname = "CHEST";
  7139. case BODY_PART_GROIN:bodyname = "GROIN";
  7140. case BODY_PART_LEFT_ARM:bodyname = "LEFT ARM";
  7141. case BODY_PART_RIGHT_ARM:bodyname = "RIGHT ARM";
  7142. case BODY_PART_LEFT_LEG:bodyname = "LEFT LEG";
  7143. case BODY_PART_RIGHT_LEG:bodyname = "RIGHT LEG";
  7144. case BODY_PART_HEAD:bodyname = "HEAD";
  7145. }
  7146. return bodyname;
  7147. }
  7148. GetWeaponNameEx(weaponid)
  7149. {
  7150. new
  7151. weapon[24];
  7152. GetWeaponName(weaponid, weapon, sizeof(weapon));
  7153. switch(weaponid)
  7154. {
  7155. case 0: weapon = "None";
  7156. case 18: weapon = "Molotov Cocktail";
  7157. case 44: weapon = "Nightvision Goggles";
  7158. case 45: weapon = "Infrared Goggles";
  7159. }
  7160. return weapon;
  7161. }
  7162. GetVIPRank(level)
  7163. {
  7164. new string[16];
  7165. switch(level)
  7166. {
  7167. case 0: string = "None";
  7168. case 1: string = "Silver";
  7169. case 2: string = "Gold";
  7170. case 3: string = "Legendary";
  7171. }
  7172. return string;
  7173. }
  7174. GetVIPRankEx(level)
  7175. {
  7176. new string[50];
  7177. switch(level)
  7178. {
  7179. case 0: string = "{FFFFFF}None";
  7180. case 1: string = "{3284FF}Silver";
  7181. case 2: string = "{FF6BEF}Gold";
  7182. case 3: string = "{FFBD30}Legendary";
  7183. }
  7184. return string;
  7185. }
  7186. GetJobName(jobid)
  7187. {
  7188. new
  7189. name[32];
  7190. if(jobid == JOB_NONE)
  7191. name = "None";
  7192. else
  7193. strcat(name, jobLocations[jobid][jobName]);
  7194. return name;
  7195. }
  7196. IncreaseJobSkill(playerid, jobid)
  7197. {
  7198. if((gDoubleXP) || PlayerData[playerid][pDoubleXP] > 0)
  7199. {
  7200. GiveJobSkill(playerid, jobid);
  7201. }
  7202. GiveJobSkill(playerid, jobid);
  7203. }
  7204. GiveJobSkill(playerid, jobid)
  7205. {
  7206. new level = GetJobLevel(playerid, jobid);
  7207. switch(jobid)
  7208. {
  7209. case JOB_COURIER:
  7210. {
  7211. PlayerData[playerid][pCourierSkill]++;
  7212. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET courierskill = courierskill + 1 WHERE uid = %i", PlayerData[playerid][pID]);
  7213. mysql_tquery(connectionID, queryBuffer);
  7214. if(GetJobLevel(playerid, jobid) != level)
  7215. {
  7216. SendClientMessageEx(playerid, COLOR_GREEN, "Your courier skill level is now %i/5. You will deliver more products and earn more money now.", level + 1);
  7217. }
  7218. }
  7219. case JOB_FISHERMAN:
  7220. {
  7221. PlayerData[playerid][pFishingSkill]++;
  7222. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET fishingskill = fishingskill + 1 WHERE uid = %i", PlayerData[playerid][pID]);
  7223. mysql_tquery(connectionID, queryBuffer);
  7224. if(GetJobLevel(playerid, jobid) != level)
  7225. {
  7226. SendClientMessageEx(playerid, COLOR_GREEN, "Your fishing skill level is now %i/5. You will catch bigger fish and your cooldowns are reduced.", level + 1);
  7227. }
  7228. }
  7229. case JOB_BODYGUARD:
  7230. {
  7231. PlayerData[playerid][pGuardSkill]++;
  7232. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET guardskill = guardskill + 1 WHERE uid = %i", PlayerData[playerid][pID]);
  7233. mysql_tquery(connectionID, queryBuffer);
  7234. if(GetJobLevel(playerid, jobid) != level)
  7235. {
  7236. SendClientMessageEx(playerid, COLOR_GREEN, "Your bodyguard skill level is now %i/5. Vests that you sell will now contain extra armor.", level + 1);
  7237. }
  7238. }
  7239. case JOB_WEAPONDEALER:
  7240. {
  7241. PlayerData[playerid][pWeaponSkill]++;
  7242. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET weaponskill = weaponskill + 1 WHERE uid = %i", PlayerData[playerid][pID]);
  7243. mysql_tquery(connectionID, queryBuffer);
  7244. if(GetJobLevel(playerid, jobid) != level)
  7245. {
  7246. SendClientMessageEx(playerid, COLOR_GREEN, "Your weapons dealer skill level is now %i/5. You have unlocked more weapons.", level + 1);
  7247. }
  7248. }
  7249. case JOB_MECHANIC:
  7250. {
  7251. PlayerData[playerid][pMechanicSkill]++;
  7252. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET mechanicskill = mechanicskill + 1 WHERE uid = %i", PlayerData[playerid][pID]);
  7253. mysql_tquery(connectionID, queryBuffer);
  7254. if(GetJobLevel(playerid, jobid) != level)
  7255. {
  7256. SendClientMessageEx(playerid, COLOR_GREEN, "Your mechanic skill level is now %i/5. You will now pay less for components.", level + 1);
  7257. }
  7258. }
  7259. case JOB_DRUGDEALER:
  7260. {
  7261. PlayerData[playerid][pSmugglerSkill]++;
  7262. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET smugglerskill = smugglerskill + 1 WHERE uid = %i", PlayerData[playerid][pID]);
  7263. mysql_tquery(connectionID, queryBuffer);
  7264. if(GetJobLevel(playerid, jobid) != level)
  7265. {
  7266. SendClientMessageEx(playerid, COLOR_GREEN, "Your drug dealer skill level is now %i/5. You will now earn more cash for smuggling.", level + 1);
  7267. }
  7268. }
  7269. case JOB_LAWYER:
  7270. {
  7271. PlayerData[playerid][pLawyerSkill]++;
  7272. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET lawyerskill = lawyerskill + 1 WHERE uid = %i", PlayerData[playerid][pID]);
  7273. mysql_tquery(connectionID, queryBuffer);
  7274. if(GetJobLevel(playerid, jobid) != level)
  7275. {
  7276. SendClientMessageEx(playerid, COLOR_GREEN, "Your lawyer skill level is now %i/5. Your cooldown times are reduced and you can free people for more time.", level + 1);
  7277. }
  7278. }
  7279. case JOB_DETECTIVE:
  7280. {
  7281. PlayerData[playerid][pDetectiveSkill]++;
  7282. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET detectiveskill = detectiveskill + 1 WHERE uid = %i", PlayerData[playerid][pID]);
  7283. mysql_tquery(connectionID, queryBuffer);
  7284. if(GetJobLevel(playerid, jobid) != level)
  7285. {
  7286. SendClientMessageEx(playerid, COLOR_GREEN, "Your detective skill level is now %i/5. Your cooldown times are now reduced.", level + 1);
  7287. }
  7288. }
  7289. /*case JOB_FARMER:
  7290. {
  7291. PlayerData[playerid][pThiefSkill]++;
  7292. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET thiefskill = thiefskill + 1 WHERE uid = %i", PlayerData[playerid][pID]);
  7293. mysql_tquery(connectionID, queryBuffer);
  7294. if(GetJobLevel(playerid, jobid) != level)
  7295. {
  7296. SendClientMessageEx(playerid, COLOR_GREEN, "Your thief skill level is now %i/5. Your cooldown times are now reduced and it takes less time to crack trunks.", level + 1);
  7297. }
  7298. }*/
  7299. }
  7300. if(GetJobLevel(playerid, jobid) != level && GetJobLevel(playerid, jobid) == 5)
  7301. {
  7302. AwardAchievement(playerid, "Experienced");
  7303. }
  7304. }
  7305. GetJobLevel(playerid, jobid)
  7306. {
  7307. if(jobid == JOB_COURIER)
  7308. {
  7309. if(0 <= PlayerData[playerid][pCourierSkill] <= 49) {
  7310. return 1;
  7311. } else if(50 <= PlayerData[playerid][pCourierSkill] <= 99) {
  7312. return 2;
  7313. } else if(100 <= PlayerData[playerid][pCourierSkill] <= 199) {
  7314. return 3;
  7315. } else if(200 <= PlayerData[playerid][pCourierSkill] <= 349) {
  7316. return 4;
  7317. } else if(PlayerData[playerid][pCourierSkill] >= 350) {
  7318. return 5;
  7319. }
  7320. }
  7321. else if(jobid == JOB_FISHERMAN)
  7322. {
  7323. if(0 <= PlayerData[playerid][pFishingSkill] <= 49) {
  7324. return 1;
  7325. } else if(50 <= PlayerData[playerid][pFishingSkill] <= 99) {
  7326. return 2;
  7327. } else if(100 <= PlayerData[playerid][pFishingSkill] <= 199) {
  7328. return 3;
  7329. } else if(200 <= PlayerData[playerid][pFishingSkill] <= 349) {
  7330. return 4;
  7331. } else if(PlayerData[playerid][pFishingSkill] >= 350) {
  7332. return 5;
  7333. }
  7334. }
  7335. else if(jobid == JOB_BODYGUARD)
  7336. {
  7337. if(0 <= PlayerData[playerid][pGuardSkill] <= 24) {
  7338. return 1;
  7339. } else if(25 <= PlayerData[playerid][pGuardSkill] <= 49) {
  7340. return 2;
  7341. } else if(50 <= PlayerData[playerid][pGuardSkill] <= 99) {
  7342. return 3;
  7343. } else if(100 <= PlayerData[playerid][pGuardSkill] <= 199) {
  7344. return 4;
  7345. } else if(PlayerData[playerid][pGuardSkill] >= 200) {
  7346. return 5;
  7347. }
  7348. }
  7349. else if(jobid == JOB_WEAPONDEALER)
  7350. {
  7351. if(0 <= PlayerData[playerid][pWeaponSkill] <= 49) {
  7352. return 1;
  7353. } else if(50 <= PlayerData[playerid][pWeaponSkill] <= 99) {
  7354. return 2;
  7355. } else if(100 <= PlayerData[playerid][pWeaponSkill] <= 199) {
  7356. return 3;
  7357. } else if(200 <= PlayerData[playerid][pWeaponSkill] <= 499) {
  7358. return 4;
  7359. } else if(PlayerData[playerid][pWeaponSkill] >= 500) {
  7360. return 5;
  7361. }
  7362. }
  7363. else if(jobid == JOB_MECHANIC)
  7364. {
  7365. if(0 <= PlayerData[playerid][pMechanicSkill] <= 24) {
  7366. return 1;
  7367. } else if(25 <= PlayerData[playerid][pMechanicSkill] <= 49) {
  7368. return 2;
  7369. } else if(50 <= PlayerData[playerid][pMechanicSkill] <= 99) {
  7370. return 3;
  7371. } else if(100 <= PlayerData[playerid][pMechanicSkill] <= 199) {
  7372. return 4;
  7373. } else if(PlayerData[playerid][pMechanicSkill] >= 200) {
  7374. return 5;
  7375. }
  7376. }
  7377. else if(jobid == JOB_DRUGDEALER)
  7378. {
  7379. if(0 <= PlayerData[playerid][pSmugglerSkill] <= 99) {
  7380. return 1;
  7381. } else if(100 <= PlayerData[playerid][pSmugglerSkill] <= 199) {
  7382. return 2;
  7383. } else if(200 <= PlayerData[playerid][pSmugglerSkill] <= 299) {
  7384. return 3;
  7385. } else if(300 <= PlayerData[playerid][pSmugglerSkill] <= 399) {
  7386. return 4;
  7387. } else if(PlayerData[playerid][pSmugglerSkill] >= 500) {
  7388. return 5;
  7389. }
  7390. }
  7391. else if(jobid == JOB_LAWYER)
  7392. {
  7393. if(0 <= PlayerData[playerid][pLawyerSkill] <= 24) {
  7394. return 1;
  7395. } else if(25 <= PlayerData[playerid][pLawyerSkill] <= 49) {
  7396. return 2;
  7397. } else if(50 <= PlayerData[playerid][pLawyerSkill] <= 99) {
  7398. return 3;
  7399. } else if(100 <= PlayerData[playerid][pLawyerSkill] <= 199) {
  7400. return 4;
  7401. } else if(PlayerData[playerid][pLawyerSkill] >= 200) {
  7402. return 5;
  7403. }
  7404. }
  7405. else if(jobid == JOB_DETECTIVE)
  7406. {
  7407. if(0 <= PlayerData[playerid][pDetectiveSkill] <= 49) {
  7408. return 1;
  7409. } else if(50 <= PlayerData[playerid][pDetectiveSkill] <= 99) {
  7410. return 2;
  7411. } else if(100 <= PlayerData[playerid][pDetectiveSkill] <= 199) {
  7412. return 3;
  7413. } else if(200 <= PlayerData[playerid][pDetectiveSkill] <= 399) {
  7414. return 4;
  7415. } else if(PlayerData[playerid][pDetectiveSkill] >= 400) {
  7416. return 5;
  7417. }
  7418. }
  7419. return 0;
  7420. }
  7421. GetPlayerCapacity(playerid, item)
  7422. {
  7423. switch(item)
  7424. {
  7425. case CAPACITY_MATERIALS:
  7426. {
  7427. return 50000 + (PlayerData[playerid][pInventoryUpgrade] * 10000);
  7428. }
  7429. case CAPACITY_WEED:
  7430. {
  7431. switch(PlayerData[playerid][pInventoryUpgrade])
  7432. {
  7433. case 0: return 50;
  7434. case 1: return 75;
  7435. case 2: return 100;
  7436. case 3: return 125;
  7437. case 4: return 150;
  7438. case 5: return 200;
  7439. }
  7440. }
  7441. case CAPACITY_COCAINE:
  7442. {
  7443. switch(PlayerData[playerid][pInventoryUpgrade])
  7444. {
  7445. case 0: return 25;
  7446. case 1: return 50;
  7447. case 2: return 75;
  7448. case 3: return 100;
  7449. case 4: return 125;
  7450. case 5: return 150;
  7451. }
  7452. }
  7453. case CAPACITY_METH:
  7454. {
  7455. switch(PlayerData[playerid][pInventoryUpgrade])
  7456. {
  7457. case 0: return 20;
  7458. case 1: return 40;
  7459. case 2: return 60;
  7460. case 3: return 80;
  7461. case 4: return 100;
  7462. case 5: return 150;
  7463. }
  7464. }
  7465. case CAPACITY_PAINKILLERS:
  7466. {
  7467. switch(PlayerData[playerid][pInventoryUpgrade])
  7468. {
  7469. case 0: return 5;
  7470. case 1: return 10;
  7471. case 2: return 15;
  7472. case 3: return 20;
  7473. case 4: return 25;
  7474. case 5: return 30;
  7475. }
  7476. }
  7477. case CAPACITY_SEEDS:
  7478. {
  7479. switch(PlayerData[playerid][pInventoryUpgrade])
  7480. {
  7481. case 0: return 10;
  7482. case 1: return 20;
  7483. case 2: return 30;
  7484. case 3: return 40;
  7485. case 4: return 50;
  7486. case 5: return 60;
  7487. }
  7488. }
  7489. case CAPACITY_EPHEDRINE:
  7490. {
  7491. switch(PlayerData[playerid][pInventoryUpgrade])
  7492. {
  7493. case 0: return 10;
  7494. case 1: return 15;
  7495. case 2: return 20;
  7496. case 3: return 25;
  7497. case 4: return 30;
  7498. case 5: return 40;
  7499. }
  7500. }
  7501. case CAPACITY_OIL:
  7502. {
  7503. switch(PlayerData[playerid][pInventoryUpgrade])
  7504. {
  7505. case 0: return 25;
  7506. case 1: return 50;
  7507. case 2: return 75;
  7508. case 3: return 100;
  7509. case 4: return 150;
  7510. case 5: return 200;
  7511. }
  7512. }
  7513. }
  7514. return 0;
  7515. }
  7516. GetPlayerAssetCount(playerid, type)
  7517. {
  7518. new count;
  7519. switch(type)
  7520. {
  7521. case LIMIT_HOUSES:
  7522. {
  7523. foreach(new i : House)
  7524. {
  7525. if(HouseInfo[i][hExists] && PlayerData[playerid][pID] == HouseInfo[i][hOwnerID])
  7526. {
  7527. count++;
  7528. }
  7529. }
  7530. }
  7531. case LIMIT_BUSINESSES:
  7532. {
  7533. foreach(new i : Business)
  7534. {
  7535. if(BusinessInfo[i][bExists] && PlayerData[playerid][pID] == BusinessInfo[i][bOwnerID])
  7536. {
  7537. count++;
  7538. }
  7539. }
  7540. }
  7541. case LIMIT_GARAGES:
  7542. {
  7543. foreach(new i : Garage)
  7544. {
  7545. if(GarageInfo[i][gExists] && PlayerData[playerid][pID] == GarageInfo[i][gOwnerID])
  7546. {
  7547. count++;
  7548. }
  7549. }
  7550. }
  7551. }
  7552. return count;
  7553. }
  7554. GetPlayerAssetLimit(playerid, type)
  7555. {
  7556. switch(type)
  7557. {
  7558. case LIMIT_HOUSES:
  7559. {
  7560. switch(PlayerData[playerid][pDonator])
  7561. {
  7562. case 2: return 4;
  7563. case 3: return 6;
  7564. }
  7565. switch(PlayerData[playerid][pAssetUpgrade])
  7566. {
  7567. case 0, 1: return 1;
  7568. case 2, 3: return 2;
  7569. case 4: return 3;
  7570. }
  7571. }
  7572. case LIMIT_BUSINESSES:
  7573. {
  7574. switch(PlayerData[playerid][pAssetUpgrade])
  7575. {
  7576. case 0, 1: return 1;
  7577. case 2, 3: return 2;
  7578. case 4: return 3;
  7579. }
  7580. }
  7581. case LIMIT_GARAGES:
  7582. {
  7583. switch(PlayerData[playerid][pAssetUpgrade])
  7584. {
  7585. case 0, 1: return 1;
  7586. case 2, 3: return 2;
  7587. case 4: return 3;
  7588. }
  7589. }
  7590. case LIMIT_VEHICLES:
  7591. {
  7592. switch(PlayerData[playerid][pDonator])
  7593. {
  7594. case 1: return 10;
  7595. case 2: return 15;
  7596. case 3: return 20;
  7597. }
  7598. switch(PlayerData[playerid][pAssetUpgrade])
  7599. {
  7600. case 0: return 3;
  7601. case 1: return 4;
  7602. case 2: return 5;
  7603. case 3: return 7;
  7604. case 4: return 10;
  7605. }
  7606. }
  7607. }
  7608. return 0;
  7609. }
  7610. DeployObject(type, Float:x, Float:y, Float:z, Float:angle)
  7611. {
  7612. for(new i = 0; i < MAX_DEPLOYABLES; i ++)
  7613. {
  7614. if(!DeployInfo[i][dExists])
  7615. {
  7616. DeployInfo[i][dExists] = 1;
  7617. DeployInfo[i][dType] = type;
  7618. DeployInfo[i][dPosX] = x;
  7619. DeployInfo[i][dPosY] = y;
  7620. DeployInfo[i][dPosZ] = z;
  7621. DeployInfo[i][dPosA] = angle;
  7622. if(type == DEPLOY_SPIKESTRIP) {
  7623. DeployInfo[i][dObject] = CreateDynamicObject(2899, x + 1.0 * floatsin(-angle, degrees), y + 1.0 * floatcos(-angle, degrees), z - 0.9, 0.0, 0.0, angle + 90.0);
  7624. } else if(type == DEPLOY_CONE) {
  7625. DeployInfo[i][dObject] = CreateDynamicObject(1238, x + 1.0 * floatsin(-angle, degrees), y + 1.0 * floatcos(-angle, degrees), z - 0.7, 0.0, 0.0, angle);
  7626. } else if(type == DEPLOY_ROADBLOCK) {
  7627. DeployInfo[i][dObject] = CreateDynamicObject(981, x + 3.0 * floatsin(-angle, degrees), y + 3.0 * floatcos(-angle, degrees), z, 0.0, 0.0, angle);
  7628. } else if(type == DEPLOY_BARREL) {
  7629. DeployInfo[i][dObject] = CreateDynamicObject(1237, x + 1.0 * floatsin(-angle, degrees), y + 1.0 * floatcos(-angle, degrees), z - 1.0, 0.0, 0.0, angle);
  7630. } else if(type == DEPLOY_FLARE) {
  7631. DeployInfo[i][dObject] = CreateDynamicObject(18728, x, y, z - 1.4, 0.0, 0.0, angle);
  7632. }
  7633. return i;
  7634. }
  7635. }
  7636. return -1;
  7637. }
  7638. IsAFarmerCar(carid)
  7639. {
  7640. for(new v = 0; v < sizeof(FarmerVehicles); v++)
  7641. {
  7642. if(carid == FarmerVehicles[v]) return 1;
  7643. }
  7644. if(VehicleInfo[carid][vJob] == JOB_FARMER) return 1;
  7645. return 0;
  7646. }
  7647. IsFireActive()
  7648. {
  7649. for(new i = 0; i < MAX_FIRES; i ++)
  7650. {
  7651. if(IsValidDynamicObject(gFireObjects[i]))
  7652. {
  7653. return 1;
  7654. }
  7655. }
  7656. return 0;
  7657. }
  7658. HandleContract(playerid, killerid)
  7659. {
  7660. if(GetFactionType(killerid) == FACTION_HITMAN && PlayerData[killerid][pContractTaken] == playerid)
  7661. {
  7662. new price = PlayerData[playerid][pContracted] / 2;
  7663. SendClientMessageEx(killerid, COLOR_YELLOW, "You have completed your contract on %s and received %s.", GetRPName(playerid), FormatNumber(price));
  7664. SendClientMessageEx(playerid, COLOR_YELLOW, "You have been killed by a hitman and lost %s.", FormatNumber(price));
  7665. SendFactionMessage(PlayerData[killerid][pFaction], COLOR_YELLOW, "Contract: %s has successfully completed the contract on %s and gained %s.", GetRPName(killerid), GetRPName(playerid), FormatNumber(price));
  7666. GivePlayerCash(playerid, -price);
  7667. GivePlayerCash(killerid, price);
  7668. PlayerData[killerid][pContractTaken] = INVALID_PLAYER_ID;
  7669. PlayerData[killerid][pCompletedHits]++;
  7670. PlayerData[playerid][pContracted] = 0;
  7671. PlayerData[playerid][pContractBy] = 0;
  7672. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET contracted = 0, contractby = 'Nobody' WHERE uid = %i", PlayerData[playerid][pID]);
  7673. mysql_tquery(connectionID, queryBuffer);
  7674. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET completedhits = %i WHERE uid = %i", PlayerData[killerid][pCompletedHits], PlayerData[killerid][pID]);
  7675. mysql_tquery(connectionID, queryBuffer);
  7676. foreach(new i : Player)
  7677. {
  7678. if(PlayerData[i][pContractTaken] == playerid)
  7679. {
  7680. PlayerData[i][pContractTaken] = INVALID_PLAYER_ID;
  7681. }
  7682. }
  7683. Log_Write("log_contracts", "%s (uid: %i) successfully completed their hit on %s (uid: %i) for $%i.", GetRPName(killerid), PlayerData[killerid][pID], GetRPName(playerid), PlayerData[playerid][pID], price);
  7684. }
  7685. else if(PlayerData[playerid][pContractTaken] == killerid)
  7686. {
  7687. new price = PlayerData[killerid][pContracted];
  7688. SendClientMessageEx(playerid, COLOR_YELLOW, "You have failed your contract on %s and lost %s.", GetRPName(playerid), FormatNumber(price));
  7689. SendClientMessageEx(killerid, COLOR_YELLOW, "You have killed a hitman chasing after you and received %s. The contract on your head has been removed.", FormatNumber(price));
  7690. SendFactionMessage(PlayerData[playerid][pFaction], COLOR_YELLOW, "Contract: %s has failed the contract on %s and lost %s.", GetRPName(playerid), GetRPName(killerid), FormatNumber(price));
  7691. GivePlayerCash(playerid, -price);
  7692. GivePlayerCash(killerid, price);
  7693. PlayerData[playerid][pContractTaken] = INVALID_PLAYER_ID;
  7694. PlayerData[playerid][pFailedHits]++;
  7695. PlayerData[killerid][pContracted] = 0;
  7696. PlayerData[killerid][pContractBy] = 0;
  7697. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET contracted = 0, contractby = 'Nobody' WHERE uid = %i", PlayerData[killerid][pID]);
  7698. mysql_tquery(connectionID, queryBuffer);
  7699. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET failedhits = %i WHERE uid = %i", PlayerData[playerid][pFailedHits], PlayerData[playerid][pID]);
  7700. mysql_tquery(connectionID, queryBuffer);
  7701. foreach(new i : Player)
  7702. {
  7703. if(PlayerData[i][pContractTaken] == killerid)
  7704. {
  7705. PlayerData[i][pContractTaken] = INVALID_PLAYER_ID;
  7706. }
  7707. }
  7708. Log_Write("log_contracts", "%s (uid: %i) failed their hit on %s (uid: %i) and lost $%i.", GetRPName(playerid), PlayerData[playerid][pID], GetRPName(killerid), PlayerData[killerid][pID], price);
  7709. }
  7710. }
  7711. GetPlayerNameEx(playerid)
  7712. {
  7713. new
  7714. name[MAX_PLAYER_NAME];
  7715. GetPlayerName(playerid, name, sizeof(name));
  7716. return name;
  7717. }
  7718. GetRPName(playerid)
  7719. {
  7720. new
  7721. name[MAX_PLAYER_NAME];
  7722. GetPlayerName(playerid, name, sizeof(name));
  7723. for(new i = 0, l = strlen(name); i < l; i ++)
  7724. {
  7725. if(name[i] == '_')
  7726. {
  7727. name[i] = ' ';
  7728. }
  7729. }
  7730. return name;
  7731. }
  7732. GetPlayerZoneName(playerid)
  7733. {
  7734. new zone[32], Float:x, Float:y, Float:z;
  7735. GetPlayerPos(playerid, x, y, z);
  7736. if(GetInsideHouse(playerid) >= 0)
  7737. zone = "House";
  7738. else if(GetInsideBusiness(playerid) >= 0)
  7739. zone = "Business";
  7740. else if(GetInsideGarage(playerid) >= 0)
  7741. zone = "Garage";
  7742. else if(GetPlayerInterior(playerid))
  7743. zone = "Interior";
  7744. else
  7745. strcpy(zone, GetZoneName(x, y, z));
  7746. return zone;
  7747. }
  7748. GetPlayerPosEx(playerid, &Float:x, &Float:y, &Float:z)
  7749. {
  7750. new id;
  7751. if(GetPlayerInterior(playerid))
  7752. {
  7753. if((id = GetInsideHouse(playerid)) >= 0)
  7754. {
  7755. x = HouseInfo[id][hPosX];
  7756. y = HouseInfo[id][hPosY];
  7757. z = HouseInfo[id][hPosZ];
  7758. return 1;
  7759. }
  7760. else if((id = GetInsideBusiness(playerid)) >= 0)
  7761. {
  7762. x = BusinessInfo[id][bPosX];
  7763. y = BusinessInfo[id][bPosY];
  7764. z = BusinessInfo[id][bPosZ];
  7765. return 1;
  7766. }
  7767. else if((id = GetInsideGarage(playerid)) >= 0)
  7768. {
  7769. x = GarageInfo[id][gPosX];
  7770. y = GarageInfo[id][gPosY];
  7771. z = GarageInfo[id][gPosZ];
  7772. return 1;
  7773. }
  7774. else if((id = GetInsideEntrance(playerid)) >= 0)
  7775. {
  7776. x = EntranceInfo[id][ePosX];
  7777. y = EntranceInfo[id][ePosY];
  7778. z = EntranceInfo[id][ePosZ];
  7779. return 1;
  7780. }
  7781. else if(GetPlayerInterior(playerid))
  7782. {
  7783. for(new i = 0; i < sizeof(staticEntrances); i ++)
  7784. {
  7785. if(IsPlayerInRangeOfPoint(playerid, 100.0, staticEntrances[i][eIntX], staticEntrances[i][eIntY], staticEntrances[i][eIntZ]))
  7786. {
  7787. x = staticEntrances[i][ePosX];
  7788. y = staticEntrances[i][ePosY];
  7789. z = staticEntrances[i][ePosZ];
  7790. return 1;
  7791. }
  7792. }
  7793. }
  7794. }
  7795. GetPlayerPos(playerid, x, y, z);
  7796. return 1;
  7797. }
  7798. GetVehicleCranePrice(vehicleid, bool:extras = true)
  7799. {
  7800. new amount;
  7801. if((pizzaVehicles[0] <= vehicleid <= pizzaVehicles[5]) || (courierVehicles[0] <= vehicleid <= courierVehicles[6]) || (sweeperVehicles[0] <= vehicleid <= sweeperVehicles[3]) || (taxiVehicles[0] <= vehicleid <= taxiVehicles[3]) || (testVehicles[0] <= vehicleid <= testVehicles[4]))
  7802. {
  7803. return 0;
  7804. }
  7805. if((VehicleInfo[vehicleid][vID] > 0) && (VehicleInfo[vehicleid][vFactionType] > 0 || VehicleInfo[vehicleid][vGang] >= 0 && VehicleInfo[vehicleid][vJob] >= 0))
  7806. {
  7807. return 0;
  7808. }
  7809. switch(GetVehicleModel(vehicleid))
  7810. {
  7811. case 481, 509, 510: // Bicycles.
  7812. amount = 800;
  7813. case 448, 462, 463, 468, 471: // Mid bikes.
  7814. amount = 1500;
  7815. case 461, 521, 522, 581: // High bikes.
  7816. amount = 2000;
  7817. case 402, 429, 475, 477, 494, 496, 502..504, 558..562, 565, 587, 589, 602, 603: // Muscle cars and mid sports cars.
  7818. amount = 3000;
  7819. case 411, 415, 451, 506, 541: // High sports cars.
  7820. amount = 4000;
  7821. case 403, 408, 414, 443, 455, 456, 498, 499, 514, 515, 524, 578, 609: // Boxed trucks and trucks.
  7822. amount = 3500;
  7823. case 413, 418, 422, 440, 459, 478, 482, 543, 552, 554, 582, 600, 605: // Pickup trucks and vans.
  7824. amount = 2500;
  7825. case 400, 424, 444, 470, 489, 495, 500, 505, 556, 557, 568, 573, 579: // Offroad vehicles
  7826. amount = 2750;
  7827. case 412, 534..536, 566, 567, 575, 576: // Lowriders
  7828. amount = 2500;
  7829. case 401, 404, 405, 410, 419, 421, 426, 436, 445, 458, 466, 467, 474, 479, 491, 492, 516..518, 526, 527, 529, 540, 542, 546, 547, 549..551, 580, 585, 604: // Saloon cars & station wagons.
  7830. amount = 2000;
  7831. }
  7832. if((extras && amount > 0) && VehicleInfo[vehicleid][vOwnerID] > 0)
  7833. {
  7834. if(VehicleInfo[vehicleid][vNeon] != 0)
  7835. amount += 1000; // $1k extra for neon.
  7836. if(VehicleInfo[vehicleid][vAlarm] != 0)
  7837. amount += VehicleInfo[vehicleid][vAlarm] * 500; // Extra $500 per alarm level.
  7838. if(VehicleInfo[vehicleid][vTrunk] != 0)
  7839. amount += VehicleInfo[vehicleid][vTrunk] * 250; // Extra $250 per trunk level.
  7840. }
  7841. return amount;
  7842. }
  7843. GetVehicleValue(vehicleid)
  7844. {
  7845. new
  7846. price = VehicleInfo[vehicleid][vPrice];
  7847. switch(VehicleInfo[vehicleid][vAlarm])
  7848. {
  7849. case 1: price += 15000;
  7850. case 2: price += 30000;
  7851. case 3: price += 60000;
  7852. }
  7853. if(VehicleInfo[vehicleid][vNeon])
  7854. {
  7855. price += 30000;
  7856. }
  7857. if(VehicleInfo[vehicleid][vTrunk])
  7858. {
  7859. price += VehicleInfo[vehicleid][vTrunk] * 10000;
  7860. }
  7861. return price;
  7862. }
  7863. GetVehicleLinkedID(id)
  7864. {
  7865. foreach(new i: Vehicle)
  7866. {
  7867. if(VehicleInfo[i][vID] == id)
  7868. {
  7869. return i;
  7870. }
  7871. }
  7872. return INVALID_VEHICLE_ID;
  7873. }
  7874. GetVehicleZoneName(vehicleid)
  7875. {
  7876. new zone[32], Float:x, Float:y, Float:z;
  7877. GetVehiclePos(vehicleid, x, y, z);
  7878. if(GetVehicleVirtualWorld(vehicleid))
  7879. zone = "Garage";
  7880. else
  7881. strcpy(zone, GetZoneName(x, y, z));
  7882. return zone;
  7883. }
  7884. GetZoneName(Float:x, Float:y, Float:z)
  7885. {
  7886. new zone[32];
  7887. for(new i = 0; i < sizeof(zoneArray); i ++)
  7888. {
  7889. if((zoneArray[i][zoneMinX] <= x <= zoneArray[i][zoneMaxX]) && (zoneArray[i][zoneMinY] <= y <= zoneArray[i][zoneMaxY]) && (zoneArray[i][zoneMinZ] <= z <= zoneArray[i][zoneMaxZ]))
  7890. {
  7891. strcpy(zone, zoneArray[i][zoneName]);
  7892. return zone;
  7893. }
  7894. }
  7895. return zone;
  7896. }
  7897. PreviewClothing(playerid, index)
  7898. {
  7899. if(PlayerData[playerid][pCash] < clothingArray[index][clothingPrice])
  7900. {
  7901. SendClientMessage(playerid, COLOR_GREY, "You can't purchase this. You don't have enough money for it.");
  7902. }
  7903. else
  7904. {
  7905. SetPlayerAttachedObject(playerid, 9, clothingArray[index][clothingModel], clothingArray[index][clothingBone]);
  7906. PlayerData[playerid][pEditType] = EDIT_CLOTHING_PREVIEW;
  7907. PlayerData[playerid][pSelected] = index;
  7908. SendClientMessageEx(playerid, COLOR_AQUA, "You are now previewing {FF6347}%s{33CCFF}. This clothing item costs {00AA00}%s{33CCFF} to purchase.", clothingArray[index][clothingName], FormatNumber(clothingArray[index][clothingPrice]));
  7909. SendClientMessageEx(playerid, COLOR_AQUA, "Use your cursor to control the editor interface. Click the floppy disk to save changes.");
  7910. EditAttachedObject(playerid, 9);
  7911. }
  7912. }
  7913. ShowClothingSelectionMenu(playerid)
  7914. {
  7915. new
  7916. models[MAX_SELECTION_MENU_ITEMS] = {-1, ...},
  7917. index;
  7918. PlayerData[playerid][pClothingIndex] = -1;
  7919. for(new i = 0; i < sizeof(clothingArray); i ++)
  7920. {
  7921. if(!strcmp(clothingArray[i][clothingType], clothingTypes[PlayerData[playerid][pCategory]]))
  7922. {
  7923. if(PlayerData[playerid][pClothingIndex] == -1)
  7924. {
  7925. PlayerData[playerid][pClothingIndex] = i;
  7926. }
  7927. models[index++] = clothingArray[i][clothingModel];
  7928. }
  7929. }
  7930. ShowPlayerSelectionMenu(playerid, MODEL_SELECTION_CLOTHING, clothingTypes[PlayerData[playerid][pCategory]], models, index);
  7931. }
  7932. PurchaseLandObject(playerid, landid, index)
  7933. {
  7934. if(PlayerData[playerid][pCash] < landArray[index][fPrice])
  7935. {
  7936. SendClientMessage(playerid, COLOR_GREY, "You can't purchase this. You don't have enough money for it.");
  7937. }
  7938. else
  7939. {
  7940. new
  7941. Float:x,
  7942. Float:y,
  7943. Float:z,
  7944. Float:a;
  7945. if(PlayerData[playerid][pEditType] == EDIT_LAND_OBJECT_PREVIEW && IsValidDynamicObject(PlayerData[playerid][pEditObject])) // Bug fix where if you did '/furniture buy' again while editing your object gets stuck. (12/28/2016)
  7946. {
  7947. DestroyDynamicObject(PlayerData[playerid][pEditObject]);
  7948. PlayerData[playerid][pEditObject] = INVALID_OBJECT_ID;
  7949. }
  7950. GetPlayerPos(playerid, x, y, z);
  7951. GetPlayerFacingAngle(playerid, a);
  7952. PlayerData[playerid][pEditType] = EDIT_LAND_OBJECT_PREVIEW;
  7953. PlayerData[playerid][pEditObject] = CreateDynamicObject(landArray[index][fModel], x + 2.0 * floatsin(-a, degrees), y + 2.0 * floatcos(-a, degrees), z + 1.0, 0.0, 0.0, ((19353 <= landArray[index][fModel] <= 19417) || (19426 <= landArray[index][fModel] <= 19465)) ? (a + 90.0) : (a), GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid));
  7954. PlayerData[playerid][pObjectLand] = landid;
  7955. PlayerData[playerid][pSelected] = index;
  7956. SendClientMessageEx(playerid, COLOR_AQUA, "You are now previewing {FF6347}%s{33CCFF}. This object costs {00AA00}%s{33CCFF} to purchase.", landArray[index][fName], FormatNumber(landArray[index][fPrice]));
  7957. SendClientMessageEx(playerid, COLOR_AQUA, "Use your cursor to control the editor interface. Click the floppy disk to save changes.");
  7958. Streamer_Update(playerid);
  7959. EditDynamicObject(playerid, PlayerData[playerid][pEditObject]);
  7960. }
  7961. }
  7962. ShowLandObjects(playerid, type)
  7963. {
  7964. new
  7965. models[MAX_SELECTION_MENU_ITEMS] = {-1, ...},
  7966. index;
  7967. PlayerData[playerid][pFurnitureIndex] = -1;
  7968. for(new i = 0; i < sizeof(landArray); i ++)
  7969. {
  7970. if(!strcmp(landArray[i][fCategory], landCategories[PlayerData[playerid][pCategory]]))
  7971. {
  7972. if(PlayerData[playerid][pFurnitureIndex] == -1)
  7973. {
  7974. PlayerData[playerid][pFurnitureIndex] = i;
  7975. }
  7976. models[index++] = landArray[i][fModel];
  7977. }
  7978. }
  7979. ShowPlayerSelectionMenu(playerid, type, landCategories[PlayerData[playerid][pCategory]], models, index);
  7980. }
  7981. ClearChat(playerid)
  7982. {
  7983. for(new i = 0; i < 30; i ++)
  7984. {
  7985. SendClientMessage(playerid, -1, " ");
  7986. }
  7987. }
  7988. Float:Streamer_GetExtraFloat(objectid, type)
  7989. {
  7990. new
  7991. string[24];
  7992. getproperty(.id = objectid, .value = type, .string = string);
  7993. strunpack(string, string);
  7994. return floatstr(string);
  7995. }
  7996. Streamer_SetExtraFloat(objectid, type, Float:value)
  7997. {
  7998. new
  7999. string[24];
  8000. format(string, sizeof(string), "%f", value);
  8001. setproperty(.id = objectid, .value = type, .string = string);
  8002. return 1;
  8003. }
  8004. Dialog:WeaponDamages(playerid, response, listitem, inputtext[])
  8005. {
  8006. if (response)
  8007. {
  8008. new count;
  8009. for(new i = 0; i < sizeof(WeaponDamages); i ++)
  8010. {
  8011. if(IsValidDamageWeapon(i))
  8012. {
  8013. if(count++ == listitem)
  8014. {
  8015. PlayerData[playerid][pSelected] = i;
  8016. return Dialog_Show(playerid, SetDamage, DIALOG_STYLE_INPUT, "{FFFFFF}Set Damage", "Please enter the weapon damage to set for %s (use 0 for default).", "Submit", "Back", GetWeaponNameEx(PlayerData[playerid][pSelected]));
  8017. }
  8018. }
  8019. }
  8020. }
  8021. return 1;
  8022. }
  8023. Dialog:SetDamage(playerid, response, listitem, inputtext[])
  8024. {
  8025. if (response)
  8026. {
  8027. new Float:damage;
  8028. if (sscanf(inputtext, "f", damage))
  8029. {
  8030. return Dialog_Show(playerid, SetDamage, DIALOG_STYLE_INPUT, "{FFFFFF}Set Damage", "Please enter the weapon damage to set for %s (use 0 for default).", "Submit", "Back", GetWeaponNameEx(PlayerData[playerid][pSelected]));
  8031. }
  8032. else if (damage < 0.0 || damage > 100.0)
  8033. {
  8034. return Dialog_Show(playerid, SetDamage, DIALOG_STYLE_INPUT, "{FFFFFF}Set Damage", "The specified damage can't be below 0 or above 100.\n\nPlease enter the weapon damage to set for %s (use 0 for default).", "Submit", "Back", GetWeaponNameEx(PlayerData[playerid][pSelected]));
  8035. }
  8036. else
  8037. {
  8038. new weaponid = PlayerData[playerid][pSelected];
  8039. SetWeaponDamage(weaponid, damage);
  8040. if (damage == 0.0)
  8041. {
  8042. SendAdminMessage(COLOR_ADM, "Admin: %s has set the damage for %s to default.", GetRPName(playerid), GetWeaponNameEx(weaponid));
  8043. }
  8044. else
  8045. {
  8046. SendAdminMessage(COLOR_ADM, "Admin: %s has set the damage for %s to %.1f.", GetRPName(playerid), GetWeaponNameEx(weaponid), damage);
  8047. }
  8048. }
  8049. }
  8050. else
  8051. {
  8052. ShowWeaponDamageEditMenu(playerid);
  8053. }
  8054. return 1;
  8055. }
  8056. Dialog:ClothesNew(playerid, response, listitem, inputtext[])
  8057. {
  8058. if(response)
  8059. {
  8060. if(listitem == 0)
  8061. {
  8062. ShowPlayerSelectionMenu(playerid, MODEL_SELECTION_CLOTHES, "Clothes Shop", customSkins, sizeof(customSkins));
  8063. }
  8064. else if(listitem == 1)
  8065. {
  8066. ShowPlayerSelectionMenu(playerid, MODEL_SELECTION_CLOTHES, "Clothes Shop", clothesShopSkins, sizeof(clothesShopSkins));
  8067. }
  8068. }
  8069. return 1;
  8070. }
  8071. stock CountPlayerHouses(playerid)
  8072. {
  8073. new count = 0;
  8074. for(new i = 0; i < MAX_HOUSES; i++){
  8075. if(HouseInfo[i][hExists])
  8076. {
  8077. if(IsHouseOwner(playerid, i))
  8078. {
  8079. count++;
  8080. }
  8081. }
  8082. }
  8083. return count;
  8084. }
  8085. GetGangColor(gang)
  8086. {
  8087. new
  8088. color;
  8089. color = GangInfo[gang][gColor] >>> 8;
  8090. return color;
  8091. }
  8092. stock ClearDamages(playerid)
  8093. {
  8094. for(new id = 0; id < MAX_DAMAGES; id++)
  8095. {
  8096. if(DamageData[playerid][id][damageTaken] != 0){
  8097. DamageData[playerid][id][damageTaken] = 0;
  8098. DamageData[playerid][id][damageBodypart] = 0;
  8099. DamageData[playerid][id][damageTime] = 0;
  8100. DamageData[playerid][id][damageWeapon] = -1;
  8101. DamageData[playerid][id][damageBy] = -1;
  8102. }
  8103. }
  8104. totalDamages[playerid] = 0;
  8105. PlayerData[playerid][pLegShot] = false;
  8106. return true;
  8107. }
  8108. stock ReturnDamages(damaged, playerid)
  8109. {
  8110. new str[400], longstr[2500], title[90], count = 0;
  8111. format(title, sizeof(title), "%s", GetRPName(damaged));
  8112. for(new id = 0; id < MAX_DAMAGES; id++){
  8113. if(DamageData[damaged][id][damageTaken] != 0) count++;
  8114. }
  8115. if(!count)return Dialog_Show(playerid, 1, DIALOG_STYLE_LIST, title, "There are no damages to show.", ">>>", "");
  8116. else if(count > 0){
  8117. for(new id = 0; id < MAX_DAMAGES; id++){
  8118. if(DamageData[damaged][id][damageTaken] >= 1){
  8119. format(str, sizeof(str), "%d dmg from %s to %s (Kevlarhit: %d) %d s ago\n", DamageData[damaged][id][damageTaken], GetWeaponNameEx(DamageData[damaged][id][damageWeapon]), ReturnBodypartName(DamageData[damaged][id][damageBodypart]), DamageData[damaged][id][damageArmor], gettime() - DamageData[damaged][id][damageTime]);
  8120. strcat(longstr, str);
  8121. }
  8122. }
  8123. Dialog_Show(playerid, 1, DIALOG_STYLE_LIST, title, longstr, ">>>", "");
  8124. }
  8125. return true;
  8126. }
  8127. stock ReturnDamagesAdmin(damaged, playerid)
  8128. {
  8129. new str[400], longstr[2500], title[90], count = 0;
  8130. format(title, sizeof(title), "%s", GetRPName(damaged));
  8131. for(new id = 0; id < MAX_DAMAGES; id++){
  8132. if(DamageData[damaged][id][damageTaken] != 0) count++;
  8133. }
  8134. if(!count)return Dialog_Show(playerid, 1, DIALOG_STYLE_LIST, title, "There are no damages to show.", ">>>", "");
  8135. else if(count > 0){
  8136. for(new id = 0; id < MAX_DAMAGES; id++){
  8137. if(DamageData[damaged][id][damageTaken] != 0){
  8138. format(str, sizeof(str), "{FF6346}(%s){FFFFFF} %d dmg from %s to %s (Kevlarhit: %d) %d s ago\n", DamageData[damaged][id][damageBy], DamageData[damaged][id][damageTaken], GetWeaponNameEx(DamageData[damaged][id][damageWeapon]), ReturnBodypartName(DamageData[damaged][id][damageBodypart]), DamageData[damaged][id][damageArmor], gettime() - DamageData[damaged][id][damageTime]);
  8139. strcat(longstr, str);
  8140. }
  8141. }
  8142. Dialog_Show(playerid, 1, DIALOG_STYLE_LIST, title, longstr, ">>>", "");
  8143. }
  8144. return true;
  8145. }
  8146. ProcessDamage(playerid, weaponid)
  8147. {
  8148. new
  8149. Float:damage = WeaponDamages[weaponid],
  8150. Float:health,
  8151. Float:armor;
  8152. if (damage != 0.0)
  8153. {
  8154. GetPlayerHealth(playerid, health);
  8155. GetPlayerArmour(playerid, armor);
  8156. if (armor >= damage) {
  8157. armor -= damage;
  8158. } else if (armor < damage) {
  8159. health -= (damage - armor), armor = 0;
  8160. } else if (health >= damage) {
  8161. health -= damage;
  8162. } else {
  8163. health = 0;
  8164. }
  8165. SetPlayerHealth(playerid, health);
  8166. SetPlayerArmour(playerid, armor);
  8167. }
  8168. }
  8169. IsValidDamageWeapon(weaponid)
  8170. {
  8171. if(!(0 <= weaponid <= 46))
  8172. return false;
  8173. switch(weaponid)
  8174. {
  8175. case 0, 19..21, WEAPON_DILDO..WEAPON_FLOWER, WEAPON_GRENADE..WEAPON_MOLTOV, WEAPON_ROCKETLAUNCHER..WEAPON_MINIGUN, WEAPON_SATCHEL..WEAPON_PARACHUTE:
  8176. return false;
  8177. }
  8178. return true;
  8179. }
  8180. ShowWeaponDamageEditMenu(playerid)
  8181. {
  8182. static
  8183. string[512];
  8184. string = "Weapon\tDamage";
  8185. for(new i = 0; i < sizeof(WeaponDamages); i ++)
  8186. {
  8187. if(IsValidDamageWeapon(i))
  8188. {
  8189. if (WeaponDamages[i] != 0.0)
  8190. format(string, sizeof(string), "%s\n%s\t%.1f%c", string, GetWeaponNameEx(i), WeaponDamages[i], '%');
  8191. else
  8192. format(string, sizeof(string), "%s\n%s\tDefault", string, GetWeaponNameEx(i));
  8193. }
  8194. }
  8195. Dialog_Show(playerid, WeaponDamages, DIALOG_STYLE_TABLIST_HEADERS, "{FFFFFF}Select Weapon", string, "Change", "Cancel");
  8196. }
  8197. SetWeaponDamage(weaponid, Float:damage) // Edited by Grime (09-27-2017)
  8198. {
  8199. if(IsValidDamageWeapon(weaponid))
  8200. {
  8201. format(queryBuffer, sizeof(queryBuffer), "INSERT INTO rp_gundamages (Weapon, Damage) VALUES(%i, %.4f) ON DUPLICATE KEY UPDATE Damage = %.4f", weaponid, damage, damage);
  8202. mysql_tquery(connectionID, queryBuffer);
  8203. WeaponDamages[weaponid] = damage;
  8204. }
  8205. }
  8206. stock AddDamages(playerid, issuerid, weaponid, bodypart, Float:amount)
  8207. {
  8208. new id;
  8209. totalDamages[playerid]++;
  8210. for(new i = 0; i < MAX_DAMAGES; i++)
  8211. {
  8212. if(!DamageData[playerid][i][damageTaken]){
  8213. id = i;
  8214. break;
  8215. }
  8216. }
  8217. new Float: Armour;
  8218. GetPlayerArmour(playerid, Armour);
  8219. if(Armour > 1 && bodypart == BODY_PART_CHEST){
  8220. DamageData[playerid][id][damageArmor] = 1;
  8221. }
  8222. else{
  8223. DamageData[playerid][id][damageArmor] = 0;
  8224. }
  8225. DamageData[playerid][id][damageTaken] = floatround(amount, floatround_round);
  8226. DamageData[playerid][id][damageWeapon] = weaponid;
  8227. DamageData[playerid][id][damageBodypart] = bodypart;
  8228. DamageData[playerid][id][damageTime] = gettime();
  8229. format(DamageData[playerid][id][damageBy], 90, "%s", GetPlayerNameEx(issuerid));
  8230. return true;
  8231. }
  8232. IsRepairShopInUse(id)
  8233. {
  8234. foreach(new i : Player)
  8235. {
  8236. if(PlayerData[i][pRepairShop] == id && IsPlayerInRangeOfPoint(i, 10.0, g_RepairShops[id][3], g_RepairShops[id][4], g_RepairShops[id][5]))
  8237. {
  8238. return 1;
  8239. }
  8240. }
  8241. return 0;
  8242. }
  8243. Dialog:Graffiti_Type(playerid, response, listitem, inputtext[])
  8244. {
  8245. if(response)
  8246. {
  8247. if(listitem == 0)
  8248. {
  8249. Dialog_Show(playerid, Dialog_Tag_Default, DIALOG_STYLE_LIST, "Default Tag", "Pink graffiti Temple Drive Ballas\nOrange graffiti Varrio loz aztecas\nDark green graffiti Seville BLVD\nOrange graffiti Varrio Los Aztecas\nPurple graffiti Kilo tray Ballas\nPurple graffiti San Fiero Rifa\nDark green graffiti Los Santos Vagos\nPurple graffiti Front Yard Ballaz\nPink graffiti Rollin Heights Ballas\nDark blue Temple drive Ballas", "Select", "Cancel");
  8250. }
  8251. if(listitem == 1)
  8252. {
  8253. Dialog_Show(playerid, Dialog_Tag_Font, DIALOG_STYLE_LIST, "Chose a font!", "Arial\nCourier\nImpact\nPricedown\nDaredevil\nBombing\naaaiight! fat\nFrom Street Art\nGhang\nGraffogie\nGraphers Blog\nNosegrind Demo", "Select", "Cancel");
  8254. }
  8255. }
  8256. return 1;
  8257. }
  8258. Dialog:Dialog_Tag_Default(playerid, response, listitem, inputtext[])
  8259. {
  8260. if(response)
  8261. {
  8262. new id = Graffiti_Nearest(playerid);
  8263. switch(listitem)
  8264. {
  8265. case 0:
  8266. {
  8267. gang_tag_chosen[playerid] = 1529;
  8268. SendClientMessageEx(playerid, -1, "You've chose %s", inputtext);
  8269. PlayerData[playerid][pGraffiti] = id;
  8270. PlayerData[playerid][pGraffitiTime] = 15;
  8271. ApplyAnimationEx(playerid, "GRAFFITI", "spraycan_fire", 4.1, 1, 0, 0, 0, 0);
  8272. SendAdminMessage(COLOR_LIGHTRED, "%s[ID %i] has started spraying a gang tag %s", GetRPName(playerid), playerid, inputtext);
  8273. GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~b~Spraying...~w~ please wait!", 15000, 3);
  8274. SendProximityMessage(playerid, 30.0, COLOR_PURPLE, "* %s takes out a can of spray paint and sprays the wall.", GetRPName(playerid));
  8275. }
  8276. case 1:
  8277. {
  8278. gang_tag_chosen[playerid] = 1531;
  8279. SendClientMessageEx(playerid, -1, "You've chose %s", inputtext);
  8280. PlayerData[playerid][pGraffiti] = id;
  8281. PlayerData[playerid][pGraffitiTime] = 15;
  8282. ApplyAnimationEx(playerid, "GRAFFITI", "spraycan_fire", 4.1, 1, 0, 0, 0, 0);
  8283. SendAdminMessage(COLOR_LIGHTRED, "%s[ID %i] has started spraying a gang tag %s", GetRPName(playerid), playerid, inputtext);
  8284. GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~b~Spraying...~w~ please wait!", 15000, 3);
  8285. SendProximityMessage(playerid, 30.0, COLOR_PURPLE, "* %s takes out a can of spray paint and sprays the wall.", GetRPName(playerid));
  8286. }
  8287. case 2:
  8288. {
  8289. gang_tag_chosen[playerid] = 18660;
  8290. SendClientMessageEx(playerid, -1, "You've chose %s", inputtext);
  8291. PlayerData[playerid][pGraffiti] = id;
  8292. PlayerData[playerid][pGraffitiTime] = 15;
  8293. ApplyAnimationEx(playerid, "GRAFFITI", "spraycan_fire", 4.1, 1, 0, 0, 0, 0);
  8294. SendAdminMessage(COLOR_LIGHTRED, "%s[ID %i] has started spraying a gang tag %s", GetRPName(playerid), playerid, inputtext);
  8295. GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~b~Spraying...~w~ please wait!", 15000, 3);
  8296. SendProximityMessage(playerid, 30.0, COLOR_PURPLE, "* %s takes out a can of spray paint and sprays the wall.", GetRPName(playerid));
  8297. }
  8298. case 3:
  8299. {
  8300. gang_tag_chosen[playerid] = 18661;
  8301. SendClientMessageEx(playerid, -1, "You've chose %s", inputtext);
  8302. PlayerData[playerid][pGraffiti] = id;
  8303. PlayerData[playerid][pGraffitiTime] = 15;
  8304. ApplyAnimationEx(playerid, "GRAFFITI", "spraycan_fire", 4.1, 1, 0, 0, 0, 0);
  8305. SendAdminMessage(COLOR_LIGHTRED, "%s[ID %i] has started spraying a gang tag %s", GetRPName(playerid), playerid, inputtext);
  8306. GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~b~Spraying...~w~ please wait!", 15000, 3);
  8307. SendProximityMessage(playerid, 30.0, COLOR_PURPLE, "* %s takes out a can of spray paint and sprays the wall.", GetRPName(playerid));
  8308. }
  8309. case 4:
  8310. {
  8311. gang_tag_chosen[playerid] = 18662;
  8312. SendClientMessageEx(playerid, -1, "You've chose %s", inputtext);
  8313. PlayerData[playerid][pGraffiti] = id;
  8314. PlayerData[playerid][pGraffitiTime] = 15;
  8315. ApplyAnimationEx(playerid, "GRAFFITI", "spraycan_fire", 4.1, 1, 0, 0, 0, 0);
  8316. SendAdminMessage(COLOR_LIGHTRED, "%s[ID %i] has started spraying a gang tag %s", GetRPName(playerid), playerid, inputtext);
  8317. GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~b~Spraying...~w~ please wait!", 15000, 3);
  8318. SendProximityMessage(playerid, 30.0, COLOR_PURPLE, "* %s takes out a can of spray paint and sprays the wall.", GetRPName(playerid));
  8319. }
  8320. case 5:
  8321. {
  8322. gang_tag_chosen[playerid] = 18663;
  8323. SendClientMessageEx(playerid, -1, "You've chose %s", inputtext);
  8324. PlayerData[playerid][pGraffiti] = id;
  8325. PlayerData[playerid][pGraffitiTime] = 15;
  8326. ApplyAnimationEx(playerid, "GRAFFITI", "spraycan_fire", 4.1, 1, 0, 0, 0, 0);
  8327. SendAdminMessage(COLOR_LIGHTRED, "%s[ID %i] has started spraying a gang tag %s", GetRPName(playerid), playerid, inputtext);
  8328. GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~b~Spraying...~w~ please wait!", 15000, 3);
  8329. SendProximityMessage(playerid, 30.0, COLOR_PURPLE, "* %s takes out a can of spray paint and sprays the wall.", GetRPName(playerid));
  8330. }
  8331. case 6:
  8332. {
  8333. gang_tag_chosen[playerid] = 18665;
  8334. SendClientMessageEx(playerid, -1, "You've chose %s", inputtext);
  8335. PlayerData[playerid][pGraffiti] = id;
  8336. PlayerData[playerid][pGraffitiTime] = 15;
  8337. ApplyAnimationEx(playerid, "GRAFFITI", "spraycan_fire", 4.1, 1, 0, 0, 0, 0);
  8338. SendAdminMessage(COLOR_LIGHTRED, "%s[ID %i] has started spraying a gang tag %s", GetRPName(playerid), playerid, inputtext);
  8339. GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~b~Spraying...~w~ please wait!", 15000, 3);
  8340. SendProximityMessage(playerid, 30.0, COLOR_PURPLE, "* %s takes out a can of spray paint and sprays the wall.", GetRPName(playerid));
  8341. }
  8342. case 7:
  8343. {
  8344. gang_tag_chosen[playerid] = 18666;
  8345. SendClientMessageEx(playerid, -1, "You've chose %s", inputtext);
  8346. PlayerData[playerid][pGraffiti] = id;
  8347. PlayerData[playerid][pGraffitiTime] = 15;
  8348. ApplyAnimationEx(playerid, "GRAFFITI", "spraycan_fire", 4.1, 1, 0, 0, 0, 0);
  8349. SendAdminMessage(COLOR_LIGHTRED, "%s[ID %i] has started spraying a gang tag %s", GetRPName(playerid), playerid, inputtext);
  8350. GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~b~Spraying...~w~ please wait!", 15000, 3);
  8351. SendProximityMessage(playerid, 30.0, COLOR_PURPLE, "* %s takes out a can of spray paint and sprays the wall.", GetRPName(playerid));
  8352. }
  8353. case 8:
  8354. {
  8355. gang_tag_chosen[playerid] = 18667;
  8356. SendClientMessageEx(playerid, -1, "You've chose %s", inputtext);
  8357. PlayerData[playerid][pGraffiti] = id;
  8358. PlayerData[playerid][pGraffitiTime] = 15;
  8359. ApplyAnimationEx(playerid, "GRAFFITI", "spraycan_fire", 4.1, 1, 0, 0, 0, 0);
  8360. SendAdminMessage(COLOR_LIGHTRED, "%s[ID %i] has started spraying a gang tag %s", GetRPName(playerid), playerid, inputtext);
  8361. GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~b~Spraying...~w~ please wait!", 15000, 3);
  8362. SendProximityMessage(playerid, 30.0, COLOR_PURPLE, "* %s takes out a can of spray paint and sprays the wall.", GetRPName(playerid));
  8363. }
  8364. case 9:
  8365. {
  8366. gang_tag_chosen[playerid] = 18664;
  8367. SendClientMessageEx(playerid, -1, "You've chose %s", inputtext);
  8368. PlayerData[playerid][pGraffiti] = id;
  8369. PlayerData[playerid][pGraffitiTime] = 15;
  8370. ApplyAnimationEx(playerid, "GRAFFITI", "spraycan_fire", 4.1, 1, 0, 0, 0, 0);
  8371. SendAdminMessage(COLOR_LIGHTRED, "%s[ID %i] has started spraying a gang tag %s", GetRPName(playerid), playerid, inputtext);
  8372. GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~b~Spraying...~w~ please wait!", 15000, 3);
  8373. SendProximityMessage(playerid, 30.0, COLOR_PURPLE, "* %s takes out a can of spray paint and sprays the wall.", GetRPName(playerid));
  8374. }
  8375. }
  8376. }
  8377. return 1;
  8378. }
  8379. Dialog:Dialog_Tag_Font(playerid, response, listitem, inputtext[])
  8380. {
  8381. if(response)
  8382. {
  8383. format(gang_tag_font[playerid], 50, inputtext);
  8384. Dialog_Show(playerid, Graffiti_Text, DIALOG_STYLE_INPUT, "Graffiti Text", "Please enter the text you wish to spray below.\n\nNote: Your text input cannot exceed over 64 characters.", "Submit", "Cancel");
  8385. }
  8386. return 1;
  8387. }
  8388. Dialog:BuyFurniture(playerid, response, listitem, inputtext[])
  8389. {
  8390. if (response)
  8391. {
  8392. PlayerData[playerid][pSelected] = listitem;
  8393. ShowFurniturePreviewer(playerid);
  8394. }
  8395. return 1;
  8396. }
  8397. Dialog:ChangeMat(playerid, response, listitem, inputtext[])
  8398. {
  8399. if(!response) return 1;
  8400. if(listitem == 0 || listitem == 1) return ShowColorList(playerid);
  8401. new t = -1;
  8402. for(new x = 0; x < sizeof(MaterialIDs); x++)
  8403. {
  8404. if(strcmp(inputtext, MaterialIDs[x][Name], true) == 0)
  8405. {
  8406. t = x;
  8407. break;
  8408. }
  8409. }
  8410. if(t == -1) return SendClientMessage(playerid, COLOR_RED, "An error has occurred, please try it later! (DEBUG: \"ChangeMatHandler\")");
  8411. FurnitureChange(playerid, GetPVarInt(playerid, "FurnID"), GetPVarInt(playerid, "MatSlot"), t, 1);
  8412. return true;
  8413. }
  8414. Dialog:ChangeColor(playerid, response, listitem, inputtext[])
  8415. {
  8416. if(!response) return 1;
  8417. if(listitem == 0 || listitem == 1) return MaterialRes
  8418. FurnitureChange(playerid, GetPVarInt(playerid, "FurnID"), GetPVarInt(playerid, "MatSlot"), listitem, 2);
  8419. return true;
  8420. }
  8421. ListTexture(playerid)
  8422. {
  8423. new fid = GetPVarInt(playerid, "FurnID");
  8424. new list[256], header[64];
  8425. format(header, sizeof(header), "You are now editing ID: %d.", GetPVarInt(playerid, "FurnID"));
  8426. format(list, sizeof(list), "Index 1: %s\nIndex 2: %s\nIndex 3: %s\n \nClear Textures", Furniture[fid][fMaterial][0] ? ("{FFFF00}In Use") : ("{C3C3C3}Empty"), Furniture[fid][fMaterial][1] ? ("{FFFF00}In Use") : ("{C3C3C3}Empty"), Furniture[fid][fMaterial][2] ? ("{FFFF00}In Use") : ("{C3C3C3}Empty"));
  8427. Dialog_Show(playerid, MaterialHandler, DIALOG_STYLE_LIST, header, list, ">>", "Cancel");
  8428. return 1;
  8429. }
  8430. Dialog:MaterialHandler(playerid, response, listitem, inputtext[])
  8431. {
  8432. if(!response) return 1;
  8433. if(listitem == 4)
  8434. {
  8435. for(new i = 0; i != 3; i ++)
  8436. {
  8437. Furniture[GetPVarInt(playerid, "FurnID")][fMaterial][i] = 0;
  8438. Furniture[GetPVarInt(playerid, "FurnID")][fMatColour][i] = 0;
  8439. SetDynamicObjectMaterial(Furniture[GetPVarInt(playerid, "FurnID")][fObject], i, -1, "none", "none", 0);
  8440. }
  8441. SaveFurniture(GetPVarInt(playerid, "FurnID"));
  8442. }
  8443. SetPVarInt(playerid, "MatSlot", listitem);
  8444. MaterialRes
  8445. //ShowMaterialList(playerid);
  8446. return true;
  8447. }
  8448. Dialog:TextureResources(playerid, response, listitem, inputtext[])
  8449. {
  8450. if(!response) return 1;
  8451. new gstr[2056], gString[256];
  8452. format(gString, sizeof(gString), " << {F3FF02}Select Color\n");
  8453. strcat(gstr, gString);
  8454. for(new i = 0; i < sizeof(MaterialIDs); i++)
  8455. {
  8456. if(strcmp("None", MaterialIDs[i][Resource], true) == 0) continue;
  8457. if(strcmp(inputtext, MaterialIDs[i][Resource], true) == 0)
  8458. {
  8459. strcat(gstr, MaterialIDs[i][Name]);
  8460. strcat(gstr, "\n");
  8461. }
  8462. }
  8463. Dialog_Show(playerid, ChangeMat, DIALOG_STYLE_LIST, "Texture List", gstr, ">>", "Cancel");
  8464. return 1;
  8465. }
  8466. ShowColorList(playerid)
  8467. {
  8468. new list[4056], bigStr[256], gString[256];
  8469. format(gString, sizeof(gString), " << {F3FF02}Select Texture\n");
  8470. strcat(list, gString);
  8471. for(new i = 0; i < sizeof(MaterialColors); i++)
  8472. {
  8473. if(strcmp("none", MaterialColors[i][ColorName], true) == 0) continue;
  8474. format(bigStr, sizeof(bigStr), "%s\n", MaterialColors[i][ColorName]);
  8475. strcat(list, bigStr);
  8476. }
  8477. Dialog_Show(playerid, ChangeColor, DIALOG_STYLE_LIST, "Color List", list, ">>", "Cancel");
  8478. return 1;
  8479. }
  8480. FurnitureChange(playerid, furnid, index, list, status = 1) // 1 for mat, 2 for color
  8481. {
  8482. new model, txd[24], texture[24], color;
  8483. switch(status)
  8484. {
  8485. case 1:
  8486. {
  8487. SendClientMessage(playerid, -1, "Furniture texture has been updated.");
  8488. Furniture[furnid][fMaterial][index] = list;
  8489. SetDynamicObjectMaterial(Furniture[furnid][fObject], index, MaterialIDs[ Furniture[furnid][fMaterial][index] ][ModelID], MaterialIDs[ Furniture[furnid][fMaterial][index] ][TxdName], MaterialIDs[ Furniture[furnid][fMaterial][index] ][TextureName], MaterialColors[ Furniture[furnid][fMatColour][index] ][ColorHex]);
  8490. SaveFurniture(furnid);
  8491. }
  8492. case 2:
  8493. {
  8494. if(Furniture[furnid][fMaterial][index] == 0)
  8495. {
  8496. Furniture[furnid][fMatColour][index] = list;
  8497. SetDynamicObjectMaterial(Furniture[furnid][fObject], index, -1, MaterialIDs[ Furniture[furnid][fMaterial][index] ][TxdName], MaterialIDs[ Furniture[furnid][fMaterial][index] ][TextureName], MaterialColors[ Furniture[furnid][fMatColour][index] ][ColorHex]);
  8498. SaveFurniture(furnid);
  8499. }
  8500. else
  8501. {
  8502. SendClientMessage(playerid, -1, "Furniture color has been updated.");
  8503. Furniture[furnid][fMatColour][index] = list;
  8504. GetDynamicObjectMaterial(Furniture[furnid][fObject], index, model, txd, texture, color);
  8505. SetDynamicObjectMaterial(Furniture[furnid][fObject], index, model, txd, texture, MaterialColors[ Furniture[furnid][fMatColour][index] ][ColorHex]);
  8506. SaveFurniture(furnid);
  8507. }
  8508. }
  8509. }
  8510. return 1;
  8511. }
  8512. Dialog:HouseFurniture(playerid, response, listitem, inputtext[])
  8513. {
  8514. new
  8515. house = PlayerData[playerid][pHouse];
  8516. if(!GetInsideHouse(playerid) && !GetFurnitureHouse(playerid)) return SendErrorMessage(playerid, "You are not nearby or in a house that you own.");
  8517. if (!IsValidHouseID(house) || !IsHouseOwner(playerid, house))
  8518. {
  8519. return 0;
  8520. }
  8521. if (response)
  8522. {
  8523. switch (listitem)
  8524. {
  8525. case 0: // Buy furniture
  8526. {
  8527. ShowFurnitureCategories(playerid);
  8528. }
  8529. case 1: // Edit furniture
  8530. {
  8531. if (HouseInfo[house][hEdit])
  8532. {
  8533. PlayerData[playerid][pHouseEdit] = -1;
  8534. SetFurnitureEditMode(house, false);
  8535. SendInfoMessage(playerid, "You are no longer editing your furniture.");
  8536. }
  8537. else
  8538. {
  8539. if (PlayerData[playerid][pHouseEdit] != -1)
  8540. {
  8541. SetFurnitureEditMode(PlayerData[playerid][pHouseEdit], false);
  8542. }
  8543. PlayerData[playerid][pHouseEdit] = house;
  8544. SetFurnitureEditMode(house, true);
  8545. SendInfoMessage(playerid, "You are now in edition mode. Use /cancel to stop editing.");
  8546. }
  8547. }
  8548. }
  8549. }
  8550. return 1;
  8551. }
  8552. Dialog:Treadmill(playerid, response, listitem, inputtext[])
  8553. {
  8554. if ((response) && IsPlayerInRangeOfPoint(playerid, 3.0, 773.5131, -2.1218, 1000.8479))
  8555. {
  8556. PlayerData[playerid][pSpeedLevel] = listitem + 1;
  8557. Timers[playerid][tWorkout] = SetTimerEx("DecreasePower", 150, true, "i", playerid);
  8558. ApplyAnimation(playerid, "GYMNASIUM", "gym_tread_geton", 4.1, 0, 0, 0, 1, 0, 1);
  8559. SetTimerEx("BeginWorkout", 2000, false, "ii", playerid, WORKOUT_TREADMILL);
  8560. }
  8561. else
  8562. {
  8563. SetCameraBehindPlayer(playerid);
  8564. }
  8565. return 1;
  8566. }
  8567. Dialog:LiftWeights(playerid, response, listitem, inputtext[])
  8568. {
  8569. if ((response) && IsPlayerInRangeOfPoint(playerid, 3.0, 771.7793, 5.4092, 1000.7802))
  8570. {
  8571. PlayerData[playerid][pWeight] = (listitem + 2) * 10;
  8572. Timers[playerid][tWorkout] = SetTimerEx("DecreasePower", 200, true, "i", playerid);
  8573. ApplyAnimation(playerid, "Freeweights", "gym_free_pickup", 4.1, 0, 0, 0, 0, 0, 1);
  8574. SetTimerEx("BeginWorkout", 2500, false, "ii", playerid, WORKOUT_DUMBELLS);
  8575. }
  8576. else
  8577. {
  8578. SetCameraBehindPlayer(playerid);
  8579. }
  8580. return 1;
  8581. }
  8582. Dialog:CarPrice(playerid, response, listitem, inputtext[])
  8583. {
  8584. new
  8585. company = PlayerData[playerid][pCompany];
  8586. if (!IsValidCompanyID(company))
  8587. {
  8588. return 0;
  8589. }
  8590. if (response)
  8591. {
  8592. new amount, modelid = PlayerData[playerid][pSelected];
  8593. if (sscanf(inputtext, "i", amount))
  8594. {
  8595. return Dialog_Show(playerid, CarPrice, DIALOG_STYLE_INPUT, "{FFFFFF}Vehicle price", "Please input the price to set for '%s' below.", "Submit", "Cancel", GetVehicleModelName(modelid));
  8596. }
  8597. else if (amount < 1)
  8598. {
  8599. return Dialog_Show(playerid, CarPrice, DIALOG_STYLE_INPUT, "{FFFFFF}Vehicle price", "The price must be above $0.\n\nPlease input the price to set for '%s' below.", "Submit", "Cancel", GetVehicleModelName(modelid));
  8600. }
  8601. else
  8602. {
  8603. new
  8604. id = AddVehicleToDealership(company, modelid, amount);
  8605. if (id == -1)
  8606. {
  8607. return SendErrorMessage(playerid, "There are no available dealership car slots.");
  8608. }
  8609. else
  8610. {
  8611. SendInfoMessage(playerid, "You have added a %s to company %i.", GetVehicleModelName(modelid), company);
  8612. ShowDealershipEditMenu(playerid, company);
  8613. }
  8614. }
  8615. }
  8616. return 1;
  8617. }
  8618. Dialog:DealerAdd(playerid, response, listitem, inputtext[])
  8619. {
  8620. new
  8621. company = PlayerData[playerid][pCompany];
  8622. if (!IsValidCompanyID(company))
  8623. {
  8624. return 0;
  8625. }
  8626. if (response)
  8627. {
  8628. new model[32], modelid;
  8629. if (sscanf(inputtext, "s[32]", model))
  8630. {
  8631. return Dialog_Show(playerid, DealerAdd, DIALOG_STYLE_INPUT, "{FFFFFF}Add Vehicle", "Please enter the model ID or name of the vehicle to add:", "Submit", "Back");
  8632. }
  8633. else if (!(modelid = GetVehicleModelFromName(model)))
  8634. {
  8635. return SendErrorMessage(playerid, "The specified model doesn't exist.");
  8636. }
  8637. else if (IsVehicleInDealership(company, modelid))
  8638. {
  8639. return SendErrorMessage(playerid, "This vehicle is already sold at this dealership.");
  8640. }
  8641. else
  8642. {
  8643. PlayerData[playerid][pSelected] = modelid;
  8644. Dialog_Show(playerid, CarPrice, DIALOG_STYLE_INPUT, "{FFFFFF}Vehicle price", "Please input the price to set for '%s' below.", "Submit", "Cancel", GetVehicleModelName(modelid));
  8645. }
  8646. }
  8647. return 1;
  8648. }
  8649. Dialog:DIALOG_BUYVEHICLE2(playerid, response, listitem, inputtext[])
  8650. {
  8651. if(response)
  8652. {
  8653. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT COUNT(*) FROM vehicles WHERE ownerid = %i", PlayerData[playerid][pID]);
  8654. mysql_tquery(connectionID, queryBuffer, "OnPlayerAttemptBuyVehicle", "ii", playerid, PlayerData[playerid][pSelected]);
  8655. }
  8656. return 1;
  8657. }
  8658. PlayerCanAfford(playerid, amount)
  8659. {
  8660. return PlayerData[playerid][pCash] >= amount;
  8661. }
  8662. PurchaseVehicle(playerid)
  8663. {
  8664. new item = PlayerData[playerid][pSelected];
  8665. if(!PlayerCanAfford(playerid, DealershipCars[item][dcPrice]))
  8666. {
  8667. SendClientMessage(playerid, COLOR_GREY, "You can't purchase this. You don't have enough money for it.");
  8668. }
  8669. else
  8670. {
  8671. new
  8672. string[128];
  8673. format(string, sizeof(string), "{FFD700}Confirmation:\nAre you sure you want to purchase this %s for {00AA00}$%i{FFD700}?", vehicleNames[DealershipCars[PlayerData[playerid][pSelected]][dcModel] - 400], DealershipCars[PlayerData[playerid][pSelected]][dcPrice]);
  8674. Dialog_Show(playerid, DIALOG_BUYVEHICLE2, DIALOG_STYLE_MSGBOX, "Purchase confirmation", string, "Yes", "No");
  8675. }
  8676. }
  8677. ShowVehicleSelectionMenu(playerid, type)
  8678. {
  8679. new
  8680. models[MAX_SELECTION_MENU_ITEMS] = {-1, ...},
  8681. index, company = GetInsideBusiness(playerid);
  8682. for(new i = 0; i < sizeof(DealershipCars); i ++)
  8683. {
  8684. if (DealershipCars[i][dcCompany] == BusinessInfo[company][bID] && DealershipCars[i][dcModel] > 0 && DealershipCars[i][dcExists])
  8685. {
  8686. models[index++] = DealershipCars[i][dcModel];
  8687. }
  8688. }
  8689. ShowPlayerSelectionMenu(playerid, type, "Buy a Vehicle", models, index);
  8690. }
  8691. Streamer_GetExtraInt(objectid, type)
  8692. {
  8693. new extra[11];
  8694. if(Streamer_GetArrayData(STREAMER_TYPE_OBJECT, objectid, E_STREAMER_EXTRA_ID, extra, sizeof(extra)))
  8695. {
  8696. return extra[type];
  8697. }
  8698. return 0;
  8699. }
  8700. Streamer_SetExtraInt(objectid, type, value)
  8701. {
  8702. new extra[11];
  8703. if(Streamer_GetArrayData(STREAMER_TYPE_OBJECT, objectid, E_STREAMER_EXTRA_ID, extra, sizeof(extra)))
  8704. {
  8705. extra[type] = value;
  8706. return Streamer_SetArrayData(STREAMER_TYPE_OBJECT, objectid, E_STREAMER_EXTRA_ID, extra, sizeof(extra));
  8707. }
  8708. return 0;
  8709. }
  8710. SetRewardPlay(enable)
  8711. {
  8712. gHReward = enable;
  8713. }
  8714. SetDoubleXP(enable)
  8715. {
  8716. gDoubleXP = enable;
  8717. }
  8718. CreateObjectEx(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, Float:drawdistance = 0.0)
  8719. {
  8720. new
  8721. objectid = CreateObject(modelid, x, y, z, rx, ry, rz, drawdistance);
  8722. if(objectid != INVALID_OBJECT_ID)
  8723. {
  8724. gScriptObject{objectid} = 1;
  8725. }
  8726. return objectid;
  8727. }
  8728. GetStaticEntranceWorld(name[])
  8729. {
  8730. for(new i = 0; i < sizeof(staticEntrances); i ++)
  8731. {
  8732. if(!strcmp(staticEntrances[i][eName], name))
  8733. {
  8734. return staticEntrances[i][eWorld];
  8735. }
  8736. }
  8737. return 0;
  8738. }
  8739. Float:DistanceCameraTargetToLocation(Float:cx, Float:cy, Float:cz, Float:ox, Float:oy, Float:oz, Float:vx, Float:vy, Float:vz)
  8740. {
  8741. new Float:x, Float:y, Float:z, Float:distance;
  8742. distance = floatround(floatsqroot(((cx - ox) * (cx - ox)) + ((cy - oy) * (cy - oy)) + ((cz - oz) * (cz - oz))));
  8743. x = vx * distance + cx;
  8744. y = vy * distance + cy;
  8745. z = vz * distance + cz;
  8746. return floatsqroot((x - ox) * (x - ox) + (y - oy) * (y - oy) + (z - oz) * (z - oz));
  8747. }
  8748. GetClosestDoor(playerid, Float:range)
  8749. {
  8750. for (new i = 0; i < MAX_FURNITURE; i ++)
  8751. {
  8752. if (Furniture[i][fExists] && IsDoorModel(Furniture[i][fModel]) && IsPlayerNearPoint(playerid, range, Furniture[i][fSpawn][0], Furniture[i][fSpawn][1], Furniture[i][fSpawn][2], Furniture[i][fInterior], Furniture[i][fWorld]))
  8753. {
  8754. return i;
  8755. }
  8756. }
  8757. return -1;
  8758. }
  8759. GateCheck(playerid)
  8760. {
  8761. new id;
  8762. if(IsPlayerInRangeOfPoint(playerid, 10.0, 1544.639892, -1631.008666, 13.252797)) // PD barrier
  8763. {
  8764. if(GetFactionType(playerid) != FACTION_POLICE && GetFactionType(playerid) != FACTION_FEDERAL)
  8765. {
  8766. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to open this gate.");
  8767. }
  8768. if(!Streamer_GetExtraInt(gPDGates[0], E_OBJECT_OPENED))
  8769. {
  8770. ShowActionBubble(playerid, "* %s uses their remote to open the gate.", GetRPName(playerid));
  8771. MoveDynamicObject(gPDGates[0], 1544.689941, -1630.818481, 13.116797, 0.2, 0.000000, 0.000000, 90.000000);
  8772. Streamer_SetExtraInt(gPDGates[0], E_OBJECT_OPENED, 1);
  8773. }
  8774. else
  8775. {
  8776. ShowActionBubble(playerid, "* %s uses their remote to close the gate.", GetRPName(playerid));
  8777. MoveDynamicObject(gPDGates[0], 1544.639892, -1631.008666, 13.252797, 0.2, 0.000000, 90.000000, 90.000000);
  8778. Streamer_SetExtraInt(gPDGates[0], E_OBJECT_OPENED, 0);
  8779. }
  8780. return 1;
  8781. }
  8782. else if(IsPlayerInRangeOfPoint(playerid, 10.0, 1588.042602, -1638.079956, 14.602818)) // PD garage gate
  8783. {
  8784. if(GetFactionType(playerid) != FACTION_POLICE && GetFactionType(playerid) != FACTION_FEDERAL)
  8785. {
  8786. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to open this gate.");
  8787. }
  8788. if(!Streamer_GetExtraInt(gPDGates[1], E_OBJECT_OPENED))
  8789. {
  8790. ShowActionBubble(playerid, "* %s uses their remote to open the gate.", GetRPName(playerid));
  8791. MoveDynamicObject(gPDGates[1], 1597.332763, -1638.079956, 14.602818, 3.0);
  8792. Streamer_SetExtraInt(gPDGates[1], E_OBJECT_OPENED, 1);
  8793. }
  8794. else
  8795. {
  8796. ShowActionBubble(playerid, "* %s uses their remote to close the gate.", GetRPName(playerid));
  8797. MoveDynamicObject(gPDGates[1], 1588.042602, -1638.079956, 14.602818, 3.0);
  8798. Streamer_SetExtraInt(gPDGates[1], E_OBJECT_OPENED, 0);
  8799. }
  8800. return 1;
  8801. }
  8802. else if(IsPlayerInRangeOfPoint(playerid, 10.0, 321.255279, -1488.601318, 25.281988)) // FBI garage gate
  8803. {
  8804. if(GetFactionType(playerid) != FACTION_FEDERAL)
  8805. {
  8806. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to open this gate.");
  8807. }
  8808. if(!Streamer_GetExtraInt(gFBIGates[0], E_OBJECT_OPENED))
  8809. {
  8810. ShowActionBubble(playerid, "* %s uses their remote to open the gate.", GetRPName(playerid));
  8811. MoveDynamicObject(gFBIGates[0], 327.033508, -1492.691650, 25.281988, 3.0);
  8812. Streamer_SetExtraInt(gFBIGates[0], E_OBJECT_OPENED, 1);
  8813. }
  8814. else
  8815. {
  8816. ShowActionBubble(playerid, "* %s uses their remote to close the gate.", GetRPName(playerid));
  8817. MoveDynamicObject(gFBIGates[0], 321.255279, -1488.601318, 25.281988, 3.0);
  8818. Streamer_SetExtraInt(gFBIGates[0], E_OBJECT_OPENED, 0);
  8819. }
  8820. return 1;
  8821. }
  8822. else if(IsPlayerInRangeOfPoint(playerid, 10.0, 283.590423, -1542.835083, 25.281988)) // FBI garage gate
  8823. {
  8824. if(GetFactionType(playerid) != FACTION_FEDERAL)
  8825. {
  8826. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to open this gate.");
  8827. }
  8828. if(!Streamer_GetExtraInt(gFBIGates[1], E_OBJECT_OPENED))
  8829. {
  8830. ShowActionBubble(playerid, "* %s uses their remote to open the gate.", GetRPName(playerid));
  8831. MoveDynamicObject(gFBIGates[1], 289.593841, -1547.023071, 25.281988, 3.0);
  8832. Streamer_SetExtraInt(gFBIGates[1], E_OBJECT_OPENED, 1);
  8833. }
  8834. else
  8835. {
  8836. ShowActionBubble(playerid, "* %s uses their remote to close the gate.", GetRPName(playerid));
  8837. MoveDynamicObject(gFBIGates[1], 283.590423, -1542.835083, 25.281988, 3.0);
  8838. Streamer_SetExtraInt(gFBIGates[1], E_OBJECT_OPENED, 0);
  8839. }
  8840. return 1;
  8841. }
  8842. if((id = GetNearbyLand(playerid)) >= 0 && (IsLandOwner(playerid, id) || PlayerData[playerid][pLandPerms] == id))
  8843. {
  8844. for(new i = 0, j = Streamer_GetUpperBound(STREAMER_TYPE_OBJECT); i <= j; i ++)
  8845. {
  8846. if(IsValidDynamicObject(i) && IsGateObject(i) && IsPlayerInRangeOfPoint(playerid, 10.0, Streamer_GetExtraFloat(i, E_OBJECT_X), Streamer_GetExtraFloat(i, E_OBJECT_Y), Streamer_GetExtraFloat(i, E_OBJECT_Z)) && Streamer_GetExtraInt(i, E_OBJECT_TYPE) == E_OBJECT_LAND && Streamer_GetExtraInt(i, E_OBJECT_EXTRA_ID) == LandInfo[id][lID])
  8847. {
  8848. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM landobjects WHERE id = %i", Streamer_GetExtraInt(i, E_OBJECT_INDEX_ID));
  8849. mysql_tquery(connectionID, queryBuffer, "OnPlayerUseLandGate", "ii", playerid, i);
  8850. return 1;
  8851. }
  8852. }
  8853. }
  8854. return 0;
  8855. }
  8856. DoorCheck(playerid)
  8857. {
  8858. new Float:angle, houseid = GetInsideHouse(playerid), landid = GetNearbyLand(playerid);
  8859. for(new i = 0; i < sizeof(gPDDoors); i ++)
  8860. {
  8861. if(IsPlayerInRangeOfDynamicObject(playerid, gPDDoors[i], 3.0))
  8862. {
  8863. if(GetFactionType(playerid) != FACTION_POLICE && GetFactionType(playerid) != FACTION_FEDERAL)
  8864. {
  8865. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to open this door.");
  8866. }
  8867. Streamer_GetFloatData(STREAMER_TYPE_OBJECT, gPDDoors[i], E_STREAMER_R_Z, angle);
  8868. if(!Streamer_GetExtraInt(gPDDoors[i], E_OBJECT_OPENED))
  8869. {
  8870. ShowActionBubble(playerid, "* %s uses their card to open the door.", GetRPName(playerid));
  8871. SetDynamicObjectRot(gPDDoors[i], 0.0000, 0.0000, angle + 90.0);
  8872. Streamer_SetExtraInt(gPDDoors[i], E_OBJECT_OPENED, 1);
  8873. }
  8874. else
  8875. {
  8876. ShowActionBubble(playerid, "* %s uses their card to close the door.", GetRPName(playerid));
  8877. SetDynamicObjectRot(gPDDoors[i], 0.0000, 0.0000, angle - 90.0);
  8878. Streamer_SetExtraInt(gPDDoors[i], E_OBJECT_OPENED, 0);
  8879. }
  8880. return 1;
  8881. }
  8882. }
  8883. if(houseid)
  8884. {
  8885. if (IsValidFurnitureID(GetClosestDoor(playerid, 2.0)))
  8886. {
  8887. if (Furniture[GetClosestDoor(playerid, 2.0)][fDoorOpen] == 1)
  8888. {
  8889. Furniture[GetClosestDoor(playerid, 2.0)][fSpawn][5] = Furniture[GetClosestDoor(playerid, 2.0)][fSpawn][5] + 90.0;
  8890. Furniture[GetClosestDoor(playerid, 2.0)][fDoorOpen] = 0;
  8891. UpdateFurniture(GetClosestDoor(playerid, 2.0));
  8892. }
  8893. else
  8894. {
  8895. Furniture[GetClosestDoor(playerid, 2.0)][fSpawn][5] = Furniture[GetClosestDoor(playerid, 2.0)][fSpawn][5] - 90.0;
  8896. Furniture[GetClosestDoor(playerid, 2.0)][fDoorOpen] = 1;
  8897. UpdateFurniture(GetClosestDoor(playerid, 2.0));
  8898. }
  8899. }
  8900. }
  8901. for(new i = 0, j = Streamer_GetUpperBound(STREAMER_TYPE_OBJECT); i <= j; i ++)
  8902. {
  8903. if(IsValidDynamicObject(i) && IsPlayerInRangeOfDynamicObject(playerid, i, 2.5) && IsDoorObject(i))
  8904. {
  8905. if(landid >= 0 && Streamer_GetExtraInt(i, E_OBJECT_TYPE) == E_OBJECT_LAND && Streamer_GetExtraInt(i, E_OBJECT_EXTRA_ID) == LandInfo[landid][lID])
  8906. {
  8907. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT door_opened, door_locked FROM landobjects WHERE id = %i", Streamer_GetExtraInt(i, E_OBJECT_INDEX_ID));
  8908. mysql_tquery(connectionID, queryBuffer, "OnPlayerUseLandDoor", "iii", playerid, i, Streamer_GetExtraInt(i, E_OBJECT_INDEX_ID));
  8909. return 1;
  8910. }
  8911. }
  8912. }
  8913. return 0;
  8914. }
  8915. EnterCheck(playerid)
  8916. {
  8917. new id, string[40];
  8918. if((gettime() - PlayerData[playerid][pLastEnter]) < 3 && PlayerData[playerid][pAdminDuty] == 0)
  8919. {
  8920. return SendClientMessage(playerid, COLOR_GREY, "Please wait a moment before entering or exiting again.");
  8921. }
  8922. new vehicleid = GetPlayerVehicleID(playerid);
  8923. new closestcar = GetClosestCar(playerid, vehicleid);
  8924. if(IsPlayerInRangeOfVehicle(playerid, closestcar, 6.0) && GetVehicleModel(closestcar) == 519)
  8925. {
  8926. if(VehicleStatus{closestcar} == 1) return SendClientMessage(playerid, COLOR_WHITE, "You're not allowed to enter this Shamal as it's been damaged!");
  8927. ShowActionBubble(playerid, "* %s enters the Shamal airplane as a passenger.", GetRPName(playerid));
  8928. SetPlayerPos(playerid, 2.509036, 23.118730, 1199.593750);
  8929. SetPlayerFacingAngle(playerid, 82.14);
  8930. SetCameraBehindPlayer(playerid);
  8931. PlayerData[playerid][pWorld] = closestcar;
  8932. SetPlayerVirtualWorld(playerid, closestcar);
  8933. PlayerData[playerid][pInterior] = 1;
  8934. SetPlayerInterior(playerid, 1);
  8935. InsideShamal[playerid] = closestcar;
  8936. SendClientMessage(playerid, COLOR_WHITE, "Type /exit near the door to exit the vehicle, or /window to look outside.");
  8937. }
  8938. if((id = GetNearbyHouse(playerid)) >= 0)
  8939. {
  8940. if(HouseInfo[id][hLocked])
  8941. {
  8942. ShowPlayerFooter(playerid, "~r~Locked");
  8943. return 0;
  8944. }
  8945. if(IsHouseOwner(playerid, id))
  8946. {
  8947. HouseInfo[id][hTimestamp] = gettime();
  8948. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET timestamp = %i WHERE id = %i", gettime(), HouseInfo[id][hID]);
  8949. mysql_tquery(connectionID, queryBuffer);
  8950. ShowActionBubble(playerid, "* %s has entered their house.", GetRPName(playerid));
  8951. }
  8952. else
  8953. {
  8954. ShowActionBubble(playerid, "* %s has entered the house.", GetRPName(playerid));
  8955. }
  8956. PlayerData[playerid][pLastEnter] = gettime();
  8957. SetFreezePos(playerid, HouseInfo[id][hIntX], HouseInfo[id][hIntY], HouseInfo[id][hIntZ]);
  8958. SetPlayerPos(playerid, HouseInfo[id][hIntX], HouseInfo[id][hIntY], HouseInfo[id][hIntZ]);
  8959. SetPlayerFacingAngle(playerid, HouseInfo[id][hIntA]);
  8960. SetPlayerInterior(playerid, HouseInfo[id][hInterior]);
  8961. SetPlayerVirtualWorld(playerid, HouseInfo[id][hWorld]);
  8962. SetCameraBehindPlayer(playerid);
  8963. if(HouseInfo[id][hLights] == 1)
  8964. {
  8965. TextDrawHideForPlayer(playerid, houseLights);
  8966. }
  8967. else
  8968. {
  8969. TextDrawShowForPlayer(playerid, houseLights);
  8970. }
  8971. return 1;
  8972. }
  8973. else if((id = GetNearbyGarage(playerid)) >= 0)
  8974. {
  8975. if(GarageInfo[id][gLocked])
  8976. {
  8977. ShowPlayerFooter(playerid, "~r~Locked");
  8978. return 0;
  8979. }
  8980. if(IsGarageOwner(playerid, id))
  8981. {
  8982. GarageInfo[id][gTimestamp] = gettime();
  8983. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE garages SET timestamp = %i WHERE id = %i", gettime(), GarageInfo[id][gID]);
  8984. mysql_tquery(connectionID, queryBuffer);
  8985. ShowActionBubble(playerid, "* %s has entered their garage.", GetRPName(playerid));
  8986. }
  8987. else
  8988. {
  8989. ShowActionBubble(playerid, "* %s has entered the garage.", GetRPName(playerid));
  8990. }
  8991. if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  8992. {
  8993. TeleportToCoords(playerid, garageInteriors[GarageInfo[id][gType]][intVX], garageInteriors[GarageInfo[id][gType]][intVY], garageInteriors[GarageInfo[id][gType]][intVZ], garageInteriors[GarageInfo[id][gType]][intVA], garageInteriors[GarageInfo[id][gType]][intID], GarageInfo[id][gWorld]);
  8994. }
  8995. else
  8996. {
  8997. PlayerData[playerid][pLastEnter] = gettime();
  8998. SetPlayerPos(playerid, garageInteriors[GarageInfo[id][gType]][intPX], garageInteriors[GarageInfo[id][gType]][intPY], garageInteriors[GarageInfo[id][gType]][intPZ]);
  8999. SetPlayerFacingAngle(playerid, garageInteriors[GarageInfo[id][gType]][intPA]);
  9000. SetPlayerInterior(playerid, garageInteriors[GarageInfo[id][gType]][intID]);
  9001. SetPlayerVirtualWorld(playerid, GarageInfo[id][gWorld]);
  9002. SetCameraBehindPlayer(playerid);
  9003. }
  9004. return 1;
  9005. }
  9006. else if((id = GetNearbyBusiness(playerid)) >= 0)
  9007. {
  9008. if(BusinessInfo[id][bLocked])
  9009. {
  9010. ShowPlayerFooter(playerid, "~r~Closed");
  9011. return 0;
  9012. }
  9013. if(IsBusinessOwner(playerid, id))
  9014. {
  9015. BusinessInfo[id][bTimestamp] = gettime();
  9016. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET timestamp = %i WHERE id = %i", gettime(), BusinessInfo[id][bID]);
  9017. mysql_tquery(connectionID, queryBuffer);
  9018. ShowActionBubble(playerid, "* %s has entered their business.", GetRPName(playerid));
  9019. }
  9020. else
  9021. {
  9022. if(BusinessInfo[id][bEntryFee] > 0)
  9023. {
  9024. if(PlayerData[playerid][pCash] < BusinessInfo[id][bEntryFee])
  9025. {
  9026. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to pay the entry fee. You may not enter.");
  9027. }
  9028. format(string, sizeof(string), "~r~-$%i", BusinessInfo[id][bEntryFee]);
  9029. GameTextForPlayer(playerid, string, 5000, 1);
  9030. BusinessInfo[id][bCash] += BusinessInfo[id][bEntryFee];
  9031. GivePlayerCash(playerid, -BusinessInfo[id][bEntryFee]);
  9032. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i WHERE id = %i", BusinessInfo[id][bCash], BusinessInfo[id][bID]);
  9033. mysql_tquery(connectionID, queryBuffer);
  9034. }
  9035. ShowActionBubble(playerid, "* %s has entered the business.", GetRPName(playerid));
  9036. switch(BusinessInfo[id][bType])
  9037. {
  9038. case BUSINESS_STORE, BUSINESS_GUNSHOP, BUSINESS_CLOTHES, BUSINESS_RESTAURANT, BUSINESS_BARCLUB:
  9039. SendClientMessageEx(playerid, COLOR_GREEN, "Welcome to %s's %s [%i products]. /buy to purchase from this business.", BusinessInfo[id][bOwner], bizInteriors[BusinessInfo[id][bType]][intType], BusinessInfo[id][bProducts]);
  9040. case BUSINESS_GYM:
  9041. SendClientMessageEx(playerid, COLOR_GREEN, "Welcome to %s's %s. /buy to purchase a fighting style.", BusinessInfo[id][bOwner], bizInteriors[BusinessInfo[id][bType]][intType]);
  9042. case BUSINESS_AGENCY:
  9043. SendClientMessageEx(playerid, COLOR_GREEN, "Welcome to %s's %s. /(ad)vertise to make an advertisement.", BusinessInfo[id][bOwner], bizInteriors[BusinessInfo[id][bType]][intType]);
  9044. }
  9045. }
  9046. PlayerData[playerid][pLastEnter] = gettime();
  9047. SetPlayerPos(playerid, BusinessInfo[id][bIntX], BusinessInfo[id][bIntY], BusinessInfo[id][bIntZ]);
  9048. SetPlayerFacingAngle(playerid, BusinessInfo[id][bIntA]);
  9049. SetPlayerInterior(playerid, BusinessInfo[id][bInterior]);
  9050. SetPlayerVirtualWorld(playerid, BusinessInfo[id][bWorld]);
  9051. SetCameraBehindPlayer(playerid);
  9052. return 1;
  9053. }
  9054. else if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER && !PlayerData[playerid][pRepairTime])
  9055. {
  9056. for(new i = 0; i < sizeof(g_RepairShops); i ++)
  9057. {
  9058. if(IsPlayerInRangeOfPoint(playerid, 5.0, g_RepairShops[i][0], g_RepairShops[i][1], g_RepairShops[i][2]))
  9059. {
  9060. if(IsRepairShopInUse(i))
  9061. {
  9062. return SendErrorMessage(playerid, "This Pay n' Spray is currently in use.");
  9063. }
  9064. if((!PlayerCanAfford(playerid, 500)) && (GetFactionType(playerid) != FACTION_POLICE && GetFactionType(playerid) != FACTION_MEDIC))
  9065. {
  9066. return SendErrorMessage(playerid, "You can't afford the entry cost.");
  9067. }
  9068. SetVehiclePos(GetPlayerVehicleID(playerid), g_RepairShops[i][3], g_RepairShops[i][4], g_RepairShops[i][5]);
  9069. SetVehicleZAngle(GetPlayerVehicleID(playerid), g_RepairShops[i][6]);
  9070. TogglePlayerControllable(playerid, 0);
  9071. SendClientMessage(playerid, COLOR_WHITE, "Garage: You will be moved out the garage in 8 seconds.");
  9072. if(GetFactionType(playerid) == FACTION_POLICE || GetFactionType(playerid) == FACTION_MEDIC)
  9073. {
  9074. SendClientMessage(playerid, COLOR_GREEN, "Your vehicle is fixed free of charge due to being in a government faction!");
  9075. }
  9076. else
  9077. {
  9078. GivePlayerCash(playerid, -500);
  9079. }
  9080. PlayerData[playerid][pRepairTime] = 8;
  9081. PlayerData[playerid][pRepairShop] = i;
  9082. return 1;
  9083. }
  9084. }
  9085. return 1;
  9086. }
  9087. else if((id = GetNearbyEntrance(playerid)) >= 0)
  9088. {
  9089. if(EntranceInfo[id][eLocked])
  9090. {
  9091. ShowPlayerFooter(playerid, "~r~Locked");
  9092. return 0;
  9093. }
  9094. if(EntranceInfo[id][eIntX] == 0.0 && EntranceInfo[id][eIntY] == 0.0 && EntranceInfo[id][eIntZ] == 0.0)
  9095. {
  9096. SendClientMessage(playerid, COLOR_GREY, "This entrance has no interior and therefore cannot be entered.");
  9097. return 0;
  9098. }
  9099. if(EntranceInfo[id][eType] == 2)
  9100. {
  9101. SendClientMessage(playerid, COLOR_GREY, "You cannot enter this type of entrance!");
  9102. return 0;
  9103. }
  9104. if(!PlayerData[playerid][pAdminDuty])
  9105. {
  9106. if(EntranceInfo[id][eAdminLevel] && PlayerData[playerid][pAdmin] < EntranceInfo[id][eAdminLevel])
  9107. {
  9108. SendClientMessage(playerid, COLOR_GREY, "Your administrator level is too low. You may not enter.");
  9109. return 0;
  9110. }
  9111. if(EntranceInfo[id][eFactionType] > 0 && GetFactionType(playerid) != EntranceInfo[id][eFactionType])
  9112. {
  9113. SendClientMessage(playerid, COLOR_GREY, "This entrance is only accesible to a specific faction type. You may not enter.");
  9114. return 0;
  9115. }
  9116. if(EntranceInfo[id][eGang] >= 0 && EntranceInfo[id][eGang] != PlayerData[playerid][pGang])
  9117. {
  9118. SendClientMessage(playerid, COLOR_GREY, "This entrance is only accesible to a specific gang. You may not enter.");
  9119. return 0;
  9120. }
  9121. if(EntranceInfo[id][eVIP] && PlayerData[playerid][pDonator] < EntranceInfo[id][eVIP])
  9122. {
  9123. SendClientMessage(playerid, COLOR_GREY, "Your VIP rank is too low. You may not enter.");
  9124. return 0;
  9125. }
  9126. }
  9127. PlayerData[playerid][pLastEnter] = gettime();
  9128. ShowActionBubble(playerid, "* %s has entered the building.", GetRPName(playerid));
  9129. if(EntranceInfo[id][eType] == 1)
  9130. {
  9131. SendClientMessage(playerid, COLOR_WHITE, "This entrance can be used for OOC duels. Use /offerduel to initiate one!");
  9132. }
  9133. else if(EntranceInfo[id][eType] == 2)
  9134. {
  9135. SendClientMessage(playerid, COLOR_WHITE, "This entrance can be used to repair vehicles, use /repaircar.");
  9136. }
  9137. if(EntranceInfo[id][eVehicles] && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  9138. {
  9139. if(EntranceInfo[id][eFreeze])
  9140. {
  9141. TeleportToCoords(playerid, EntranceInfo[id][eIntX], EntranceInfo[id][eIntY], EntranceInfo[id][eIntZ], EntranceInfo[id][eIntA], EntranceInfo[id][eInterior], EntranceInfo[id][eWorld], true);
  9142. }
  9143. else
  9144. {
  9145. TeleportToCoords(playerid, EntranceInfo[id][eIntX], EntranceInfo[id][eIntY], EntranceInfo[id][eIntZ], EntranceInfo[id][eIntA], EntranceInfo[id][eInterior], EntranceInfo[id][eWorld]);
  9146. }
  9147. }
  9148. else
  9149. {
  9150. if(EntranceInfo[id][eFreeze])
  9151. {
  9152. SetFreezePos(playerid, EntranceInfo[id][eIntX], EntranceInfo[id][eIntY], EntranceInfo[id][eIntZ]);
  9153. }
  9154. else
  9155. {
  9156. SetPlayerPos(playerid, EntranceInfo[id][eIntX], EntranceInfo[id][eIntY], EntranceInfo[id][eIntZ]);
  9157. }
  9158. SetPlayerFacingAngle(playerid, EntranceInfo[id][eIntA]);
  9159. SetPlayerInterior(playerid, EntranceInfo[id][eInterior]);
  9160. SetPlayerVirtualWorld(playerid, EntranceInfo[id][eWorld]);
  9161. SetCameraBehindPlayer(playerid);
  9162. }
  9163. if(!EntranceInfo[id][eFreeze])
  9164. {
  9165. format(string, sizeof(string), "~w~%s", EntranceInfo[id][eName]);
  9166. GameTextForPlayer(playerid, string, 5000, 1);
  9167. }
  9168. return 1;
  9169. }
  9170. else
  9171. {
  9172. for(new i = 0; i < sizeof(staticEntrances); i ++)
  9173. {
  9174. if(IsPlayerInRangeOfPoint(playerid, 3.0, staticEntrances[i][ePosX], staticEntrances[i][ePosY], staticEntrances[i][ePosZ]))
  9175. {
  9176. if(!strcmp(staticEntrances[i][eName], "VIP lounge") && PlayerData[playerid][pDonator] == 0)
  9177. {
  9178. SendClientMessage(playerid, COLOR_GREY, "This lounge is only available to those with a VIP subscription.");
  9179. return 0;
  9180. }
  9181. if(staticEntrances[i][eFreeze])
  9182. {
  9183. SetFreezePos(playerid, staticEntrances[i][eIntX], staticEntrances[i][eIntY], staticEntrances[i][eIntZ]);
  9184. }
  9185. else
  9186. {
  9187. SetPlayerPos(playerid, staticEntrances[i][eIntX], staticEntrances[i][eIntY], staticEntrances[i][eIntZ]);
  9188. format(string, sizeof(string), "~w~%s", staticEntrances[i][eName]);
  9189. GameTextForPlayer(playerid, string, 5000, 1);
  9190. }
  9191. PlayerData[playerid][pLastEnter] = gettime();
  9192. ShowActionBubble(playerid, "* %s has entered the building.", GetRPName(playerid));
  9193. SetPlayerFacingAngle(playerid, staticEntrances[i][eIntA]);
  9194. SetPlayerInterior(playerid, staticEntrances[i][eInterior]);
  9195. SetPlayerVirtualWorld(playerid, staticEntrances[i][eWorld]);
  9196. SetCameraBehindPlayer(playerid);
  9197. return 1;
  9198. }
  9199. }
  9200. }
  9201. return 0;
  9202. }
  9203. ExitCheck(playerid)
  9204. {
  9205. new id;
  9206. if((gettime() - PlayerData[playerid][pLastEnter]) < 3 && PlayerData[playerid][pAdminDuty] == 0)
  9207. {
  9208. return SendClientMessage(playerid, COLOR_GREY, "Please wait a moment before entering or exiting again.");
  9209. }
  9210. if(InsideShamal[playerid] != INVALID_VEHICLE_ID && IsPlayerInRangeOfPoint(playerid,3,2.509036, 23.118730, 1199.593750))
  9211. {
  9212. ShowActionBubble(playerid, "* %s exits the Shamal airplane.", GetRPName(playerid));
  9213. if(InsideShamal[playerid] == INVALID_VEHICLE_ID || GetVehicleModel(InsideShamal[playerid]) != 519) {
  9214. SetPlayerPos(playerid, 0.000000, 0.000000, 420.000000);
  9215. }
  9216. else {
  9217. new Float:X, Float:Y, Float:Z;
  9218. GetVehiclePos(InsideShamal[playerid], X, Y, Z);
  9219. SetPlayerPos(playerid, X-4, Y-2.3, Z);
  9220. }
  9221. PlayerData[playerid][pWorld] = 0;
  9222. SetPlayerVirtualWorld(playerid, 0);
  9223. PlayerData[playerid][pInterior] = 0;
  9224. SetPlayerInterior(playerid, 0);
  9225. InsideShamal[playerid] = INVALID_VEHICLE_ID;
  9226. }
  9227. if((id = GetInsideHouse(playerid)) >= 0 && IsPlayerInRangeOfPoint(playerid, 3.0, HouseInfo[id][hIntX], HouseInfo[id][hIntY], HouseInfo[id][hIntZ]))
  9228. {
  9229. PlayerData[playerid][pLastEnter] = gettime();
  9230. ShowActionBubble(playerid, "* %s has exited the house.", GetRPName(playerid));
  9231. SetPlayerPos(playerid, HouseInfo[id][hPosX], HouseInfo[id][hPosY], HouseInfo[id][hPosZ]);
  9232. SetFreezePos(playerid, HouseInfo[id][hPosX], HouseInfo[id][hPosY], HouseInfo[id][hPosZ]);
  9233. SetPlayerFacingAngle(playerid, HouseInfo[id][hPosA]);
  9234. SetPlayerInterior(playerid, HouseInfo[id][hOutsideInt]);
  9235. SetPlayerVirtualWorld(playerid, HouseInfo[id][hOutsideVW]);
  9236. SetCameraBehindPlayer(playerid);
  9237. TextDrawHideForPlayer(playerid, houseLights);
  9238. return 1;
  9239. }
  9240. else if((id = GetInsideGarage(playerid)) >= 0)
  9241. {
  9242. if((GetPlayerState(playerid) == PLAYER_STATE_DRIVER && IsPlayerInRangeOfPoint(playerid, 6.0, garageInteriors[GarageInfo[id][gType]][intVX], garageInteriors[GarageInfo[id][gType]][intVY], garageInteriors[GarageInfo[id][gType]][intVZ])) ||
  9243. ((GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) && (IsPlayerInRangeOfPoint(playerid, 2.0, garageInteriors[GarageInfo[id][gType]][intPX], garageInteriors[GarageInfo[id][gType]][intPY], garageInteriors[GarageInfo[id][gType]][intPZ]) || IsPlayerInRangeOfPoint(playerid, 4.0, garageInteriors[GarageInfo[id][gType]][intVX], garageInteriors[GarageInfo[id][gType]][intVY], garageInteriors[GarageInfo[id][gType]][intVZ]))))
  9244. {
  9245. ShowActionBubble(playerid, "* %s has exited the garage.", GetRPName(playerid));
  9246. if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  9247. {
  9248. TeleportToCoords(playerid, GarageInfo[id][gExitX], GarageInfo[id][gExitY], GarageInfo[id][gExitZ], GarageInfo[id][gExitA], 0, 0);
  9249. }
  9250. else
  9251. {
  9252. SetPlayerPos(playerid, GarageInfo[id][gPosX], GarageInfo[id][gPosY], GarageInfo[id][gPosZ]);
  9253. SetPlayerFacingAngle(playerid, GarageInfo[id][gPosA]);
  9254. SetPlayerInterior(playerid, 0);
  9255. SetPlayerVirtualWorld(playerid, 0);
  9256. SetCameraBehindPlayer(playerid);
  9257. }
  9258. }
  9259. PlayerData[playerid][pLastEnter] = gettime();
  9260. return 1;
  9261. }
  9262. else if((id = GetInsideBusiness(playerid)) >= 0 && IsPlayerInRangeOfPoint(playerid, 3.0, BusinessInfo[id][bIntX], BusinessInfo[id][bIntY], BusinessInfo[id][bIntZ]))
  9263. {
  9264. PlayerData[playerid][pLastEnter] = gettime();
  9265. ShowActionBubble(playerid, "* %s has exited the business.", GetRPName(playerid));
  9266. SetPlayerPos(playerid, BusinessInfo[id][bPosX], BusinessInfo[id][bPosY], BusinessInfo[id][bPosZ]);
  9267. SetPlayerFacingAngle(playerid, BusinessInfo[id][bPosA]);
  9268. SetPlayerInterior(playerid, BusinessInfo[id][bOutsideInt]);
  9269. SetPlayerVirtualWorld(playerid, BusinessInfo[id][bOutsideVW]);
  9270. SetCameraBehindPlayer(playerid);
  9271. return 1;
  9272. }
  9273. else if((id = GetInsideEntrance(playerid)) >= 0 && IsPlayerInRangeOfPoint(playerid, (IsPlayerInAnyVehicle(playerid)) ? (7.0) : (3.0), EntranceInfo[id][eIntX], EntranceInfo[id][eIntY], EntranceInfo[id][eIntZ]))
  9274. {
  9275. if(EntranceInfo[id][eType] == 1)
  9276. {
  9277. SetPlayerWeapons(playerid);
  9278. }
  9279. PlayerData[playerid][pLastEnter] = gettime();
  9280. ShowActionBubble(playerid, "* %s has exited the building.", GetRPName(playerid));
  9281. if(EntranceInfo[id][eVehicles] && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  9282. {
  9283. if(EntranceInfo[id][eFreeze])
  9284. {
  9285. TeleportToCoords(playerid, EntranceInfo[id][ePosX], EntranceInfo[id][ePosY], EntranceInfo[id][ePosZ], EntranceInfo[id][ePosA], EntranceInfo[id][eOutsideInt], EntranceInfo[id][eOutsideVW], true);
  9286. }
  9287. else
  9288. {
  9289. TeleportToCoords(playerid, EntranceInfo[id][ePosX], EntranceInfo[id][ePosY], EntranceInfo[id][ePosZ], EntranceInfo[id][ePosA], EntranceInfo[id][eOutsideInt], EntranceInfo[id][eOutsideVW]);
  9290. }
  9291. }
  9292. else
  9293. {
  9294. if(EntranceInfo[id][eFreeze])
  9295. {
  9296. SetFreezePos(playerid, EntranceInfo[id][ePosX], EntranceInfo[id][ePosY], EntranceInfo[id][ePosZ]);
  9297. }
  9298. else
  9299. {
  9300. SetPlayerPos(playerid, EntranceInfo[id][ePosX], EntranceInfo[id][ePosY], EntranceInfo[id][ePosZ]);
  9301. }
  9302. SetPlayerFacingAngle(playerid, EntranceInfo[id][ePosA]);
  9303. SetPlayerInterior(playerid, EntranceInfo[id][eOutsideInt]);
  9304. SetPlayerVirtualWorld(playerid, EntranceInfo[id][eOutsideVW]);
  9305. SetCameraBehindPlayer(playerid);
  9306. }
  9307. return 1;
  9308. }
  9309. else
  9310. {
  9311. for(new i = 0; i < sizeof(staticEntrances); i ++)
  9312. {
  9313. if(IsPlayerInRangeOfPoint(playerid, 3.0, staticEntrances[i][eIntX], staticEntrances[i][eIntY], staticEntrances[i][eIntZ]) && GetPlayerVirtualWorld(playerid) == staticEntrances[i][eWorld])
  9314. {
  9315. if(staticEntrances[i][eFreeze])
  9316. {
  9317. SetFreezePos(playerid, staticEntrances[i][ePosX], staticEntrances[i][ePosY], staticEntrances[i][ePosZ]);
  9318. }
  9319. else
  9320. {
  9321. SetPlayerPos(playerid, staticEntrances[i][ePosX], staticEntrances[i][ePosY], staticEntrances[i][ePosZ]);
  9322. }
  9323. PlayerData[playerid][pLastEnter] = gettime();
  9324. ShowActionBubble(playerid, "* %s has exited the building.", GetRPName(playerid));
  9325. SetPlayerFacingAngle(playerid, staticEntrances[i][ePosA]);
  9326. SetPlayerInterior(playerid, 0);
  9327. SetPlayerVirtualWorld(playerid, 0);
  9328. SetCameraBehindPlayer(playerid);
  9329. return 1;
  9330. }
  9331. }
  9332. }
  9333. return 0;
  9334. }
  9335. AddReportToQueue(playerid, text[])
  9336. {
  9337. for(new x = 0; x < MAX_REPORTS; x ++)
  9338. {
  9339. if(!ReportInfo[x][rExists])
  9340. {
  9341. strcpy(ReportInfo[x][rText], text, 128);
  9342. ReportInfo[x][rExists] = 1;
  9343. ReportInfo[x][rAccepted] = 0;
  9344. ReportInfo[x][rReporter] = playerid;
  9345. ReportInfo[x][rHandledBy] = INVALID_PLAYER_ID;
  9346. ReportInfo[x][rTime] = 5;
  9347. PlayerData[playerid][pLastReport] = gettime();
  9348. foreach(new i : Player)
  9349. {
  9350. if(PlayerData[i][pAdmin] > 0 && !PlayerData[i][pToggleReports])
  9351. {
  9352. SendClientMessageEx(i, COLOR_YELLOW2, "Report from [%i]%s (RID: %i): %s", playerid, GetRPName(playerid), x, text);
  9353. }
  9354. }
  9355. return 1;
  9356. }
  9357. }
  9358. return 0;
  9359. }
  9360. AddBan(username[], ip[], from[], reason[], permanent = 0)
  9361. {
  9362. if(!isnull(username) && !isnull(ip))
  9363. {
  9364. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT id FROM bans WHERE username = '%s' OR ip = '%s'", username, ip);
  9365. mysql_tquery(connectionID, queryBuffer, "OnBanAttempt", "ssssi", username, ip, from, reason, permanent);
  9366. }
  9367. }
  9368. UpdateLandText(landid)
  9369. {
  9370. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT COUNT(*) FROM landobjects WHERE landid = %i", LandInfo[landid][lID]);
  9371. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_UPDATE_LANDLABELS, landid);
  9372. }
  9373. BanPlayer(playerid, from[], reason[], permanent = 0)
  9374. {
  9375. if(IsPlayerConnected(playerid))
  9376. {
  9377. if(!strcmp(from, SERVER_ANTICHEAT))
  9378. {
  9379. gAnticheatBans++;
  9380. SaveServerInfo();
  9381. }
  9382. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO log_bans VALUES(null, %i, NOW(), '%s (IP: %s) was banned by %s, reason: %e')", PlayerData[playerid][pID], GetPlayerNameEx(playerid), GetPlayerIP(playerid), from, reason);
  9383. mysql_tquery(connectionID, queryBuffer);
  9384. AddBan(GetPlayerNameEx(playerid), GetPlayerIP(playerid), from, reason, permanent);
  9385. KickIP(GetPlayerIP(playerid));
  9386. }
  9387. }
  9388. Rangeban(playerid, from[], reason[])
  9389. {
  9390. if(IsPlayerConnected(playerid))
  9391. {
  9392. AddBan(GetPlayerNameEx(playerid), GetPlayerIPRange(playerid), from, reason);
  9393. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO log_bans VALUES(null, %i, NOW(), '%s (IP: %s) was rangebanned by %s, reason: %e')", PlayerData[playerid][pID], GetPlayerNameEx(playerid), GetPlayerIP(playerid), from, reason);
  9394. mysql_tquery(connectionID, queryBuffer);
  9395. KickIP(GetPlayerIP(playerid));
  9396. }
  9397. }
  9398. KickIP(ip[])
  9399. {
  9400. foreach(new i : Player)
  9401. {
  9402. if(!strcmp(GetPlayerIP(i), ip))
  9403. {
  9404. KickPlayer(i);
  9405. }
  9406. }
  9407. }
  9408. GetPlayerHealthEx(playerid)
  9409. {
  9410. new Float:health;
  9411. GetPlayerHealth(playerid, health);
  9412. return floatround(health);
  9413. }
  9414. GetPlayerArmourEx(playerid)
  9415. {
  9416. new Float:armor;
  9417. GetPlayerArmour(playerid, armor);
  9418. return floatround(armor);
  9419. }
  9420. GivePlayerHealth(playerid, Float:amount)
  9421. {
  9422. new Float:health;
  9423. GetPlayerHealth(playerid, health);
  9424. SetPlayerHealth(playerid, (health + amount > 100.0) ? (100.0) : (health + amount));
  9425. }
  9426. GivePlayerArmour(playerid, Float:amount)
  9427. {
  9428. new Float:armor;
  9429. GetPlayerArmour(playerid, armor);
  9430. SetScriptArmour(playerid, (armor + amount > 100.0) ? (100.0) : (armor + amount));
  9431. }
  9432. // ---------------------------------------
  9433. // These functions are forwarded so they can be called by filterscripts using CallRemoteFunction.
  9434. //LS ELEVATOR
  9435. // Public:
  9436. forward CallElevator(playerid, floorid); // You can use INVALID_PLAYER_ID too.
  9437. forward ShowElevatorDialog(playerid);
  9438. //----------------------------------------
  9439. forward SetScriptPos(playerid, Float:x, Float:y, Float:z);
  9440. public SetScriptPos(playerid, Float:x, Float:y, Float:z)
  9441. {
  9442. SetPlayerPos(playerid, x, y, z);
  9443. }
  9444. forward FinishServerShutdown();
  9445. public FinishServerShutdown()
  9446. {
  9447. foreach(new i : Player) {
  9448. Kick(i);
  9449. }
  9450. SendRconCommand("exit");
  9451. return 1;
  9452. }
  9453. forward SetScriptArmour(playerid, Float:amount);
  9454. public SetScriptArmour(playerid, Float:amount)
  9455. {
  9456. PlayerData[playerid][pACTime] = gettime() + 5;
  9457. PlayerData[playerid][pArmorTime] = gettime() + 5;
  9458. PlayerData[playerid][pArmor] = amount;
  9459. return SetPlayerArmour(playerid, amount);
  9460. }
  9461. forward SetScriptSkin(playerid, skinid);
  9462. public SetScriptSkin(playerid, skinid)
  9463. {
  9464. SetPlayerSkin(playerid, skinid);
  9465. PlayerData[playerid][pSkin] = skinid;
  9466. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET skin = %i WHERE uid = %i", PlayerData[playerid][pSkin], PlayerData[playerid][pID]);
  9467. mysql_tquery(connectionID, queryBuffer);
  9468. }
  9469. forward DestroyDamageTD(playerid);
  9470. public DestroyDamageTD(playerid)
  9471. {
  9472. if(PlayerData[playerid][pDamageTimer] >= 0)
  9473. {
  9474. TextDrawHideForPlayer(playerid, Damage[playerid]);
  9475. PlayerData[playerid][pDamageTimer] = -1;
  9476. }
  9477. }
  9478. forward TurnOffFlash(playerid);
  9479. public TurnOffFlash(playerid)
  9480. {
  9481. PlayerTextDrawHide(playerid, _vhudFlash[playerid]);
  9482. return 1;
  9483. }
  9484. IsPlayerSpawned(playerid) return PlayerData[playerid][pLogged];
  9485. Float:GetPlayerDistanceFromPlayer(playerid, targetid)
  9486. {
  9487. new Float:Pos[3];
  9488. GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
  9489. return GetPlayerDistanceFromPoint(targetid, Pos[0], Pos[1], Pos[2]);
  9490. }
  9491. stock Float:GetDistanceBetweenPoints(Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2) {
  9492. return floatsqroot(floatpower(x1 - x2, 2) + floatpower(y1 - y2, 2) + floatpower(z1 - z2, 2));
  9493. }
  9494. forward UnloadTruckJob(playerid);
  9495. public UnloadTruckJob(playerid)
  9496. {
  9497. new JobID = PlayerTruckJob[playerid][pTDJobID];
  9498. new Float:VehHealth; GetVehicleHealth(GetPlayerVehicleID(playerid), VehHealth);
  9499. new Float:VehDamage = 1000.0 - VehHealth;
  9500. VehDamage = (VehDamage/1000.0)*100.0;
  9501. new string[128], str[5000], ExpGained;
  9502. TogglePlayerControllable(playerid, 1);
  9503. if(PlayerTruckJob[playerid][pTDLegal] == 1)
  9504. {
  9505. // Work out Price for Job
  9506. new OriginalPrice = LegalTruckJobInfo[JobID][pTJPrice];
  9507. new Float:DamageFirst = ((OriginalPrice*VehDamage)/100);
  9508. new Float:DamagePrice, NewPrice;
  9509. if(PlayerTruckJob[playerid][pTDSpeeding] != 0)
  9510. {
  9511. DamagePrice = (DamageFirst * (PlayerTruckJob[playerid][pTDSpeeding]*2));
  9512. NewPrice = floatround((OriginalPrice - DamagePrice),floatround_ceil);
  9513. }
  9514. else
  9515. {
  9516. NewPrice = floatround((OriginalPrice - DamageFirst),floatround_ceil);
  9517. }
  9518. // Calculate Experience Points Received
  9519. ExpGained = floatround((NewPrice/10),floatround_floor);
  9520. format(string, sizeof(string), "Goods Delivered: %s\n", LegalTruckJobInfo[JobID][pTJDesc]);
  9521. strcat(str, string);
  9522. format(string, sizeof(string), "Distance Travelled: %.2f Km\n", PlayerTruckJob[playerid][pTDDistance]);
  9523. strcat(str, string);
  9524. format(string, sizeof(string), "Damage Taken: %.2f Percent\n", VehDamage);
  9525. strcat(str, string);
  9526. format(string, sizeof(string), "Speeding Offenses: %d\n\n", PlayerTruckJob[playerid][pTDSpeeding]);
  9527. strcat(str, string);
  9528. format(string, sizeof(string), "Original Job Payment: $%d\n", OriginalPrice);
  9529. strcat(str, string);
  9530. if(PlayerTruckJob[playerid][pTDDistance] > 60.0)
  9531. {
  9532. strcat(str, "Distance Bonus: $2000\n");
  9533. NewPrice += 2000;
  9534. }
  9535. if(PlayerTruckJob[playerid][pTDSpeeding] != 0)
  9536. {
  9537. format(string, sizeof(string), "Payments Lost: $%d\n", floatround(DamagePrice,floatround_ceil));
  9538. strcat(str, string);
  9539. }
  9540. else
  9541. {
  9542. format(string, sizeof(string), "Payments Lost: $%d\n", floatround(DamageFirst,floatround_ceil));
  9543. strcat(str, string);
  9544. }
  9545. format(string, sizeof(string), "Payment Received: $%d\n\n", NewPrice);
  9546. strcat(str, string);
  9547. // Give Payment
  9548. GivePlayerCash(playerid, NewPrice);
  9549. // Clear Job Variables
  9550. ClearTruckJob(playerid);
  9551. new veh = GetPlayerVehicleID(playerid);
  9552. DetachTrailerFromVehicle(veh);
  9553. }
  9554. else
  9555. {
  9556. // Work out Price for Job
  9557. new OriginalPrice = IllegalTruckJobInfo[JobID][pTJPrice];
  9558. new Float:DamageFirst = ((OriginalPrice*VehDamage)/100);
  9559. new Float:DamagePrice, NewPrice;
  9560. if(PlayerTruckJob[playerid][pTDSpeeding] != 0)
  9561. {
  9562. DamagePrice = (DamageFirst * (PlayerTruckJob[playerid][pTDSpeeding]*2));
  9563. NewPrice = floatround((OriginalPrice - DamagePrice),floatround_ceil);
  9564. }
  9565. else
  9566. {
  9567. NewPrice = floatround((OriginalPrice - DamageFirst),floatround_ceil);
  9568. }
  9569. // Calculate Experience Points Received
  9570. ExpGained = floatround((NewPrice/10),floatround_floor);
  9571. format(string, sizeof(string), "Goods Delivered: %s\n", IllegalTruckJobInfo[JobID][pTJDesc]);
  9572. strcat(str, string);
  9573. format(string, sizeof(string), "Distance Travelled: %.2f Km\n", PlayerTruckJob[playerid][pTDDistance]);
  9574. strcat(str, string);
  9575. format(string, sizeof(string), "Damage Taken: %.2f Percent\n", VehDamage);
  9576. strcat(str, string);
  9577. format(string, sizeof(string), "Speeding Offenses: %d\n\n", PlayerTruckJob[playerid][pTDSpeeding]);
  9578. strcat(str, string);
  9579. format(string, sizeof(string), "Original Job Payment: $%d\n", OriginalPrice);
  9580. strcat(str, string);
  9581. if(PlayerTruckJob[playerid][pTDDistance] > 60.0)
  9582. {
  9583. strcat(str, "Distance Bonus: $3000\n");
  9584. NewPrice += 3000;
  9585. }
  9586. if(PlayerTruckJob[playerid][pTDSpeeding] != 0)
  9587. {
  9588. format(string, sizeof(string), "Payments Lost: $%d\n", floatround(DamagePrice,floatround_ceil));
  9589. strcat(str, string);
  9590. }
  9591. else
  9592. {
  9593. format(string, sizeof(string), "Payments Lost: $%d\n", floatround(DamageFirst,floatround_ceil));
  9594. strcat(str, string);
  9595. }
  9596. format(string, sizeof(string), "Payment Received: $%d\n\n", NewPrice);
  9597. strcat(str, string);
  9598. // Give Payment
  9599. GivePlayerCash(playerid, NewPrice);
  9600. // Clear Job Variables
  9601. new veh = GetPlayerVehicleID(playerid);
  9602. DetachTrailerFromVehicle(veh);
  9603. ClearTruckJob(playerid);
  9604. }
  9605. format(string, sizeof(string), "Old Trucking Experience: %d XP\n", PlayerData[playerid][pTruckingXP]);
  9606. strcat(str, string);
  9607. format(string, sizeof(string), "XP Gained: %d XP\n", ExpGained);
  9608. strcat(str, string);
  9609. format(string, sizeof(string), "New Trucking Experience: %d XP\n\n", PlayerData[playerid][pTruckingXP]+ExpGained);
  9610. strcat(str, string);
  9611. new OldXP = PlayerData[playerid][pTruckingXP];
  9612. PlayerData[playerid][pTruckingXP] += ExpGained;
  9613. new NewXP = PlayerData[playerid][pTruckingXP];
  9614. new TruckLevel = PlayerData[playerid][pTruckingLevel];
  9615. if((TruckLevel == 1 && OldXP < 5000 && NewXP >= 5000) ||
  9616. (TruckLevel == 2 && OldXP < 10000 && NewXP >= 10000) ||
  9617. (TruckLevel == 3 && OldXP < 15000 && NewXP >= 15000) ||
  9618. (TruckLevel == 4 && OldXP < 20000 && NewXP >= 20000) ||
  9619. (TruckLevel == 5 && OldXP < 30000 && NewXP >= 30000) ||
  9620. (TruckLevel == 6 && OldXP < 40000 && NewXP >= 40000) ||
  9621. (TruckLevel == 7 && OldXP < 50000 && NewXP >= 50000) ||
  9622. (TruckLevel == 8 && OldXP < 60000 && NewXP >= 60000) ||
  9623. (TruckLevel == 9 && OldXP < 80000 && NewXP >= 80000) ||
  9624. (TruckLevel == 10 && OldXP < 100000 && NewXP >= 100000) ||
  9625. (TruckLevel == 11 && OldXP < 120000 && NewXP >= 120000) ||
  9626. (TruckLevel == 12 && OldXP < 140000 && NewXP >= 140000) ||
  9627. (TruckLevel == 13 && OldXP < 160000 && NewXP >= 160000) ||
  9628. (TruckLevel == 14 && OldXP < 200000 && NewXP >= 200000))
  9629. {
  9630. PlayerData[playerid][pTruckingLevel] ++;
  9631. strcat(str, "{00FF00}You have just advanced a Trucking Level!\n");
  9632. format(string, sizeof(string), "Your new Trucking Level is %d!\n\n", PlayerData[playerid][pTruckingLevel]);
  9633. strcat(str, string);
  9634. }
  9635. if(TruckLevel == 1) strcat(str, "{FFFFFF}Next Level At: 5000 XP");
  9636. if(TruckLevel == 2) strcat(str, "{FFFFFF}Next Level At: 10000 XP");
  9637. if(TruckLevel == 3) strcat(str, "{FFFFFF}Next Level At: 15000 XP");
  9638. if(TruckLevel == 4) strcat(str, "{FFFFFF}Next Level At: 20000 XP");
  9639. if(TruckLevel == 5) strcat(str, "{FFFFFF}Next Level At: 30000 XP");
  9640. if(TruckLevel == 6) strcat(str, "{FFFFFF}Next Level At: 40000 XP");
  9641. if(TruckLevel == 7) strcat(str, "{FFFFFF}Next Level At: 50000 XP");
  9642. if(TruckLevel == 8) strcat(str, "{FFFFFF}Next Level At: 60000 XP");
  9643. if(TruckLevel == 9) strcat(str, "{FFFFFF}Next Level At: 80000 XP");
  9644. if(TruckLevel == 10) strcat(str, "{FFFFFF}Next Level At: 100000 XP");
  9645. if(TruckLevel == 11) strcat(str, "{FFFFFF}Next Level At: 120000 XP");
  9646. if(TruckLevel == 12) strcat(str, "{FFFFFF}Next Level At: 140000 XP");
  9647. if(TruckLevel == 13) strcat(str, "{FFFFFF}Next Level At: 160000 XP");
  9648. if(TruckLevel == 14) strcat(str, "{FFFFFF}Next Level At: 200000 XP");
  9649. if(TruckLevel == 15) strcat(str, "{FFFFFF}Currently no more levels available.");
  9650. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE `users` SET `truckingxp` = %i, `truckinglevel` = %i WHERE `uid` = %i", PlayerData[playerid][pTruckingXP], PlayerData[playerid][pTruckingLevel], PlayerData[playerid][pID]);
  9651. mysql_tquery(connectionID, queryBuffer);
  9652. Dialog_Show(playerid, 1, DIALOG_STYLE_MSGBOX, "{FFFFFF}Delivery Complete", str, "Ok", "Cancel");
  9653. }
  9654. forward LoadTruckJob(playerid, legal);
  9655. public LoadTruckJob(playerid, legal)
  9656. {
  9657. TogglePlayerControllable(playerid, 1);
  9658. new string[128], str[3000];
  9659. if(legal == 1)
  9660. {
  9661. // Work out the Distance in KM Between Depot's
  9662. new Float:PosX, Float:PosY, Float:PosZ;
  9663. new Float:DPosX, Float:DPosY, Float:DPosZ;
  9664. GetPlayerPos(playerid, PosX, PosY, PosZ);
  9665. DPosX = TruckDepotInfo[PlayerTruckJob[playerid][pTDDestDepot]][pTDPosX];
  9666. DPosY = TruckDepotInfo[PlayerTruckJob[playerid][pTDDestDepot]][pTDPosY];
  9667. DPosZ = TruckDepotInfo[PlayerTruckJob[playerid][pTDDestDepot]][pTDPosZ];
  9668. format(string,sizeof(string),"Delivery Destination: %s\n", TruckDepotInfo[PlayerTruckJob[playerid][pTDDestDepot]][pTDName]);
  9669. strcat(str, string);
  9670. format(string,sizeof(string),"Delivery Goods: %s\n", LegalTruckJobInfo[PlayerTruckJob[playerid][pTDJobID]][pTJDesc]);
  9671. strcat(str, string);
  9672. strcat(str, "{FF0000}A marker has been set to the Delivery Location on your GPS.\n");
  9673. strcat(str, "{FFFFFF}Deliver the goods with minimal damage and do not get caught speeding.\n\n");
  9674. strcat(str, "Use /unloadtrailer to unload your goods when you have reached the destination.");
  9675. Dialog_Show(playerid, 1, DIALOG_STYLE_MSGBOX, "{FFFFFF}Delivery Information", str, "Ok", "Cancel");
  9676. SetPlayerCheckpoint(playerid, DPosX, DPosY, DPosZ, 5.0);
  9677. PlayerData[playerid][pCP] = CHECKPOINT_TRUCKDELIVERY;
  9678. PlayerTruckJob[playerid][pTDTrailer] = GetVehicleTrailer(GetPlayerVehicleID(playerid));
  9679. }
  9680. else
  9681. {
  9682. new Float:PosX, Float:PosY, Float:PosZ;
  9683. new Float:DPosX, Float:DPosY, Float:DPosZ;
  9684. GetPlayerPos(playerid, PosX, PosY, PosZ);
  9685. DPosX = TruckDepotInfo[PlayerTruckJob[playerid][pTDDestDepot]][pTDPosX];
  9686. DPosY = TruckDepotInfo[PlayerTruckJob[playerid][pTDDestDepot]][pTDPosY];
  9687. DPosZ = TruckDepotInfo[PlayerTruckJob[playerid][pTDDestDepot]][pTDPosZ];
  9688. format(string,sizeof(string),"Delivery Destination: %s\n", TruckDepotInfo[PlayerTruckJob[playerid][pTDDestDepot]][pTDName]);
  9689. strcat(str, string);
  9690. format(string,sizeof(string),"Delivery Goods: %s\n", IllegalTruckJobInfo[PlayerTruckJob[playerid][pTDJobID]][pTJDesc]);
  9691. strcat(str, string);
  9692. strcat(str, "{FF0000}A marker has been set to the Delivery Location on your GPS.\n");
  9693. strcat(str, "{FFFFFF}Deliver the goods with minimal damage and do not get caught speeding.\n\n");
  9694. strcat(str, "Use /unloadtrailer to unload your goods when you have reached the destination.");
  9695. Dialog_Show(playerid, 1, DIALOG_STYLE_MSGBOX, "{FFFFFF}Delivery Information", str, "Ok", "Cancel");
  9696. SetPlayerCheckpoint(playerid, DPosX, DPosY, DPosZ, 5.0);
  9697. PlayerData[playerid][pCP] = CHECKPOINT_TRUCKDELIVERY;
  9698. PlayerTruckJob[playerid][pTDTrailer] = GetVehicleTrailer(GetPlayerVehicleID(playerid));
  9699. }
  9700. }
  9701. forward ClearTruckJob(playerid);
  9702. public ClearTruckJob(playerid)
  9703. {
  9704. PlayerTruckJob[playerid][pTDDestDepot] =0;
  9705. PlayerTruckJob[playerid][pTDJobID] =0;
  9706. PlayerTruckJob[playerid][pTDDamage] =0;
  9707. PlayerTruckJob[playerid][pTDSpeeding] =0;
  9708. PlayerTruckJob[playerid][pTDActive] =0;
  9709. PlayerTruckJob[playerid][pTDLegal] =0;
  9710. PlayerTruckJob[playerid][pTDDistance] =0.0;
  9711. PlayerTruckJob[playerid][pTDTrailer] =0;
  9712. DisablePlayerCheckpoint(playerid);
  9713. PlayerData[playerid][pCP] = CHECKPOINT_NONE;
  9714. SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0);
  9715. }
  9716. forward Impound_Load();
  9717. public Impound_Load()
  9718. {
  9719. static
  9720. rows,
  9721. fields;
  9722. cache_get_data(rows, fields, connectionID);
  9723. for (new i = 0; i < rows; i ++) if (i < MAX_IMPOUND_LOTS)
  9724. {
  9725. ImpoundData[i][impoundExists] = true;
  9726. ImpoundData[i][impoundID] = cache_get_field_content_int(i, "impoundID");
  9727. ImpoundData[i][impoundLot][0] = cache_get_field_content_float(i, "impoundLotX");
  9728. ImpoundData[i][impoundLot][1] = cache_get_field_content_float(i, "impoundLotY");
  9729. ImpoundData[i][impoundLot][2] = cache_get_field_content_float(i, "impoundLotZ");
  9730. ImpoundData[i][impoundRelease][0] = cache_get_field_content_float(i, "impoundReleaseX");
  9731. ImpoundData[i][impoundRelease][1] = cache_get_field_content_float(i, "impoundReleaseY");
  9732. ImpoundData[i][impoundRelease][2] = cache_get_field_content_float(i, "impoundReleaseZ");
  9733. ImpoundData[i][impoundRelease][3] = cache_get_field_content_float(i, "impoundReleaseA");
  9734. Impound_Refresh(i);
  9735. }
  9736. return 1;
  9737. }
  9738. forward OnImpoundCreated(impoundid);
  9739. public OnImpoundCreated(impoundid)
  9740. {
  9741. if (impoundid == -1 || !ImpoundData[impoundid][impoundExists])
  9742. return 0;
  9743. ImpoundData[impoundid][impoundID] = cache_insert_id(connectionID);
  9744. Impound_Save(impoundid);
  9745. return 1;
  9746. }
  9747. forward GiveWeaponToPlayer(playerid, weaponid, bool:temp);
  9748. public GiveWeaponToPlayer(playerid, weaponid, bool:temp)
  9749. {
  9750. GivePlayerWeaponEx(playerid, weaponid, temp);
  9751. }
  9752. public OnPlayerStreamOut(playerid, forplayerid)
  9753. {
  9754. if(GetPVarInt(forplayerid, "MASK_USED") == 0) {
  9755. ShowPlayerNameTagForPlayer(playerid, forplayerid, 1);
  9756. }
  9757. return 1;
  9758. }
  9759. forward TakeOffMask(playerid);
  9760. public TakeOffMask(playerid)
  9761. {
  9762. PlayerTextDrawHide(playerid, _Mask[playerid]);
  9763. return 1;
  9764. }
  9765. forward OnDealershipCarAdded(id);
  9766. public OnDealershipCarAdded(id)
  9767. {
  9768. DealershipCars[id][dcID] = cache_insert_id(connectionID);
  9769. SaveDealershipCar(id);
  9770. }
  9771. forward OnLoadDealershipCars();
  9772. public OnLoadDealershipCars()
  9773. {
  9774. new
  9775. rows = cache_get_row_count(connectionID);
  9776. for (new i = 0; i < rows; i ++)
  9777. {
  9778. DealershipCars[i][dcExists] = 1;
  9779. DealershipCars[i][dcID] = cache_get_field_content_int(i, "ID");
  9780. DealershipCars[i][dcCompany] = cache_get_field_content_int(i, "Company");
  9781. DealershipCars[i][dcModel] = cache_get_field_content_int(i, "Model");
  9782. DealershipCars[i][dcPrice] = cache_get_field_content_int(i, "Price");
  9783. }
  9784. }
  9785. forward BeginWorkout(playerid, type);
  9786. public BeginWorkout(playerid, type)
  9787. {
  9788. PlayerTextDrawSetString(playerid, PlayerData[playerid][pText][60], "0");
  9789. PlayerTextDrawSetString(playerid, PlayerData[playerid][pText][62], "0");
  9790. switch (type)
  9791. {
  9792. case WORKOUT_DUMBELLS:
  9793. {
  9794. PlayerTextDrawSetString(playerid, PlayerData[playerid][pText][59], "Reps");
  9795. ShowPlayerTextDraws(playerid, 58, 60);
  9796. gWeights[playerid][0] = SetAttachedObject(playerid, 3072, 5, 0.0, 0.0, 0.0);
  9797. gWeights[playerid][1] = SetAttachedObject(playerid, 3071, 6, 0.0, 0.0, 0.0);
  9798. ShowPlayerProgressBar(playerid, PlayerData[playerid][pBars][0]);
  9799. SetPlayerProgressBarValue(playerid, PlayerData[playerid][pBars][0], 0.0);
  9800. }
  9801. case WORKOUT_TREADMILL:
  9802. {
  9803. PlayerTextDrawSetString(playerid, PlayerData[playerid][pText][59], "Level");
  9804. PlayerTextDrawFormatString(playerid, PlayerData[playerid][pText][60], "%i", PlayerData[playerid][pSpeedLevel]);
  9805. ShowPlayerProgressBar(playerid, PlayerData[playerid][pBars][0]);
  9806. SetPlayerProgressBarValue(playerid, PlayerData[playerid][pBars][0], 50.0);
  9807. PlayerPlaySound(playerid, 17801, 0.0, 0.0, 0.0);
  9808. ShowPlayerTextDraws(playerid, 58, 62);
  9809. }
  9810. }
  9811. PlayerData[playerid][pWorkout] = type;
  9812. PlayerData[playerid][pDistanceRan] = 0;
  9813. PlayerData[playerid][pReps] = 0;
  9814. return TogglePlayerControllable(playerid, 0);
  9815. }
  9816. forward DecreasePower(playerid);
  9817. public DecreasePower(playerid)
  9818. {
  9819. new
  9820. Float:value = GetPlayerProgressBarValue(playerid, PlayerData[playerid][pBars][0]);
  9821. switch (PlayerData[playerid][pWorkout])
  9822. {
  9823. case WORKOUT_DUMBELLS:
  9824. {
  9825. if (value > 0.0)
  9826. {
  9827. SetPlayerProgressBarValue(playerid, PlayerData[playerid][pBars][0], value - 3.0);
  9828. }
  9829. }
  9830. case WORKOUT_TREADMILL:
  9831. {
  9832. if (value > 0.0)
  9833. {
  9834. SetPlayerProgressBarValue(playerid, PlayerData[playerid][pBars][0], value - (PlayerData[playerid][pSpeedLevel] + 8));
  9835. }
  9836. else
  9837. {
  9838. StopWorkout(playerid);
  9839. ApplyAnimation(playerid, "GYMNASIUM", "gym_tread_falloff", 4.1, 0, 0, 0, 0, 0, 1);
  9840. }
  9841. }
  9842. }
  9843. }
  9844. forward ReturnChatAnimation(playerid, text[]);
  9845. public ReturnChatAnimation(playerid, text[])
  9846. {
  9847. if(!PlayerUseAnims(playerid) || PlayerData[playerid][pLoopAnim] != 0)
  9848. {
  9849. return 1;
  9850. }
  9851. switch(PlayerData[playerid][pChatstyle])
  9852. {
  9853. case 0: ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,1,1,0,1,1,1);
  9854. case 1: ApplyAnimation(playerid, "GANGS", "PRTIAL_GNGTLKA",4.0,1,0,0,1,1,1);
  9855. case 2: ApplyAnimation(playerid, "GANGS", "PRTIAL_GNGTLKB", 4.0,1,0,0,1,1,1);
  9856. case 3: ApplyAnimation(playerid, "GANGS", "PRTIAL_GNGTLKD", 4.0,1,0,0,1,1,1);
  9857. case 4: ApplyAnimation(playerid, "GANGS", "PRTIAL_GNGTLKE", 4.0,1,0,0,1,1,1);
  9858. case 5: ApplyAnimation(playerid, "GANGS", "PRTIAL_GNGTLKF", 4.0,1,0,0,1,1,1);
  9859. case 6: ApplyAnimation(playerid, "GANGS", "PRTIAL_GNGTLKG", 4.0,1,0,0,1,1,1);
  9860. case 7: ApplyAnimation(playerid, "GANGS", "PRTIAL_GNGTLKH", 4.0,1,0,0,1,1,1);
  9861. }
  9862. if(strlen(text) <= 16) SetTimerEx("TIMER_EndChatAnim",2000, 0, "i", playerid);
  9863. else if(strlen(text) <= 32 && strlen(text) > 16) SetTimerEx("TIMER_EndChatAnim",3500, 0, "i", playerid);
  9864. else if(strlen(text) <= 64 && strlen(text) > 32) SetTimerEx("TIMER_EndChatAnim",4000, 0, "i", playerid);
  9865. else if(strlen(text) <= 96 && strlen(text) > 64) SetTimerEx("TIMER_EndChatAnim",4500, 0, "i", playerid);
  9866. else if(strlen(text) <= 128 && strlen(text) > 96) SetTimerEx("TIMER_EndChatAnim",5000, 0, "i", playerid);
  9867. else if(strlen(text) > 128) SetTimerEx("TIMER_EndChatAnim",5500, 0, "i", playerid);
  9868. return 1;
  9869. }
  9870. forward TIMER_EndChatAnim(playerid);
  9871. public TIMER_EndChatAnim(playerid)
  9872. {
  9873. if(PlayerData[playerid][pInjured] != 1)
  9874. return ApplyAnimation(playerid, "CARRY", "crry_prtial", 4, 0, 0, 0, 0, 0, 1);
  9875. return 1;
  9876. }
  9877. forward AnimationCameraView(playerid, viewid, bool:play);
  9878. public AnimationCameraView(playerid, viewid,bool:play) {
  9879. if(play) {
  9880. TogglePlayerSpectating(playerid, true);
  9881. PlayerTextDrawShow(playerid, os_logo[playerid][0]);
  9882. TextDrawShowForPlayer(playerid, welcomenew);
  9883. switch(viewid) {
  9884. case 1: {
  9885. InterpolateCameraPos(playerid, 2001.022338, -1680.001831, 111.524520, 1847.486328, -1588.119262, 45.335948, 10000);
  9886. InterpolateCameraLookAt(playerid, 1996.748535, -1677.679321, 110.366386, 1842.846801, -1588.866577, 43.628067, 6000);
  9887. ViewCam[playerid] = SetTimerEx("AnimationCameraView", 7000, false, "iib", playerid,2,true);
  9888. return 1;
  9889. }
  9890. case 2: {
  9891. InterpolateCameraPos(playerid, 1350.769897, -1161.625610, 63.912643, 1345.028564, -1381.431640, 37.928005, 10000);
  9892. InterpolateCameraLookAt(playerid, 1350.744140, -1165.983520, 61.461566, 1349.314086, -1383.640136, 36.602577, 6000);
  9893. ViewCam[playerid] = SetTimerEx("AnimationCameraView", 7000, false, "iib", playerid,3,true);
  9894. return 1;
  9895. }
  9896. case 3: {
  9897. InterpolateCameraPos(playerid, 1715.645019, -1938.294555, 14.028053, 1714.797729, -1859.568725, 16.619020, 10000);
  9898. InterpolateCameraLookAt(playerid, 1715.549194, -1933.334594, 14.652102, 1719.508422, -1858.186523, 15.670925, 10000);
  9899. ViewCam[playerid] = SetTimerEx("AnimationCameraView", 7000, false, "iib", playerid,4,true);
  9900. return 1;
  9901. }
  9902. case 4: {
  9903. InterpolateCameraPos(playerid, 2527.106445, -1651.230468, 59.606048, 2258.847900, -1651.125366, 33.323886, 10000);
  9904. InterpolateCameraLookAt(playerid, 2523.139892, -1653.018554, 57.142471, 2254.557861, -1652.318969, 31.049913, 10000);
  9905. ViewCam[playerid] = SetTimerEx("AnimationCameraView", 7000, false, "iib", playerid,5,true);
  9906. return 1;
  9907. }
  9908. case 5: {
  9909. InterpolateCameraPos(playerid, 2209.850585, -1115.027709, 37.585510, 2019.370605, -1123.279907, 45.939300, 10000);
  9910. InterpolateCameraLookAt(playerid, 2205.017089, -1116.304321, 37.493427, 2017.365600, -1127.638549, 44.531455, 10000);
  9911. ViewCam[playerid] = SetTimerEx("AnimationCameraView", 7000, false, "iib", playerid,6,true);
  9912. return 1;
  9913. }
  9914. case 6: {
  9915. InterpolateCameraPos(playerid, 1828.507446, -1052.825073, 30.756277, 1583.096679, -1035.206054, 32.867546, 10000);
  9916. InterpolateCameraLookAt(playerid, 1823.512207, -1053.039550, 30.793386, 1584.801879, -1039.839111, 32.075389, 10000);
  9917. ViewCam[playerid] = SetTimerEx("AnimationCameraView", 7000, false, "iib", playerid,7,true);
  9918. return 1;
  9919. }
  9920. case 7: {
  9921. InterpolateCameraPos(playerid, 1531.205566, -978.054687, 60.876388, 1461.443481, -810.305114, 77.579307, 10000);
  9922. InterpolateCameraLookAt(playerid, 1526.846191, -975.952758, 59.620300, 1456.799926, -812.138061, 77.300292, 10000);
  9923. ViewCam[playerid] = SetTimerEx("AnimationCameraView", 7000, false, "iib", playerid,8,true);
  9924. return 1;
  9925. }
  9926. case 8: {
  9927. InterpolateCameraPos(playerid, 635.315673, -1780.251342, 21.155647, 417.544250, -1759.125366, 26.359794, 15000);
  9928. InterpolateCameraLookAt(playerid, 630.351623, -1779.681518, 20.973197, 415.232757, -1763.481567, 25.535095, 10000);
  9929. ViewCam[playerid] = SetTimerEx("AnimationCameraView", 7000, false, "iib", playerid,9,true);
  9930. return 1;
  9931. }
  9932. case 9: {
  9933. InterpolateCameraPos(playerid, 836.923767, -1779.394165, 18.188320, 970.047790, -1792.450439, 21.380487, 15000);
  9934. InterpolateCameraLookAt(playerid, 840.450439, -1775.850219, 18.139299, 966.497192, -1789.023559, 20.574161, 10000);
  9935. ViewCam[playerid] = SetTimerEx("AnimationCameraView", 7000, false, "iib", playerid,1,true);
  9936. return 1;
  9937. }
  9938. }
  9939. }
  9940. else {
  9941. KillTimer(ViewCam[playerid]);
  9942. TogglePlayerSpectating(playerid, false);
  9943. SetCameraBehindPlayer(playerid);
  9944. TextDrawHideForPlayer(playerid, welcomenew);
  9945. PlayerTextDrawHide(playerid, os_logo[playerid][0]);
  9946. }
  9947. return 1;
  9948. }
  9949. forward AntiNameTag();
  9950. public AntiNameTag()
  9951. {
  9952. if(antiNT)
  9953. {
  9954. foreach(new playerid : Player)
  9955. {
  9956. foreach(new i : Player)
  9957. {
  9958. if(i == playerid)
  9959. continue;
  9960. if(PlayerData[i][pAdminDuty])
  9961. continue;
  9962. if(GetPlayerDistanceFromPlayer(playerid, i) <= 30.0) {
  9963. ShowPlayerNameTagForPlayer(playerid, i, true);
  9964. } else {
  9965. ShowPlayerNameTagForPlayer(playerid, i, false);
  9966. }
  9967. }
  9968. }
  9969. }
  9970. }
  9971. forward AddToPaycheck(playerid, amount);
  9972. public AddToPaycheck(playerid, amount)
  9973. {
  9974. if(PlayerData[playerid][pLogged])
  9975. {
  9976. PlayerData[playerid][pPaycheck] = PlayerData[playerid][pPaycheck] + amount;
  9977. if(PlayerData[playerid][pPaycheck] >= 20000)
  9978. {
  9979. AwardAchievement(playerid, "Working class");
  9980. }
  9981. if(!PlayerData[playerid][pAdminDuty])
  9982. {
  9983. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET paycheck = paycheck + %i WHERE uid = %i", amount, PlayerData[playerid][pID]);
  9984. mysql_tquery(connectionID, queryBuffer);
  9985. AddToTaxVault(-amount);
  9986. }
  9987. }
  9988. }
  9989. IsPhoneBusy(number)
  9990. {
  9991. new targetid = GetPhonePlayerID(number);
  9992. return (targetid != INVALID_PLAYER_ID && PlayerData[targetid][pCalling] > 0);
  9993. }
  9994. GetPhonePayphoneID(number)
  9995. {
  9996. for (new i = 0; i < MAX_PAYPHONES; i ++)
  9997. {
  9998. if (IsValidPayphoneID(i) && Payphones[i][phNumber] == number)
  9999. {
  10000. return i;
  10001. }
  10002. }
  10003. return -1;
  10004. }
  10005. GetPhonePlayerID(number)
  10006. {
  10007. foreach (new i : Player)
  10008. {
  10009. if (PlayerData[i][pPhone] == number)
  10010. {
  10011. return i;
  10012. }
  10013. }
  10014. return INVALID_PLAYER_ID;
  10015. }
  10016. IsCallIncoming(playerid)
  10017. {
  10018. return (PlayerData[playerid][pCalling] == 1 && PlayerData[playerid][pCaller] != INVALID_PLAYER_ID);
  10019. }
  10020. IsPlayerNearRingingPayphone(playerid)
  10021. {
  10022. new payphone = GetClosestPayphone(playerid);
  10023. return (IsValidPayphoneID(payphone) && Payphones[payphone][phCaller] != INVALID_PLAYER_ID);
  10024. }
  10025. IsPlayerNearPoint(playerid, Float:range, Float:x, Float:y, Float:z, interior = -1, world = -1)
  10026. {
  10027. if (interior == -1)
  10028. interior = GetPlayerInterior(playerid);
  10029. if (world == -1)
  10030. world = GetPlayerVirtualWorld(playerid);
  10031. return (IsPlayerInRangeOfPoint(playerid, range, x, y, z)) && (GetPlayerInterior(playerid) == interior && GetPlayerVirtualWorld(playerid) == world);
  10032. }
  10033. GetClosestPayphone(playerid)
  10034. {
  10035. for (new i = 0; i < MAX_PAYPHONES; i ++)
  10036. {
  10037. if (Payphones[i][phExists] && IsPlayerNearPoint(playerid, 2.0, Payphones[i][phX], Payphones[i][phY], Payphones[i][phZ], Payphones[i][phInterior], Payphones[i][phWorld]))
  10038. {
  10039. return i;
  10040. }
  10041. }
  10042. return -1;
  10043. }
  10044. AddPayphone(Float:x, Float:y, Float:z, Float:angle, interior, world)
  10045. {
  10046. new
  10047. id = GetNextPayphoneID();
  10048. if (id != -1)
  10049. {
  10050. Payphones[id][phExists] = 1;
  10051. Payphones[id][phNumber] = Random(1000000, 9999999);
  10052. Payphones[id][phOccupied] = 0;
  10053. Payphones[id][phCaller] = INVALID_PLAYER_ID;
  10054. Payphones[id][phX] = x;
  10055. Payphones[id][phY] = y;
  10056. Payphones[id][phZ] = z;
  10057. Payphones[id][phA] = angle;
  10058. Payphones[id][phInterior] = interior;
  10059. Payphones[id][phWorld] = world;
  10060. Payphones[id][phObject] = INVALID_OBJECT_ID;
  10061. Payphones[id][phText] = INVALID_3DTEXT_ID;
  10062. UpdatePayphone(id);
  10063. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO rp_payphones (phInterior) VALUES(%i)", interior);
  10064. mysql_tquery(connectionID, queryBuffer, "OnPayphoneAdded", "i", id);
  10065. }
  10066. return id;
  10067. }
  10068. forward OnATMAdded(id);
  10069. public OnATMAdded(id)
  10070. {
  10071. ATM[id][atmID] = cache_insert_id(connectionID);
  10072. SaveATM(id);
  10073. }
  10074. forward OnPayphoneAdded(id);
  10075. public OnPayphoneAdded(id)
  10076. {
  10077. Payphones[id][phID] = cache_insert_id(connectionID);
  10078. SavePayphone(id);
  10079. }
  10080. SavePayphone(id)
  10081. {
  10082. static
  10083. queryString[512];
  10084. if (!Payphones[id][phExists]) return 0;
  10085. format(queryString, sizeof(queryString), "UPDATE rp_payphones SET phNumber = %i, phX = %.4f, phY = %.4f, phZ = %.4f, phA = %.4f, phInterior = %i, phWorld = %i WHERE phID = %i",
  10086. Payphones[id][phNumber],
  10087. Payphones[id][phX],
  10088. Payphones[id][phY],
  10089. Payphones[id][phZ],
  10090. Payphones[id][phA],
  10091. Payphones[id][phInterior],
  10092. Payphones[id][phWorld],
  10093. Payphones[id][phID]
  10094. );
  10095. return mysql_tquery(connectionID, queryString);
  10096. }
  10097. stock GetPlayerSQLId(playerid)
  10098. {
  10099. return PlayerData[playerid][pID];
  10100. }
  10101. forward GetPlayerCash(playerid);
  10102. public GetPlayerCash(playerid)
  10103. {
  10104. return PlayerData[playerid][pCash];
  10105. }
  10106. IsValidPayphoneID(id)
  10107. {
  10108. return (id >= 0 && id < MAX_PAYPHONES) && Payphones[id][phExists];
  10109. }
  10110. GetNextPayphoneID()
  10111. {
  10112. for (new i = 0; i < MAX_PAYPHONES; i ++)
  10113. {
  10114. if (!Payphones[i][phExists])
  10115. {
  10116. return i;
  10117. }
  10118. }
  10119. return -1;
  10120. }
  10121. stock CheckServerAd(szInput[]) {
  10122. new
  10123. iCount,
  10124. iPeriod,
  10125. iDash,
  10126. iPos,
  10127. iChar,
  10128. iColon;
  10129. while((iChar = szInput[iPos++])) {
  10130. if('0' <= iChar <= '9') iCount++;
  10131. else if(iChar == '.') iPeriod++;
  10132. else if(iChar == '-') iDash++;
  10133. else if(iChar == ':') iColon++;
  10134. }
  10135. if(iCount >= 7 && iPeriod >= 3 && iColon >= 1 || strfind(szInput, "samp.") > -1 || strfind(szInput, ":7777") > -1) {
  10136. return 1;
  10137. }
  10138. return 0;
  10139. }
  10140. //==============================================================================
  10141. stock l_GetPlayerSkin(playerid) return (!GetPlayerSkin(playerid));
  10142. #if defined _ALS_GetPlayerSkin
  10143. #undef GetPlayerSkin
  10144. #else
  10145. #define _ALS_GetPlayerSkin
  10146. #endif
  10147. #define GetPlayerSkin l_GetPlayerSkin
  10148. stock GetPlayerSkinScript(playerid) return (!GetPlayerSkin(playerid));
  10149. stock IsARestricted(modelid) {
  10150. switch(modelid)
  10151. {
  10152. case 460,476,511,512,513,520,519,553,577,592,593,548,425,417,488,497,563,447,416,433,523,427,490,528,407,544,596,598,597,599,432,601,472,473
  10153. ,493,595,484,430,453,452,446,454,441,464,465,501,522,564,594,538,532,486,406,537,571,449,539,435,450,569,570,584,590,591,606,607,608,610,611,568
  10154. ,444,556,557,470,495,415,494,502,503,504,524:
  10155. return 1;
  10156. }
  10157. return 0;
  10158. }
  10159. #define PROPERTY_OFFSET(%0) \
  10160. ((((%0) * ((%0) << 1)) << 2) + 65536)
  10161. stock GetVehicleColor(vehicleID, &color1, &color2)
  10162. {
  10163. vehicleID = PROPERTY_OFFSET(vehicleID);
  10164. if(existproperty(_, "", vehicleID))
  10165. {
  10166. new
  10167. colorStr[24],
  10168. strPos;
  10169. getproperty(_, "", vehicleID, colorStr);
  10170. strunpack(colorStr, colorStr);
  10171. if((strPos = strfind(colorStr, "-")) != -1)
  10172. {
  10173. color1 = strval(colorStr);
  10174. color2 = strval(colorStr[strPos + 1]);
  10175. return 1;
  10176. }
  10177. }
  10178. return 0;
  10179. }
  10180. func CreateLSPDMap()
  10181. {
  10182. gPDDoors[0] = CreateDynamicObject(1567, 1586.21436, -1654.44727, 2109.51294, 0.00000, 0.00000, 360.11990);
  10183. gPDDoors[1] = CreateDynamicObject(1567, 1578.64783, -1657.78467, 2109.51294, 0.00000, 0.00000, 183.42041);
  10184. gPDDoors[2] = CreateDynamicObject(1567, 1554.74219, -1656.79309, 2109.51294, 0.00000, 0.00000, 180.56023);
  10185. gPDDoors[3] = CreateDynamicObject(1567, 1583.28503, -1675.50513, 2109.51294, 0.00000, 0.00000, 179.64014);
  10186. gPDDoors[4] = CreateDynamicObject(1567, 1580.09802, -1675.50806, 2109.51294, 0.00000, 0.00000, 179.88002);
  10187. gPDDoors[5] = CreateDynamicObject(1567, 1568.14197, -1673.16602, 2109.51294, 0.00000, 0.00000, 450.79984);
  10188. gPDDoors[6] = CreateDynamicObject(1567, 1555.60840, -1670.54663, 2109.53345, 0.00000, 0.00000, -0.72000);
  10189. new lspdenterijer;
  10190. //----------------------[LSPD]----------------------------//
  10191. // lspd interior
  10192. lspdenterijer = CreateDynamicObjectEx(1721,1560.026,-1665.081,2109.537,0.000,0.000,90.000,300.000,300.000);
  10193. SetDynamicObjectMaterial(lspdenterijer, 1, 8419, "vgsbldng1", "buildng01wind_128", 0);
  10194. lspdenterijer = CreateDynamicObjectEx(3077,1587.324,-1670.981,2109.539,0.000,0.000,303.739,300.000,300.000);
  10195. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10196. SetDynamicObjectMaterial(lspdenterijer, 1, 10765, "airportgnd_sfse", "white", 0);
  10197. lspdenterijer = CreateDynamicObjectEx(19430,1568.770,-1669.211,2111.657,90.000,179.994,270.000,300.000,300.000);
  10198. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10199. lspdenterijer = CreateDynamicObjectEx(14566,1568.745,-1669.603,2111.555,0.000,0.000,44.994,300.000,300.000);
  10200. SetDynamicObjectMaterial(lspdenterijer, 0, 17547, "eastbeach4a_lae2", "bluestucco1", 0);
  10201. SetDynamicObjectMaterial(lspdenterijer, 1, 17547, "eastbeach4a_lae2", "bluestucco1", 0);
  10202. SetDynamicObjectMaterial(lspdenterijer, 2, 17547, "eastbeach4a_lae2", "bluestucco1", 0);
  10203. SetDynamicObjectMaterial(lspdenterijer, 4, 17547, "eastbeach4a_lae2", "bluestucco1", 0);
  10204. SetDynamicObjectMaterial(lspdenterijer, 5, 17547, "eastbeach4a_lae2", "bluestucco1", 0);
  10205. SetDynamicObjectMaterial(lspdenterijer, 6, 17547, "eastbeach4a_lae2", "bluestucco1", 0);
  10206. SetDynamicObjectMaterial(lspdenterijer, 7, 17547, "eastbeach4a_lae2", "bluestucco1", 0);
  10207. SetDynamicObjectMaterial(lspdenterijer, 8, 17547, "eastbeach4a_lae2", "bluestucco1", 0);
  10208. lspdenterijer = CreateDynamicObjectEx(19327,1583.751,-1657.967,2111.874,0.000,0.000,0.000,300.000,300.000);
  10209. SetDynamicObjectMaterialText(lspdenterijer, 0, "?????????", 120, "Ariel", 40, 1, -1, 0, 1);
  10210. lspdenterijer = CreateDynamicObjectEx(19455,1552.662,-1675.364,2111.287,0.000,0.000,0.000,300.000,300.000);
  10211. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10212. lspdenterijer = CreateDynamicObjectEx(19071,1567.988,-1674.938,2108.537,0.000,179.994,0.000,300.000,300.000);
  10213. SetDynamicObjectMaterial(lspdenterijer, 0, 14623, "mafcasmain", "ab_tileStar2", 0);
  10214. lspdenterijer = CreateDynamicObjectEx(19364,1550.984,-1670.629,2111.287,0.000,0.000,90.000,300.000,300.000);
  10215. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10216. lspdenterijer = CreateDynamicObjectEx(2920,1547.038,-1670.342,2108.915,0.000,0.000,0.000,300.000,300.000);
  10217. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10218. lspdenterijer = CreateDynamicObjectEx(19071,1567.987,-1674.938,2113.990,0.000,0.000,0.000,300.000,300.000);
  10219. SetDynamicObjectMaterial(lspdenterijer, 0, 4604, "buildblk555", "gm_labuld5_b", 0);
  10220. lspdenterijer = CreateDynamicObjectEx(2920,1547.010,-1671.152,2109.667,90.000,187.668,352.309,300.000,300.000);
  10221. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10222. lspdenterijer = CreateDynamicObjectEx(2920,1547.035,-1671.151,2112.886,90.000,168.458,11.530,300.000,300.000);
  10223. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10224. lspdenterijer = CreateDynamicObjectEx(2920,1547.032,-1664.016,2108.915,0.000,0.000,0.000,300.000,300.000);
  10225. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10226. lspdenterijer = CreateDynamicObjectEx(2920,1547.077,-1680.299,2108.915,0.000,0.000,0.000,300.000,300.000);
  10227. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10228. lspdenterijer = CreateDynamicObjectEx(19455,1564.697,-1670.573,2111.287,0.000,0.000,90.000,300.000,300.000);
  10229. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10230. lspdenterijer = CreateDynamicObjectEx(19455,1557.401,-1679.881,2111.287,0.000,0.000,90.000,300.000,300.000);
  10231. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10232. lspdenterijer = CreateDynamicObjectEx(2920,1547.035,-1656.879,2109.667,90.000,179.994,179.994,300.000,300.000);
  10233. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10234. lspdenterijer = CreateDynamicObjectEx(2920,1547.056,-1656.930,2112.886,90.000,179.994,179.994,300.000,300.000);
  10235. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10236. lspdenterijer = CreateDynamicObjectEx(2920,1547.034,-1657.753,2108.915,0.000,0.000,0.000,300.000,300.000);
  10237. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10238. lspdenterijer = CreateDynamicObjectEx(18762,1553.162,-1679.567,2112.037,0.000,0.000,0.000,300.000,300.000);
  10239. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10240. lspdenterijer = CreateDynamicObjectEx(18762,1561.909,-1679.570,2112.037,0.000,0.000,0.000,300.000,300.000);
  10241. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10242. lspdenterijer = CreateDynamicObjectEx(18980,1562.021,-1679.480,2112.741,0.000,90.000,0.000,300.000,300.000);
  10243. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10244. lspdenterijer = CreateDynamicObjectEx(19414,1562.349,-1673.988,2111.287,0.000,0.000,0.000,300.000,300.000);
  10245. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10246. lspdenterijer = CreateDynamicObjectEx(2920,1562.370,-1679.673,2112.064,90.000,191.310,348.667,300.000,300.000);
  10247. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10248. lspdenterijer = CreateDynamicObjectEx(19438,1555.324,-1679.900,2110.710,0.000,90.000,0.000,300.000,300.000);
  10249. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10250. lspdenterijer = CreateDynamicObjectEx(18762,1557.507,-1679.535,2112.037,0.000,0.000,0.000,300.000,300.000);
  10251. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10252. lspdenterijer = CreateDynamicObjectEx(19438,1559.680,-1679.904,2110.730,0.000,90.000,0.000,300.000,300.000);
  10253. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10254. lspdenterijer = CreateDynamicObjectEx(2920,1552.884,-1670.593,2108.915,0.000,0.000,270.000,300.000,300.000);
  10255. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10256. lspdenterijer = CreateDynamicObjectEx(2920,1553.890,-1670.594,2108.915,0.000,0.000,270.000,300.000,300.000);
  10257. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10258. lspdenterijer = CreateDynamicObjectEx(2920,1555.525,-1670.563,2108.915,0.000,0.000,270.000,300.000,300.000);
  10259. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10260. lspdenterijer = CreateDynamicObjectEx(2920,1557.250,-1670.582,2108.915,0.000,0.000,270.000,300.000,300.000);
  10261. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10262. lspdenterijer = CreateDynamicObjectEx(2920,1558.885,-1670.576,2108.915,0.000,0.000,270.000,300.000,300.000);
  10263. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10264. lspdenterijer = CreateDynamicObjectEx(2920,1559.776,-1670.582,2108.915,0.000,0.000,270.000,300.000,300.000);
  10265. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10266. lspdenterijer = CreateDynamicObjectEx(19455,1562.366,-1680.336,2111.287,0.000,0.000,0.000,300.000,300.000);
  10267. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10268. lspdenterijer = CreateDynamicObjectEx(19367,1562.348,-1670.776,2111.287,0.000,0.000,0.000,300.000,300.000);
  10269. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10270. lspdenterijer = CreateDynamicObjectEx(19364,1548.441,-1670.525,2111.287,0.000,0.000,90.000,300.000,300.000);
  10271. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10272. lspdenterijer = CreateDynamicObjectEx(2920,1548.536,-1670.578,2109.667,90.000,180.000,270.000,300.000,300.000);
  10273. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10274. lspdenterijer = CreateDynamicObjectEx(2920,1550.215,-1670.584,2112.887,90.000,180.005,269.989,300.000,300.000);
  10275. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10276. lspdenterijer = CreateDynamicObjectEx(19364,1550.579,-1670.478,2111.287,0.000,0.000,90.000,300.000,300.000);
  10277. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10278. lspdenterijer = CreateDynamicObjectEx(19364,1549.897,-1670.364,2111.287,0.000,0.000,90.000,300.000,300.000);
  10279. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10280. lspdenterijer = CreateDynamicObjectEx(2920,1564.229,-1670.590,2112.887,90.000,180.000,90.000,300.000,300.000);
  10281. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10282. lspdenterijer = CreateDynamicObjectEx(2920,1564.229,-1670.590,2109.668,90.000,179.994,90.000,300.000,300.000);
  10283. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10284. lspdenterijer = CreateDynamicObjectEx(18980,1562.021,-1679.480,2109.818,0.000,90.000,0.000,300.000,300.000);
  10285. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10286. lspdenterijer = CreateDynamicObjectEx(2165,1549.650,-1660.198,2109.535,0.000,0.000,0.000,300.000,300.000);
  10287. SetDynamicObjectMaterial(lspdenterijer, 3, 8419, "vgsbldng1", "buildng01wind_128", 0);
  10288. lspdenterijer = CreateDynamicObjectEx(2165,1552.874,-1660.119,2109.535,0.000,0.000,0.000,300.000,300.000);
  10289. SetDynamicObjectMaterial(lspdenterijer, 3, 8419, "vgsbldng1", "buildng01wind_128", 0);
  10290. lspdenterijer = CreateDynamicObjectEx(2165,1550.912,-1667.625,2109.535,0.000,0.000,180.000,300.000,300.000);
  10291. SetDynamicObjectMaterial(lspdenterijer, 3, 8419, "vgsbldng1", "buildng01wind_128", 0);
  10292. lspdenterijer = CreateDynamicObjectEx(2165,1553.711,-1667.579,2109.535,0.000,0.000,179.994,300.000,300.000);
  10293. SetDynamicObjectMaterial(lspdenterijer, 3, 8419, "vgsbldng1", "buildng01wind_128", 0);
  10294. lspdenterijer = CreateDynamicObjectEx(2920,1562.380,-1669.078,2108.915,0.000,0.000,180.000,300.000,300.000);
  10295. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10296. lspdenterijer = CreateDynamicObjectEx(2165,1548.847,-1664.514,2109.535,0.000,0.000,90.000,300.000,300.000);
  10297. SetDynamicObjectMaterial(lspdenterijer, 3, 8419, "vgsbldng1", "buildng01wind_128", 0);
  10298. lspdenterijer = CreateDynamicObjectEx(2920,1562.374,-1666.628,2108.915,0.000,0.000,179.994,300.000,300.000);
  10299. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10300. lspdenterijer = CreateDynamicObjectEx(2920,1562.382,-1665.074,2108.915,0.000,0.000,179.994,300.000,300.000);
  10301. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10302. lspdenterijer = CreateDynamicObjectEx(2920,1562.371,-1663.427,2108.915,0.000,0.000,179.994,300.000,300.000);
  10303. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10304. lspdenterijer = CreateDynamicObjectEx(2920,1562.359,-1661.801,2108.915,0.000,0.000,179.994,300.000,300.000);
  10305. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10306. lspdenterijer = CreateDynamicObjectEx(2920,1562.377,-1659.199,2108.915,0.000,0.000,179.994,300.000,300.000);
  10307. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10308. lspdenterijer = CreateDynamicObjectEx(19834,1562.348,-1666.112,2109.606,0.000,0.000,90.000,300.000,300.000);
  10309. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10310. lspdenterijer = CreateDynamicObjectEx(19834,1562.343,-1668.405,2109.606,0.000,0.000,90.000,300.000,300.000);
  10311. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10312. lspdenterijer = CreateDynamicObjectEx(19834,1562.392,-1668.397,2109.606,0.000,0.000,90.000,300.000,300.000);
  10313. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10314. lspdenterijer = CreateDynamicObjectEx(19834,1562.410,-1666.114,2109.606,0.000,0.000,90.000,300.000,300.000);
  10315. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10316. lspdenterijer = CreateDynamicObjectEx(19834,1562.410,-1666.114,2112.924,0.000,0.000,90.000,300.000,300.000);
  10317. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10318. lspdenterijer = CreateDynamicObjectEx(19834,1562.333,-1666.116,2112.924,0.000,0.000,90.000,300.000,300.000);
  10319. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10320. lspdenterijer = CreateDynamicObjectEx(19834,1562.392,-1668.468,2112.926,0.000,0.000,90.000,300.000,300.000);
  10321. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10322. lspdenterijer = CreateDynamicObjectEx(19834,1562.343,-1668.468,2112.926,0.000,0.000,90.000,300.000,300.000);
  10323. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10324. lspdenterijer = CreateDynamicObjectEx(19834,1562.355,-1662.331,2109.606,0.000,0.000,90.000,300.000,300.000);
  10325. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10326. lspdenterijer = CreateDynamicObjectEx(19834,1562.374,-1660.254,2109.606,0.000,0.000,90.000,300.000,300.000);
  10327. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10328. lspdenterijer = CreateDynamicObjectEx(19834,1562.399,-1660.255,2109.606,0.000,0.000,90.000,300.000,300.000);
  10329. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10330. lspdenterijer = CreateDynamicObjectEx(19834,1562.380,-1662.333,2109.606,0.000,0.000,90.000,300.000,300.000);
  10331. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10332. lspdenterijer = CreateDynamicObjectEx(19834,1562.374,-1660.255,2112.918,0.000,0.000,90.000,300.000,300.000);
  10333. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10334. lspdenterijer = CreateDynamicObjectEx(19834,1562.374,-1660.254,2112.918,0.000,0.000,90.000,300.000,300.000);
  10335. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10336. lspdenterijer = CreateDynamicObjectEx(19834,1562.423,-1660.250,2112.918,0.000,0.000,90.000,300.000,300.000);
  10337. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10338. lspdenterijer = CreateDynamicObjectEx(19834,1562.380,-1662.333,2112.930,0.000,0.000,90.000,300.000,300.000);
  10339. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10340. lspdenterijer = CreateDynamicObjectEx(19834,1562.354,-1662.329,2112.930,0.000,0.000,90.000,300.000,300.000);
  10341. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10342. lspdenterijer = CreateDynamicObjectEx(19834,1562.376,-1664.685,2112.922,0.000,0.000,90.000,300.000,300.000);
  10343. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10344. lspdenterijer = CreateDynamicObjectEx(2165,1556.219,-1659.926,2109.535,0.000,0.000,0.000,300.000,300.000);
  10345. SetDynamicObjectMaterial(lspdenterijer, 3, 8419, "vgsbldng1", "buildng01wind_128", 0);
  10346. lspdenterijer = CreateDynamicObjectEx(19367,1562.451,-1657.477,2111.287,0.000,0.000,358.000,300.000,300.000);
  10347. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10348. lspdenterijer = CreateDynamicObjectEx(19786,1550.248,-1647.593,2111.793,0.000,0.000,0.000,300.000,300.000);
  10349. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10350. SetDynamicObjectMaterial(lspdenterijer, 1, 14803, "bdupsnew", "Bdup2_poster", 0);
  10351. lspdenterijer = CreateDynamicObjectEx(19392,1553.989,-1656.801,2111.287,0.000,0.000,90.000,300.000,300.000);
  10352. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10353. lspdenterijer = CreateDynamicObjectEx(18762,1547.495,-1657.146,2110.767,0.000,0.000,0.000,300.000,300.000);
  10354. SetDynamicObjectMaterial(lspdenterijer, 0, 14391, "dr_gsmix", "white_128", 0);
  10355. lspdenterijer = CreateDynamicObjectEx(18762,1549.806,-1657.112,2109.864,0.000,90.000,0.000,300.000,300.000);
  10356. SetDynamicObjectMaterial(lspdenterijer, 0, 14391, "dr_gsmix", "white_128", 0);
  10357. lspdenterijer = CreateDynamicObjectEx(18762,1551.954,-1657.128,2110.666,0.000,0.000,0.000,300.000,300.000);
  10358. SetDynamicObjectMaterial(lspdenterijer, 0, 14391, "dr_gsmix", "white_128", 0);
  10359. lspdenterijer = CreateDynamicObjectEx(18762,1558.016,-1657.083,2112.659,0.000,90.000,0.000,300.000,300.000);
  10360. SetDynamicObjectMaterial(lspdenterijer, 0, 14391, "dr_gsmix", "white_128", 0);
  10361. lspdenterijer = CreateDynamicObjectEx(18762,1560.254,-1656.987,2110.666,0.000,0.000,0.000,300.000,300.000);
  10362. SetDynamicObjectMaterial(lspdenterijer, 0, 14391, "dr_gsmix", "white_128", 0);
  10363. lspdenterijer = CreateDynamicObjectEx(2395,1548.306,-1657.430,2110.146,0.000,0.000,0.000,300.000,300.000);
  10364. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10365. lspdenterijer = CreateDynamicObjectEx(18762,1549.812,-1657.120,2112.733,0.000,90.000,0.000,300.000,300.000);
  10366. SetDynamicObjectMaterial(lspdenterijer, 0, 14391, "dr_gsmix", "white_128", 0);
  10367. lspdenterijer = CreateDynamicObjectEx(2395,1557.004,-1657.222,2110.116,0.000,0.000,0.000,300.000,300.000);
  10368. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10369. lspdenterijer = CreateDynamicObjectEx(18762,1556.026,-1656.859,2110.666,0.000,0.000,0.000,300.000,300.000);
  10370. SetDynamicObjectMaterial(lspdenterijer, 0, 14391, "dr_gsmix", "white_128", 0);
  10371. lspdenterijer = CreateDynamicObjectEx(19455,1547.072,-1651.896,2111.287,0.000,0.000,0.000,300.000,300.000);
  10372. SetDynamicObjectMaterial(lspdenterijer, 0, 14651, "ab_trukstpd", "Bow_bar_flooring", 0);
  10373. lspdenterijer = CreateDynamicObjectEx(19455,1560.696,-1652.801,2111.287,0.000,0.000,0.000,300.000,300.000);
  10374. SetDynamicObjectMaterial(lspdenterijer, 0, 14651, "ab_trukstpd", "Bow_bar_flooring", 0);
  10375. lspdenterijer = CreateDynamicObjectEx(19455,1551.819,-1647.608,2111.287,0.000,0.000,270.000,300.000,300.000);
  10376. SetDynamicObjectMaterial(lspdenterijer, 0, 14651, "ab_trukstpd", "Bow_bar_flooring", 0);
  10377. lspdenterijer = CreateDynamicObjectEx(2206,1551.334,-1649.838,2109.535,0.000,0.000,180.000,300.000,300.000);
  10378. SetDynamicObjectMaterial(lspdenterijer, 0, 8419, "vgsbldng1", "buildng01wind_128", 0);
  10379. lspdenterijer = CreateDynamicObjectEx(19071,1586.926,-1647.672,2126.622,0.000,90.000,270.000,300.000,300.000);
  10380. SetDynamicObjectMaterial(lspdenterijer, 0, 14803, "bdupsnew", "Bdup2_carpet", 0);
  10381. lspdenterijer = CreateDynamicObjectEx(18762,1556.387,-1648.072,2110.666,0.000,0.000,0.000,300.000,300.000);
  10382. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10383. lspdenterijer = CreateDynamicObjectEx(18762,1560.104,-1648.073,2110.666,0.000,0.000,0.000,300.000,300.000);
  10384. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10385. lspdenterijer = CreateDynamicObjectEx(18762,1558.290,-1648.112,2109.918,0.000,90.000,0.000,300.000,300.000);
  10386. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10387. lspdenterijer = CreateDynamicObjectEx(18762,1558.271,-1648.286,2112.729,0.000,90.000,0.000,300.000,300.000);
  10388. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10389. lspdenterijer = CreateDynamicObjectEx(19364,1562.192,-1657.563,2111.287,0.000,0.000,90.000,300.000,300.000);
  10390. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10391. lspdenterijer = CreateDynamicObjectEx(2533,1547.666,-1669.887,2109.534,0.000,0.000,179.994,300.000,300.000);
  10392. SetDynamicObjectMaterial(lspdenterijer, 3, 7650, "vgnusedcar", "lightyellow2_32", 0);
  10393. lspdenterijer = CreateDynamicObjectEx(2689,1547.629,-1655.771,2110.743,0.000,0.000,0.000,300.000,300.000);
  10394. SetDynamicObjectMaterial(lspdenterijer, 1, 11631, "mp_ranchcut", "CJ_PAINTING20", 0);
  10395. lspdenterijer = CreateDynamicObjectEx(2689,1547.932,-1658.239,2110.747,0.000,0.000,95.000,300.000,300.000);
  10396. SetDynamicObjectMaterial(lspdenterijer, 1, 11631, "mp_ranchcut", "CJ_PAINTING20", 0);
  10397. lspdenterijer = CreateDynamicObjectEx(1721,1560.063,-1659.625,2109.537,0.000,0.000,90.000,300.000,300.000);
  10398. SetDynamicObjectMaterial(lspdenterijer, 1, 8419, "vgsbldng1", "buildng01wind_128", 0);
  10399. lspdenterijer = CreateDynamicObjectEx(1721,1552.061,-1660.149,2109.537,0.000,0.000,190.000,300.000,300.000);
  10400. SetDynamicObjectMaterial(lspdenterijer, 1, 8419, "vgsbldng1", "buildng01wind_128", 0);
  10401. lspdenterijer = CreateDynamicObjectEx(1721,1548.885,-1660.131,2109.537,0.000,0.000,180.000,300.000,300.000);
  10402. SetDynamicObjectMaterial(lspdenterijer, 1, 8419, "vgsbldng1", "buildng01wind_128", 0);
  10403. lspdenterijer = CreateDynamicObjectEx(18762,1558.057,-1656.936,2109.864,0.000,90.000,0.000,300.000,300.000);
  10404. SetDynamicObjectMaterial(lspdenterijer, 0, 14391, "dr_gsmix", "white_128", 0);
  10405. lspdenterijer = CreateDynamicObjectEx(19392,1553.986,-1656.775,2111.270,0.000,0.000,90.000,300.000,300.000);
  10406. SetDynamicObjectMaterial(lspdenterijer, 0, 14651, "ab_trukstpd", "Bow_bar_flooring", 0);
  10407. lspdenterijer = CreateDynamicObjectEx(2635,1551.858,-1655.784,2109.940,0.000,0.000,0.000,300.000,300.000);
  10408. SetDynamicObjectMaterial(lspdenterijer, 1, 8419, "vgsbldng1", "buildng01wind_128", 0);
  10409. lspdenterijer = CreateDynamicObjectEx(19455,1567.223,-1669.244,2111.287,0.000,0.000,90.000,300.000,300.000);
  10410. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10411. lspdenterijer = CreateDynamicObjectEx(19455,1567.195,-1659.030,2111.287,0.000,0.000,90.000,300.000,300.000);
  10412. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10413. lspdenterijer = CreateDynamicObjectEx(19392,1577.897,-1657.857,2111.287,0.000,0.000,91.983,300.000,300.000);
  10414. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10415. lspdenterijer = CreateDynamicObjectEx(19455,1576.181,-1654.192,2111.287,0.000,0.000,0.000,300.000,300.000);
  10416. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10417. lspdenterijer = CreateDynamicObjectEx(19455,1580.646,-1651.671,2111.287,0.000,0.000,270.000,300.000,300.000);
  10418. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10419. lspdenterijer = CreateDynamicObjectEx(2395,1582.230,-1657.723,2112.729,0.000,90.000,180.000,300.000,300.000);
  10420. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10421. lspdenterijer = CreateDynamicObjectEx(19455,1585.385,-1653.134,2111.287,0.000,0.000,0.000,300.000,300.000);
  10422. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10423. lspdenterijer = CreateDynamicObjectEx(19379,1554.696,-1663.838,2113.038,0.000,90.000,0.000,300.000,300.000);
  10424. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10425. lspdenterijer = CreateDynamicObjectEx(18762,1557.586,-1659.406,2113.430,0.000,90.000,0.000,300.000,300.000);
  10426. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10427. lspdenterijer = CreateDynamicObjectEx(18762,1552.614,-1659.413,2113.406,0.000,90.000,0.000,300.000,300.000);
  10428. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10429. lspdenterijer = CreateDynamicObjectEx(18762,1549.803,-1661.388,2113.381,0.000,90.000,269.994,300.000,300.000);
  10430. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10431. lspdenterijer = CreateDynamicObjectEx(18762,1549.796,-1665.847,2113.355,0.000,90.000,269.999,300.000,300.000);
  10432. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10433. lspdenterijer = CreateDynamicObjectEx(18762,1551.776,-1668.438,2113.331,0.000,90.000,180.000,300.000,300.000);
  10434. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10435. lspdenterijer = CreateDynamicObjectEx(18762,1556.765,-1668.436,2113.305,0.000,90.000,179.994,300.000,300.000);
  10436. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10437. lspdenterijer = CreateDynamicObjectEx(18762,1559.598,-1666.435,2113.281,0.000,90.000,269.999,300.000,300.000);
  10438. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10439. lspdenterijer = CreateDynamicObjectEx(18762,1559.590,-1661.582,2113.281,0.000,90.000,270.000,300.000,300.000);
  10440. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10441. lspdenterijer = CreateDynamicObjectEx(18762,1552.443,-1664.185,2113.381,0.000,90.000,0.000,300.000,300.000);
  10442. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10443. lspdenterijer = CreateDynamicObjectEx(18762,1556.723,-1664.174,2113.406,0.000,90.000,0.000,300.000,300.000);
  10444. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10445. lspdenterijer = CreateDynamicObjectEx(19392,1582.890,-1669.204,2111.287,0.000,0.000,90.000,300.000,300.000);
  10446. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10447. lspdenterijer = CreateDynamicObjectEx(19431,1580.671,-1670.089,2111.288,0.000,0.000,0.000,300.000,300.000);
  10448. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10449. lspdenterijer = CreateDynamicObjectEx(19455,1576.076,-1670.833,2111.287,0.000,0.000,90.000,300.000,300.000);
  10450. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10451. lspdenterijer = CreateDynamicObjectEx(19392,1587.010,-1654.407,2111.287,0.000,0.000,90.000,300.000,300.000);
  10452. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10453. lspdenterijer = CreateDynamicObjectEx(19455,1585.988,-1650.556,2111.287,0.000,0.000,270.000,300.000,300.000);
  10454. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10455. lspdenterijer = CreateDynamicObjectEx(19455,1588.949,-1659.078,2111.287,0.000,0.000,0.000,300.000,300.000);
  10456. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10457. lspdenterijer = CreateDynamicObjectEx(19455,1585.989,-1650.582,2107.801,0.000,0.000,270.000,300.000,300.000);
  10458. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10459. lspdenterijer = CreateDynamicObjectEx(19455,1593.397,-1654.389,2111.287,0.000,0.000,270.000,300.000,300.000);
  10460. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10461. lspdenterijer = CreateDynamicObjectEx(19455,1593.722,-1654.357,2107.793,0.000,0.000,270.000,300.000,300.000);
  10462. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10463. lspdenterijer = CreateDynamicObjectEx(19455,1595.267,-1650.522,2111.287,0.000,0.000,270.000,300.000,300.000);
  10464. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10465. lspdenterijer = CreateDynamicObjectEx(19455,1595.265,-1650.546,2107.794,0.000,0.000,270.000,300.000,300.000);
  10466. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10467. lspdenterijer = CreateDynamicObjectEx(19071,1614.553,-1676.049,2105.082,0.000,179.994,0.000,300.000,300.000);
  10468. SetDynamicObjectMaterial(lspdenterijer, 0, 14623, "mafcasmain", "ab_tileStar2", 0);
  10469. lspdenterijer = CreateDynamicObjectEx(19455,1598.416,-1652.807,2111.287,0.000,0.000,0.000,300.000,300.000);
  10470. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10471. lspdenterijer = CreateDynamicObjectEx(19071,1619.415,-1672.958,2109.798,0.000,0.000,0.000,300.000,300.000);
  10472. SetDynamicObjectMaterial(lspdenterijer, 0, 4604, "buildblk555", "gm_labuld5_b", 0);
  10473. lspdenterijer = CreateDynamicObjectEx(19071,1609.834,-1677.592,2114.016,0.000,0.000,0.000,300.000,300.000);
  10474. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10475. lspdenterijer = CreateDynamicObjectEx(19455,1604.815,-1650.479,2107.794,0.000,0.000,270.000,300.000,300.000);
  10476. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10477. lspdenterijer = CreateDynamicObjectEx(19455,1598.412,-1659.155,2107.831,0.000,0.000,0.000,300.000,300.000);
  10478. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10479. lspdenterijer = CreateDynamicObjectEx(19455,1607.685,-1659.090,2107.831,0.000,0.000,0.000,300.000,300.000);
  10480. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10481. lspdenterijer = CreateDynamicObjectEx(19455,1603.038,-1663.717,2107.831,0.000,0.000,90.000,300.000,300.000);
  10482. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10483. lspdenterijer = CreateDynamicObjectEx(19455,1607.729,-1649.536,2107.831,0.000,0.000,0.000,300.000,300.000);
  10484. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10485. lspdenterijer = CreateDynamicObjectEx(2920,1576.260,-1659.086,2108.915,0.000,0.000,179.994,300.000,300.000);
  10486. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10487. lspdenterijer = CreateDynamicObjectEx(2920,1576.253,-1668.975,2108.915,0.000,0.000,179.994,300.000,300.000);
  10488. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10489. lspdenterijer = CreateDynamicObjectEx(2920,1576.263,-1664.792,2108.915,0.000,0.000,179.994,300.000,300.000);
  10490. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10491. lspdenterijer = CreateDynamicObjectEx(2920,1576.270,-1666.673,2108.915,0.000,0.000,179.994,300.000,300.000);
  10492. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10493. lspdenterijer = CreateDynamicObjectEx(2920,1576.264,-1663.107,2108.915,0.000,0.000,179.994,300.000,300.000);
  10494. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10495. lspdenterijer = CreateDynamicObjectEx(2920,1576.277,-1661.375,2108.915,0.000,0.000,179.994,300.000,300.000);
  10496. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10497. lspdenterijer = CreateDynamicObjectEx(19834,1576.311,-1665.833,2109.606,0.000,0.000,90.000,300.000,300.000);
  10498. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10499. lspdenterijer = CreateDynamicObjectEx(19834,1576.291,-1661.998,2109.606,0.000,0.000,90.000,300.000,300.000);
  10500. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10501. lspdenterijer = CreateDynamicObjectEx(19834,1576.291,-1660.306,2109.606,0.000,0.000,90.000,300.000,300.000);
  10502. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10503. lspdenterijer = CreateDynamicObjectEx(19455,1571.484,-1658.985,2111.287,0.000,0.000,90.000,300.000,300.000);
  10504. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10505. lspdenterijer = CreateDynamicObjectEx(19834,1576.240,-1660.307,2109.606,0.000,0.000,90.000,300.000,300.000);
  10506. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10507. lspdenterijer = CreateDynamicObjectEx(19834,1576.218,-1662.022,2109.606,0.000,0.000,90.000,300.000,300.000);
  10508. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10509. lspdenterijer = CreateDynamicObjectEx(19834,1576.218,-1662.022,2112.922,0.000,0.000,90.000,300.000,300.000);
  10510. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10511. lspdenterijer = CreateDynamicObjectEx(19834,1576.225,-1660.046,2112.922,0.000,0.000,90.000,300.000,300.000);
  10512. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10513. lspdenterijer = CreateDynamicObjectEx(19834,1576.295,-1660.265,2112.922,0.000,0.000,90.000,300.000,300.000);
  10514. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10515. lspdenterijer = CreateDynamicObjectEx(19834,1576.300,-1661.948,2112.922,0.000,0.000,90.000,300.000,300.000);
  10516. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10517. lspdenterijer = CreateDynamicObjectEx(19834,1576.250,-1665.884,2109.606,0.000,0.000,90.000,300.000,300.000);
  10518. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10519. lspdenterijer = CreateDynamicObjectEx(19834,1576.229,-1667.859,2109.606,0.000,0.000,90.000,300.000,300.000);
  10520. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10521. lspdenterijer = CreateDynamicObjectEx(19834,1576.279,-1667.859,2109.606,0.000,0.000,90.000,300.000,300.000);
  10522. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10523. lspdenterijer = CreateDynamicObjectEx(19834,1576.277,-1667.859,2112.925,0.000,0.000,90.000,300.000,300.000);
  10524. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10525. lspdenterijer = CreateDynamicObjectEx(19834,1576.286,-1665.560,2112.927,0.000,0.000,90.000,300.000,300.000);
  10526. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10527. lspdenterijer = CreateDynamicObjectEx(19834,1576.235,-1665.562,2112.927,0.000,0.000,90.000,300.000,300.000);
  10528. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10529. lspdenterijer = CreateDynamicObjectEx(19834,1576.223,-1667.741,2112.927,0.000,0.000,90.000,300.000,300.000);
  10530. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10531. lspdenterijer = CreateDynamicObjectEx(19834,1576.261,-1663.840,2112.927,0.000,0.000,90.000,300.000,300.000);
  10532. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10533. lspdenterijer = CreateDynamicObjectEx(19455,1603.422,-1661.993,2107.831,0.000,0.000,0.000,300.000,300.000);
  10534. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10535. lspdenterijer = CreateDynamicObjectEx(18762,1567.135,-1658.845,2109.864,0.000,90.000,0.000,300.000,300.000);
  10536. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10537. lspdenterijer = CreateDynamicObjectEx(18762,1564.454,-1658.913,2111.736,0.000,0.000,0.000,300.000,300.000);
  10538. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10539. lspdenterijer = CreateDynamicObjectEx(18762,1574.337,-1658.922,2111.736,0.000,0.000,0.000,300.000,300.000);
  10540. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10541. lspdenterijer = CreateDynamicObjectEx(18762,1571.939,-1658.817,2109.855,0.000,90.000,0.000,300.000,300.000);
  10542. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10543. lspdenterijer = CreateDynamicObjectEx(18762,1571.891,-1658.869,2112.610,0.000,90.000,0.000,300.000,300.000);
  10544. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10545. lspdenterijer = CreateDynamicObjectEx(18762,1567.135,-1658.845,2112.603,0.000,90.000,0.000,300.000,300.000);
  10546. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10547. lspdenterijer = CreateDynamicObjectEx(19455,1569.450,-1659.127,2111.287,0.000,0.000,90.000,300.000,300.000);
  10548. SetDynamicObjectMaterial(lspdenterijer, 0, 15040, "cuntcuts", "csnewspaper02", 0);
  10549. lspdenterijer = CreateDynamicObjectEx(2180,1566.922,-1666.449,2109.533,0.000,0.000,180.000,300.000,300.000);
  10550. SetDynamicObjectMaterial(lspdenterijer, 0, 8419, "vgsbldng1", "buildng01wind_128", 0);
  10551. lspdenterijer = CreateDynamicObjectEx(2180,1571.979,-1666.447,2109.533,0.000,0.000,180.000,300.000,300.000);
  10552. SetDynamicObjectMaterial(lspdenterijer, 0, 8419, "vgsbldng1", "buildng01wind_128", 0);
  10553. lspdenterijer = CreateDynamicObjectEx(2180,1571.281,-1663.418,2109.533,0.000,0.000,180.000,300.000,300.000);
  10554. SetDynamicObjectMaterial(lspdenterijer, 0, 8419, "vgsbldng1", "buildng01wind_128", 0);
  10555. lspdenterijer = CreateDynamicObjectEx(2180,1568.130,-1663.463,2109.533,0.000,0.000,180.000,300.000,300.000);
  10556. SetDynamicObjectMaterial(lspdenterijer, 0, 8419, "vgsbldng1", "buildng01wind_128", 0);
  10557. lspdenterijer = CreateDynamicObjectEx(19327,1568.741,-1669.022,2111.542,0.000,0.000,180.000,300.000,300.000);
  10558. SetDynamicObjectMaterialText(lspdenterijer, 0, "LSPD", 120, "Ariel", 100, 1, -1, 0, 1);
  10559. lspdenterijer = CreateDynamicObjectEx(19455,1576.504,-1669.227,2111.287,0.000,0.000,90.000,300.000,300.000);
  10560. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10561. lspdenterijer = CreateDynamicObjectEx(19455,1589.255,-1669.156,2111.287,0.000,0.000,90.000,300.000,300.000);
  10562. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10563. lspdenterijer = CreateDynamicObjectEx(19455,1588.931,-1666.734,2111.287,0.000,0.000,0.000,300.000,300.000);
  10564. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10565. lspdenterijer = CreateDynamicObjectEx(14566,1589.246,-1662.947,2111.610,0.000,0.000,314.994,300.000,300.000);
  10566. SetDynamicObjectMaterial(lspdenterijer, 0, 17547, "eastbeach4a_lae2", "bluestucco1", 0);
  10567. SetDynamicObjectMaterial(lspdenterijer, 1, 17547, "eastbeach4a_lae2", "bluestucco1", 0);
  10568. SetDynamicObjectMaterial(lspdenterijer, 2, 17547, "eastbeach4a_lae2", "bluestucco1", 0);
  10569. SetDynamicObjectMaterial(lspdenterijer, 4, 17547, "eastbeach4a_lae2", "bluestucco1", 0);
  10570. SetDynamicObjectMaterial(lspdenterijer, 5, 17547, "eastbeach4a_lae2", "bluestucco1", 0);
  10571. SetDynamicObjectMaterial(lspdenterijer, 6, 17547, "eastbeach4a_lae2", "bluestucco1", 0);
  10572. SetDynamicObjectMaterial(lspdenterijer, 7, 17547, "eastbeach4a_lae2", "bluestucco1", 0);
  10573. SetDynamicObjectMaterial(lspdenterijer, 8, 17547, "eastbeach4a_lae2", "bluestucco1", 0);
  10574. lspdenterijer = CreateDynamicObjectEx(19327,1588.725,-1663.594,2111.472,0.000,0.000,270.000,300.000,300.000);
  10575. SetDynamicObjectMaterialText(lspdenterijer, 0, "LSPD", 120, "Ariel", 100, 1, -1, 0, 0);
  10576. lspdenterijer = CreateDynamicObjectEx(19455,1567.172,-1670.777,2111.287,0.000,0.000,90.000,300.000,300.000);
  10577. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10578. lspdenterijer = CreateDynamicObjectEx(19455,1567.255,-1677.828,2111.287,0.000,0.000,90.000,300.000,300.000);
  10579. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10580. lspdenterijer = CreateDynamicObjectEx(19450,1569.376,-1657.631,2112.059,0.000,90.000,90.000,300.000,300.000);
  10581. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10582. lspdenterijer = CreateDynamicObjectEx(19455,1588.890,-1676.344,2111.287,0.000,0.000,0.000,300.000,300.000);
  10583. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10584. lspdenterijer = CreateDynamicObjectEx(19388,1568.137,-1672.420,2111.288,0.000,0.000,0.000,300.000,300.000);
  10585. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10586. lspdenterijer = CreateDynamicObjectEx(19455,1568.151,-1678.810,2111.287,0.000,0.000,0.000,300.000,300.000);
  10587. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10588. lspdenterijer = CreateDynamicObjectEx(19455,1572.899,-1675.462,2111.287,0.000,0.000,90.000,300.000,300.000);
  10589. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10590. lspdenterijer = CreateDynamicObjectEx(19388,1579.317,-1675.515,2111.288,0.000,0.000,270.000,300.000,300.000);
  10591. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10592. lspdenterijer = CreateDynamicObjectEx(19455,1576.749,-1680.350,2111.287,0.000,0.000,0.000,300.000,300.000);
  10593. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10594. lspdenterijer = CreateDynamicObjectEx(19455,1579.707,-1684.890,2111.287,0.000,0.000,90.000,300.000,300.000);
  10595. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10596. lspdenterijer = CreateDynamicObjectEx(19455,1580.842,-1680.334,2111.287,0.000,0.000,0.000,300.000,300.000);
  10597. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10598. lspdenterijer = CreateDynamicObjectEx(19388,1582.493,-1675.520,2111.288,0.000,0.000,270.000,300.000,300.000);
  10599. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10600. lspdenterijer = CreateDynamicObjectEx(19455,1588.895,-1675.500,2111.287,0.000,0.000,90.000,300.000,300.000);
  10601. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10602. lspdenterijer = CreateDynamicObjectEx(19455,1585.626,-1681.197,2111.287,0.000,0.000,90.000,300.000,300.000);
  10603. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10604. lspdenterijer = CreateDynamicObjectEx(19379,1582.482,-1663.336,2113.038,0.000,90.000,0.000,300.000,300.000);
  10605. SetDynamicObjectMaterial(lspdenterijer, 0, 3899, "hospital2", "black", 0);
  10606. lspdenterijer = CreateDynamicObjectEx(18762,1585.270,-1667.725,2113.406,0.000,90.000,0.000,300.000,300.000);
  10607. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10608. lspdenterijer = CreateDynamicObjectEx(18762,1580.671,-1667.720,2113.381,0.000,90.000,0.000,300.000,300.000);
  10609. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10610. lspdenterijer = CreateDynamicObjectEx(18762,1577.682,-1665.735,2113.381,0.000,90.000,269.999,300.000,300.000);
  10611. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10612. lspdenterijer = CreateDynamicObjectEx(18762,1577.707,-1661.008,2113.355,0.000,90.000,270.000,300.000,300.000);
  10613. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10614. lspdenterijer = CreateDynamicObjectEx(18762,1580.151,-1659.012,2113.331,0.000,90.000,0.000,300.000,300.000);
  10615. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10616. lspdenterijer = CreateDynamicObjectEx(18762,1584.706,-1659.016,2113.305,0.000,90.000,0.000,300.000,300.000);
  10617. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10618. lspdenterijer = CreateDynamicObjectEx(18762,1587.241,-1665.729,2113.381,0.000,90.000,269.999,300.000,300.000);
  10619. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10620. lspdenterijer = CreateDynamicObjectEx(18762,1587.238,-1660.962,2113.355,0.000,90.000,270.000,300.000,300.000);
  10621. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10622. lspdenterijer = CreateDynamicObjectEx(18762,1579.843,-1663.505,2113.306,0.000,90.000,0.000,300.000,300.000);
  10623. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10624. lspdenterijer = CreateDynamicObjectEx(18762,1584.695,-1663.519,2113.306,0.000,90.000,0.000,300.000,300.000);
  10625. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10626. lspdenterijer = CreateDynamicObjectEx(2193,1582.772,-1663.178,2109.538,0.000,0.000,0.000,300.000,300.000);
  10627. SetDynamicObjectMaterial(lspdenterijer, 5, 8396, "sphinx01", "luxorceiling02_128", 0);
  10628. lspdenterijer = CreateDynamicObjectEx(2193,1583.781,-1665.071,2109.538,0.000,0.000,90.000,300.000,300.000);
  10629. SetDynamicObjectMaterial(lspdenterijer, 5, 8396, "sphinx01", "luxorceiling02_128", 0);
  10630. lspdenterijer = CreateDynamicObjectEx(2173,1587.162,-1678.882,2109.539,0.000,0.000,90.000,300.000,300.000);
  10631. SetDynamicObjectMaterial(lspdenterijer, 0, 8419, "vgsbldng1", "buildng01wind_128", 0);
  10632. lspdenterijer = CreateDynamicObjectEx(1516,1574.761,-1668.375,2109.538,0.000,0.000,0.000,300.000,300.000);
  10633. SetDynamicObjectMaterial(lspdenterijer, 0, 8419, "vgsbldng1", "buildng01wind_128", 0);
  10634. lspdenterijer = CreateDynamicObjectEx(1516,1563.737,-1668.380,2109.538,0.000,0.000,0.000,300.000,300.000);
  10635. SetDynamicObjectMaterial(lspdenterijer, 0, 8419, "vgsbldng1", "buildng01wind_128", 0);
  10636. lspdenterijer = CreateDynamicObjectEx(1516,1561.538,-1671.217,2109.538,0.000,0.000,0.000,300.000,300.000);
  10637. SetDynamicObjectMaterial(lspdenterijer, 0, 8419, "vgsbldng1", "buildng01wind_128", 0);
  10638. lspdenterijer = CreateDynamicObjectEx(14867,1575.028,-1670.647,2111.042,0.000,0.000,179.994,300.000,300.000);
  10639. SetDynamicObjectMaterial(lspdenterijer, 0, 8419, "vgsbldng1", "buildng01wind_128", 0);
  10640. lspdenterijer = CreateDynamicObjectEx(19175,1588.770,-1678.234,2111.266,0.000,0.000,270.000,300.000,300.000);
  10641. SetDynamicObjectMaterial(lspdenterijer, 0, 12855, "cunte_cop", "sw_PD", 0);
  10642. lspdenterijer = CreateDynamicObjectEx(2533,1573.404,-1674.864,2109.538,0.000,0.000,179.994,300.000,300.000);
  10643. SetDynamicObjectMaterial(lspdenterijer, 3, 7650, "vgnusedcar", "lightyellow2_32", 0);
  10644. lspdenterijer = CreateDynamicObjectEx(19370,1583.803,-1657.840,2111.287,0.000,0.000,90.000,300.000,300.000);
  10645. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10646. lspdenterijer = CreateDynamicObjectEx(2267,1583.702,-1657.977,2111.858,0.000,0.000,0.000,300.000,300.000);
  10647. SetDynamicObjectMaterial(lspdenterijer, 0, 10765, "airportgnd_sfse", "white", 0);
  10648. SetDynamicObjectMaterial(lspdenterijer, 1, 3899, "hospital2", "black", 0);
  10649. lspdenterijer = CreateDynamicObjectEx(2206,1562.897,-1674.849,2109.537,0.000,0.000,90.000,300.000,300.000);
  10650. SetDynamicObjectMaterial(lspdenterijer, 0, 8419, "vgsbldng1", "buildng01wind_128", 0);
  10651. lspdenterijer = CreateDynamicObjectEx(14867,1567.734,-1677.318,2111.018,0.000,0.000,90.000,300.000,300.000);
  10652. SetDynamicObjectMaterial(lspdenterijer, 0, 8419, "vgsbldng1", "buildng01wind_128", 0);
  10653. lspdenterijer = CreateDynamicObjectEx(19396,1600.056,-1657.250,2107.831,0.000,0.000,90.000,300.000,300.000);
  10654. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10655. lspdenterijer = CreateDynamicObjectEx(19396,1606.181,-1657.225,2107.831,0.000,0.000,90.000,300.000,300.000);
  10656. SetDynamicObjectMaterial(lspdenterijer, 0, 6095, "shops01_law", "GB_chatwall03b", 0);
  10657. lspdenterijer = CreateDynamicObjectEx(1516,1571.840,-1674.901,2109.538,0.000,0.000,0.000,300.000,300.000);
  10658. SetDynamicObjectMaterial(lspdenterijer, 0, 8419, "vgsbldng1", "buildng01wind_128", 0);
  10659. lspdenterijer = CreateDynamicObjectEx(1516,1588.120,-1674.782,2109.538,0.000,0.000,0.000,300.000,300.000);
  10660. SetDynamicObjectMaterial(lspdenterijer, 0, 8419, "vgsbldng1", "buildng01wind_128", 0);
  10661. //
  10662. lspdenterijer = CreateDynamicObjectEx(4150,1528.753,-1661.587,2109.287,0.000,0.000,0.000,300.000,300.000);
  10663. lspdenterijer = CreateDynamicObjectEx(3975,1575.126,-1675.717,2109.912,0.000,0.000,0.000,300.000,300.000);
  10664. lspdenterijer = CreateDynamicObjectEx(4186,1476.274,-1693.862,2116.288,0.000,0.000,0.000,300.000,300.000);
  10665. lspdenterijer = CreateDynamicObjectEx(3985,1476.339,-1632.209,2108.790,0.000,0.000,0.000,300.000,300.000);
  10666. lspdenterijer = CreateDynamicObjectEx(712,1509.213,-1669.937,2119.231,0.000,0.000,0.000,300.000,300.000);
  10667. lspdenterijer = CreateDynamicObjectEx(713,1495.269,-1708.321,2109.510,0.000,0.000,0.000,300.000,300.000);
  10668. lspdenterijer = CreateDynamicObjectEx(4163,1465.973,-1731.567,2109.288,0.000,0.000,0.000,300.000,300.000);
  10669. lspdenterijer = CreateDynamicObjectEx(3997,1479.354,-1801.538,2109.357,0.000,0.000,0.000,300.000,300.000);
  10670. lspdenterijer = CreateDynamicObjectEx(3980,1481.189,-1785.068,2119.242,0.000,0.000,0.000,300.000,300.000);
  10671. lspdenterijer = CreateDynamicObjectEx(4002,1479.868,-1790.398,2152.548,0.000,0.000,0.000,300.000,300.000);
  10672. lspdenterijer = CreateDynamicObjectEx(3994,1476.129,-1593.217,2109.154,0.000,0.000,0.000,300.000,300.000);
  10673. lspdenterijer = CreateDynamicObjectEx(620,1479.291,-1666.177,2109.488,356.857,0.000,3.136,300.000,300.000);
  10674. lspdenterijer = CreateDynamicObjectEx(647,1499.362,-1620.162,2112.333,356.852,0.000,359.544,300.000,300.000);
  10675. lspdenterijer = CreateDynamicObjectEx(647,1476.537,-1665.248,2112.094,356.852,0.000,357.264,300.000,300.000);
  10676. lspdenterijer = CreateDynamicObjectEx(647,1483.505,-1665.441,2112.094,0.000,0.000,0.000,300.000,300.000);
  10677. lspdenterijer = CreateDynamicObjectEx(4016,1493.720,-1547.182,2114.406,0.000,0.000,0.000,300.000,300.000);
  10678. lspdenterijer = CreateDynamicObjectEx(4144,1438.679,-1518.470,2109.134,0.000,0.000,0.000,300.000,300.000);
  10679. lspdenterijer = CreateDynamicObjectEx(4008,1405.166,-1544.529,2116.760,0.000,0.000,0.000,300.000,300.000);
  10680. lspdenterijer = CreateDynamicObjectEx(4206,1476.442,-1640.168,2110.530,0.000,0.000,0.000,300.000,300.000);
  10681. lspdenterijer = CreateDynamicObjectEx(1226,1519.305,-1690.311,2113.031,0.000,0.000,0.000,300.000,300.000);
  10682. lspdenterijer = CreateDynamicObjectEx(1229,1519.919,-1673.648,2110.762,0.000,0.000,0.000,300.000,300.000);
  10683. lspdenterijer = CreateDynamicObjectEx(1226,1518.668,-1663.246,2113.131,0.000,0.000,0.000,300.000,300.000);
  10684. lspdenterijer = CreateDynamicObjectEx(700,1494.209,-1694.439,2110.458,0.000,0.000,0.000,300.000,300.000);
  10685. lspdenterijer = CreateDynamicObjectEx(646,1545.717,-1679.745,2110.814,0.000,0.000,0.000,300.000,300.000);
  10686. lspdenterijer = CreateDynamicObjectEx(646,1545.174,-1669.722,2110.824,0.000,0.000,0.000,300.000,300.000);
  10687. lspdenterijer = CreateDynamicObjectEx(14532,1559.542,-1670.130,2110.519,0.000,0.000,0.000,300.000,300.000);
  10688. lspdenterijer = CreateDynamicObjectEx(16779,1583.820,-1680.460,2113.308,0.000,0.000,0.000,300.000,300.000);
  10689. lspdenterijer = CreateDynamicObjectEx(2776,1571.203,-1664.909,2110.034,0.000,0.000,177.978,300.000,300.000);
  10690. lspdenterijer = CreateDynamicObjectEx(2206,1560.099,-1660.420,2109.535,0.000,0.000,270.000,300.000,300.000);
  10691. lspdenterijer = CreateDynamicObjectEx(14414,1591.156,-1652.326,2106.294,0.000,0.000,270.000,300.000,300.000);
  10692. lspdenterijer = CreateDynamicObjectEx(11713,1605.168,-1650.566,2107.543,0.000,0.000,270.000,300.000,300.000);
  10693. lspdenterijer = CreateDynamicObjectEx(1714,1550.413,-1647.991,2109.535,0.000,0.000,359.997,300.000,300.000);
  10694. lspdenterijer = CreateDynamicObjectEx(3978,1391.996,-1654.935,2107.464,0.000,0.000,0.000,300.000,300.000);
  10695. lspdenterijer = CreateDynamicObjectEx(4005,1414.503,-1681.482,2122.129,0.000,0.000,0.000,300.000,300.000);
  10696. lspdenterijer = CreateDynamicObjectEx(4197,1392.087,-1655.128,2107.462,0.000,0.000,270.000,300.000,300.000);
  10697. lspdenterijer = CreateDynamicObjectEx(4006,1406.946,-1620.322,2128.797,0.000,0.000,0.000,300.000,300.000);
  10698. lspdenterijer = CreateDynamicObjectEx(4146,1367.592,-1583.277,2109.164,0.000,0.000,0.000,300.000,300.000);
  10699. lspdenterijer = CreateDynamicObjectEx(4113,1382.926,-1572.090,2143.689,0.000,0.000,0.000,300.000,300.000);
  10700. lspdenterijer = CreateDynamicObjectEx(4107,1361.333,-1801.521,2109.294,0.000,0.000,0.000,300.000,300.000);
  10701. lspdenterijer = CreateDynamicObjectEx(1267,1416.740,-1723.454,2125.438,0.000,0.000,234.992,300.000,300.000);
  10702. lspdenterijer = CreateDynamicObjectEx(4113,1341.493,-1647.510,2135.439,0.000,0.000,0.000,300.000,300.000);
  10703. lspdenterijer = CreateDynamicObjectEx(1569,1552.761,-1675.531,2109.537,0.000,0.000,90.000,300.000,300.000);
  10704. lspdenterijer = CreateDynamicObjectEx(1569,1552.775,-1672.550,2109.537,0.000,0.000,270.000,300.000,300.000);
  10705. lspdenterijer = CreateDynamicObjectEx(19325,1547.025,-1667.344,2111.600,0.000,0.000,179.994,300.000,300.000);
  10706. lspdenterijer = CreateDynamicObjectEx(19325,1547.034,-1660.785,2111.600,0.000,0.000,179.994,300.000,300.000);
  10707. lspdenterijer = CreateDynamicObjectEx(11711,1552.772,-1674.032,2112.385,0.000,0.000,90.000,300.000,300.000);
  10708. lspdenterijer = CreateDynamicObjectEx(19325,1552.262,-1670.579,2111.600,0.000,0.000,90.000,300.000,300.000);
  10709. lspdenterijer = CreateDynamicObjectEx(19325,1559.265,-1670.579,2111.600,90.000,180.000,269.999,300.000,300.000);
  10710. lspdenterijer = CreateDynamicObjectEx(16779,1567.226,-1662.753,2113.218,0.000,0.000,0.000,300.000,300.000);
  10711. lspdenterijer = CreateDynamicObjectEx(2201,1549.929,-1667.470,2110.321,0.000,0.000,0.000,300.000,300.000);
  10712. lspdenterijer = CreateDynamicObjectEx(2202,1550.956,-1669.808,2109.535,0.000,0.000,179.994,300.000,300.000);
  10713. lspdenterijer = CreateDynamicObjectEx(2186,1561.604,-1670.008,2109.535,0.000,0.000,180.000,300.000,300.000);
  10714. lspdenterijer = CreateDynamicObjectEx(2225,1548.489,-1662.473,2109.534,0.000,0.000,90.000,300.000,300.000);
  10715. lspdenterijer = CreateDynamicObjectEx(2816,1548.902,-1663.348,2110.332,0.000,0.000,178.000,300.000,300.000);
  10716. lspdenterijer = CreateDynamicObjectEx(19787,1561.666,-1665.777,2112.271,9.997,0.000,270.000,300.000,300.000);
  10717. lspdenterijer = CreateDynamicObjectEx(1897,1561.769,-1665.720,2113.248,0.000,0.000,90.000,300.000,300.000);
  10718. lspdenterijer = CreateDynamicObjectEx(1811,1555.000,-1678.416,2110.162,0.000,0.000,270.000,300.000,300.000);
  10719. lspdenterijer = CreateDynamicObjectEx(1811,1556.000,-1678.416,2110.162,0.000,0.000,270.000,300.000,300.000);
  10720. lspdenterijer = CreateDynamicObjectEx(1811,1557.000,-1678.413,2110.162,0.000,0.000,270.000,300.000,300.000);
  10721. lspdenterijer = CreateDynamicObjectEx(1811,1558.000,-1678.416,2110.162,0.000,0.000,270.000,300.000,300.000);
  10722. lspdenterijer = CreateDynamicObjectEx(1811,1559.000,-1678.415,2110.162,0.000,0.000,270.000,300.000,300.000);
  10723. lspdenterijer = CreateDynamicObjectEx(1811,1560.000,-1678.413,2110.162,0.000,0.000,270.000,300.000,300.000);
  10724. lspdenterijer = CreateDynamicObjectEx(19325,1562.367,-1667.014,2111.600,90.000,179.994,359.994,300.000,300.000);
  10725. lspdenterijer = CreateDynamicObjectEx(16779,1570.612,-1665.858,2113.217,0.000,0.000,0.000,300.000,300.000);
  10726. lspdenterijer = CreateDynamicObjectEx(19325,1562.374,-1661.360,2111.600,90.000,180.005,0.000,300.000,300.000);
  10727. lspdenterijer = CreateDynamicObjectEx(16779,1554.787,-1652.722,2113.305,0.000,0.000,0.000,300.000,300.000);
  10728. lspdenterijer = CreateDynamicObjectEx(19787,1561.669,-1668.174,2112.271,9.997,0.000,270.000,300.000,300.000);
  10729. lspdenterijer = CreateDynamicObjectEx(1897,1561.743,-1668.197,2113.248,0.000,0.000,90.000,300.000,300.000);
  10730. lspdenterijer = CreateDynamicObjectEx(19787,1561.840,-1662.619,2112.271,9.997,0.000,270.000,300.000,300.000);
  10731. lspdenterijer = CreateDynamicObjectEx(19787,1562.140,-1660.076,2112.271,9.997,0.000,270.000,300.000,300.000);
  10732. lspdenterijer = CreateDynamicObjectEx(1897,1561.927,-1662.729,2113.173,0.000,0.000,90.000,300.000,300.000);
  10733. lspdenterijer = CreateDynamicObjectEx(1897,1562.212,-1660.066,2113.372,0.000,0.000,90.000,300.000,300.000);
  10734. lspdenterijer = CreateDynamicObjectEx(2206,1559.970,-1665.812,2109.535,0.000,0.000,270.000,300.000,300.000);
  10735. lspdenterijer = CreateDynamicObjectEx(2190,1560.461,-1666.467,2110.472,0.000,0.000,270.000,300.000,300.000);
  10736. lspdenterijer = CreateDynamicObjectEx(2190,1560.517,-1661.197,2110.472,0.000,0.000,270.000,300.000,300.000);
  10737. lspdenterijer = CreateDynamicObjectEx(1811,1558.317,-1666.725,2110.162,0.000,0.000,180.000,300.000,300.000);
  10738. lspdenterijer = CreateDynamicObjectEx(1811,1558.568,-1661.350,2110.162,0.000,0.000,179.994,300.000,300.000);
  10739. lspdenterijer = CreateDynamicObjectEx(1811,1553.015,-1666.130,2110.162,0.000,0.000,89.994,300.000,300.000);
  10740. lspdenterijer = CreateDynamicObjectEx(1811,1550.286,-1666.187,2110.162,0.000,0.000,89.994,300.000,300.000);
  10741. lspdenterijer = CreateDynamicObjectEx(1811,1550.230,-1663.885,2110.162,0.000,0.000,359.989,300.000,300.000);
  10742. lspdenterijer = CreateDynamicObjectEx(1811,1550.318,-1661.637,2110.162,0.000,0.000,269.989,300.000,300.000);
  10743. lspdenterijer = CreateDynamicObjectEx(1811,1553.557,-1661.496,2110.162,0.000,0.000,269.989,300.000,300.000);
  10744. lspdenterijer = CreateDynamicObjectEx(1811,1556.836,-1661.305,2110.162,0.000,0.000,269.989,300.000,300.000);
  10745. lspdenterijer = CreateDynamicObjectEx(16779,1558.564,-1675.033,2113.348,0.000,0.000,0.000,300.000,300.000);
  10746. lspdenterijer = CreateDynamicObjectEx(19325,1559.696,-1648.542,2111.599,0.000,0.000,90.000,300.000,300.000);
  10747. lspdenterijer = CreateDynamicObjectEx(1599,1558.182,-1648.284,2111.219,0.000,0.000,90.000,300.000,300.000);
  10748. lspdenterijer = CreateDynamicObjectEx(1599,1558.703,-1648.354,2111.718,0.000,0.000,90.000,300.000,300.000);
  10749. lspdenterijer = CreateDynamicObjectEx(1600,1557.452,-1648.239,2110.681,0.000,0.000,270.000,300.000,300.000);
  10750. lspdenterijer = CreateDynamicObjectEx(19808,1559.848,-1660.989,2110.489,0.000,0.000,270.000,300.000,300.000);
  10751. lspdenterijer = CreateDynamicObjectEx(19808,1559.708,-1666.321,2110.489,0.000,0.000,270.000,300.000,300.000);
  10752. lspdenterijer = CreateDynamicObjectEx(2204,1560.602,-1653.582,2109.535,0.000,0.000,270.000,300.000,300.000);
  10753. lspdenterijer = CreateDynamicObjectEx(2568,1560.071,-1649.573,2109.535,0.000,0.000,270.000,300.000,300.000);
  10754. lspdenterijer = CreateDynamicObjectEx(2608,1561.025,-1670.290,2111.847,0.000,0.000,179.994,300.000,300.000);
  10755. lspdenterijer = CreateDynamicObjectEx(14633,1585.290,-1685.902,2111.016,0.000,0.000,0.000,300.000,300.000);
  10756. lspdenterijer = CreateDynamicObjectEx(11245,1547.760,-1647.113,2111.389,0.000,0.000,270.000,300.000,300.000);
  10757. lspdenterijer = CreateDynamicObjectEx(2597,1547.644,-1658.274,2110.386,0.000,0.000,0.000,300.000,300.000);
  10758. lspdenterijer = CreateDynamicObjectEx(2597,1547.604,-1656.028,2110.386,0.000,0.000,0.000,300.000,300.000);
  10759. lspdenterijer = CreateDynamicObjectEx(2689,1547.647,-1658.484,2110.769,0.000,0.000,330.000,300.000,300.000);
  10760. lspdenterijer = CreateDynamicObjectEx(2608,1550.065,-1670.140,2111.847,0.000,0.000,179.994,300.000,300.000);
  10761. lspdenterijer = CreateDynamicObjectEx(1666,1552.521,-1667.561,2110.479,0.000,0.000,0.000,300.000,300.000);
  10762. lspdenterijer = CreateDynamicObjectEx(1839,1560.076,-1661.952,2110.472,0.000,0.000,0.000,300.000,300.000);
  10763. lspdenterijer = CreateDynamicObjectEx(1971,1553.483,-1647.694,2112.170,0.000,0.000,0.000,300.000,300.000);
  10764. lspdenterijer = CreateDynamicObjectEx(2101,1559.865,-1667.369,2110.472,0.000,0.000,270.000,300.000,300.000);
  10765. lspdenterijer = CreateDynamicObjectEx(1971,1552.734,-1677.235,2112.089,0.000,0.000,90.000,300.000,300.000);
  10766. lspdenterijer = CreateDynamicObjectEx(2827,1550.796,-1660.183,2110.331,0.000,0.000,270.000,300.000,300.000);
  10767. lspdenterijer = CreateDynamicObjectEx(2828,1550.844,-1649.974,2110.472,0.000,0.000,0.000,300.000,300.000);
  10768. lspdenterijer = CreateDynamicObjectEx(1726,1550.802,-1655.841,2109.535,0.000,0.000,179.994,300.000,300.000);
  10769. lspdenterijer = CreateDynamicObjectEx(1726,1558.900,-1655.780,2109.535,0.000,0.000,179.994,300.000,300.000);
  10770. lspdenterijer = CreateDynamicObjectEx(1726,1552.718,-1648.283,2109.535,0.000,0.000,0.000,300.000,300.000);
  10771. lspdenterijer = CreateDynamicObjectEx(1727,1547.687,-1653.704,2109.534,0.000,0.000,90.000,300.000,300.000);
  10772. lspdenterijer = CreateDynamicObjectEx(1727,1549.721,-1651.557,2109.534,0.000,0.000,90.000,300.000,300.000);
  10773. lspdenterijer = CreateDynamicObjectEx(19787,1560.609,-1651.126,2111.207,0.000,0.000,270.000,300.000,300.000);
  10774. lspdenterijer = CreateDynamicObjectEx(19808,1559.895,-1651.186,2110.405,0.000,0.000,270.000,300.000,300.000);
  10775. lspdenterijer = CreateDynamicObjectEx(1714,1558.625,-1651.056,2109.535,0.000,0.000,90.000,300.000,300.000);
  10776. lspdenterijer = CreateDynamicObjectEx(2608,1547.379,-1653.165,2111.850,0.000,0.000,90.000,300.000,300.000);
  10777. lspdenterijer = CreateDynamicObjectEx(1808,1561.807,-1678.744,2109.537,0.000,0.000,180.000,300.000,300.000);
  10778. lspdenterijer = CreateDynamicObjectEx(1808,1552.390,-1670.397,2109.535,0.000,0.000,179.994,300.000,300.000);
  10779. lspdenterijer = CreateDynamicObjectEx(1809,1561.551,-1657.902,2109.537,0.000,0.000,0.000,300.000,300.000);
  10780. lspdenterijer = CreateDynamicObjectEx(1809,1561.551,-1657.901,2110.084,0.000,0.000,0.000,300.000,300.000);
  10781. lspdenterijer = CreateDynamicObjectEx(1808,1556.021,-1656.257,2109.535,0.000,0.000,179.994,300.000,300.000);
  10782. lspdenterijer = CreateDynamicObjectEx(2816,1551.962,-1655.750,2110.382,0.000,0.000,195.994,300.000,300.000);
  10783. lspdenterijer = CreateDynamicObjectEx(19325,1580.953,-1657.885,2111.602,90.000,0.000,270.000,300.000,300.000);
  10784. lspdenterijer = CreateDynamicObjectEx(14680,1554.440,-1664.519,2111.508,0.000,0.000,90.000,300.000,300.000);
  10785. lspdenterijer = CreateDynamicObjectEx(14680,1557.547,-1664.482,2111.508,0.000,0.000,90.000,300.000,300.000);
  10786. lspdenterijer = CreateDynamicObjectEx(14680,1560.203,-1664.475,2111.508,0.000,0.000,90.000,300.000,300.000);
  10787. lspdenterijer = CreateDynamicObjectEx(14680,1558.773,-1664.492,2111.508,0.000,0.000,90.000,300.000,300.000);
  10788. lspdenterijer = CreateDynamicObjectEx(14680,1556.221,-1659.982,2111.508,0.000,0.000,90.000,300.000,300.000);
  10789. lspdenterijer = CreateDynamicObjectEx(14680,1559.500,-1659.995,2111.508,0.000,0.000,90.000,300.000,300.000);
  10790. lspdenterijer = CreateDynamicObjectEx(14680,1555.220,-1659.980,2111.508,0.000,0.000,90.000,300.000,300.000);
  10791. lspdenterijer = CreateDynamicObjectEx(14680,1560.457,-1660.001,2111.508,0.000,0.000,90.000,300.000,300.000);
  10792. lspdenterijer = CreateDynamicObjectEx(3975,1575.031,-1628.487,2109.314,0.000,0.000,0.000,300.000,300.000);
  10793. lspdenterijer = CreateDynamicObjectEx(19325,1576.261,-1666.880,2111.600,90.000,180.005,359.978,300.000,300.000);
  10794. lspdenterijer = CreateDynamicObjectEx(19325,1576.275,-1661.097,2111.600,90.000,180.005,359.978,300.000,300.000);
  10795. lspdenterijer = CreateDynamicObjectEx(2930,1601.647,-1657.193,2108.718,0.000,0.000,90.000,300.000,300.000);
  10796. lspdenterijer = CreateDynamicObjectEx(2207,1568.392,-1661.715,2109.537,0.000,0.000,0.000,300.000,300.000);
  10797. lspdenterijer = CreateDynamicObjectEx(2776,1568.082,-1664.901,2110.034,0.000,0.000,177.978,300.000,300.000);
  10798. lspdenterijer = CreateDynamicObjectEx(2776,1571.069,-1667.907,2110.034,0.000,0.000,177.978,300.000,300.000);
  10799. lspdenterijer = CreateDynamicObjectEx(2776,1566.001,-1667.928,2110.034,0.000,0.000,177.978,300.000,300.000);
  10800. lspdenterijer = CreateDynamicObjectEx(19430,1588.892,-1662.947,2111.647,90.000,180.005,0.000,300.000,300.000);
  10801. lspdenterijer = CreateDynamicObjectEx(1533,1602.609,-1650.615,2106.081,0.000,0.000,0.000,300.000,300.000);
  10802. lspdenterijer = CreateDynamicObjectEx(14680,1582.744,-1663.797,2111.508,0.000,0.000,90.000,300.000,300.000);
  10803. lspdenterijer = CreateDynamicObjectEx(14680,1583.869,-1663.827,2111.508,0.000,0.000,90.000,300.000,300.000);
  10804. lspdenterijer = CreateDynamicObjectEx(14680,1586.698,-1663.838,2111.508,0.000,0.000,90.000,300.000,300.000);
  10805. lspdenterijer = CreateDynamicObjectEx(14680,1587.647,-1663.852,2111.508,0.000,0.000,90.000,300.000,300.000);
  10806. lspdenterijer = CreateDynamicObjectEx(14680,1587.373,-1659.434,2111.508,0.000,0.000,90.000,300.000,300.000);
  10807. lspdenterijer = CreateDynamicObjectEx(14680,1586.248,-1659.413,2111.508,0.000,0.000,90.000,300.000,300.000);
  10808. lspdenterijer = CreateDynamicObjectEx(14680,1583.222,-1659.389,2111.508,0.000,0.000,90.000,300.000,300.000);
  10809. lspdenterijer = CreateDynamicObjectEx(14680,1582.398,-1659.349,2111.508,0.000,0.000,90.000,300.000,300.000);
  10810. lspdenterijer = CreateDynamicObjectEx(2930,1605.359,-1657.171,2108.643,0.000,0.000,90.000,300.000,300.000);
  10811. lspdenterijer = CreateDynamicObjectEx(1806,1584.119,-1663.937,2109.539,0.000,0.000,118.000,300.000,300.000);
  10812. lspdenterijer = CreateDynamicObjectEx(1806,1584.105,-1662.908,2109.539,0.000,0.000,89.994,300.000,300.000);
  10813. lspdenterijer = CreateDynamicObjectEx(1714,1588.489,-1678.314,2109.539,0.000,0.000,270.000,300.000,300.000);
  10814. lspdenterijer = CreateDynamicObjectEx(14532,1563.210,-1659.790,2110.519,0.000,0.000,209.998,300.000,300.000);
  10815. lspdenterijer = CreateDynamicObjectEx(14532,1580.027,-1683.856,2110.520,0.000,0.000,67.994,300.000,300.000);
  10816. lspdenterijer = CreateDynamicObjectEx(2853,1587.116,-1678.912,2110.341,0.000,0.000,0.000,300.000,300.000);
  10817. lspdenterijer = CreateDynamicObjectEx(2824,1566.030,-1666.479,2110.339,0.000,0.000,0.000,300.000,300.000);
  10818. lspdenterijer = CreateDynamicObjectEx(2593,1588.380,-1675.993,2110.391,0.000,0.000,0.000,300.000,300.000);
  10819. lspdenterijer = CreateDynamicObjectEx(2704,1588.156,-1675.943,2110.787,0.000,0.000,108.000,300.000,300.000);
  10820. lspdenterijer = CreateDynamicObjectEx(1368,1605.864,-1663.183,2106.770,0.000,0.000,180.000,300.000,300.000);
  10821. lspdenterijer = CreateDynamicObjectEx(1368,1600.567,-1663.191,2106.770,0.000,0.000,180.000,300.000,300.000);
  10822. lspdenterijer = CreateDynamicObjectEx(1368,1602.978,-1660.436,2106.770,0.000,0.000,270.000,300.000,300.000);
  10823. lspdenterijer = CreateDynamicObjectEx(2707,1565.400,-1659.321,2111.962,0.000,0.000,0.000,300.000,300.000);
  10824. lspdenterijer = CreateDynamicObjectEx(2707,1566.500,-1659.321,2111.962,0.000,0.000,0.000,300.000,300.000);
  10825. lspdenterijer = CreateDynamicObjectEx(2707,1567.599,-1659.321,2111.962,0.000,0.000,0.000,300.000,300.000);
  10826. lspdenterijer = CreateDynamicObjectEx(2707,1568.800,-1659.321,2111.962,0.000,0.000,0.000,300.000,300.000);
  10827. lspdenterijer = CreateDynamicObjectEx(2707,1570.099,-1659.321,2111.962,0.000,0.000,0.000,300.000,300.000);
  10828. lspdenterijer = CreateDynamicObjectEx(2707,1571.500,-1659.321,2111.962,0.000,0.000,0.000,300.000,300.000);
  10829. lspdenterijer = CreateDynamicObjectEx(2707,1572.900,-1659.321,2111.962,0.000,0.000,0.000,300.000,300.000);
  10830. lspdenterijer = CreateDynamicObjectEx(2240,1563.772,-1668.448,2110.594,0.000,0.000,0.000,300.000,300.000);
  10831. lspdenterijer = CreateDynamicObjectEx(2241,1574.785,-1668.356,2110.564,0.000,0.000,0.000,300.000,300.000);
  10832. lspdenterijer = CreateDynamicObjectEx(2205,1580.827,-1654.112,2109.718,0.000,0.000,270.000,300.000,300.000);
  10833. lspdenterijer = CreateDynamicObjectEx(1806,1579.433,-1654.640,2109.539,0.000,0.000,269.989,300.000,300.000);
  10834. lspdenterijer = CreateDynamicObjectEx(2612,1585.020,-1675.635,2111.334,0.000,0.000,0.000,300.000,300.000);
  10835. lspdenterijer = CreateDynamicObjectEx(1726,1581.519,-1680.885,2109.539,0.000,0.000,90.000,300.000,300.000);
  10836. lspdenterijer = CreateDynamicObjectEx(1726,1583.181,-1680.588,2109.513,0.000,0.000,180.000,300.000,300.000);
  10837. lspdenterijer = CreateDynamicObjectEx(1714,1586.328,-1677.599,2109.539,0.000,0.000,0.000,300.000,300.000);
  10838. lspdenterijer = CreateDynamicObjectEx(1808,1584.188,-1680.928,2109.539,0.000,0.000,179.994,300.000,300.000);
  10839. lspdenterijer = CreateDynamicObjectEx(2608,1580.928,-1678.421,2111.708,0.000,0.000,90.000,300.000,300.000);
  10840. lspdenterijer = CreateDynamicObjectEx(2608,1585.958,-1680.909,2111.708,0.000,0.000,180.000,300.000,300.000);
  10841. lspdenterijer = CreateDynamicObjectEx(14532,1581.250,-1676.828,2110.520,0.000,0.000,269.998,300.000,300.000);
  10842. lspdenterijer = CreateDynamicObjectEx(19572,1585.421,-1680.879,2109.539,0.000,0.000,0.000,300.000,300.000);
  10843. lspdenterijer = CreateDynamicObjectEx(11743,1577.249,-1680.083,2110.341,0.000,0.000,0.000,300.000,300.000);
  10844. lspdenterijer = CreateDynamicObjectEx(2173,1577.359,-1681.232,2109.539,0.000,0.000,90.000,300.000,300.000);
  10845. lspdenterijer = CreateDynamicObjectEx(1714,1577.177,-1682.255,2109.539,0.000,0.000,90.000,300.000,300.000);
  10846. lspdenterijer = CreateDynamicObjectEx(1714,1578.025,-1679.989,2109.539,0.000,0.000,2.000,300.000,300.000);
  10847. lspdenterijer = CreateDynamicObjectEx(1808,1576.992,-1678.450,2109.539,0.000,0.000,90.000,300.000,300.000);
  10848. lspdenterijer = CreateDynamicObjectEx(2201,1562.744,-1672.687,2110.474,0.000,0.000,90.000,300.000,300.000);
  10849. lspdenterijer = CreateDynamicObjectEx(19617,1554.977,-1647.693,2111.475,0.000,0.000,0.000,300.000,300.000);
  10850. lspdenterijer = CreateDynamicObjectEx(1806,1581.649,-1653.706,2109.539,0.000,0.000,179.989,300.000,300.000);
  10851. lspdenterijer = CreateDynamicObjectEx(2776,1566.918,-1667.967,2110.034,0.000,0.000,177.978,300.000,300.000);
  10852. lspdenterijer = CreateDynamicObjectEx(2776,1571.972,-1667.928,2110.034,0.000,0.000,177.978,300.000,300.000);
  10853. lspdenterijer = CreateDynamicObjectEx(2776,1570.375,-1664.866,2110.034,0.000,0.000,177.978,300.000,300.000);
  10854. lspdenterijer = CreateDynamicObjectEx(2776,1567.181,-1664.910,2110.034,0.000,0.000,177.978,300.000,300.000);
  10855. lspdenterijer = CreateDynamicObjectEx(2190,1562.490,-1674.130,2110.474,0.000,0.000,90.000,300.000,300.000);
  10856. lspdenterijer = CreateDynamicObjectEx(19808,1563.199,-1674.282,2110.489,0.000,0.000,90.000,300.000,300.000);
  10857. lspdenterijer = CreateDynamicObjectEx(2776,1564.423,-1673.880,2110.033,0.000,0.000,267.978,300.000,300.000);
  10858. lspdenterijer = CreateDynamicObjectEx(1998,1605.986,-1654.850,2106.081,0.000,0.000,90.000,300.000,300.000);
  10859. lspdenterijer = CreateDynamicObjectEx(2776,1606.229,-1653.965,2106.579,0.000,0.000,270.000,300.000,300.000);
  10860. lspdenterijer = CreateDynamicObjectEx(2066,1578.683,-1684.270,2109.538,0.000,0.000,180.000,300.000,300.000);
  10861. lspdenterijer = CreateDynamicObjectEx(2066,1578.683,-1684.270,2110.933,0.000,0.000,179.994,300.000,300.000);
  10862. lspdenterijer = CreateDynamicObjectEx(2066,1578.109,-1684.281,2109.538,0.000,0.000,179.994,300.000,300.000);
  10863. lspdenterijer = CreateDynamicObjectEx(2066,1578.108,-1684.281,2110.933,0.000,0.000,179.994,300.000,300.000);
  10864. lspdenterijer = CreateDynamicObjectEx(2066,1577.532,-1684.267,2109.538,0.000,0.000,179.994,300.000,300.000);
  10865. lspdenterijer = CreateDynamicObjectEx(2066,1577.531,-1684.267,2110.933,0.000,0.000,179.994,300.000,300.000);
  10866. lspdenterijer = CreateDynamicObjectEx(2066,1577.328,-1677.437,2109.538,0.000,0.000,90.000,300.000,300.000);
  10867. lspdenterijer = CreateDynamicObjectEx(2066,1577.328,-1677.437,2110.933,0.000,0.000,90.000,300.000,300.000);
  10868. lspdenterijer = CreateDynamicObjectEx(2066,1577.331,-1676.860,2109.538,0.000,0.000,90.000,300.000,300.000);
  10869. lspdenterijer = CreateDynamicObjectEx(2066,1577.331,-1676.859,2110.933,0.000,0.000,90.000,300.000,300.000);
  10870. lspdenterijer = CreateDynamicObjectEx(2066,1577.322,-1676.285,2109.538,0.000,0.000,90.000,300.000,300.000);
  10871. lspdenterijer = CreateDynamicObjectEx(2066,1577.322,-1676.284,2110.907,0.000,0.000,90.000,300.000,300.000);
  10872. lspdenterijer = CreateDynamicObjectEx(2066,1576.925,-1682.992,2109.512,0.000,0.000,270.000,300.000,300.000);
  10873. lspdenterijer = CreateDynamicObjectEx(2066,1564.079,-1671.355,2109.512,0.000,0.000,0.000,300.000,300.000);
  10874. lspdenterijer = CreateDynamicObjectEx(2066,1564.078,-1671.355,2110.907,0.000,0.000,0.000,300.000,300.000);
  10875. lspdenterijer = CreateDynamicObjectEx(2066,1564.655,-1671.364,2109.512,0.000,0.000,0.000,300.000,300.000);
  10876. lspdenterijer = CreateDynamicObjectEx(2066,1564.654,-1671.363,2110.907,0.000,0.000,0.000,300.000,300.000);
  10877. lspdenterijer = CreateDynamicObjectEx(2066,1565.229,-1671.363,2109.512,0.000,0.000,0.000,300.000,300.000);
  10878. lspdenterijer = CreateDynamicObjectEx(2066,1565.229,-1671.362,2110.907,0.000,0.000,0.000,300.000,300.000);
  10879. lspdenterijer = CreateDynamicObjectEx(2066,1565.805,-1671.362,2109.512,0.000,0.000,0.000,300.000,300.000);
  10880. lspdenterijer = CreateDynamicObjectEx(2066,1565.805,-1671.360,2110.913,0.000,0.000,0.000,300.000,300.000);
  10881. lspdenterijer = CreateDynamicObjectEx(2066,1566.380,-1671.360,2109.512,0.000,0.000,0.000,300.000,300.000);
  10882. lspdenterijer = CreateDynamicObjectEx(2066,1566.380,-1671.359,2110.912,0.000,0.000,0.000,300.000,300.000);
  10883. lspdenterijer = CreateDynamicObjectEx(1726,1576.879,-1674.806,2109.538,0.000,0.000,180.000,300.000,300.000);
  10884. lspdenterijer = CreateDynamicObjectEx(2066,1580.253,-1681.661,2109.512,0.000,0.000,270.000,300.000,300.000);
  10885. lspdenterijer = CreateDynamicObjectEx(2066,1580.230,-1681.086,2109.512,0.000,0.000,270.000,300.000,300.000);
  10886. lspdenterijer = CreateDynamicObjectEx(2066,1580.208,-1680.510,2109.512,0.000,0.000,270.000,300.000,300.000);
  10887. lspdenterijer = CreateDynamicObjectEx(2066,1580.228,-1678.656,2109.512,0.000,0.000,270.000,300.000,300.000);
  10888. lspdenterijer = CreateDynamicObjectEx(2827,1561.493,-1671.233,2110.060,0.000,0.000,250.000,300.000,300.000);
  10889. lspdenterijer = CreateDynamicObjectEx(2930,1603.499,-1657.187,2108.718,0.000,0.000,90.000,300.000,300.000);
  10890. lspdenterijer = CreateDynamicObjectEx(2930,1599.194,-1657.166,2108.643,0.000,0.000,90.000,300.000,300.000);
  10891. lspdenterijer = CreateDynamicObjectEx(2853,1588.145,-1674.812,2110.062,0.000,0.000,0.000,300.000,300.000);
  10892. lspdenterijer = CreateDynamicObjectEx(2853,1571.788,-1674.858,2110.062,0.000,0.000,28.000,300.000,300.000);
  10893. lspdenterijer = CreateDynamicObjectEx(1567,1568.142,-1673.166,2109.513,0.000,0.000,344.000,300.000,300.000);
  10894. print("LSPD Map has been loaded successfully");
  10895. return 1;
  10896. }
  10897. stock LoadGeneralTextdraws()
  10898. {
  10899. //------------------------------------------//
  10900. Blind = TextDrawCreate(641.199951, 1.500000, "usebox");
  10901. TextDrawLetterSize(Blind, 0.000000, 49.378147);
  10902. TextDrawTextSize(Blind, -2.000000, 0.000000);
  10903. TextDrawAlignment(Blind, 3);
  10904. TextDrawColor(Blind, -1);
  10905. TextDrawUseBox(Blind, true);
  10906. TextDrawBoxColor(Blind, 255);
  10907. TextDrawSetShadow(Blind, 0);
  10908. TextDrawSetOutline(Blind, 0);
  10909. TextDrawBackgroundColor(Blind, 255);
  10910. TextDrawFont(Blind, 1);
  10911. //--------------Login Screen----------------//
  10912. // CreateDynamicArt3(nnahtann, 8, -648.2,1879.167, 600.0, 0, 0, -90);
  10913. //------------------------------------------//
  10914. /////////////////////////////////////////////
  10915. welcomenew = TextDrawCreate(327.496246, 153.999984, "Welcome to ~g~Old School Roleplay~w~!");
  10916. TextDrawLetterSize(welcomenew, 0.449999, 1.600000);
  10917. TextDrawAlignment(welcomenew, 2);
  10918. TextDrawColor(welcomenew, -1);
  10919. TextDrawSetShadow(welcomenew, 0);
  10920. TextDrawSetOutline(welcomenew, 1);
  10921. TextDrawBackgroundColor(welcomenew, 255);
  10922. TextDrawFont(welcomenew, 3);
  10923. TextDrawSetProportional(welcomenew, 1);
  10924. ////////////////////////////////////////////
  10925. new motd[128];
  10926. format(motd, sizeof(motd), "%s", gServerMOTD);
  10927. Textdraw2 = TextDrawCreate(0.000000,437.000000,"SERVER MOTD:");
  10928. Textdraw3 = TextDrawCreate(303.000000,437.000000,motd);
  10929. TextDrawUseBox(Textdraw2,1);
  10930. TextDrawBoxColor(Textdraw2,0x00000066);
  10931. TextDrawTextSize(Textdraw2,700.000000,1500.000000);
  10932. TextDrawAlignment(Textdraw2,1);
  10933. TextDrawAlignment(Textdraw3,2);
  10934. TextDrawBackgroundColor(Textdraw2,0x00000066);
  10935. TextDrawBackgroundColor(Textdraw3,0x000000ff);
  10936. TextDrawFont(Textdraw2,1);
  10937. TextDrawLetterSize(Textdraw2,0.299999,1.000000);
  10938. TextDrawFont(Textdraw3,2);
  10939. TextDrawLetterSize(Textdraw3,0.399999,1.000000);
  10940. TextDrawColor(Textdraw2,0x00ff00cc);
  10941. TextDrawColor(Textdraw3,0xffffffff);
  10942. TextDrawSetOutline(Textdraw2,1);
  10943. TextDrawSetOutline(Textdraw3,1);
  10944. TextDrawSetProportional(Textdraw2,1);
  10945. TextDrawSetProportional(Textdraw3,1);
  10946. TextDrawSetShadow(Textdraw2,1);
  10947. TextDrawSetShadow(Textdraw3,1);
  10948. // LOGIN SCREEN NEW
  10949. welcomepm = TextDrawCreate(204.743530, 134.166641, "Welcome to");
  10950. TextDrawLetterSize(welcomepm, 0.449999, 1.600000);
  10951. TextDrawAlignment(welcomepm, 1);
  10952. TextDrawColor(welcomepm, -1);
  10953. TextDrawSetShadow(welcomepm, 0);
  10954. TextDrawSetOutline(welcomepm, 1);
  10955. TextDrawBackgroundColor(welcomepm, 51);
  10956. TextDrawFont(welcomepm, 1);
  10957. TextDrawSetProportional(welcomepm, 1);
  10958. welcomepm1 = TextDrawCreate(301.258972, 134.750045, "Ultimate");
  10959. TextDrawLetterSize(welcomepm1, 0.449999, 1.600000);
  10960. TextDrawAlignment(welcomepm1, 1);
  10961. TextDrawColor(welcomepm1, -5963521);
  10962. TextDrawSetShadow(welcomepm1, 0);
  10963. TextDrawSetOutline(welcomepm1, 1);
  10964. TextDrawBackgroundColor(welcomepm1, 51);
  10965. TextDrawFont(welcomepm1, 1);
  10966. TextDrawSetProportional(welcomepm1, 1);
  10967. welcomepm2 = TextDrawCreate(371.068969, 134.749969, "Roleplay~w~!");
  10968. TextDrawLetterSize(welcomepm2, 0.449999, 1.600000);
  10969. TextDrawAlignment(welcomepm2, 1);
  10970. TextDrawColor(welcomepm2, 16777215);
  10971. TextDrawSetShadow(welcomepm2, 0);
  10972. TextDrawSetOutline(welcomepm2, 1);
  10973. TextDrawBackgroundColor(welcomepm2, 51);
  10974. TextDrawFont(welcomepm2, 1);
  10975. TextDrawSetProportional(welcomepm2, 1);
  10976. welcomepm3 = TextDrawCreate(265.183105, 277.083312, "Enjoy your stay!");
  10977. TextDrawLetterSize(welcomepm3, 0.449999, 1.600000);
  10978. TextDrawAlignment(welcomepm3, 1);
  10979. TextDrawColor(welcomepm3, -1);
  10980. TextDrawSetShadow(welcomepm3, 0);
  10981. TextDrawSetOutline(welcomepm3, 1);
  10982. TextDrawBackgroundColor(welcomepm3, 51);
  10983. TextDrawFont(welcomepm3, 1);
  10984. TextDrawSetProportional(welcomepm3, 1);
  10985. Tutorial[0] = TextDrawCreate(529.000366, 396.818450, "usebox");
  10986. TextDrawLetterSize(Tutorial[0], 0.000000, -14.743003);
  10987. TextDrawTextSize(Tutorial[0], 106.999954, 0.000000);
  10988. TextDrawAlignment(Tutorial[0], 1);
  10989. TextDrawColor(Tutorial[0], 0);
  10990. TextDrawUseBox(Tutorial[0], true);
  10991. TextDrawBoxColor(Tutorial[0], 102);
  10992. TextDrawSetShadow(Tutorial[0], 0);
  10993. TextDrawSetOutline(Tutorial[0], 0);
  10994. TextDrawBackgroundColor(Tutorial[0], 255);
  10995. TextDrawFont(Tutorial[0], 0);
  10996. Tutorial[1] = TextDrawCreate(232.666809, 265.896209, "Old School Roleplay - Tutorial");
  10997. TextDrawLetterSize(Tutorial[1], 0.335000, 1.616592);
  10998. TextDrawAlignment(Tutorial[1], 1);
  10999. TextDrawColor(Tutorial[1], 144559871);
  11000. TextDrawSetShadow(Tutorial[1], 0);
  11001. TextDrawSetOutline(Tutorial[1], 1);
  11002. TextDrawBackgroundColor(Tutorial[1], 51);
  11003. TextDrawFont(Tutorial[1], 1);
  11004. TextDrawSetProportional(Tutorial[1], 1);
  11005. Tutorial[2] = TextDrawCreate(318.666717, 290.370208, "Welcome to Old School Roleplay! Thanks for choosing us as your Roleplay destination. We hope you enjoy our community.");
  11006. TextDrawLetterSize(Tutorial[2], 0.195333, 1.052444);
  11007. TextDrawAlignment(Tutorial[2], 2);
  11008. TextDrawColor(Tutorial[2], -1);
  11009. TextDrawSetShadow(Tutorial[2], 0);
  11010. TextDrawSetOutline(Tutorial[2], 1);
  11011. TextDrawBackgroundColor(Tutorial[2], 51);
  11012. TextDrawFont(Tutorial[2], 1);
  11013. TextDrawSetProportional(Tutorial[2], 1);
  11014. // Time textdraw
  11015. TimeTD = TextDrawCreate(578.000000, 8.000000, "12:05AM");
  11016. TextDrawAlignment(TimeTD, 2);
  11017. TextDrawBackgroundColor(TimeTD, 255);
  11018. TextDrawFont(TimeTD, 2);
  11019. TextDrawLetterSize(TimeTD, 0.230000, 1.500000);
  11020. TextDrawColor(TimeTD, -1);
  11021. TextDrawSetOutline(TimeTD, 1);
  11022. TextDrawSetProportional(TimeTD, 1);
  11023. TextDrawSetSelectable(TimeTD, 0);
  11024. // Animation textdraw
  11025. AnimationTD = TextDrawCreate(435.000000, 426.000000, "Press ~r~~k~~PED_SPRINT~~w~ to stop animation");
  11026. TextDrawBackgroundColor(AnimationTD, 255);
  11027. TextDrawFont(AnimationTD, 2);
  11028. TextDrawLetterSize(AnimationTD, 0.260000, 1.299999);
  11029. TextDrawColor(AnimationTD, -1);
  11030. TextDrawSetOutline(AnimationTD, 1);
  11031. TextDrawSetProportional(AnimationTD, 1);
  11032. // Damage Informer Textdraw
  11033. for(new i; i < MAX_PLAYERS; ++i)
  11034. {
  11035. Damage[i] = TextDrawCreate(198.000015, 382.874114, "Damage: You were shot by");
  11036. TextDrawLetterSize(Damage[i], 0.213333, 1.110517);
  11037. TextDrawAlignment(Damage[i], 1);
  11038. TextDrawColor(Damage[i], -1);
  11039. TextDrawSetShadow(Damage[i], 0);
  11040. TextDrawSetOutline(Damage[i], 1);
  11041. TextDrawBackgroundColor(Damage[i], 51);
  11042. TextDrawFont(Damage[i], 1);
  11043. TextDrawSetProportional(Damage[i], 1);
  11044. }
  11045. #if defined SERVER_INTRO
  11046. // Server intro by Leone & Pedro
  11047. introTextdraws[0] = TextDrawCreate(660.000000, -59.000000, "_");
  11048. TextDrawBackgroundColor(introTextdraws[0], 255);
  11049. TextDrawFont(introTextdraws[0], 1);
  11050. TextDrawLetterSize(introTextdraws[0], 0.500000, 19.000000);
  11051. TextDrawColor(introTextdraws[0], -1);
  11052. TextDrawSetOutline(introTextdraws[0], 0);
  11053. TextDrawSetProportional(introTextdraws[0], 1);
  11054. TextDrawSetShadow(introTextdraws[0], 1);
  11055. TextDrawUseBox(introTextdraws[0], 1);
  11056. TextDrawBoxColor(introTextdraws[0], 255);
  11057. TextDrawTextSize(introTextdraws[0], -50.000000, 0.000000);
  11058. introTextdraws[1] = TextDrawCreate(651.000000, 338.000000, "_");
  11059. TextDrawBackgroundColor(introTextdraws[1], 255);
  11060. TextDrawFont(introTextdraws[1], 1);
  11061. TextDrawLetterSize(introTextdraws[1], 0.500000, 19.000000);
  11062. TextDrawColor(introTextdraws[1], -1);
  11063. TextDrawSetOutline(introTextdraws[1], 0);
  11064. TextDrawSetProportional(introTextdraws[1], 1);
  11065. TextDrawSetShadow(introTextdraws[1], 1);
  11066. TextDrawUseBox(introTextdraws[1], 1);
  11067. TextDrawBoxColor(introTextdraws[1], 255);
  11068. TextDrawTextSize(introTextdraws[1], -50.000000, 0.000000);
  11069. introTextdraws[2] = TextDrawCreate(249.000000, 144.000000, "Old School Roleplay");
  11070. TextDrawBackgroundColor(introTextdraws[2], 255);
  11071. TextDrawFont(introTextdraws[2], 2);
  11072. TextDrawLetterSize(introTextdraws[2], 0.400000, 2.099999);
  11073. TextDrawColor(introTextdraws[2], 144559871);
  11074. TextDrawSetOutline(introTextdraws[2], 1);
  11075. TextDrawSetProportional(introTextdraws[2], 1);
  11076. introTextdraws[3] = TextDrawCreate(331.000000, 161.000000, "Presents...");
  11077. TextDrawBackgroundColor(introTextdraws[3], 255);
  11078. TextDrawFont(introTextdraws[3], 2);
  11079. TextDrawLetterSize(introTextdraws[3], 0.300000, 1.799999);
  11080. TextDrawColor(introTextdraws[3], -1);
  11081. TextDrawSetOutline(introTextdraws[3], 1);
  11082. TextDrawSetProportional(introTextdraws[3], 1);
  11083. introTextdraws[4] = TextDrawCreate(288.000000, 156.000000, "Grand~n~ Theft~n~Auto");
  11084. TextDrawBackgroundColor(introTextdraws[4], 255);
  11085. TextDrawFont(introTextdraws[4], 3);
  11086. TextDrawLetterSize(introTextdraws[4], 0.750000, 2.999999);
  11087. TextDrawColor(introTextdraws[4], -1);
  11088. TextDrawSetOutline(introTextdraws[4], 1);
  11089. TextDrawSetProportional(introTextdraws[4], 1);
  11090. introTextdraws[5] = TextDrawCreate(261.000000, 233.000000, "San Andreas");
  11091. TextDrawBackgroundColor(introTextdraws[5], 255);
  11092. TextDrawFont(introTextdraws[5], 0);
  11093. TextDrawLetterSize(introTextdraws[5], 0.599999, 2.699999);
  11094. TextDrawColor(introTextdraws[5], 144559871);
  11095. TextDrawSetOutline(introTextdraws[5], 1);
  11096. TextDrawSetProportional(introTextdraws[5], 1);
  11097. introTextdraws[6] = TextDrawCreate(513.000000, 176.000000, "Management");
  11098. TextDrawBackgroundColor(introTextdraws[6], 255);
  11099. TextDrawFont(introTextdraws[6], 0);
  11100. TextDrawLetterSize(introTextdraws[6], 0.579999, 2.399997);
  11101. TextDrawColor(introTextdraws[6], 144559871);
  11102. TextDrawSetOutline(introTextdraws[6], 1);
  11103. TextDrawSetProportional(introTextdraws[6], 1);
  11104. introTextdraws[7] = TextDrawCreate(555.000000, 201.000000, "Pedro~n~Leone");
  11105. TextDrawAlignment(introTextdraws[7], 2);
  11106. TextDrawBackgroundColor(introTextdraws[7], 255);
  11107. TextDrawFont(introTextdraws[7], 2);
  11108. TextDrawLetterSize(introTextdraws[7], 0.189999, 1.399997);
  11109. TextDrawColor(introTextdraws[7], -1);
  11110. TextDrawSetOutline(introTextdraws[7], 1);
  11111. TextDrawSetProportional(introTextdraws[7], 1);
  11112. introTextdraws[8] = TextDrawCreate(26.000000, 153.000000, "Development");
  11113. TextDrawBackgroundColor(introTextdraws[8], 255);
  11114. TextDrawFont(introTextdraws[8], 0);
  11115. TextDrawLetterSize(introTextdraws[8], 0.579999, 2.399997);
  11116. TextDrawColor(introTextdraws[8], 144559871);
  11117. TextDrawSetOutline(introTextdraws[8], 1);
  11118. TextDrawSetProportional(introTextdraws[8], 1);
  11119. introTextdraws[9] = TextDrawCreate(44.000000, 178.000000, "Leone");
  11120. TextDrawBackgroundColor(introTextdraws[9], 255);
  11121. TextDrawFont(introTextdraws[9], 2);
  11122. TextDrawLetterSize(introTextdraws[9], 0.189999, 1.399997);
  11123. TextDrawColor(introTextdraws[9], -1);
  11124. TextDrawSetOutline(introTextdraws[9], 1);
  11125. TextDrawSetProportional(introTextdraws[9], 1);
  11126. introTextdraws[10] = TextDrawCreate(33.000000, 219.000000, "Mapping");
  11127. TextDrawBackgroundColor(introTextdraws[10], 255);
  11128. TextDrawFont(introTextdraws[10], 0);
  11129. TextDrawLetterSize(introTextdraws[10], 0.579999, 2.399997);
  11130. TextDrawColor(introTextdraws[10], 144559871);
  11131. TextDrawSetOutline(introTextdraws[10], 1);
  11132. TextDrawSetProportional(introTextdraws[10], 1);
  11133. introTextdraws[11] = TextDrawCreate(65.000000, 246.000000, "Jack~n~Helena");
  11134. TextDrawAlignment(introTextdraws[11], 2);
  11135. TextDrawBackgroundColor(introTextdraws[11], 255);
  11136. TextDrawFont(introTextdraws[11], 2);
  11137. TextDrawLetterSize(introTextdraws[11], 0.189999, 1.399997);
  11138. TextDrawColor(introTextdraws[11], -1);
  11139. TextDrawSetOutline(introTextdraws[11], 1);
  11140. TextDrawSetProportional(introTextdraws[11], 1);
  11141. introTextdraws[12] = TextDrawCreate(145.000000, 144.000000, "Beta Testing");
  11142. TextDrawBackgroundColor(introTextdraws[12], 255);
  11143. TextDrawFont(introTextdraws[12], 0);
  11144. TextDrawLetterSize(introTextdraws[12], 0.579999, 2.399997);
  11145. TextDrawColor(introTextdraws[12], 144559871);
  11146. TextDrawSetOutline(introTextdraws[12], 1);
  11147. TextDrawSetProportional(introTextdraws[12], 1);
  11148. introTextdraws[13] = TextDrawCreate(192.000000, 168.000000, "Michael~n~Leone~n~Helena");
  11149. TextDrawAlignment(introTextdraws[13], 2);
  11150. TextDrawBackgroundColor(introTextdraws[13], 255);
  11151. TextDrawFont(introTextdraws[13], 2);
  11152. TextDrawLetterSize(introTextdraws[13], 0.189999, 1.399997);
  11153. TextDrawColor(introTextdraws[13], -1);
  11154. TextDrawSetOutline(introTextdraws[13], 1);
  11155. TextDrawSetProportional(introTextdraws[13], 1);
  11156. introTextdraws[14] = TextDrawCreate(428.000000, 208.000000, "Suggestions");
  11157. TextDrawBackgroundColor(introTextdraws[14], 255);
  11158. TextDrawFont(introTextdraws[14], 0);
  11159. TextDrawLetterSize(introTextdraws[14], 0.579999, 2.399997);
  11160. TextDrawColor(introTextdraws[14], 144559871);
  11161. TextDrawSetOutline(introTextdraws[14], 1);
  11162. TextDrawSetProportional(introTextdraws[14], 1);
  11163. introTextdraws[15] = TextDrawCreate(469.000000, 233.000000, "Hank~n~Mike");
  11164. TextDrawAlignment(introTextdraws[15], 2);
  11165. TextDrawBackgroundColor(introTextdraws[15], 255);
  11166. TextDrawFont(introTextdraws[15], 2);
  11167. TextDrawLetterSize(introTextdraws[15], 0.189999, 1.399997);
  11168. TextDrawColor(introTextdraws[15], -1);
  11169. TextDrawSetOutline(introTextdraws[15], 1);
  11170. TextDrawSetProportional(introTextdraws[15], 1);
  11171. introTextdraws[16] = TextDrawCreate(293.000000, 140.000000, "Credits");
  11172. TextDrawBackgroundColor(introTextdraws[16], 255);
  11173. TextDrawFont(introTextdraws[16], 0);
  11174. TextDrawLetterSize(introTextdraws[16], 0.639998, 2.599997);
  11175. TextDrawColor(introTextdraws[16], 144559871);
  11176. TextDrawSetOutline(introTextdraws[16], 1);
  11177. TextDrawSetProportional(introTextdraws[16], 1);
  11178. introTextdraws[17] = TextDrawCreate(321.000000, 165.000000, "Incognito~n~BlueG~n~Y_Less~n~Pedro~n~Leone~n~Admin team~n~Helper team~n~Beta testers~n~Our players!");
  11179. TextDrawAlignment(introTextdraws[17], 2);
  11180. TextDrawBackgroundColor(introTextdraws[17], 255);
  11181. TextDrawFont(introTextdraws[17], 2);
  11182. TextDrawLetterSize(introTextdraws[17], 0.189999, 1.399997);
  11183. TextDrawColor(introTextdraws[17], -1);
  11184. TextDrawSetOutline(introTextdraws[17], 1);
  11185. TextDrawSetProportional(introTextdraws[17], 1);
  11186. introTextdraws[18] = TextDrawCreate(391.000000, 161.000000, "Several months of development...");
  11187. TextDrawBackgroundColor(introTextdraws[18], 255);
  11188. TextDrawFont(introTextdraws[18], 2);
  11189. TextDrawLetterSize(introTextdraws[18], 0.240000, 1.599999);
  11190. TextDrawColor(introTextdraws[18], 144559871);
  11191. TextDrawSetOutline(introTextdraws[18], 1);
  11192. TextDrawSetProportional(introTextdraws[18], 1);
  11193. introTextdraws[19] = TextDrawCreate(421.000000, 175.000000, "To make this script possible");
  11194. TextDrawBackgroundColor(introTextdraws[19], 255);
  11195. TextDrawFont(introTextdraws[19], 2);
  11196. TextDrawLetterSize(introTextdraws[19], 0.240000, 1.599999);
  11197. TextDrawColor(introTextdraws[19], -1);
  11198. TextDrawSetOutline(introTextdraws[19], 1);
  11199. TextDrawSetProportional(introTextdraws[19], 1);
  11200. introTextdraws[20] = TextDrawCreate(29.000000, 161.000000, "Happiness is realizing that nothing is too important");
  11201. TextDrawBackgroundColor(introTextdraws[20], 255);
  11202. TextDrawFont(introTextdraws[20], 2);
  11203. TextDrawLetterSize(introTextdraws[20], 0.240000, 1.599999);
  11204. TextDrawColor(introTextdraws[20], 144559871);
  11205. TextDrawSetOutline(introTextdraws[20], 1);
  11206. TextDrawSetProportional(introTextdraws[20], 1);
  11207. introTextdraws[21] = TextDrawCreate(29.000000, 175.000000, "One update at a time.");
  11208. TextDrawBackgroundColor(introTextdraws[21], 255);
  11209. TextDrawFont(introTextdraws[21], 2);
  11210. TextDrawLetterSize(introTextdraws[21], 0.240000, 1.599999);
  11211. TextDrawColor(introTextdraws[21], -1);
  11212. TextDrawSetOutline(introTextdraws[21], 1);
  11213. TextDrawSetProportional(introTextdraws[21], 1);
  11214. introTextdraws[22] = TextDrawCreate(204.000000, 152.000000, "Standards of Excellence");
  11215. TextDrawBackgroundColor(introTextdraws[22], 255);
  11216. TextDrawFont(introTextdraws[22], 2);
  11217. TextDrawLetterSize(introTextdraws[22], 0.240000, 1.599999);
  11218. TextDrawColor(introTextdraws[22], 144559871);
  11219. TextDrawSetOutline(introTextdraws[22], 1);
  11220. TextDrawSetProportional(introTextdraws[22], 1);
  11221. introTextdraws[23] = TextDrawCreate(281.000000, 125.000000, "~w~Welcome to..."); // 258.00
  11222. TextDrawBackgroundColor(introTextdraws[23], 255);
  11223. TextDrawFont(introTextdraws[23], 0);
  11224. TextDrawLetterSize(introTextdraws[23], 0.649998, 2.699997);
  11225. TextDrawColor(introTextdraws[23], 144559871);
  11226. TextDrawSetOutline(introTextdraws[23], 1);
  11227. TextDrawSetProportional(introTextdraws[23], 1);
  11228. introTextdraws[24] = TextDrawCreate(258.000000, 146.000000, "Old School Roleplay");
  11229. TextDrawBackgroundColor(introTextdraws[24], 255);
  11230. TextDrawFont(introTextdraws[24], 0);
  11231. TextDrawLetterSize(introTextdraws[24], 0.649998, 2.699997);
  11232. TextDrawColor(introTextdraws[24], 144559871);
  11233. TextDrawSetOutline(introTextdraws[24], 1);
  11234. TextDrawSetProportional(introTextdraws[24], 1);
  11235. introTextdraws[25] = TextDrawCreate(202.000000, 342.000000, "Thank you for watching this quick introduction.~n~Let's wrap this up, then you can register.");
  11236. TextDrawBackgroundColor(introTextdraws[25], 255);
  11237. TextDrawFont(introTextdraws[25], 2);
  11238. TextDrawLetterSize(introTextdraws[25], 0.240000, 1.599999);
  11239. TextDrawColor(introTextdraws[25], -1);
  11240. TextDrawSetOutline(introTextdraws[25], 1);
  11241. TextDrawSetProportional(introTextdraws[25], 1);
  11242. #endif
  11243. // House Lights
  11244. houseLights = TextDrawCreate(0.0, 0.0, "|");
  11245. TextDrawUseBox(houseLights, 1);
  11246. TextDrawBoxColor(houseLights, 0x000000BB);
  11247. TextDrawTextSize(houseLights, 660.000000, 22.000000);
  11248. TextDrawAlignment(houseLights, 0);
  11249. TextDrawBackgroundColor(houseLights, 0x000000FF);
  11250. TextDrawFont(houseLights, 3);
  11251. TextDrawLetterSize(houseLights, 1.000000, 52.200000);
  11252. TextDrawColor(houseLights, 0x000000FF);
  11253. TextDrawSetOutline(houseLights, 1);
  11254. TextDrawSetProportional(houseLights, 1);
  11255. TextDrawSetShadow(houseLights, 1);
  11256. }
  11257. stock CreatePlayerTextDraws( playerid )
  11258. {
  11259. os_logo[playerid][0] = CreatePlayerTextDraw(playerid, 209.444412, 72.866668, "mdl-2003:logo_osrp");
  11260. PlayerTextDrawTextSize(playerid, os_logo[playerid][0], 217.000000, 84.000000);
  11261. PlayerTextDrawAlignment(playerid, os_logo[playerid][0], 1);
  11262. PlayerTextDrawColor(playerid, os_logo[playerid][0], -1);
  11263. PlayerTextDrawSetShadow(playerid, os_logo[playerid][0], 0);
  11264. PlayerTextDrawBackgroundColor(playerid, os_logo[playerid][0], 255);
  11265. PlayerTextDrawFont(playerid, os_logo[playerid][0], 4);
  11266. PlayerTextDrawSetProportional(playerid, os_logo[playerid][0], 0);
  11267. PlayerData[playerid][pText][58] = CreatePlayerTextDraw(playerid, 484.000000, 123.000000, "Power");
  11268. PlayerTextDrawBackgroundColor(playerid, PlayerData[playerid][pText][58], 255);
  11269. PlayerTextDrawFont(playerid, PlayerData[playerid][pText][58], 2);
  11270. PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pText][58], 0.360000, 1.700000);
  11271. PlayerTextDrawColor(playerid, PlayerData[playerid][pText][58], -1429936641);
  11272. PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pText][58], 1);
  11273. PlayerTextDrawSetProportional(playerid, PlayerData[playerid][pText][58], 1);
  11274. PlayerData[playerid][pText][59] = CreatePlayerTextDraw(playerid, 497.000000, 139.000000, "Reps");
  11275. PlayerTextDrawBackgroundColor(playerid, PlayerData[playerid][pText][59], 255);
  11276. PlayerTextDrawFont(playerid, PlayerData[playerid][pText][59], 2);
  11277. PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pText][59], 0.360000, 1.700000);
  11278. PlayerTextDrawColor(playerid, PlayerData[playerid][pText][59], -1429936641);
  11279. PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pText][59], 1);
  11280. PlayerTextDrawSetProportional(playerid, PlayerData[playerid][pText][59], 1);
  11281. PlayerData[playerid][pText][60] = CreatePlayerTextDraw(playerid, 608.000000, 139.000000, "0");
  11282. PlayerTextDrawAlignment(playerid, PlayerData[playerid][pText][60], 3);
  11283. PlayerTextDrawBackgroundColor(playerid, PlayerData[playerid][pText][60], 255);
  11284. PlayerTextDrawFont(playerid, PlayerData[playerid][pText][60], 2);
  11285. PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pText][60], 0.360000, 1.700000);
  11286. PlayerTextDrawColor(playerid, PlayerData[playerid][pText][60], -1429936641);
  11287. PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pText][60], 1);
  11288. PlayerTextDrawSetProportional(playerid, PlayerData[playerid][pText][60], 1);
  11289. PlayerData[playerid][pText][61] = CreatePlayerTextDraw(playerid, 469.000000, 156.000000, "Distance");
  11290. PlayerTextDrawBackgroundColor(playerid, PlayerData[playerid][pText][61], 255);
  11291. PlayerTextDrawFont(playerid, PlayerData[playerid][pText][61], 2);
  11292. PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pText][61], 0.360000, 1.700000);
  11293. PlayerTextDrawColor(playerid, PlayerData[playerid][pText][61], -1429936641);
  11294. PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pText][61], 1);
  11295. PlayerTextDrawSetProportional(playerid, PlayerData[playerid][pText][61], 1);
  11296. PlayerData[playerid][pText][62] = CreatePlayerTextDraw(playerid, 608.000000, 156.000000, "0");
  11297. PlayerTextDrawAlignment(playerid, PlayerData[playerid][pText][62], 3);
  11298. PlayerTextDrawBackgroundColor(playerid, PlayerData[playerid][pText][62], 255);
  11299. PlayerTextDrawFont(playerid, PlayerData[playerid][pText][62], 2);
  11300. PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pText][62], 0.360000, 1.700000);
  11301. PlayerTextDrawColor(playerid, PlayerData[playerid][pText][62], -1429936641);
  11302. PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pText][62], 1);
  11303. PlayerTextDrawSetProportional(playerid, PlayerData[playerid][pText][62], 1);
  11304. playerfooter[playerid] = CreatePlayerTextDraw(playerid, 327.333190, 432.417785, ".");
  11305. PlayerTextDrawLetterSize(playerid, playerfooter[playerid], 0.220000, 1.276443);
  11306. PlayerTextDrawTextSize(playerid, playerfooter[playerid], 0.000000, 831.000000);
  11307. PlayerTextDrawAlignment(playerid, playerfooter[playerid], 2);
  11308. PlayerTextDrawColor(playerid, playerfooter[playerid], -1);
  11309. PlayerTextDrawUseBox(playerid, playerfooter[playerid], 1);
  11310. PlayerTextDrawBoxColor(playerid, playerfooter[playerid], 153);
  11311. PlayerTextDrawSetShadow(playerid, playerfooter[playerid], 0);
  11312. PlayerTextDrawSetOutline(playerid, playerfooter[playerid], 1);
  11313. PlayerTextDrawBackgroundColor(playerid, playerfooter[playerid], 255);
  11314. PlayerTextDrawFont(playerid, playerfooter[playerid], 2);
  11315. PlayerTextDrawSetProportional(playerid, playerfooter[playerid], 1);
  11316. LoadingObjects0[playerid] = CreatePlayerTextDraw(playerid, 219.267944, 377.416687, "LD_SPAC:white");
  11317. PlayerTextDrawLetterSize(playerid, LoadingObjects0[playerid], 0.000000, 0.000000);
  11318. PlayerTextDrawTextSize(playerid, LoadingObjects0[playerid], 205.212310, 58.333312);
  11319. PlayerTextDrawAlignment(playerid, LoadingObjects0[playerid], 1);
  11320. PlayerTextDrawColor(playerid, LoadingObjects0[playerid], -2139062017);
  11321. PlayerTextDrawSetShadow(playerid, LoadingObjects0[playerid], 0);
  11322. PlayerTextDrawSetOutline(playerid, LoadingObjects0[playerid], 0);
  11323. PlayerTextDrawFont(playerid, LoadingObjects0[playerid], 4);
  11324. LoadingObjects1[playerid] = CreatePlayerTextDraw(playerid, 424.011718, 382.666687, "LD_SPAC:white");
  11325. PlayerTextDrawLetterSize(playerid, LoadingObjects1[playerid], 0.000000, 0.000000);
  11326. PlayerTextDrawTextSize(playerid, LoadingObjects1[playerid], -204.743774, -5.250000);
  11327. PlayerTextDrawAlignment(playerid, LoadingObjects1[playerid], 1);
  11328. PlayerTextDrawColor(playerid, LoadingObjects1[playerid], -1);
  11329. PlayerTextDrawSetShadow(playerid, LoadingObjects1[playerid], 0);
  11330. PlayerTextDrawSetOutline(playerid, LoadingObjects1[playerid], 0);
  11331. PlayerTextDrawFont(playerid, LoadingObjects1[playerid], 4);
  11332. LoadingObjects2[playerid] = CreatePlayerTextDraw(playerid, 424.011718, 378.000000, "LD_SPAC:white");
  11333. PlayerTextDrawLetterSize(playerid, LoadingObjects2[playerid], 0.000000, 0.000000);
  11334. PlayerTextDrawTextSize(playerid, LoadingObjects2[playerid], -4.216674, 57.750000);
  11335. PlayerTextDrawAlignment(playerid, LoadingObjects2[playerid], 1);
  11336. PlayerTextDrawColor(playerid, LoadingObjects2[playerid], -1);
  11337. PlayerTextDrawSetShadow(playerid, LoadingObjects2[playerid], 0);
  11338. PlayerTextDrawSetOutline(playerid, LoadingObjects2[playerid], 0);
  11339. PlayerTextDrawFont(playerid, LoadingObjects2[playerid], 4);
  11340. LoadingObjects3[playerid] = CreatePlayerTextDraw(playerid, 218.799423, 377.416687, "LD_SPAC:white");
  11341. PlayerTextDrawLetterSize(playerid, LoadingObjects3[playerid], 0.000000, 0.000000);
  11342. PlayerTextDrawTextSize(playerid, LoadingObjects3[playerid], 4.685211, 58.333312);
  11343. PlayerTextDrawAlignment(playerid, LoadingObjects3[playerid], 1);
  11344. PlayerTextDrawColor(playerid, LoadingObjects3[playerid], -1);
  11345. PlayerTextDrawSetShadow(playerid, LoadingObjects3[playerid], 0);
  11346. PlayerTextDrawSetOutline(playerid, LoadingObjects3[playerid], 0);
  11347. PlayerTextDrawFont(playerid, LoadingObjects3[playerid], 4);
  11348. LoadingObjects4[playerid] = CreatePlayerTextDraw(playerid, 424.011718, 429.333312, "LD_SPAC:white");
  11349. PlayerTextDrawLetterSize(playerid, LoadingObjects4[playerid], 0.000000, 0.000000);
  11350. PlayerTextDrawTextSize(playerid, LoadingObjects4[playerid], -204.275253, 6.416687);
  11351. PlayerTextDrawAlignment(playerid, LoadingObjects4[playerid], 1);
  11352. PlayerTextDrawColor(playerid, LoadingObjects4[playerid], -1);
  11353. PlayerTextDrawSetShadow(playerid, LoadingObjects4[playerid], 0);
  11354. PlayerTextDrawSetOutline(playerid, LoadingObjects4[playerid], 0);
  11355. PlayerTextDrawFont(playerid, LoadingObjects4[playerid], 4);
  11356. LoadingObjects5[playerid] = CreatePlayerTextDraw(playerid, 230.043624, 398.416717, "Loading Objects...");
  11357. PlayerTextDrawLetterSize(playerid, LoadingObjects5[playerid], 0.449999, 1.600000);
  11358. PlayerTextDrawAlignment(playerid, LoadingObjects5[playerid], 1);
  11359. PlayerTextDrawColor(playerid, LoadingObjects5[playerid], 255);
  11360. PlayerTextDrawSetShadow(playerid, LoadingObjects5[playerid], 0);
  11361. PlayerTextDrawSetOutline(playerid, LoadingObjects5[playerid], 1);
  11362. PlayerTextDrawBackgroundColor(playerid, LoadingObjects5[playerid], 51);
  11363. PlayerTextDrawFont(playerid, LoadingObjects5[playerid], 2);
  11364. PlayerTextDrawSetProportional(playerid, LoadingObjects5[playerid], 1);
  11365. _crTextTarget[playerid] = CreatePlayerTextDraw(playerid, 320.000000, 388.000000, "Target Vehicle: ~r~N/A");
  11366. PlayerTextDrawAlignment(playerid, _crTextTarget[playerid], 2);
  11367. PlayerTextDrawBackgroundColor(playerid, _crTextTarget[playerid], 255);
  11368. PlayerTextDrawFont(playerid, _crTextTarget[playerid], 1);
  11369. PlayerTextDrawLetterSize(playerid, _crTextTarget[playerid], 0.500000, 1.600000);
  11370. PlayerTextDrawColor(playerid, _crTextTarget[playerid], -1);
  11371. PlayerTextDrawSetOutline(playerid, _crTextTarget[playerid], 1);
  11372. PlayerTextDrawSetProportional(playerid, _crTextTarget[playerid], 1);
  11373. _crTextSpeed[playerid] = CreatePlayerTextDraw(playerid, 190.000000, 410.000000, "Speed: ~r~N/A");
  11374. PlayerTextDrawAlignment(playerid, _crTextSpeed[playerid], 1);
  11375. PlayerTextDrawBackgroundColor(playerid, _crTextSpeed[playerid], 255);
  11376. PlayerTextDrawFont(playerid, _crTextSpeed[playerid], 1);
  11377. PlayerTextDrawLetterSize(playerid, _crTextSpeed[playerid], 0.500000, 1.600000);
  11378. PlayerTextDrawColor(playerid, _crTextSpeed[playerid], -1);
  11379. PlayerTextDrawSetOutline(playerid, _crTextSpeed[playerid], 1);
  11380. PlayerTextDrawSetProportional(playerid, _crTextSpeed[playerid], 1);
  11381. _crTickets[playerid] = CreatePlayerTextDraw(playerid, 340.000000, 410.000000, "Tickets: ~r~N/A");
  11382. PlayerTextDrawAlignment(playerid, _crTickets[playerid], 1);
  11383. PlayerTextDrawBackgroundColor(playerid, _crTickets[playerid], 255);
  11384. PlayerTextDrawFont(playerid, _crTickets[playerid], 1);
  11385. PlayerTextDrawLetterSize(playerid, _crTickets[playerid], 0.500000, 1.600000);
  11386. PlayerTextDrawColor(playerid, _crTickets[playerid], -1);
  11387. PlayerTextDrawSetOutline(playerid, _crTickets[playerid], 1);
  11388. PlayerTextDrawSetProportional(playerid, _crTickets[playerid], 1);
  11389. //-------------------------------------------------------------------------//
  11390. TuningBuy[ playerid ][ 0 ] = CreatePlayerTextDraw(playerid, 425.125000, 338.666687, "usebox");
  11391. PlayerTextDrawLetterSize(playerid, TuningBuy[ playerid ][ 0 ], 0.000000, 8.627778);
  11392. PlayerTextDrawTextSize(playerid, TuningBuy[ playerid ][ 0 ], 216.125000, 0.000000);
  11393. PlayerTextDrawAlignment(playerid, TuningBuy[ playerid ][ 0 ], 1);
  11394. PlayerTextDrawColor(playerid, TuningBuy[ playerid ][ 0 ], 0);
  11395. PlayerTextDrawUseBox(playerid, TuningBuy[ playerid ][ 0 ], true);
  11396. PlayerTextDrawBoxColor(playerid, TuningBuy[ playerid ][ 0 ], 102);
  11397. PlayerTextDrawSetShadow(playerid, TuningBuy[ playerid ][ 0 ], 0);
  11398. PlayerTextDrawSetOutline(playerid, TuningBuy[ playerid ][ 0 ], 0);
  11399. PlayerTextDrawFont(playerid, TuningBuy[ playerid ][ 0 ], 0);
  11400. TuningBuy[ playerid ][ 1 ] = CreatePlayerTextDraw(playerid, 319.375000, 337.749847, "Hydraulics");
  11401. PlayerTextDrawLetterSize(playerid, TuningBuy[ playerid ][ 1 ], 0.386249, 1.156664);
  11402. PlayerTextDrawAlignment(playerid, TuningBuy[ playerid ][ 1 ], 2);
  11403. PlayerTextDrawColor(playerid, TuningBuy[ playerid ][ 1 ], -1);
  11404. PlayerTextDrawSetShadow(playerid, TuningBuy[ playerid ][ 1 ], 0);
  11405. PlayerTextDrawSetOutline(playerid, TuningBuy[ playerid ][ 1 ], 1);
  11406. PlayerTextDrawBackgroundColor(playerid, TuningBuy[ playerid ][ 1 ], 51 );
  11407. PlayerTextDrawFont(playerid, TuningBuy[ playerid ][ 1 ], 2);
  11408. PlayerTextDrawSetProportional(playerid, TuningBuy[ playerid ][ 1 ], 1 );
  11409. PlayerTextDrawSetSelectable(playerid, TuningBuy[ playerid ][ 1 ], false );
  11410. TuningBuy[ playerid ][ 2 ] = CreatePlayerTextDraw(playerid, 198.375000, 361.583282, "-");
  11411. PlayerTextDrawLetterSize(playerid, TuningBuy[ playerid ][ 2 ], 18.981874, 0.514999);
  11412. PlayerTextDrawAlignment(playerid, TuningBuy[ playerid ][ 2 ], 1);
  11413. PlayerTextDrawColor(playerid, TuningBuy[ playerid ][ 2 ], -10092289);
  11414. PlayerTextDrawSetShadow(playerid, TuningBuy[ playerid ][ 2 ], 0);
  11415. PlayerTextDrawSetOutline(playerid, TuningBuy[ playerid ][ 2 ], 1);
  11416. PlayerTextDrawBackgroundColor(playerid, TuningBuy[ playerid ][ 2 ], 51);
  11417. PlayerTextDrawFont(playerid, TuningBuy[ playerid ][ 2 ], 2);
  11418. PlayerTextDrawSetProportional(playerid, TuningBuy[ playerid ][ 2 ], 1);
  11419. TuningBuy[ playerid ][ 3 ] = CreatePlayerTextDraw(playerid, 222.500000, 352.916656, "Left `Chrome Flames` Sideskirt");
  11420. PlayerTextDrawLetterSize(playerid, TuningBuy[ playerid ][ 3 ], 0.244999, 1.092499);
  11421. PlayerTextDrawAlignment(playerid, TuningBuy[ playerid ][ 3 ], 1);
  11422. PlayerTextDrawColor(playerid, TuningBuy[ playerid ][ 3 ], -1);
  11423. PlayerTextDrawSetShadow(playerid, TuningBuy[ playerid ][ 3 ], 0);
  11424. PlayerTextDrawSetOutline(playerid, TuningBuy[ playerid ][ 3 ], 1);
  11425. PlayerTextDrawBackgroundColor(playerid, TuningBuy[ playerid ][ 3 ], 51);
  11426. PlayerTextDrawFont(playerid, TuningBuy[ playerid ][ 3 ], 2);
  11427. PlayerTextDrawSetProportional(playerid, TuningBuy[ playerid ][ 3 ], 1);
  11428. TuningBuy[ playerid ][ 4 ] = CreatePlayerTextDraw(playerid, 222.500000, 365.000000, "price: ~w~10000$");
  11429. PlayerTextDrawLetterSize(playerid, TuningBuy[ playerid ][ 4 ], 0.244999, 1.092499);
  11430. PlayerTextDrawAlignment(playerid, TuningBuy[ playerid ][ 4 ], 1);
  11431. PlayerTextDrawColor(playerid, TuningBuy[ playerid ][ 4 ], -1);
  11432. PlayerTextDrawSetShadow(playerid, TuningBuy[ playerid ][ 4 ], 0);
  11433. PlayerTextDrawSetOutline(playerid, TuningBuy[ playerid ][ 4 ], 1);
  11434. PlayerTextDrawBackgroundColor(playerid, TuningBuy[ playerid ][ 4 ], 51);
  11435. PlayerTextDrawFont(playerid, TuningBuy[ playerid ][ 4 ], 2);
  11436. PlayerTextDrawSetProportional(playerid, TuningBuy[ playerid ][ 4 ], 1);
  11437. TuningBuy[ playerid ][ 5 ] = CreatePlayerTextDraw(playerid, 215.125000, 372.999877, "-");
  11438. PlayerTextDrawLetterSize(playerid, TuningBuy[ playerid ][ 5 ], 6.743125, 0.444999);
  11439. PlayerTextDrawAlignment(playerid, TuningBuy[ playerid ][ 5 ], 1);
  11440. PlayerTextDrawColor(playerid, TuningBuy[ playerid ][ 5 ], -10092289);
  11441. PlayerTextDrawSetShadow(playerid, TuningBuy[ playerid ][ 5 ], 0);
  11442. PlayerTextDrawSetOutline(playerid, TuningBuy[ playerid ][ 5 ], 1);
  11443. PlayerTextDrawBackgroundColor(playerid, TuningBuy[ playerid ][ 5 ], 51);
  11444. PlayerTextDrawFont(playerid, TuningBuy[ playerid ][ 5 ], 2);
  11445. PlayerTextDrawSetProportional(playerid, TuningBuy[ playerid ][ 5 ], 1);
  11446. TuningBuy[ playerid ][ 6 ] = CreatePlayerTextDraw(playerid, 206.750000, 347.166564, "-");
  11447. PlayerTextDrawLetterSize(playerid, TuningBuy[ playerid ][ 6 ], 18.981874, 0.514999);
  11448. PlayerTextDrawAlignment(playerid, TuningBuy[ playerid ][ 6 ], 1);
  11449. PlayerTextDrawColor(playerid, TuningBuy[ playerid ][ 6 ], -10092289);
  11450. PlayerTextDrawSetShadow(playerid, TuningBuy[ playerid ][ 6 ], 0);
  11451. PlayerTextDrawSetOutline(playerid, TuningBuy[ playerid ][ 6 ], 1);
  11452. PlayerTextDrawBackgroundColor(playerid, TuningBuy[ playerid ][ 6 ], 51);
  11453. PlayerTextDrawFont(playerid, TuningBuy[ playerid ][ 6 ], 2);
  11454. PlayerTextDrawSetProportional(playerid, TuningBuy[ playerid ][ 6 ], 1);
  11455. TuningBuy[ playerid ][ 7 ] = CreatePlayerTextDraw(playerid, 385.000000, 381.500000, "ld_beat:right");
  11456. PlayerTextDrawLetterSize(playerid, TuningBuy[ playerid ][ 7 ], 0.449999, 1.600000);
  11457. PlayerTextDrawTextSize(playerid, TuningBuy[ playerid ][ 7 ], 27.500000, 13.416657);
  11458. PlayerTextDrawAlignment(playerid, TuningBuy[ playerid ][ 7 ], 2);
  11459. PlayerTextDrawColor(playerid, TuningBuy[ playerid ][ 7 ], -1);
  11460. PlayerTextDrawUseBox(playerid, TuningBuy[ playerid ][ 7 ], true);
  11461. PlayerTextDrawBoxColor(playerid, TuningBuy[ playerid ][ 7 ], 255);
  11462. PlayerTextDrawSetShadow(playerid, TuningBuy[ playerid ][ 7 ], 0);
  11463. PlayerTextDrawSetOutline(playerid, TuningBuy[ playerid ][ 7 ], 1);
  11464. PlayerTextDrawBackgroundColor(playerid, TuningBuy[ playerid ][ 7 ], 51);
  11465. PlayerTextDrawFont(playerid, TuningBuy[ playerid ][ 7 ], 4);
  11466. PlayerTextDrawSetProportional(playerid, TuningBuy[ playerid ][ 7 ], 1);
  11467. PlayerTextDrawSetSelectable(playerid, TuningBuy[ playerid ][ 7 ], true);
  11468. TuningBuy[ playerid ][ 8 ] = CreatePlayerTextDraw(playerid, 230.375000, 381.916473, "ld_beat:left");
  11469. PlayerTextDrawLetterSize(playerid, TuningBuy[ playerid ][ 8 ], 0.449999, 1.600000);
  11470. PlayerTextDrawTextSize(playerid, TuningBuy[ playerid ][ 8 ], 27.500000, 13.416657);
  11471. PlayerTextDrawAlignment(playerid, TuningBuy[ playerid ][ 8 ], 2);
  11472. PlayerTextDrawColor(playerid, TuningBuy[ playerid ][ 8 ], -1);
  11473. PlayerTextDrawUseBox(playerid, TuningBuy[ playerid ][ 8 ], true);
  11474. PlayerTextDrawBoxColor(playerid, TuningBuy[ playerid ][ 8 ], 255);
  11475. PlayerTextDrawSetShadow(playerid, TuningBuy[ playerid ][ 8 ], 0);
  11476. PlayerTextDrawSetOutline(playerid, TuningBuy[ playerid ][ 8 ], 1);
  11477. PlayerTextDrawBackgroundColor(playerid, TuningBuy[ playerid ][ 8 ], 51);
  11478. PlayerTextDrawFont(playerid, TuningBuy[ playerid ][ 8 ], 4);
  11479. PlayerTextDrawSetProportional(playerid, TuningBuy[ playerid ][ 8 ], 1);
  11480. PlayerTextDrawSetSelectable(playerid, TuningBuy[ playerid ][ 8 ], true);
  11481. TuningBuy[ playerid ][ 9 ] = CreatePlayerTextDraw(playerid, 320.000000, 381.499938, "BUY");
  11482. PlayerTextDrawTextSize(playerid, TuningBuy[ playerid ][ 9 ], 23.000000, 13.000000 );
  11483. PlayerTextDrawLetterSize(playerid, TuningBuy[ playerid ][ 9 ], 0.421249, 1.360832 );
  11484. PlayerTextDrawAlignment(playerid, TuningBuy[ playerid ][ 9 ], 2);
  11485. PlayerTextDrawColor(playerid, TuningBuy[ playerid ][ 9 ], -1);
  11486. PlayerTextDrawSetShadow(playerid, TuningBuy[ playerid ][ 9 ], 0);
  11487. PlayerTextDrawSetOutline(playerid, TuningBuy[ playerid ][ 9 ], 1);
  11488. PlayerTextDrawBackgroundColor(playerid, TuningBuy[ playerid ][ 9 ], 51);
  11489. PlayerTextDrawFont(playerid, TuningBuy[ playerid ][ 9 ], 2);
  11490. PlayerTextDrawSetProportional(playerid, TuningBuy[ playerid ][ 9 ], 1);
  11491. PlayerTextDrawSetSelectable(playerid, TuningBuy[ playerid ][ 9 ], true);
  11492. TuningBuy[ playerid ][ 10 ] = CreatePlayerTextDraw(playerid, 200.000000, 396.416656, "-");
  11493. PlayerTextDrawLetterSize(playerid, TuningBuy[ playerid ][ 10 ], 18.981874, 0.514999);
  11494. PlayerTextDrawAlignment(playerid, TuningBuy[ playerid ][ 10 ], 1);
  11495. PlayerTextDrawColor(playerid, TuningBuy[ playerid ][ 10 ], -10092289);
  11496. PlayerTextDrawSetShadow(playerid, TuningBuy[ playerid ][ 10 ], 0);
  11497. PlayerTextDrawSetOutline(playerid, TuningBuy[ playerid ][ 10 ], 1);
  11498. PlayerTextDrawBackgroundColor(playerid, TuningBuy[ playerid ][ 10 ], 51);
  11499. PlayerTextDrawFont(playerid, TuningBuy[ playerid ][ 10 ], 2);
  11500. PlayerTextDrawSetProportional(playerid, TuningBuy[ playerid ][ 10 ], 1);
  11501. TuningBuy[ playerid ][ 11 ] = CreatePlayerTextDraw(playerid, 225.000000, 401.916595, "Advanced tuning system");
  11502. PlayerTextDrawLetterSize(playerid, TuningBuy[ playerid ][ 11 ], 0.258749, 0.987497);
  11503. PlayerTextDrawAlignment(playerid, TuningBuy[ playerid ][ 11 ], 1);
  11504. PlayerTextDrawColor(playerid, TuningBuy[ playerid ][ 11 ], -1);
  11505. PlayerTextDrawSetShadow(playerid, TuningBuy[ playerid ][ 11 ], 0);
  11506. PlayerTextDrawSetOutline(playerid, TuningBuy[ playerid ][ 11 ], 1);
  11507. PlayerTextDrawBackgroundColor(playerid, TuningBuy[ playerid ][ 11 ], 51);
  11508. PlayerTextDrawFont(playerid, TuningBuy[ playerid ][ 11 ], 2);
  11509. PlayerTextDrawSetProportional(playerid, TuningBuy[ playerid ][ 11 ], 1);
  11510. TuningBuy[ playerid ][ 12 ] = CreatePlayerTextDraw(playerid, 203.500000, 411.416839, "-");
  11511. PlayerTextDrawLetterSize(playerid, TuningBuy[ playerid ][ 12 ], 18.981874, 0.514998);
  11512. PlayerTextDrawAlignment(playerid, TuningBuy[ playerid ][ 12 ], 1);
  11513. PlayerTextDrawColor(playerid, TuningBuy[ playerid ][ 12 ], -10092289);
  11514. PlayerTextDrawSetShadow(playerid, TuningBuy[ playerid ][ 12 ], 0);
  11515. PlayerTextDrawSetOutline(playerid, TuningBuy[ playerid ][ 12 ], 1);
  11516. PlayerTextDrawBackgroundColor(playerid, TuningBuy[ playerid ][ 12 ], 51);
  11517. PlayerTextDrawFont(playerid, TuningBuy[ playerid ][ 12 ], 2);
  11518. PlayerTextDrawSetProportional(playerid, TuningBuy[ playerid ][ 12 ], 1);
  11519. TuningBuy[ playerid ][ 13 ] = CreatePlayerTextDraw(playerid, 404.500000, 337.999877, "ld_beat:cross");
  11520. PlayerTextDrawLetterSize(playerid, TuningBuy[ playerid ][ 13 ], 0.449999, 1.600000);
  11521. PlayerTextDrawTextSize(playerid, TuningBuy[ playerid ][ 13 ], 17.500000, 8.749991);
  11522. PlayerTextDrawAlignment(playerid, TuningBuy[ playerid ][ 13 ], 2);
  11523. PlayerTextDrawColor(playerid, TuningBuy[ playerid ][ 13 ], -1);
  11524. PlayerTextDrawUseBox(playerid, TuningBuy[ playerid ][ 13 ], true);
  11525. PlayerTextDrawBoxColor(playerid, TuningBuy[ playerid ][ 13 ], 255);
  11526. PlayerTextDrawSetShadow(playerid, TuningBuy[ playerid ][ 13 ], 0);
  11527. PlayerTextDrawSetOutline(playerid, TuningBuy[ playerid ][ 13 ], 1);
  11528. PlayerTextDrawBackgroundColor(playerid, TuningBuy[ playerid ][ 13 ], 51);
  11529. PlayerTextDrawFont(playerid, TuningBuy[ playerid ][ 13 ], 4);
  11530. PlayerTextDrawSetProportional(playerid, TuningBuy[ playerid ][ 13 ], 1);
  11531. PlayerTextDrawSetSelectable(playerid, TuningBuy[ playerid ][ 13 ], true);
  11532. return 1;
  11533. }
  11534. stock IsComponentidCompatible( modelid, componentid ) {
  11535. if( componentid == 1025 || componentid == 1073 || componentid == 1074 || componentid == 1075 || componentid == 1076 ||
  11536. componentid == 1077 || componentid == 1078 || componentid == 1079 || componentid == 1080 || componentid == 1081 ||
  11537. componentid == 1082 || componentid == 1083 || componentid == 1084 || componentid == 1085 || componentid == 1096 ||
  11538. componentid == 1097 || componentid == 1098 || componentid == 1087 || componentid == 1086 ) {
  11539. return componentid;
  11540. }
  11541. switch( modelid ) {
  11542. case 400: if( componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1013 || componentid == 1024 || componentid == 1008 || componentid == 1009 || componentid == 1010 ) return componentid;
  11543. case 401: if( componentid == 1005 || componentid == 1004 || componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 114 || componentid == 1020 || componentid == 1019 || componentid == 1013 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1003 || componentid == 1017 || componentid == 1007) return componentid;
  11544. case 402: if( componentid == 1009 || componentid == 1009 || componentid == 1010 ) return componentid;
  11545. case 404: if( componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1013 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1002 || componentid == 1016 || componentid == 1000 || componentid == 1017 || componentid == 1007) return componentid;
  11546. case 405: if( componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1001 || componentid == 1014 || componentid == 1023 || componentid == 1000) return componentid;
  11547. case 409: if( componentid == 1009 ) return componentid;
  11548. case 410: if( componentid == 1019 || componentid == 1021 || componentid == 1020 || componentid == 1013 || componentid == 1024 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1001 || componentid == 1023 || componentid == 1003 || componentid == 1017 || componentid == 1007) return componentid;
  11549. case 411: if( componentid == 1008 || componentid == 1009 || componentid == 1010) return componentid;
  11550. case 412: if( componentid == 1008 || componentid == 1009 || componentid == 1010) return componentid;
  11551. case 415: if( componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1001 || componentid == 1023 || componentid == 1003 || componentid == 1017 || componentid == 1007) return componentid;
  11552. case 418: if( componentid == 1020 || componentid == 1021 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1002 || componentid == 1016) return componentid;
  11553. case 419: if( componentid == 1008 || componentid == 1009 || componentid == 1010) return componentid;
  11554. case 420: if( componentid == 1005 || componentid == 1004 || componentid == 1021 || componentid == 1019 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1001 || componentid == 1003) return componentid;
  11555. case 421: if( componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1014 || componentid == 1023 || componentid == 1016 || componentid == 1000) return componentid;
  11556. case 422: if( componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1013 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1017 || componentid == 1007) return componentid;
  11557. case 426: if( componentid == 1005 || componentid == 1004 || componentid == 1021 || componentid == 1019 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1003) return componentid;
  11558. case 429: if( componentid == 1008 || componentid == 1009 || componentid == 1010) return componentid;
  11559. case 436: if( componentid == 1020 || componentid == 1021 || componentid == 1022 || componentid == 1019 || componentid == 1013 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1003 || componentid == 1017 || componentid == 1007) return componentid;
  11560. case 438: if( componentid == 1008 || componentid == 1009 || componentid == 1010) return componentid;
  11561. case 439: if( componentid == 1003 || componentid == 1023 || componentid == 1001 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1017 || componentid == 1007 || componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1013) return componentid;
  11562. case 442: if( componentid == 1008 || componentid == 1009 || componentid == 1010) return componentid;
  11563. case 445: if( componentid == 1008 || componentid == 1009 || componentid == 1010) return componentid;
  11564. case 451: if( componentid == 1008 || componentid == 1009 || componentid == 1010) return componentid;
  11565. case 458: if( componentid == 1008 || componentid == 1009 || componentid == 1010) return componentid;
  11566. case 466: if( componentid == 1008 || componentid == 1009 || componentid == 1010) return componentid;
  11567. case 467: if( componentid == 1008 || componentid == 1009 || componentid == 1010) return componentid;
  11568. case 474: if( componentid == 1008 || componentid == 1009 || componentid == 1010) return componentid;
  11569. case 475: if( componentid == 1008 || componentid == 1009 || componentid == 1010) return componentid;
  11570. case 477: if( componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1017 || componentid == 1007) return componentid;
  11571. case 478: if( componentid == 1005 || componentid == 1004 || componentid == 1012 || componentid == 1020 || componentid == 1021 || componentid == 1022 || componentid == 1013 || componentid == 1024 || componentid == 1008 || componentid == 1009 || componentid == 1010) return componentid;
  11572. case 479: if( componentid == 1008 || componentid == 1009 || componentid == 1010) return componentid;
  11573. case 480: if( componentid == 1008 || componentid == 1009 || componentid == 1010) return componentid;
  11574. case 489: if( componentid == 1005 || componentid == 1004 || componentid == 1020 || componentid == 1019 || componentid == 1018 || componentid == 1013 || componentid == 1024 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1002 || componentid == 1016 || componentid == 1000) return componentid;
  11575. case 491: if( componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1014 || componentid == 1023 || componentid == 1003 || componentid == 1017 || componentid == 1007) return componentid;
  11576. case 492: if( componentid == 1005 || componentid == 1004 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1016 || componentid == 1000) return componentid;
  11577. case 496: if( componentid == 1006 || componentid == 1017 || componentid == 1007 || componentid == 1011 || componentid == 1019 || componentid == 1023 || componentid == 1001 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1003 || componentid == 1002 || componentid == 1142 || componentid == 1143 || componentid == 1020) return componentid;
  11578. case 500: if( componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1013 || componentid == 1024 || componentid == 1008 || componentid == 1009 || componentid == 1010) return componentid;
  11579. case 506: if( componentid == 1009) return componentid;
  11580. case 507: if( componentid == 1008 || componentid == 1009 || componentid == 1010) return componentid;
  11581. case 516: if( componentid == 1004 || componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1002 || componentid == 1015 || componentid == 1016 || componentid == 1000 || componentid == 1017 || componentid == 1007) return componentid;
  11582. case 517: if( componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1002 || componentid == 1023 || componentid == 1016 || componentid == 1003 || componentid == 1017 || componentid == 1007) return componentid;
  11583. case 518: if( componentid == 1005 || componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1018 || componentid == 1013 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1023 || componentid == 1003 || componentid == 1017 || componentid == 1007) return componentid;
  11584. case 526: if( componentid == 1008 || componentid == 1009 || componentid == 1010) return componentid;
  11585. case 527: if( componentid == 1021 || componentid == 1020 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1001 || componentid == 1014 || componentid == 1015 || componentid == 1017 || componentid == 1007) return componentid;
  11586. case 529: if( componentid == 1012 || componentid == 1011 || componentid == 1020 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1023 || componentid == 1003 || componentid == 1017 || componentid == 1007) return componentid;
  11587. case 533: if( componentid == 1008 || componentid == 1009 || componentid == 1010) return componentid;
  11588. case 534: if( componentid == 1126 || componentid == 1127 || componentid == 1179 || componentid == 1185 || componentid == 1100 || componentid == 1123 || componentid == 1125 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1180 || componentid == 1178 || componentid == 1101 || componentid == 1122 || componentid == 1124 || componentid == 1106) return componentid;
  11589. case 535: if( componentid == 1109 || componentid == 1110 || componentid == 1113 || componentid == 1114 || componentid == 1115 || componentid == 1116 || componentid == 1117 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1120 || componentid == 1118 || componentid == 1121 || componentid == 1119) return componentid;
  11590. case 536: if( componentid == 1104 || componentid == 1105 || componentid == 1182 || componentid == 1181 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1184 || componentid == 1183 || componentid == 1128 || componentid == 1103 || componentid == 1107 || componentid == 1108) return componentid;
  11591. case 540: if( componentid == 1004 || componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1019 || componentid == 1018 || componentid == 1024 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1023 || componentid == 1017 || componentid == 1007) return componentid;
  11592. case 541: if( componentid == 1008 || componentid == 1009 || componentid == 1010) return componentid;
  11593. case 542: if( componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1014 || componentid == 1015) return componentid;
  11594. case 545: if( componentid == 1008 || componentid == 1009 || componentid == 1010) return componentid;
  11595. case 546: if( componentid == 1004 || componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1019 || componentid == 1018 || componentid == 1024 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1002 || componentid == 1001 || componentid == 1023 || componentid == 1017 || componentid == 1007) return componentid;
  11596. case 547: if( componentid == 1142 || componentid == 1143 || componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1016 || componentid == 1003 || componentid == 1000) return componentid;
  11597. case 549: if( componentid == 1012 || componentid == 1011 || componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1001 || componentid == 1023 || componentid == 1003 || componentid == 1017 || componentid == 1007) return componentid;
  11598. case 550: if( componentid == 1005 || componentid == 1004 || componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1023 || componentid == 1003) return componentid;
  11599. case 551: if( componentid == 1005 || componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1002 || componentid == 1023 || componentid == 1016 || componentid == 1003) return componentid;
  11600. case 555: if( componentid == 1008 || componentid == 1009 || componentid == 1010) return componentid;
  11601. case 558: if( componentid == 1092 || componentid == 1089 || componentid == 1166 || componentid == 1165 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1168 || componentid == 1167 || componentid == 1088 || componentid == 1091 || componentid == 1164 || componentid == 1163 || componentid == 1094 || componentid == 1090 || componentid == 1095 || componentid == 1093) return componentid;
  11602. case 559: if( componentid == 1065 || componentid == 1066 || componentid == 1160 || componentid == 1173 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1159 || componentid == 1161 || componentid == 1162 || componentid == 1158 || componentid == 1067 || componentid == 1068 || componentid == 1071 || componentid == 1069 || componentid == 1072 || componentid == 1070 || componentid == 1009) return componentid;
  11603. case 560: if( componentid == 1028 || componentid == 1029 || componentid == 1169 || componentid == 1170 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1141 || componentid == 1140 || componentid == 1032 || componentid == 1033 || componentid == 1138 || componentid == 1139 || componentid == 1027 || componentid == 1026 || componentid == 1030 || componentid == 1031) return componentid;
  11604. case 561: if( componentid == 1064 || componentid == 1059 || componentid == 1155 || componentid == 1157 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1154 || componentid == 1156 || componentid == 1055 || componentid == 1061 || componentid == 1058 || componentid == 1060 || componentid == 1062 || componentid == 1056 || componentid == 1063 || componentid == 1057) return componentid;
  11605. case 562: if( componentid == 1034 || componentid == 1037 || componentid == 1171 || componentid == 1172 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1149 || componentid == 1148 || componentid == 1038 || componentid == 1035 || componentid == 1147 || componentid == 1146 || componentid == 1040 || componentid == 1036 || componentid == 1041 || componentid == 1039) return componentid;
  11606. case 565: if( componentid == 1046 || componentid == 1045 || componentid == 1153 || componentid == 1152 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1150 || componentid == 1151 || componentid == 1054 || componentid == 1053 || componentid == 1049 || componentid == 1050 || componentid == 1051 || componentid == 1047 || componentid == 1052 || componentid == 1048) return componentid;
  11607. case 566: if( componentid == 1008 || componentid == 1009 || componentid == 1010) return componentid;
  11608. case 567: if( componentid == 1129 || componentid == 1132 || componentid == 1189 || componentid == 1188 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1187 || componentid == 1186 || componentid == 1130 || componentid == 1131 || componentid == 1102 || componentid == 1133) return componentid;
  11609. case 575: if( componentid == 1044 || componentid == 1043 || componentid == 1174 || componentid == 1175 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1176 || componentid == 1177 || componentid == 1099 || componentid == 1042) return componentid;
  11610. case 576: if( componentid == 1136 || componentid == 1135 || componentid == 1191 || componentid == 1190 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1192 || componentid == 1193 || componentid == 1137 || componentid == 1134) return componentid;
  11611. case 579: if( componentid == 1008 || componentid == 1009 || componentid == 1010) return componentid;
  11612. case 580: if( componentid == 1020 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1023 || componentid == 1017 || componentid == 1007) return componentid;
  11613. case 585: if( componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1019 || componentid == 1018 || componentid == 1013 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1023 || componentid == 1003 || componentid == 1017 || componentid == 1007) return componentid;
  11614. case 587: if( componentid == 1008 || componentid == 1009 || componentid == 1010) return componentid;
  11615. case 589: if( componentid == 1005 || componentid == 1004 || componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1024 || componentid == 1013 || componentid == 1006 || componentid == 1016 || componentid == 1000 || componentid == 1017 || componentid == 1007) return componentid;
  11616. case 600: if( componentid == 1005 || componentid == 1004 || componentid == 1020 || componentid == 1022 || componentid == 1018 || componentid == 1013 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1017 || componentid == 1007) return componentid;
  11617. case 602: if( componentid == 1008 || componentid == 1009 || componentid == 1010) return componentid;
  11618. case 603: if( componentid == 1144 || componentid == 1145 || componentid == 1142 || componentid == 1143 || componentid == 1020 || componentid == 1019 || componentid == 1018 || componentid == 1024 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1023 || componentid == 1017 || componentid == 1007) return componentid;
  11619. }
  11620. return false;
  11621. }
  11622. stock GetVehicleCameraPos( vehicleid, &Float:x, &Float:y, &Float:z, Float:xoff=0.0, Float:yoff=0.0, Float:zoff=0.0 ) { // credits Pasha
  11623. new Float:rot;
  11624. GetVehicleZAngle( vehicleid, rot );
  11625. rot = 360 - rot;
  11626. GetVehiclePos( vehicleid, x, y, z );
  11627. x = floatsin( rot, degrees ) * yoff + floatcos( rot, degrees ) * xoff + x;
  11628. y = floatcos( rot, degrees ) * yoff - floatsin( rot, degrees ) * xoff + y;
  11629. z = zoff + z;
  11630. }
  11631. IsADickVehicle(carid)
  11632. {
  11633. switch(GetVehicleModel(carid)) {
  11634. case 481, 509, 510: return 1;
  11635. }
  11636. return 0;
  11637. }
  11638. stock IsABike(carid) {
  11639. switch(GetVehicleModel(carid)) {
  11640. case 509, 481, 510: return 1;
  11641. }
  11642. return 0;
  11643. }
  11644. GetPlayerVehicle(playerid, vehicleid)
  11645. {
  11646. #pragma unused playerid
  11647. for(new v = 0; v < MAX_VEHICLES; v++)
  11648. {
  11649. if(VehicleInfo[v][vID] == vehicleid)
  11650. {
  11651. return v;
  11652. }
  11653. }
  11654. return 0;
  11655. }
  11656. stock IsAtImpoundingPoint(playerid)
  11657. {
  11658. if(IsPlayerConnected(playerid))
  11659. {
  11660. for(new x; x < MAX_IMPOUNDPOINTS; x++)
  11661. {
  11662. if(ImpoundPoints[x][impoundPosX] != 0)
  11663. {
  11664. if(IsPlayerInRangeOfPoint(playerid, 4.0, ImpoundPoints[x][impoundPosX], ImpoundPoints[x][impoundPosY], ImpoundPoints[x][impoundPosZ]) && GetPlayerInterior(playerid) == ImpoundPoints[x][impoundInt] && GetPlayerVirtualWorld(playerid) == ImpoundPoints[x][impoundVW]) return 1;
  11665. }
  11666. }
  11667. }
  11668. return 0;
  11669. }
  11670. //new
  11671. // Float:oldVehicleHealth[MAX_VEHICLES], Float:newVehicleHealth[MAX_VEHICLES]; // change MAX_VEHICLES to your own vehicle amount.
  11672. //Float:VehicleHealth(vehicleid)
  11673. //{
  11674. // new
  11675. // Float:health;
  11676. // GetVehicleHealth(vehicleid, health);
  11677. // return health;
  11678. //}
  11679. stock GetPlayerHelmet(playerid)
  11680. {
  11681. switch(PlayerData[playerid][pHelmet])
  11682. {
  11683. case 1: return 18645; //MotorcycleHelmet
  11684. case 2: return 18976; //MotorcycleHelmet2
  11685. case 3: return 18977; //MotorcycleHelmet3
  11686. case 4: return 18978; //MotorcycleHelmet4
  11687. case 5: return 18979; //MotorcycleHelmet5
  11688. }
  11689. return true;
  11690. }
  11691. stock IsanewBike(carid) {
  11692. switch(GetVehicleModel(carid)) {
  11693. case 509, 481, 510, 462, 448, 581, 522, 461, 521, 523, 463, 586, 468, 471: return 1;
  11694. }
  11695. return 0;
  11696. }
  11697. stock Create3DandP( text[], Float:vXU, Float:vYU, Float:vZU, vInt, vVW, pickupid, Float:radius ) {
  11698. CreateDynamic3DTextLabel(text, COLOR_AQUA, vXU, vYU, vZU, radius, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, vVW, vInt, -1, 20.0);
  11699. CreateDynamicPickup(pickupid, 1, vXU, vYU, vZU, vVW, vInt);
  11700. }
  11701. stock IsPlayerInRangeOfVehicle(playerid, vehicleid, Float:Range)
  11702. {
  11703. new Float:Pos[3];
  11704. GetVehiclePos(vehicleid, Pos[0], Pos[1], Pos[2]);
  11705. return IsPlayerInRangeOfPoint(playerid, Range, Pos[0], Pos[1], Pos[2]);
  11706. }
  11707. stock Float:GetPlayerSpeed(playerid)
  11708. {
  11709. static Float:velocity[3];
  11710. if (IsPlayerInAnyVehicle(playerid))
  11711. GetVehicleVelocity(GetPlayerVehicleID(playerid), velocity[0], velocity[1], velocity[2]);
  11712. else
  11713. GetPlayerVelocity(GetPlayerVehicleID(playerid), velocity[0], velocity[1], velocity[2]);
  11714. return floatsqroot((velocity[0] * velocity[0]) + (velocity[1] * velocity[1]) + (velocity[2] * velocity[2])) * 100.0;
  11715. }
  11716. stock IsACruiser(vehicleid)
  11717. {
  11718. switch (GetVehicleModel(vehicleid)) {
  11719. case 523, 427, 490, 528, 596..599, 601: return 1;
  11720. }
  11721. return 0;
  11722. }
  11723. stock PlayerName(playerid)
  11724. {
  11725. new name[MAX_PLAYER_NAME];
  11726. GetPlayerName(playerid, name, sizeof(name));
  11727. return name;
  11728. }
  11729. ClearChatbox(playerid)
  11730. {
  11731. for(new i = 0; i < 50; i++)
  11732. {
  11733. SendClientMessage(playerid, COLOR_WHITE, "");
  11734. }
  11735. return 1;
  11736. }
  11737. stock GetWeaponSlot(weaponid)
  11738. {
  11739. switch( weaponid )
  11740. {
  11741. case 0, 1:
  11742. {
  11743. return 0;
  11744. }
  11745. case 2, 3, 4, 5, 6, 7, 8, 9:
  11746. {
  11747. return 1;
  11748. }
  11749. case 22, 23, 24:
  11750. {
  11751. return 2;
  11752. }
  11753. case 25, 26, 27:
  11754. {
  11755. return 3;
  11756. }
  11757. case 28, 29, 32:
  11758. {
  11759. return 4;
  11760. }
  11761. case 30, 31:
  11762. {
  11763. return 5;
  11764. }
  11765. case 33, 34:
  11766. {
  11767. return 6;
  11768. }
  11769. case 35, 36, 37, 38:
  11770. {
  11771. return 7;
  11772. }
  11773. case 16, 17, 18, 39, 40:
  11774. {
  11775. return 8;
  11776. }
  11777. case 41, 42, 43:
  11778. {
  11779. return 9;
  11780. }
  11781. case 10, 11, 12, 13, 14, 15:
  11782. {
  11783. return 10;
  11784. }
  11785. case 44, 45, 46:
  11786. {
  11787. return 11;
  11788. }
  11789. }
  11790. return -1;
  11791. }
  11792. autoWeather()
  11793. {
  11794. SetWeather(nextWeather);
  11795. switch(random(21))
  11796. {
  11797. case 0: nextWeather = 0;
  11798. case 1: nextWeather = 1;
  11799. case 2: nextWeather = 2;
  11800. case 3: nextWeather = 3;
  11801. case 4: nextWeather = 4;
  11802. case 5: nextWeather = 5;
  11803. case 6: nextWeather = 6;
  11804. case 7: nextWeather = 7;
  11805. case 8: nextWeather = 8;
  11806. case 9: nextWeather = 9;
  11807. case 10: nextWeather = 10;
  11808. case 11: nextWeather = 11;
  11809. case 12: nextWeather = 12;
  11810. case 13: nextWeather = 13;
  11811. case 14: nextWeather = 14;
  11812. case 15: nextWeather = 15;
  11813. case 16: nextWeather = 16;
  11814. case 17: nextWeather = 17;
  11815. case 18: nextWeather = 18;
  11816. case 19: nextWeather = 19;
  11817. case 20: nextWeather = 20;
  11818. }
  11819. }
  11820. stock IsAMotorBike(carid)
  11821. {
  11822. switch(GetVehicleModel(carid)) {
  11823. case 509, 510, 462, 448, 581, 522, 461, 521, 523, 463, 586, 468, 471: return 1;
  11824. }
  11825. return 0;
  11826. }
  11827. stock GetTurfOwnerNameTextDraw(id)
  11828. {
  11829. new turfname[128], name[32];
  11830. if(TurfInfo[id][tCapturedGang] >= 0)
  11831. {
  11832. strcpy(name, GangInfo[TurfInfo[id][tCapturedGang]][gName]);
  11833. }
  11834. format(turfname, sizeof(turfname), "%s", name);
  11835. return turfname;
  11836. }
  11837. stock IsValidColorCode(clr[])
  11838. {
  11839. if (IsNumeric(clr)) {
  11840. return -1;
  11841. }
  11842. if(strcmp(clr, "black", true)==0) return 0;
  11843. else if(strcmp(clr, "white", true)==0) return 1;
  11844. else if(strcmp(clr, "blue", true)==0) return 2;
  11845. else if(strcmp(clr, "red", true)==0) return 3;
  11846. else if(strcmp(clr, "green", true)==0) return 16;
  11847. else if(strcmp(clr, "purple", true)==0) return 5;
  11848. else if(strcmp(clr, "yellow", true)==0) return 6;
  11849. else if(strcmp(clr, "lightblue", true)==0) return 7;
  11850. else if(strcmp(clr, "navy", true)==0) return 94;
  11851. else if(strcmp(clr, "beige", true)==0) return 102;
  11852. else if(strcmp(clr, "darkgreen", true)==0) return 51;
  11853. else if(strcmp(clr, "darkblue", true)==0) return 103;
  11854. else if(strcmp(clr, "darkgrey", true)==0) return 13;
  11855. else if(strcmp(clr, "gold", true)==0) return 99;
  11856. else if(strcmp(clr, "brown", true)==0 || strcmp(clr, "dennell", true)==0) return 55;
  11857. else if(strcmp(clr, "darkbrown", true)==0) return 84;
  11858. else if(strcmp(clr, "darkred", true)==0) return 74;
  11859. else if(strcmp(clr, "maroon", true)==0) return 115;
  11860. else if(strcmp(clr, "pink", true)==0) return 126;
  11861. return -1;
  11862. }
  11863. forward GetColorCode(clr[]);
  11864. public GetColorCode(clr[])
  11865. {
  11866. new color = -1;
  11867. if (IsNumeric(clr)) {
  11868. color = strval(clr);
  11869. return color;
  11870. }
  11871. if(strcmp(clr, "black", true)==0) color=0;
  11872. if(strcmp(clr, "white", true)==0) color=1;
  11873. if(strcmp(clr, "blue", true)==0) color=2;
  11874. if(strcmp(clr, "red", true)==0) color=3;
  11875. if(strcmp(clr, "green", true)==0) color=16;
  11876. if(strcmp(clr, "purple", true)==0) color=5;
  11877. if(strcmp(clr, "yellow", true)==0) color=6;
  11878. if(strcmp(clr, "lightblue", true)==0) color=7;
  11879. if(strcmp(clr, "navy", true)==0) color=94;
  11880. if(strcmp(clr, "beige", true)==0) color=102;
  11881. if(strcmp(clr, "darkgreen", true)==0) color=51;
  11882. if(strcmp(clr, "darkblue", true)==0) color=103;
  11883. if(strcmp(clr, "darkgrey", true)==0) color=13;
  11884. if(strcmp(clr, "gold", true)==0) color=99;
  11885. if(strcmp(clr, "brown", true)==0 || strcmp(clr, "dennell", true)==0) color=55;
  11886. if(strcmp(clr, "darkbrown", true)==0) color=84;
  11887. if(strcmp(clr, "darkred", true)==0) color=74;
  11888. if(strcmp(clr, "maroon", true)==0) color=115;
  11889. if(strcmp(clr, "pink", true)==0) color=126;
  11890. return color;
  11891. }
  11892. stock GangTag_IntColor(color)
  11893. {
  11894. if(color == 0) return color;
  11895. new rgba = 0xFF + (color * 256);
  11896. return rgba >>> 8 | rgba << 24;
  11897. }
  11898. stock Booth_GetPlayer(id)
  11899. {
  11900. foreach (new i : Player) if (PlayerData[i][pRangeBooth] == id) {
  11901. return i;
  11902. }
  11903. return INVALID_PLAYER_ID;
  11904. }
  11905. stock Booth_Leave(playerid)
  11906. {
  11907. if (PlayerData[playerid][pRangeBooth] != -1)
  11908. {
  11909. if (IsValidObject(g_BoothObject[PlayerData[playerid][pRangeBooth]])) {
  11910. DestroyObject(g_BoothObject[PlayerData[playerid][pRangeBooth]]);
  11911. g_BoothObject[PlayerData[playerid][pRangeBooth]] = -1;
  11912. }
  11913. ResetPlayerWeapons(playerid);
  11914. SetPlayerWeapons(playerid);
  11915. g_BoothUsed[PlayerData[playerid][pRangeBooth]] = false;
  11916. // PlayerTextDrawHide(playerid, PlayerData[playerid][pTextdraws][81]);
  11917. PlayerData[playerid][pRangeBooth] = -1;
  11918. PlayerData[playerid][pTargets] = 0;
  11919. PlayerData[playerid][pTargetLevel] = 0;
  11920. }
  11921. return 1;
  11922. }
  11923. stock Booth_Refresh(playerid)
  11924. {
  11925. new id = PlayerData[playerid][pRangeBooth];
  11926. if (id == -1)
  11927. return 0;
  11928. if (IsValidObject(g_BoothObject[id])) {
  11929. DestroyObject(g_BoothObject[id]);
  11930. }
  11931. g_BoothObject[id] = CreateObject(1583, arrBoothPositions[id][0] - 15.0, arrBoothPositions[id][1] + 1.5, arrBoothPositions[id][2], 0.0, 0.0, 90.0);
  11932. return MoveObject(g_BoothObject[id], arrBoothPositions[id][0] - 1.0, arrBoothPositions[id][1] + 1.5, arrBoothPositions[id][2], (!PlayerData[playerid][pTargetLevel]) ? (2.0) : (2.0 + (PlayerData[playerid][pTargetLevel] * 1.2)));
  11933. }
  11934. stock PlayerPlaySoundEx(playerid, sound)
  11935. {
  11936. new
  11937. Float:x,
  11938. Float:y,
  11939. Float:z;
  11940. GetPlayerPos(playerid, x, y, z);
  11941. foreach (new i : Player) if (IsPlayerInRangeOfPoint(i, 20.0, x, y, z)) {
  11942. PlayerPlaySound(i, sound, x, y, z);
  11943. }
  11944. return 1;
  11945. }
  11946. stock GetPlayerNameExt(playerid)
  11947. {
  11948. new name[MAX_PLAYER_NAME];
  11949. GetPlayerName(playerid, name, sizeof(name));
  11950. return name;
  11951. }
  11952. Float:GetDistanceBetweenPlayers(iPlayerOne, iPlayerTwo)
  11953. {
  11954. new
  11955. Float: fPlayerPos[3];
  11956. GetPlayerPos(iPlayerOne, fPlayerPos[0], fPlayerPos[1], fPlayerPos[2]);
  11957. return GetPlayerDistanceFromPoint(iPlayerTwo, fPlayerPos[0], fPlayerPos[1], fPlayerPos[2]);
  11958. }
  11959. stock GetClosestPlayer(p1)
  11960. {
  11961. new Float:dis,Float:dis2,player;
  11962. player = -1;
  11963. dis = 99999.99;
  11964. foreach(new x: Player)
  11965. {
  11966. if(x != p1)
  11967. {
  11968. dis2 = GetDistanceBetweenPlayers(x,p1);
  11969. if(dis2 < dis && dis2 != -1.00)
  11970. {
  11971. dis = dis2;
  11972. player = x;
  11973. }
  11974. }
  11975. }
  11976. return player;
  11977. }
  11978. stock GetPlayerID(name[]) {
  11979. if(!isnull(name)) {
  11980. foreach(new i : Player) {
  11981. if(strmatch(PlayerName(i), name)) {
  11982. return i;
  11983. }
  11984. }
  11985. }
  11986. return -1;
  11987. }
  11988. getTurftype(tid)
  11989. {
  11990. new ret[32], id = TurfInfo[tid][tType];
  11991. switch(id)
  11992. {
  11993. case 0: { ret = "Normal"; }
  11994. case 1: { ret = "Materials"; } // hollowpoimt
  11995. case 2: { ret = "Low class weapons"; }// poisontip
  11996. case 3: { ret = "Medium class weapons"; }// fmj
  11997. case 4: { ret = "High class Weapons"; } // old weps
  11998. case 5: { ret = "Traphouse"; }
  11999. case 6: { ret = "Crackhouse"; }
  12000. case 7: { ret = "Sales tax"; }
  12001. case 8: { ret = "Locked"; }
  12002. }
  12003. return ret;
  12004. }
  12005. stock GetGenderString(gender) {
  12006. new sex[7];
  12007. switch(gender) {
  12008. case 2: sex = "Female";
  12009. default: sex = "Male";
  12010. }
  12011. return sex;
  12012. }
  12013. stock GetWeaponLicStatus(weaponLicStatus) {
  12014. new weapLic[20];
  12015. switch(weaponLicStatus) {
  12016. case 1: weapLic = "Passed";
  12017. case 2: weapLic = "Permanent Passed";
  12018. default: weapLic = "Not Passed";
  12019. }
  12020. return weapLic;
  12021. }
  12022. stock GetNameWithSpace(oldName[]) {
  12023. new name[MAX_PLAYER_NAME];
  12024. format(name, sizeof(name), "%s", oldName);
  12025. for(new i = 0; i < strlen(name); i++) {
  12026. if(name[i] == '_') {
  12027. name[i] = ' ';
  12028. }
  12029. }
  12030. return name;
  12031. }
  12032. stock GetDriveLicStatus(driveLicStatus) {
  12033. new driveLic[15];
  12034. switch(driveLicStatus) {
  12035. case 1: driveLic = "Passed";
  12036. default: driveLic = "Not Passed";
  12037. }
  12038. return driveLic;
  12039. }
  12040. mysql_escaped(const string[])
  12041. {
  12042. new
  12043. retString[300];
  12044. mysql_escape_string(string, retString);
  12045. return retString;
  12046. }
  12047. IsVehicleSpawnSetup(company)
  12048. {
  12049. return (BusinessInfo[company][cVehicle][0] != 0.0 && BusinessInfo[company][cVehicle][1] != 0.0 && BusinessInfo[company][cVehicle][2] != 0.0);
  12050. }
  12051. GetVehicleModelFromName(const string[])
  12052. {
  12053. new
  12054. modelid = strval(string);
  12055. if (400 <= modelid <= 611)
  12056. {
  12057. return modelid;
  12058. }
  12059. else
  12060. {
  12061. for (new i = 0; i < sizeof(vehicleNames); i ++)
  12062. {
  12063. if (strfind(vehicleNames[i], string, true) != -1)
  12064. {
  12065. modelid = i + 400;
  12066. return modelid;
  12067. }
  12068. }
  12069. }
  12070. return 0;
  12071. }
  12072. StopWorkout(playerid)
  12073. {
  12074. if (PlayerData[playerid][pWorkout] != WORKOUT_NONE)
  12075. {
  12076. HidePlayerProgressBar(playerid, PlayerData[playerid][pBars][0]);
  12077. HidePlayerTextDraws(playerid, 58, 62);
  12078. SetCameraBehindPlayer(playerid);
  12079. TogglePlayerControllable(playerid, 1);
  12080. KillTimer(Timers[playerid][tWorkout]);
  12081. switch (PlayerData[playerid][pWorkout])
  12082. {
  12083. case WORKOUT_DUMBELLS:
  12084. {
  12085. PlayerData[playerid][pWeight] = 0;
  12086. PlayerData[playerid][pReps] = 0;
  12087. PlayerPlaySound(playerid, 17807, 0.0, 0.0, 0.0);
  12088. RemovePlayerAttachedObject(playerid, gWeights[playerid][0]);
  12089. RemovePlayerAttachedObject(playerid, gWeights[playerid][1]);
  12090. }
  12091. case WORKOUT_TREADMILL:
  12092. {
  12093. PlayerData[playerid][pSpeedLevel] = 0;
  12094. PlayerData[playerid][pDistanceRan] = 0;
  12095. PlayerPlaySound(playerid, 17808, 0.0, 0.0, 0.0);
  12096. }
  12097. }
  12098. PlayerData[playerid][pWorkout] = WORKOUT_NONE;
  12099. }
  12100. return 1;
  12101. }
  12102. AddFitnessForPlayer(playerid)
  12103. {
  12104. if (PlayerData[playerid][pFitness] < 100)
  12105. {
  12106. PlayerData[playerid][pFitness]++;
  12107. }
  12108. }
  12109. WorkoutUpdate(playerid)
  12110. {
  12111. if (PlayerData[playerid][pWorkout] != WORKOUT_NONE)
  12112. {
  12113. new
  12114. Float:value = GetPlayerProgressBarValue(playerid, PlayerData[playerid][pBars][0]);
  12115. switch (PlayerData[playerid][pWorkout])
  12116. {
  12117. case WORKOUT_DUMBELLS:
  12118. {
  12119. switch (PlayerData[playerid][pWeight])
  12120. {
  12121. case 20..60:
  12122. {
  12123. ApplyAnimation(playerid, "Freeweights", "gym_free_A", 4.1, 0, 0, 0, 0, 0, 1);
  12124. }
  12125. case 70..110:
  12126. {
  12127. ApplyAnimation(playerid, "Freeweights", "gym_free_B", 4.1, 0, 0, 0, 0, 0, 1);
  12128. }
  12129. }
  12130. if (value < 90.0)
  12131. {
  12132. AddPowerToMeter(playerid);
  12133. }
  12134. else
  12135. {
  12136. PlayerData[playerid][pReps]++;
  12137. if (PlayerData[playerid][pFitness] < 100 && (PlayerData[playerid][pReps] % ((120 - PlayerData[playerid][pWeight]) / 5)) == 0)
  12138. {
  12139. AddFitnessForPlayer(playerid);
  12140. }
  12141. SetPlayerProgressBarValue(playerid, PlayerData[playerid][pBars][0], 0.0);
  12142. PlayerTextDrawFormatString(playerid, PlayerData[playerid][pText][60], "%i", PlayerData[playerid][pReps]);
  12143. ApplyAnimation(playerid, "Freeweights", "gym_free_down", 4.1, 0, 0, 0, 0, 0, 1);
  12144. ApplyAnimation(playerid, "Freeweights", "gym_free_down", 4.1, 0, 0, 0, 0, 0, 1);
  12145. if (PlayerData[playerid][pReps] == 50 && !PlayerData[playerid][pGymMembership])
  12146. {
  12147. PlayerData[playerid][pWorkoutTime] = gettime() + 43200;
  12148. StopWorkout(playerid);
  12149. SendInfoMessage(playerid, "You have reached your limit for today!");
  12150. ApplyAnimation(playerid, "Freeweights", "gym_free_putdown", 4.1, 0, 0, 0, 0, 0, 1);
  12151. }
  12152. }
  12153. }
  12154. case WORKOUT_TREADMILL:
  12155. {
  12156. PlayerData[playerid][pDistanceRan] = PlayerData[playerid][pDistanceRan] + 1;
  12157. SetPlayerProgressBarValue(playerid, PlayerData[playerid][pBars][0], value + (PlayerData[playerid][pSpeedLevel] + 12));
  12158. PlayerTextDrawFormatString(playerid, PlayerData[playerid][pText][62], "%i", PlayerData[playerid][pDistanceRan]);
  12159. if (PlayerData[playerid][pFitness] < 100 && (PlayerData[playerid][pDistanceRan] % 100) == 0)
  12160. {
  12161. AddFitnessForPlayer(playerid);
  12162. }
  12163. if (PlayerData[playerid][pDistanceRan] == 200 && !PlayerData[playerid][pGymMembership])
  12164. {
  12165. PlayerData[playerid][pWorkoutTime] = gettime() + 43200;
  12166. StopWorkout(playerid);
  12167. SendInfoMessage(playerid, "You have reached your limit for today!");
  12168. ApplyAnimation(playerid, "GYMNASIUM", "gym_tread_getoff", 4.1, 0, 0, 0, 0, 0, 1);
  12169. }
  12170. }
  12171. }
  12172. }
  12173. return 1;
  12174. }
  12175. AddPowerToMeter(playerid)
  12176. {
  12177. new
  12178. Float:value = GetPlayerProgressBarValue(playerid, PlayerData[playerid][pBars][0]);
  12179. switch (PlayerData[playerid][pWeight])
  12180. {
  12181. case 20: SetPlayerProgressBarValue(playerid, PlayerData[playerid][pBars][0], value + 22.0);
  12182. case 30: SetPlayerProgressBarValue(playerid, PlayerData[playerid][pBars][0], value + 20.5);
  12183. case 40: SetPlayerProgressBarValue(playerid, PlayerData[playerid][pBars][0], value + 19.0);
  12184. case 50: SetPlayerProgressBarValue(playerid, PlayerData[playerid][pBars][0], value + 18.0);
  12185. case 60: SetPlayerProgressBarValue(playerid, PlayerData[playerid][pBars][0], value + 16.0);
  12186. case 70: SetPlayerProgressBarValue(playerid, PlayerData[playerid][pBars][0], value + 14.0);
  12187. case 80: SetPlayerProgressBarValue(playerid, PlayerData[playerid][pBars][0], value + 12.0);
  12188. case 90: SetPlayerProgressBarValue(playerid, PlayerData[playerid][pBars][0], value + 10.0);
  12189. case 100: SetPlayerProgressBarValue(playerid, PlayerData[playerid][pBars][0], value + 8.0);
  12190. case 110: SetPlayerProgressBarValue(playerid, PlayerData[playerid][pBars][0], value + 6.0);
  12191. }
  12192. }
  12193. IsWeightsInUse(playerid)
  12194. {
  12195. foreach (new i : Player)
  12196. {
  12197. if (PlayerData[i][pWorkout] == WORKOUT_DUMBELLS && IsPlayerInRangeOfPlayer(i, playerid, 10.0))
  12198. {
  12199. return 1;
  12200. }
  12201. }
  12202. return 0;
  12203. }
  12204. IsPlayerNearGymEquipment(playerid)
  12205. {
  12206. return (IsPlayerInRangeOfPoint(playerid, 2.0, 771.7793, 5.4092, 1000.7802) || IsPlayerInRangeOfPoint(playerid, 2.0, 773.5131, -2.1218, 1000.8479));
  12207. }
  12208. GymCheck(playerid)
  12209. {
  12210. new company = GetInsideBusiness(playerid);
  12211. if (company == -1 || BusinessInfo[company][bType] != BUSINESS_GYM)
  12212. {
  12213. return 0;
  12214. }
  12215. else if (IsPlayerInRangeOfPoint(playerid, 2.0, 771.7793, 5.4092, 1000.7802))
  12216. {
  12217. if (!PlayerData[playerid][pWorkout])
  12218. {
  12219. if (PlayerData[playerid][pWorkoutTime] > gettime())
  12220. {
  12221. SendErrorMessage(playerid, "You have reached your limit for the day.");
  12222. }
  12223. else if (IsWeightsInUse(playerid))
  12224. {
  12225. SendErrorMessage(playerid, "The weights are already being used.");
  12226. }
  12227. else if (PlayerData[playerid][pWeight])
  12228. {
  12229. SendErrorMessage(playerid, "Please wait before using this command.");
  12230. }
  12231. else
  12232. {
  12233. SetPlayerPos(playerid, 771.7793, 5.4092, 1000.7802);
  12234. SetPlayerFacingAngle(playerid, 270.0000);
  12235. SetPlayerCameraPos(playerid, 775.425048, 5.364191, 1001.295227);
  12236. SetPlayerCameraLookAt(playerid, 772.279235, 5.403525, 1000.780212);
  12237. Dialog_Show(playerid, LiftWeights, DIALOG_STYLE_LIST, "{FFFFFF}Select weight", "20 lbs\n30 lbs\n40 lbs\n50 lbs\n60 lbs\n70 lbs\n80 lbs\n90 lbs\n100 lbs\n110 lbs", "Begin", "Cancel");
  12238. }
  12239. }
  12240. else
  12241. {
  12242. StopWorkout(playerid);
  12243. ApplyAnimation(playerid, "Freeweights", "gym_free_putdown", 4.1, 0, 0, 0, 0, 0, 1);
  12244. }
  12245. return 1;
  12246. }
  12247. else if (IsPlayerInRangeOfPoint(playerid, 2.0, 773.5131, -2.1218, 1000.8479))
  12248. {
  12249. if (!PlayerData[playerid][pWorkout])
  12250. {
  12251. if (PlayerData[playerid][pWorkoutTime] > gettime())
  12252. {
  12253. SendErrorMessage(playerid, "You have reached your limit for the day.");
  12254. }
  12255. else if (IsTreadmillInUse(playerid))
  12256. {
  12257. SendErrorMessage(playerid, "The treadmill is already being used.");
  12258. }
  12259. else if (PlayerData[playerid][pSpeedLevel])
  12260. {
  12261. SendErrorMessage(playerid, "Please wait before using this command.");
  12262. }
  12263. else
  12264. {
  12265. SetPlayerPos(playerid, 773.4777, -1.3239, 1000.7260);
  12266. SetPlayerFacingAngle(playerid, 180.0000);
  12267. SetPlayerCameraPos(playerid, 774.571166, -6.172124, 1001.582763);
  12268. SetPlayerCameraLookAt(playerid, 773.482116, -3.338384, 1000.847900);
  12269. Dialog_Show(playerid, Treadmill, DIALOG_STYLE_LIST, "{FFFFFF}Select level", "Level 1 (slowest)\nLevel 2\nLevel 3\nLevel 4\nLevel 5\nLevel 6\nLevel 7\nLevel 8\nLevel 9\nLevel 10 (fastest)", "Begin", "Cancel");
  12270. }
  12271. }
  12272. else
  12273. {
  12274. StopWorkout(playerid);
  12275. ApplyAnimation(playerid, "GYMNASIUM", "gym_tread_getoff", 4.1, 0, 0, 0, 0, 0, 1);
  12276. }
  12277. return 1;
  12278. }
  12279. return 0;
  12280. }
  12281. IsTreadmillInUse(playerid)
  12282. {
  12283. foreach (new i : Player)
  12284. {
  12285. if (PlayerData[i][pWorkout] == WORKOUT_TREADMILL && IsPlayerInRangeOfPlayer(i, playerid, 10.0))
  12286. {
  12287. return 1;
  12288. }
  12289. }
  12290. return 0;
  12291. }
  12292. ShowPlayerTextDraws(playerid, start, end)
  12293. {
  12294. for (new i = start; i < end + 1; i ++)
  12295. {
  12296. PlayerTextDrawShow(playerid, PlayerData[playerid][pText][i]);
  12297. }
  12298. }
  12299. HidePlayerTextDraws(playerid, start, end)
  12300. {
  12301. for (new i = start; i < end + 1; i ++)
  12302. {
  12303. PlayerTextDrawHide(playerid, PlayerData[playerid][pText][i]);
  12304. }
  12305. }
  12306. SetAttachedObject(playerid, modelid, bone, Float:x = 0.0, Float:y = 0.0, Float:z = 0.0, Float:rx = 0.0, Float:ry = 0.0, Float:rz = 0.0, Float:sx = 1.0, Float:sy = 1.0, Float:sz = 1.0, materialcolor1 = 0, materialcolor2 = 0)
  12307. {
  12308. for (new i = 0; i < MAX_PLAYER_ATTACHED_OBJECTS; i ++)
  12309. {
  12310. if (!IsPlayerAttachedObjectSlotUsed(playerid, i))
  12311. {
  12312. SetPlayerAttachedObject(playerid, i, modelid, bone, x, y, z, rx, ry, rz, sx, sy, sz, materialcolor1, materialcolor2);
  12313. return i;
  12314. }
  12315. }
  12316. return -1;
  12317. }
  12318. stock strreplace2(string[], const search[], const replacement[], bool:ignorecase = false, pos = 0, limit = -1, maxlength = sizeof(string)) {
  12319. // No need to do anything if the limit is 0.
  12320. if (limit == 0)
  12321. return 0;
  12322. new
  12323. sublen = strlen(search),
  12324. replen = strlen(replacement),
  12325. bool:packed = ispacked(string),
  12326. maxlen = maxlength,
  12327. len = strlen(string),
  12328. count = 0
  12329. ;
  12330. // "maxlen" holds the max string length (not to be confused with "maxlength", which holds the max. array size).
  12331. // Since packed strings hold 4 characters per array slot, we multiply "maxlen" by 4.
  12332. if (packed)
  12333. maxlen *= 4;
  12334. // If the length of the substring is 0, we have nothing to look for..
  12335. if (!sublen)
  12336. return 0;
  12337. // In this line we both assign the return value from "strfind" to "pos" then check if it's -1.
  12338. while (-1 != (pos = strfind(string, search, ignorecase, pos))) {
  12339. // Delete the string we found
  12340. strdel(string, pos, pos + sublen);
  12341. len -= sublen;
  12342. // If there's anything to put as replacement, insert it. Make sure there's enough room first.
  12343. if (replen && len + replen < maxlen) {
  12344. strins(string, replacement, pos, maxlength);
  12345. pos += replen;
  12346. len += replen;
  12347. }
  12348. // Is there a limit of number of replacements, if so, did we break it?
  12349. if (limit != -1 && ++count >= limit)
  12350. break;
  12351. }
  12352. return count;
  12353. }
  12354. stock strmatch(const string1[], const string2[])
  12355. {
  12356. if ((strcmp(string1, string2, true, strlen(string2)) == 0) && (strlen(string2) == strlen(string1)))
  12357. {
  12358. return true;
  12359. }
  12360. else
  12361. {
  12362. return false;
  12363. }
  12364. }
  12365. GetVehicleModelName(modelid)
  12366. {
  12367. new string[32];
  12368. if (400 <= modelid <= 611)
  12369. strcpy(string, vehicleNames[modelid - 400]);
  12370. else
  12371. string = "Unknown";
  12372. return string;
  12373. }
  12374. GetNextDealershipCarID()
  12375. {
  12376. for (new i = 0; i < MAX_DEALERSHIP_CARS; i ++)
  12377. {
  12378. if (!DealershipCars[i][dcExists])
  12379. {
  12380. return i;
  12381. }
  12382. }
  12383. return -1;
  12384. }
  12385. ShowDealershipEditMenu(playerid, company)
  12386. {
  12387. static
  12388. string[3072];
  12389. if (BusinessInfo[company][bType] != BUSINESS_DEALERSHIP)
  12390. {
  12391. return 0;
  12392. }
  12393. else
  12394. {
  12395. new
  12396. index = 0;
  12397. string = "Add Vehicle";
  12398. for (new i = 0; i < MAX_DEALERSHIP_CARS; i ++)
  12399. {
  12400. if (DealershipCars[i][dcExists] && DealershipCars[i][dcCompany] == BusinessInfo[company][bID])
  12401. {
  12402. format(string, sizeof(string), "%s\n%s (price: %s)", string, GetVehicleModelName(DealershipCars[i][dcModel]), FormatNumber(DealershipCars[i][dcPrice]));
  12403. gListedItems[playerid][index++] = i;
  12404. }
  12405. }
  12406. PlayerData[playerid][pCompany] = company;
  12407. Dialog_Show(playerid, DealerList, DIALOG_STYLE_LIST, "{FFFFFF}Dealership cars", string, "Select", "Back");
  12408. }
  12409. return 1;
  12410. }
  12411. ClearProducts(company)
  12412. {
  12413. switch (BusinessInfo[company][bType])
  12414. {
  12415. case BUSINESS_DEALERSHIP:
  12416. {
  12417. for (new i = 0; i < MAX_DEALERSHIP_CARS; i ++)
  12418. {
  12419. if (DealershipCars[i][dcExists] && DealershipCars[i][dcCompany] == BusinessInfo[company][bID])
  12420. {
  12421. DealershipCars[i][dcExists] = 0;
  12422. }
  12423. }
  12424. format(queryBuffer, sizeof(queryBuffer), "DELETE FROM rp_dealercars WHERE Company = %i", BusinessInfo[company][bID]);
  12425. mysql_tquery(connectionID, queryBuffer);
  12426. }
  12427. }
  12428. }
  12429. SaveDealershipCar(id)
  12430. {
  12431. static
  12432. queryString[128];
  12433. if (!DealershipCars[id][dcExists]) return 0;
  12434. format(queryString, sizeof(queryString), "UPDATE rp_dealercars SET Model = %i, Price = %i WHERE ID = %i", DealershipCars[id][dcModel], DealershipCars[id][dcPrice], DealershipCars[id][dcID]);
  12435. return mysql_tquery(connectionID, queryString);
  12436. }
  12437. IsValidCompanyID(id)
  12438. {
  12439. return (id >= 0 && id < MAX_BUSINESSES) && BusinessInfo[id][bExists];
  12440. }
  12441. IsVehicleInDealership(company, model)
  12442. {
  12443. if (!IsValidCompanyID(company) || BusinessInfo[company][bType] != BUSINESS_DEALERSHIP)
  12444. {
  12445. return 0;
  12446. }
  12447. for (new i = 0; i < MAX_DEALERSHIP_CARS; i ++)
  12448. {
  12449. if (DealershipCars[i][dcExists] && DealershipCars[i][dcCompany] == BusinessInfo[company][bID] && DealershipCars[i][dcModel] == model)
  12450. {
  12451. return 1;
  12452. }
  12453. }
  12454. return 0;
  12455. }
  12456. AddVehicleToDealership(company, model, price)
  12457. {
  12458. if (!IsValidCompanyID(company) || BusinessInfo[company][bType] != BUSINESS_DEALERSHIP)
  12459. {
  12460. return -1;
  12461. }
  12462. new
  12463. id = GetNextDealershipCarID();
  12464. if (id != -1)
  12465. {
  12466. DealershipCars[id][dcExists] = 1;
  12467. DealershipCars[id][dcCompany] = BusinessInfo[company][bID];
  12468. DealershipCars[id][dcModel] = model;
  12469. DealershipCars[id][dcPrice] = price;
  12470. format(queryBuffer, sizeof(queryBuffer), "INSERT INTO rp_dealercars (Company) VALUES(%i)", DealershipCars[id][dcCompany]);
  12471. mysql_tquery(connectionID, queryBuffer, "OnDealershipCarAdded", "i", id);
  12472. }
  12473. return id;
  12474. }
  12475. stock IsEngineVehicle(vehicleid)
  12476. {
  12477. static const g_aEngineStatus[] = {
  12478. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  12479. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1,
  12480. 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  12481. 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  12482. 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  12483. 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  12484. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1,
  12485. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  12486. 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  12487. 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1,
  12488. 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0
  12489. };
  12490. new modelid = GetVehicleModel(vehicleid);
  12491. if (modelid < 400 || modelid > 611)
  12492. return 0;
  12493. return (g_aEngineStatus[modelid - 400]);
  12494. }
  12495. forward HidePlayerBox(playerid, PlayerText:boxid);
  12496. public HidePlayerBox(playerid, PlayerText:boxid)
  12497. {
  12498. if (!IsPlayerConnected(playerid))
  12499. return 0;
  12500. PlayerTextDrawHide(playerid, boxid);
  12501. PlayerTextDrawDestroy(playerid, boxid);
  12502. return 1;
  12503. }
  12504. stock PlayerText:ShowPlayerBox(playerid, color)
  12505. {
  12506. new
  12507. PlayerText:textid;
  12508. textid = CreatePlayerTextDraw(playerid, 0.000000, 0.000000, "_");
  12509. PlayerTextDrawFont(playerid, textid, 1);
  12510. PlayerTextDrawLetterSize(playerid, textid, 0.500000, 50.000000);
  12511. PlayerTextDrawColor(playerid, textid, -1);
  12512. PlayerTextDrawUseBox(playerid, textid, 1);
  12513. PlayerTextDrawBoxColor(playerid, textid, color);
  12514. PlayerTextDrawTextSize(playerid, textid, 640.000000, 30.000000);
  12515. PlayerTextDrawShow(playerid, textid);
  12516. return textid;
  12517. }
  12518. stock GetClosestCar(iPlayer, iException = INVALID_VEHICLE_ID, Float: fRange = Float: 0x7F800000) {
  12519. new
  12520. iReturnID = -1,
  12521. Float: fVehiclePos[4];
  12522. for(new i = 1; i <= MAX_VEHICLES; ++i) if(GetVehicleModel(i) && i != iException) {
  12523. GetVehiclePos(i, fVehiclePos[0], fVehiclePos[1], fVehiclePos[2]);
  12524. if((fVehiclePos[3] = GetPlayerDistanceFromPoint(iPlayer, fVehiclePos[0], fVehiclePos[1], fVehiclePos[2])) < fRange) {
  12525. fRange = fVehiclePos[3];
  12526. iReturnID = i;
  12527. }
  12528. }
  12529. return iReturnID;
  12530. }
  12531. stock Impound_Delete(impoundid)
  12532. {
  12533. if (impoundid != -1 && ImpoundData[impoundid][impoundExists])
  12534. {
  12535. new
  12536. query[64];
  12537. format(query, sizeof(query), "DELETE FROM `impoundlots` WHERE `impoundID` = '%d'", ImpoundData[impoundid][impoundID]);
  12538. mysql_tquery(connectionID, query);
  12539. if (IsValidDynamic3DTextLabel(ImpoundData[impoundid][impoundText3D]))
  12540. DestroyDynamic3DTextLabel(ImpoundData[impoundid][impoundText3D]);
  12541. if (IsValidDynamicPickup(ImpoundData[impoundid][impoundPickup]))
  12542. DestroyDynamicPickup(ImpoundData[impoundid][impoundPickup]);
  12543. for (new i = 0; i < MAX_VEHICLES; i ++) if (VehicleInfo[i][carImpounded] == ImpoundData[impoundid][impoundID]) {
  12544. VehicleInfo[i][carImpounded] = 0;
  12545. VehicleInfo[i][carImpoundPrice] = 0;
  12546. ReloadVehicle(i);
  12547. }
  12548. ImpoundData[impoundid][impoundExists] = false;
  12549. ImpoundData[impoundid][impoundID] = 0;
  12550. }
  12551. return 1;
  12552. }
  12553. stock GetImpoundByID(sqlid)
  12554. {
  12555. for (new i = 0; i < MAX_IMPOUND_LOTS; i ++) if (ImpoundData[i][impoundExists] && ImpoundData[i][impoundID] == sqlid) {
  12556. return i;
  12557. }
  12558. return -1;
  12559. }
  12560. stock Impound_Nearest(playerid)
  12561. {
  12562. for (new i = 0; i < MAX_IMPOUND_LOTS; i ++) if (ImpoundData[i][impoundExists] && IsPlayerInRangeOfPoint(playerid, 20.0, ImpoundData[i][impoundLot][0], ImpoundData[i][impoundLot][1], ImpoundData[i][impoundLot][2])) {
  12563. return i;
  12564. }
  12565. return -1;
  12566. }
  12567. stock Impound_Create(Float:x, Float:y, Float:z)
  12568. {
  12569. for (new i = 0; i != MAX_IMPOUND_LOTS; i ++) if (!ImpoundData[i][impoundExists])
  12570. {
  12571. ImpoundData[i][impoundExists] = true;
  12572. ImpoundData[i][impoundLot][0] = x;
  12573. ImpoundData[i][impoundLot][1] = y;
  12574. ImpoundData[i][impoundLot][2] = z;
  12575. ImpoundData[i][impoundRelease][0] = 0.0;
  12576. ImpoundData[i][impoundRelease][1] = 0.0;
  12577. ImpoundData[i][impoundRelease][2] = 0.0;
  12578. mysql_tquery(connectionID, "INSERT INTO `impoundlots` (`impoundLotX`) VALUES('0.0')", "OnImpoundCreated", "d", i);
  12579. Impound_Refresh(i);
  12580. return i;
  12581. }
  12582. return -1;
  12583. }
  12584. stock Impound_Refresh(impoundid)
  12585. {
  12586. if (impoundid != -1 && ImpoundData[impoundid][impoundExists])
  12587. {
  12588. new
  12589. string[64];
  12590. if (IsValidDynamic3DTextLabel(ImpoundData[impoundid][impoundText3D]))
  12591. DestroyDynamic3DTextLabel(ImpoundData[impoundid][impoundText3D]);
  12592. if (IsValidDynamicPickup(ImpoundData[impoundid][impoundPickup]))
  12593. DestroyDynamicPickup(ImpoundData[impoundid][impoundPickup]);
  12594. format(string, sizeof(string), "[Impound %d]\n{FFFFFF}/impound to impound a vehicle.", impoundid);
  12595. ImpoundData[impoundid][impoundText3D] = CreateDynamic3DTextLabel(string, COLOR_YELLOW, ImpoundData[impoundid][impoundLot][0], ImpoundData[impoundid][impoundLot][1], ImpoundData[impoundid][impoundLot][2], 20.0);
  12596. ImpoundData[impoundid][impoundPickup] = CreateDynamicPickup(1239, 23, ImpoundData[impoundid][impoundLot][0], ImpoundData[impoundid][impoundLot][1], ImpoundData[impoundid][impoundLot][2]);
  12597. }
  12598. return 1;
  12599. }
  12600. stock Impound_Save(impoundid)
  12601. {
  12602. new
  12603. query[300];
  12604. format(query, sizeof(query), "UPDATE `impoundlots` SET `impoundLotX` = '%.4f', `impoundLotY` = '%.4f', `impoundLotZ` = '%.4f', `impoundReleaseX` = '%.4f', `impoundReleaseY` = '%.4f', `impoundReleaseZ` = '%.4f', `impoundReleaseA` = '%.4f' WHERE `impoundID` = '%d'",
  12605. ImpoundData[impoundid][impoundLot][0],
  12606. ImpoundData[impoundid][impoundLot][1],
  12607. ImpoundData[impoundid][impoundLot][2],
  12608. ImpoundData[impoundid][impoundRelease][0],
  12609. ImpoundData[impoundid][impoundRelease][1],
  12610. ImpoundData[impoundid][impoundRelease][2],
  12611. ImpoundData[impoundid][impoundRelease][3],
  12612. ImpoundData[impoundid][impoundID]
  12613. );
  12614. return mysql_tquery(connectionID, query);
  12615. }
  12616. Float:GetDistanceToTruckDepot(p1,p2)
  12617. {
  12618. new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
  12619. x1 = TruckDepotInfo[p1][pTDPosX];
  12620. y1 = TruckDepotInfo[p1][pTDPosY];
  12621. z1 = TruckDepotInfo[p1][pTDPosZ];
  12622. GetPlayerPos(p2,x2,y2,z2);
  12623. return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
  12624. }
  12625. stock GetClosestTruckDepot(p1, level)
  12626. {
  12627. new Float:dis,Float:dis2,player, count;
  12628. player = -1;
  12629. dis = 99999.99;
  12630. for(new x=0; x<MAX_TRUCKDEPOTS; x++)
  12631. {
  12632. if(TruckDepotInfo[x][pTDLevel] == level)
  12633. {
  12634. count ++;
  12635. dis2 = GetDistanceToTruckDepot(x,p1);
  12636. if(dis2 < dis && dis2 != -1.00)
  12637. {
  12638. dis = dis2;
  12639. player = x;
  12640. }
  12641. }
  12642. }
  12643. if(count == 0) player = -1;
  12644. return player;
  12645. }
  12646. stock g_mysql_ReturnEscaped(unEscapedString[], connectionHandle)
  12647. {
  12648. new EscapedString[256];
  12649. mysql_real_escape_string(unEscapedString, EscapedString, connectionHandle);
  12650. return EscapedString;
  12651. }
  12652. stock FIXES_valstr(dest[], value, bool:pack = false)
  12653. {
  12654. // format can't handle cellmin properly
  12655. static const cellmin_value[] = !"-2147483648";
  12656. if (value == cellmin)
  12657. pack && strpack(dest, cellmin_value, 12) || strunpack(dest, cellmin_value, 12);
  12658. else
  12659. format(dest, 12, "%d", value) && pack && strpack(dest, dest, 12);
  12660. }
  12661. stock number_format(number)
  12662. {
  12663. new i, string[15];
  12664. FIXES_valstr(string, number);
  12665. if(strfind(string, "-") != -1) i = strlen(string) - 4;
  12666. else i = strlen(string) - 3;
  12667. while (i >= 1)
  12668. {
  12669. if(strfind(string, "-") != -1) strins(string, ",", i + 1);
  12670. else strins(string, ",", i);
  12671. i -= 3;
  12672. }
  12673. return string;
  12674. }
  12675. stock ABroadCast(hColor, szMessage[], iLevel) {
  12676. foreach(new i: Player)
  12677. {
  12678. if(PlayerData[i][pAdmin] >= iLevel) {
  12679. SendClientMessageEx(i, hColor, szMessage);
  12680. }
  12681. }
  12682. return 1;
  12683. }
  12684. stock ShowPlayerFooter(playerid, string[], time = 5000) {
  12685. if (PlayerData[playerid][pShowFooter]) {
  12686. PlayerTextDrawHide(playerid, playerfooter[playerid]);
  12687. KillTimer(PlayerData[playerid][pFooterTimer]);
  12688. }
  12689. PlayerTextDrawSetString(playerid, playerfooter[playerid], string);
  12690. PlayerTextDrawShow(playerid, playerfooter[playerid]);
  12691. PlayerData[playerid][pShowFooter] = true;
  12692. PlayerData[playerid][pFooterTimer] = SetTimerEx("HidePlayerFooter", time, false, "d", playerid);
  12693. return 1;
  12694. }
  12695. forward HidePlayerFooter(playerid);
  12696. public HidePlayerFooter(playerid) {
  12697. if (!PlayerData[playerid][pShowFooter])
  12698. return 0;
  12699. PlayerData[playerid][pShowFooter] = false;
  12700. return PlayerTextDrawHide(playerid, playerfooter[playerid]);
  12701. }
  12702. stock ShowFreezeTextdraw(playerid)
  12703. {
  12704. PlayerTextDrawShow(playerid, LoadingObjects0[playerid]);
  12705. PlayerTextDrawShow(playerid, LoadingObjects1[playerid]);
  12706. PlayerTextDrawShow(playerid, LoadingObjects2[playerid]);
  12707. PlayerTextDrawShow(playerid, LoadingObjects3[playerid]);
  12708. PlayerTextDrawShow(playerid, LoadingObjects4[playerid]);
  12709. PlayerTextDrawShow(playerid, LoadingObjects5[playerid]);
  12710. return 1;
  12711. }
  12712. stock str_replace(sSearch[], sReplace[], const sSubject[], &iCount = 0)
  12713. {
  12714. new
  12715. iLengthTarget = strlen(sSearch),
  12716. iLengthReplace = strlen(sReplace),
  12717. iLengthSource = strlen(sSubject),
  12718. iItterations = (iLengthSource - iLengthTarget) + 1;
  12719. new
  12720. sTemp[128],
  12721. sReturn[128];
  12722. strcat(sReturn, sSubject, 256);
  12723. iCount = 0;
  12724. for(new iIndex; iIndex < iItterations; ++iIndex)
  12725. {
  12726. strmid(sTemp, sReturn, iIndex, (iIndex + iLengthTarget), (iLengthTarget + 1));
  12727. if(!strcmp(sTemp, sSearch, false))
  12728. {
  12729. strdel(sReturn, iIndex, (iIndex + iLengthTarget));
  12730. strins(sReturn, sReplace, iIndex, iLengthReplace);
  12731. iIndex += iLengthTarget;
  12732. iCount++;
  12733. }
  12734. }
  12735. return sReturn;
  12736. }
  12737. CMD:testcolor(playerid, params[])
  12738. {
  12739. SendClientMessageEx(playerid, -1, "%d", GetGangColor(PlayerData[playerid][pGang]));
  12740. return 1;
  12741. }
  12742. SetPlayerCellphoneAction(playerid, enable)
  12743. {
  12744. if (PlayerData[playerid][pCuffed])
  12745. {
  12746. return 0;
  12747. }
  12748. else
  12749. {
  12750. if (enable)
  12751. {
  12752. if (VehicleHasDoors(GetPlayerVehicleID(playerid)))
  12753. {
  12754. ApplyAnimation(playerid, "CAR_CHAT", "carfone_in", 4.1, 0, 0, 0, 1, 0, 1);
  12755. }
  12756. else
  12757. {
  12758. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USECELLPHONE);
  12759. SetPlayerAttachedObject(playerid, 5, 330, 6);
  12760. }
  12761. }
  12762. else
  12763. {
  12764. if (VehicleHasDoors(GetPlayerVehicleID(playerid)))
  12765. {
  12766. ApplyAnimation(playerid, "CAR_CHAT", "carfone_out", 4.1, 0, 0, 0, 0, 0, 1);
  12767. }
  12768. else
  12769. {
  12770. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
  12771. RemovePlayerAttachedObject(playerid, 5);
  12772. }
  12773. }
  12774. }
  12775. return 1;
  12776. }
  12777. ResetPayphone(playerid)
  12778. {
  12779. if (PlayerData[playerid][pPayphone] != -1)
  12780. {
  12781. Payphones[PlayerData[playerid][pPayphone]][phOccupied] = 0;
  12782. UpdatePayphoneText(PlayerData[playerid][pPayphone]);
  12783. }
  12784. PlayerData[playerid][pPayphone] = -1;
  12785. }
  12786. HangupCall(playerid)
  12787. {
  12788. if (PlayerData[playerid][pCalling] > 0)
  12789. {
  12790. for (new i = 0; i < MAX_PAYPHONES; i ++)
  12791. {
  12792. if (IsValidPayphoneID(i) && Payphones[i][phCaller] == playerid)
  12793. {
  12794. Payphones[i][phCaller] = INVALID_PLAYER_ID;
  12795. UpdatePayphoneText(i);
  12796. }
  12797. }
  12798. if (PlayerData[playerid][pCaller] != INVALID_PLAYER_ID)
  12799. {
  12800. SetPlayerCellphoneAction(PlayerData[playerid][pCaller], false);
  12801. SendInfoMessage(PlayerData[playerid][pCaller], "The other line has ended the call.");
  12802. PlayerPlaySound(PlayerData[playerid][pCaller], 20601, 0.0, 0.0, 0.0);
  12803. if (PlayerData[PlayerData[playerid][pCaller]][pPayphone] != -1)
  12804. {
  12805. ResetPayphone(PlayerData[playerid][pCaller]);
  12806. ShowActionBubble(PlayerData[playerid][pCaller], "* %s hangs up the payphone.", GetRPName(PlayerData[playerid][pCaller]));
  12807. }
  12808. else
  12809. {
  12810. ShowActionBubble(PlayerData[playerid][pCaller], "* %s hangs up the phone and puts it in their pocket.", GetRPName(PlayerData[playerid][pCaller]));
  12811. }
  12812. PlayerData[PlayerData[playerid][pCaller]][pCalling] = 0;
  12813. PlayerData[PlayerData[playerid][pCaller]][pCaller] = INVALID_PLAYER_ID;
  12814. }
  12815. SetPlayerCellphoneAction(playerid, false);
  12816. PlayerPlaySound(playerid, 20601, 0.0, 0.0, 0.0);
  12817. PlayerData[playerid][pCalling] = 0;
  12818. PlayerData[playerid][pCaller] = INVALID_PLAYER_ID;
  12819. if (PlayerData[playerid][pPayphone] != -1)
  12820. {
  12821. ResetPayphone(playerid);
  12822. ShowActionBubble(playerid, "* %s hangs up the payphone.", GetRPName(playerid));
  12823. }
  12824. else
  12825. {
  12826. ShowActionBubble(playerid, "* %s hangs up the phone and puts it in their pocket.", GetRPName(playerid));
  12827. }
  12828. }
  12829. }
  12830. SendTextMessage(playerid, number, const text[])
  12831. {
  12832. foreach (new i : Player)
  12833. {
  12834. if (number != 0 && PlayerData[i][pPhone] == number)
  12835. {
  12836. if (PlayerData[i][pTogglePhone])
  12837. {
  12838. return SendErrorMessage(playerid, "That player's phone is turned off.");
  12839. }
  12840. else
  12841. {
  12842. SendClientMessageEx(i, COLOR_YELLOW, "* Text from %i: %s", PlayerData[playerid][pPhone], text);
  12843. SendClientMessageEx(playerid, COLOR_YELLOW, "* Text to %i: %s", number, text);
  12844. return 1;
  12845. }
  12846. }
  12847. }
  12848. return SendErrorMessage(playerid, "The specified number is not in service.");
  12849. }
  12850. CallPayphone(playerid, payphone)
  12851. {
  12852. foreach (new i : Player)
  12853. {
  12854. if (IsPlayerNearPoint(i, 20.0, Payphones[payphone][phX], Payphones[payphone][phY], Payphones[payphone][phZ], Payphones[payphone][phInterior], Payphones[payphone][phWorld]))
  12855. {
  12856. SendClientMessage(i, COLOR_PURPLE, "* The payphone is ringing. (( /answer ))");
  12857. }
  12858. }
  12859. Payphones[payphone][phCaller] = playerid;
  12860. UpdatePayphoneText(payphone);
  12861. }
  12862. AssignPayphone(playerid, payphone)
  12863. {
  12864. if (IsValidPayphoneID(payphone))
  12865. {
  12866. PlayerData[playerid][pPayphone] = payphone;
  12867. Payphones[payphone][phOccupied] = true;
  12868. Payphones[payphone][phCaller] = INVALID_PLAYER_ID;
  12869. UpdatePayphoneText(payphone);
  12870. }
  12871. }
  12872. UpdatePayphoneText(id)
  12873. {
  12874. new
  12875. string[64];
  12876. if (!Payphones[id][phExists]) return 0;
  12877. if (IsPlayerConnected(Payphones[id][phCaller])) {
  12878. format(string, sizeof(string), "ID: %i\nNumber: %i\n{FF0000}Ringing (/answer)", id, Payphones[id][phNumber]);
  12879. }
  12880. else if (Payphones[id][phOccupied]) {
  12881. format(string, sizeof(string), "ID: %i\nNumber: %i\n{FF5030}Occupied", id, Payphones[id][phNumber]);
  12882. }
  12883. else {
  12884. format(string, sizeof(string), "ID: %i\nNumber: %i\n{00ff00}Available (/call)", id, Payphones[id][phNumber]);
  12885. }
  12886. UpdateDynamic3DTextLabelText(Payphones[id][phText], COLOR_GREY, string);
  12887. return 1;
  12888. }
  12889. UpdatePayphone(id)
  12890. {
  12891. if (!Payphones[id][phExists]) return 0;
  12892. DestroyDynamicObject(Payphones[id][phObject]);
  12893. DestroyDynamic3DTextLabel(Payphones[id][phText]);
  12894. Payphones[id][phObject] = CreateDynamicObject(1216, Payphones[id][phX], Payphones[id][phY], Payphones[id][phZ], 0.0, 0.0, Payphones[id][phA], Payphones[id][phWorld], Payphones[id][phInterior]);
  12895. Payphones[id][phText] = CreateDynamic3DTextLabel("Payphone", COLOR_GREY, Payphones[id][phX], Payphones[id][phY], Payphones[id][phZ] + 0.5, 5.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, Payphones[id][phWorld], Payphones[id][phInterior]);
  12896. UpdatePayphoneText(id);
  12897. return 1;
  12898. }
  12899. CallNumber(playerid, number, payphone = -1)
  12900. {
  12901. if (PlayerData[playerid][pCalling] > 0)
  12902. {
  12903. return SendErrorMessage(playerid, "You are already on a call.");
  12904. }
  12905. else if (PlayerData[playerid][pPhone] == number)
  12906. {
  12907. return SendErrorMessage(playerid, "You can't dial your own number.");
  12908. }
  12909. else
  12910. {
  12911. new targetid = GetPhonePlayerID(number);
  12912. if (IsValidPayphoneID(payphone))
  12913. {
  12914. ShowActionBubble(playerid, "* %s inserts a coin and picks up the payphone.", GetRPName(playerid));
  12915. AssignPayphone(playerid, payphone);
  12916. }
  12917. else
  12918. {
  12919. ShowActionBubble(playerid, "* %s takes out their phone and dials a number.", GetRPName(playerid));
  12920. }
  12921. if (IsPlayerConnected(targetid))
  12922. {
  12923. if (PlayerData[targetid][pTogglePhone])
  12924. {
  12925. return SendClientMessage(playerid, COLOR_GREY, "* The phone is switched off. The number would automatically forward to voicemail. *");
  12926. }
  12927. else if (PlayerData[targetid][pCalling] > 0)
  12928. {
  12929. return SendClientMessage(playerid, COLOR_GREY, "* The other line is currently busy. *");
  12930. }
  12931. else
  12932. {
  12933. PlayerData[playerid][pCalling] = 1;
  12934. PlayerData[playerid][pCaller] = targetid;
  12935. PlayerData[targetid][pCalling] = 1;
  12936. PlayerData[targetid][pCaller] = playerid;
  12937. if (IsValidPayphoneID(payphone))
  12938. {
  12939. SendInfoMessage(targetid, "Payphone (%i) is attempting to call you (use /answer to answer).", Payphones[payphone][phNumber]);
  12940. }
  12941. else
  12942. {
  12943. SendInfoMessage(targetid, "Number %i is attempting to call you (use /answer to answer).", PlayerData[playerid][pPhone]);
  12944. }
  12945. ShowActionBubble(targetid, "* %s's phone starts to ring.", GetRPName(targetid));
  12946. HandlePhoneRing(targetid);
  12947. }
  12948. }
  12949. else
  12950. {
  12951. new id = GetPhonePayphoneID(number);
  12952. if (IsValidPayphoneID(id) && !Payphones[id][phOccupied])
  12953. {
  12954. CallPayphone(playerid, id);
  12955. }
  12956. else
  12957. {
  12958. SetTimerEx("OnPhoneResponse", 3000, false, "ii", playerid, number);
  12959. }
  12960. PlayerData[playerid][pCalling] = 1;
  12961. }
  12962. SetPlayerCellphoneAction(playerid, true);
  12963. HandlePhoneDial(playerid);
  12964. SendInfoMessage(playerid, "You have dialed number: %i. Please wait for a connection...", number);
  12965. PlayerPlaySound(playerid, 16001, 0.0, 0.0, 0.0);
  12966. }
  12967. return 1;
  12968. }
  12969. ListContacts(playerid)
  12970. {
  12971. if (PlayerData[playerid][pPhone] > 0)
  12972. {
  12973. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM `rp_contacts` WHERE Phone = %i", PlayerData[playerid][pPhone]);
  12974. mysql_tquery(connectionID, queryBuffer, "OnPlayerListContacts", "i", playerid);
  12975. }
  12976. }
  12977. OpenPhone(playerid)
  12978. {
  12979. new strHead[128];
  12980. if (PlayerData[playerid][pPhone] > 0)
  12981. {
  12982. format(strHead,sizeof(strHead),"{FFFFFF}Phone: %i",PlayerData[playerid][pPhone]);
  12983. Dialog_Show(playerid, PhoneMenu, DIALOG_STYLE_LIST, strHead, "Call a number\nSend a message\nContact list\nMusic\nBank\nSettings", "Select", "Cancel");
  12984. }
  12985. }
  12986. forward OnPlayerTextPlayer(playerid, text[]);
  12987. public OnPlayerTextPlayer(playerid, text[])
  12988. {
  12989. new
  12990. contact[MAX_PLAYER_NAME];
  12991. new rows, fields;
  12992. cache_get_data(rows, fields, connectionID);
  12993. if (!rows)
  12994. {
  12995. return SendErrorMessage(playerid, "You don't have that name in your contacts");
  12996. }
  12997. else
  12998. {
  12999. new
  13000. number;
  13001. number = cache_get_field_content_int(0, "Number");
  13002. cache_get_field_content(0, "Contact", contact);
  13003. SendTextMessage(playerid, number, text);
  13004. }
  13005. return 1;
  13006. }
  13007. forward OnPlayerCallContact(playerid);
  13008. public OnPlayerCallContact(playerid)
  13009. {
  13010. new
  13011. contact[MAX_PLAYER_NAME];
  13012. new rows, fields;
  13013. cache_get_data(rows, fields, connectionID);
  13014. if (!rows)
  13015. {
  13016. return SendErrorMessage(playerid, "You don't have that name in your contacts");
  13017. }
  13018. else
  13019. {
  13020. new
  13021. number;
  13022. number = cache_get_field_content_int(0, "Number");
  13023. cache_get_field_content(0, "Contact", contact);
  13024. CallNumber(playerid, number);
  13025. }
  13026. return 1;
  13027. }//Dialog_Show(playerid, PhoneSMStext, DIALOG_STYLE_INPUT, strHead, "Please type your message:", "Send", "Cancel");
  13028. forward OnPlayerTextContact(playerid);
  13029. public OnPlayerTextContact(playerid)
  13030. {
  13031. new
  13032. contact[MAX_PLAYER_NAME];
  13033. new rows, fields;
  13034. cache_get_data(rows, fields, connectionID);
  13035. if (!rows)
  13036. {
  13037. return 0;
  13038. }
  13039. else
  13040. {
  13041. new
  13042. number;
  13043. number = cache_get_field_content_int(0, "Number");
  13044. cache_get_field_content(0, "Contact", contact);
  13045. PlayerData[playerid][pPhoneSMS] = number;
  13046. new strHead[64];
  13047. format(strHead, sizeof(strHead), "{FFFFFF}SMS to %i", number);
  13048. Dialog_Show(playerid, PhoneSMStext, DIALOG_STYLE_INPUT, strHead, "Please type your message:", "Send", "Cancel");
  13049. }
  13050. return 1;
  13051. }
  13052. forward OnPlayerListContacts(playerid);
  13053. public OnPlayerListContacts(playerid)
  13054. {
  13055. new
  13056. contact[MAX_PLAYER_NAME],
  13057. string[1024],
  13058. number;
  13059. new rows, fields;
  13060. cache_get_data(rows, fields, connectionID);
  13061. strcat(string, "Add Contact");
  13062. for (new i = 0; i < rows; i ++)
  13063. {
  13064. cache_get_field_content(i, "Contact", contact);
  13065. number = cache_get_field_content_int(i, "Number");
  13066. format(string, sizeof(string), "%s\n%s (%i)", string, contact, number);
  13067. gListedItems[playerid][i] = cache_get_field_content_int(i, "ID");
  13068. }
  13069. Dialog_Show(playerid, Contacts, DIALOG_STYLE_LIST, "{FFFFFF}My contacts", string, "Select", "Cancel");
  13070. }
  13071. stock SaveImpoundPoint(id)
  13072. {
  13073. new string[1024];
  13074. format(string, sizeof(string), "UPDATE `impoundpoints` SET \
  13075. `PosX`=%f, \
  13076. `PosY`=%f, \
  13077. `PosZ`=%f, \
  13078. `VW`=%d, \
  13079. `Int`=%d WHERE `id`=%d",
  13080. ImpoundPoints[id][impoundPosX],
  13081. ImpoundPoints[id][impoundPosY],
  13082. ImpoundPoints[id][impoundPosZ],
  13083. ImpoundPoints[id][impoundVW],
  13084. ImpoundPoints[id][impoundInt],
  13085. id
  13086. );
  13087. mysql_tquery(connectionID, string);
  13088. }
  13089. stock SaveImpoundPoints()
  13090. {
  13091. for(new i = 0; i < MAX_ImpoundPoints; i++)
  13092. {
  13093. SaveImpoundPoint(i);
  13094. }
  13095. return 1;
  13096. }
  13097. stock RehashImpoundPoint(id)
  13098. {
  13099. DestroyDynamic3DTextLabel(ImpoundPoints[id][impoundTextID]);
  13100. ImpoundPoints[id][impoundSQLId] = -1;
  13101. ImpoundPoints[id][impoundPosX] = 0.0;
  13102. ImpoundPoints[id][impoundPosY] = 0.0;
  13103. ImpoundPoints[id][impoundPosZ] = 0.0;
  13104. ImpoundPoints[id][impoundVW] = 0;
  13105. ImpoundPoints[id][impoundInt] = 0;
  13106. LoadImpoundPoint(id);
  13107. }
  13108. stock RehashImpoundPoints()
  13109. {
  13110. printf("[RehashImpoundPoints] Deleting impound Points from server...");
  13111. for(new i = 0; i < MAX_ImpoundPoints; i++)
  13112. {
  13113. RehashImpoundPoint(i);
  13114. }
  13115. LoadImpoundPoints();
  13116. }
  13117. stock LoadImpoundPoint(id)
  13118. {
  13119. new string[128];
  13120. format(string, sizeof(string), "SELECT * FROM `impoundpoints` WHERE `id`=%d", id);
  13121. mysql_tquery(connectionID, string, "OnLoadImpoundPoints", "i", id);
  13122. }
  13123. stock LoadImpoundPoints()
  13124. {
  13125. printf("[LoadImpoundPoints] Loading data from database...");
  13126. mysql_tquery(connectionID, "SELECT * FROM `impoundpoints`", "OnLoadImpoundPoints", "");
  13127. }
  13128. forward OnGraffitiCreated(id);
  13129. public OnGraffitiCreated(id)
  13130. {
  13131. GraffitiData[id][graffitiID] = cache_insert_id(connectionID);
  13132. Graffiti_Save(id);
  13133. return 1;
  13134. }
  13135. forward GivePlayerCash(playerid, amount);
  13136. public GivePlayerCash(playerid, amount)
  13137. {
  13138. if(PlayerData[playerid][pLogged])
  13139. {
  13140. PlayerData[playerid][pCash] = PlayerData[playerid][pCash] + amount;
  13141. if(amount < 0)
  13142. {
  13143. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET money_spent = money_spent + %i WHERE uid = %i", -amount, PlayerData[playerid][pID]);
  13144. mysql_tquery(connectionID, queryBuffer);
  13145. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid FROM "#TABLE_USERS" WHERE uid = %i AND money_spent >= 500000", PlayerData[playerid][pID]);
  13146. mysql_tquery(connectionID, queryBuffer, "OnPlayerCheckMoney", "is", playerid, "I'm rich!");
  13147. }
  13148. else if(amount > 0)
  13149. {
  13150. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET money_earned = money_earned + %i WHERE uid = %i", amount, PlayerData[playerid][pID]);
  13151. mysql_tquery(connectionID, queryBuffer);
  13152. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid FROM "#TABLE_USERS" WHERE uid = %i AND money_earned >= 500000", PlayerData[playerid][pID]);
  13153. mysql_tquery(connectionID, queryBuffer, "OnPlayerCheckMoney", "is", playerid, "High roller");
  13154. }
  13155. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET cash = cash + %i WHERE uid = %i", amount, PlayerData[playerid][pID]);
  13156. mysql_tquery(connectionID, queryBuffer);
  13157. }
  13158. return 1;
  13159. }
  13160. forward AddBanForPlayer(playerid, from[], reason[], permanent);
  13161. public AddBanForPlayer(playerid, from[], reason[], permanent)
  13162. {
  13163. BanPlayer(playerid, from, reason, permanent);
  13164. }
  13165. forward IsPlayerLoggedIn(playerid);
  13166. public IsPlayerLoggedIn(playerid)
  13167. {
  13168. return PlayerData[playerid][pLogged];
  13169. }
  13170. forward IsPlayerScripter(playerid);
  13171. public IsPlayerScripter(playerid)
  13172. {
  13173. return PlayerData[playerid][pDeveloper];
  13174. }
  13175. forward IsPlayerFormerAdmin(playerid);
  13176. public IsPlayerFormerAdmin(playerid)
  13177. {
  13178. return PlayerData[playerid][pFormerAdmin];
  13179. }
  13180. forward IsPlayerAdminLevel(playerid, level);
  13181. public IsPlayerAdminLevel(playerid, level)
  13182. {
  13183. return PlayerData[playerid][pAdmin] >= level;
  13184. }
  13185. forward IsPlayerInFaction(playerid, type);
  13186. public IsPlayerInFaction(playerid, type)
  13187. {
  13188. return GetFactionType(playerid) == type;
  13189. }
  13190. forward GetPlayerData(playerid, pEnum:var);
  13191. public GetPlayerData(playerid, pEnum:var)
  13192. {
  13193. return PlayerData[playerid][var];
  13194. }
  13195. forward SetPlayerData(playerid, pEnum:var, amount);
  13196. public SetPlayerData(playerid, pEnum:var, amount)
  13197. {
  13198. PlayerData[playerid][var] = amount;
  13199. }
  13200. forward GetPlayerUID(playerid);
  13201. public GetPlayerUID(playerid)
  13202. {
  13203. return PlayerData[playerid][pID];
  13204. }
  13205. forward mysql_connection_handle(type);
  13206. public mysql_connection_handle(type)
  13207. {
  13208. if(type == 0)
  13209. return connectionID;
  13210. else if(type == 1)
  13211. return connectionID;
  13212. return 0;
  13213. }
  13214. // ---------------------------------------
  13215. // ---------------------------------------
  13216. FriskPlayer(playerid, targetid)
  13217. {
  13218. SendClientMessageEx(playerid, COLOR_NAVYBLUE, "_____ %s's Items _____", GetRPName(targetid));
  13219. if(PlayerData[targetid][pCash] < 5000)
  13220. {
  13221. SendClientMessageEx(playerid, COLOR_GREY2, "Cash: $%i", PlayerData[targetid][pCash]);
  13222. }
  13223. else
  13224. {
  13225. SendClientMessage(playerid, COLOR_GREY2, "Cash: $5000+");
  13226. }
  13227. if(PlayerData[targetid][pPhone])
  13228. {
  13229. SendClientMessage(playerid, COLOR_GREY2, "Mobile phone");
  13230. }
  13231. if(PlayerData[targetid][pWalkieTalkie])
  13232. {
  13233. SendClientMessage(playerid, COLOR_GREY2, "Walkie talkie");
  13234. }
  13235. if(PlayerData[targetid][pSpraycans])
  13236. {
  13237. SendClientMessageEx(playerid, COLOR_GREY2, "Spraycans (%i)", PlayerData[targetid][pSpraycans]);
  13238. }
  13239. if(PlayerData[targetid][pBoombox])
  13240. {
  13241. SendClientMessage(playerid, COLOR_GREY2, "Boombox");
  13242. }
  13243. if(PlayerData[targetid][pMP3Player])
  13244. {
  13245. SendClientMessage(playerid, COLOR_GREY2, "MP3 player");
  13246. }
  13247. if(PlayerData[targetid][pPhonebook])
  13248. {
  13249. SendClientMessage(playerid, COLOR_GREY2, "Phonebook");
  13250. }
  13251. if(PlayerData[targetid][pPoliceScanner])
  13252. {
  13253. SendClientMessage(playerid, COLOR_GREY2, "Police scanner");
  13254. }
  13255. if(PlayerData[targetid][pMaterials] > 0)
  13256. {
  13257. SendClientMessageEx(playerid, COLOR_GREY2, "Materials (%i)", PlayerData[targetid][pMaterials]);
  13258. }
  13259. if(PlayerData[targetid][pFirstAid] > 0)
  13260. {
  13261. SendClientMessageEx(playerid, COLOR_GREY2, "First aid (%i)", PlayerData[targetid][pFirstAid]);
  13262. }
  13263. if(PlayerData[targetid][pBodykits] > 0)
  13264. {
  13265. SendClientMessageEx(playerid, COLOR_GREY2, "Bodywork kits (%i)", PlayerData[targetid][pBodykits]);
  13266. }
  13267. if(PlayerData[targetid][pRimkits] > 0)
  13268. {
  13269. SendClientMessageEx(playerid, COLOR_GREY2, "Rimkits (%i)", PlayerData[targetid][pRimkits]);
  13270. }
  13271. if(PlayerData[targetid][pWeed])
  13272. {
  13273. SendClientMessageEx(playerid, COLOR_RED, "Weed (%ig)", PlayerData[targetid][pWeed]);
  13274. }
  13275. if(PlayerData[targetid][pCocaine])
  13276. {
  13277. SendClientMessageEx(playerid, COLOR_RED, "Cocaine (%ig)", PlayerData[targetid][pCocaine]);
  13278. }
  13279. if(PlayerData[targetid][pMeth])
  13280. {
  13281. SendClientMessageEx(playerid, COLOR_RED, "Meth (%ig)", PlayerData[targetid][pMeth]);
  13282. }
  13283. if(PlayerData[targetid][pPainkillers])
  13284. {
  13285. SendClientMessageEx(playerid, COLOR_RED, "Painkillers (%i)", PlayerData[targetid][pPainkillers]);
  13286. }
  13287. if(PlayerData[targetid][pSeeds])
  13288. {
  13289. SendClientMessageEx(playerid, COLOR_RED, "Marijuana seeds (%i)", PlayerData[targetid][pSeeds]);
  13290. }
  13291. if(PlayerData[targetid][pEphedrine])
  13292. {
  13293. SendClientMessageEx(playerid, COLOR_RED, "Raw ephedrine (%i)", PlayerData[targetid][pEphedrine]);
  13294. }
  13295. switch(PlayerData[targetid][pSmuggleDrugs])
  13296. {
  13297. case 1: SendClientMessageEx(playerid, COLOR_RED, "Seeds package");
  13298. case 2: SendClientMessageEx(playerid, COLOR_RED, "Cocaine package");
  13299. case 3: SendClientMessageEx(playerid, COLOR_RED, "Raw ephedrine package");
  13300. }
  13301. for(new i = 0; i < 13; i ++)
  13302. {
  13303. if(PlayerData[targetid][pWeapons][i] > 0)
  13304. {
  13305. SendClientMessageEx(playerid, COLOR_RED, "%s", GetWeaponNameEx(PlayerData[targetid][pWeapons][i]));
  13306. }
  13307. }
  13308. ShowActionBubble(playerid, "* %s searches for illegal items on %s.", GetRPName(playerid), GetRPName(targetid));
  13309. }
  13310. DisplayStats(playerid, targetid = INVALID_PLAYER_ID)
  13311. {
  13312. if(targetid == INVALID_PLAYER_ID) targetid = playerid;
  13313. new string[3000];
  13314. new name[24], gender[8], faction[48], facrank[32], gang[32], gangrank[32], gangcrew[32], division[32], insurance[24], Float:health, Float:armor;
  13315. new job[32], secondjob[32], jailtype[32];
  13316. if(playerid == MAX_PLAYERS)
  13317. {
  13318. strcpy(name, PlayerData[playerid][pUsername]);
  13319. }
  13320. else
  13321. {
  13322. strcat(name, GetRPName(playerid));
  13323. }
  13324. if(PlayerData[playerid][pGender] == 1) gender = "Male";
  13325. else if(PlayerData[playerid][pGender] == 2) gender = "Female";
  13326. switch(PlayerData[playerid][pInsurance])
  13327. {
  13328. case HOSPITAL_COUNTY: insurance = "County General";
  13329. case HOSPITAL_ALLSAINTS: insurance = "All Saints";
  13330. case HOSPITAL_VIPLOUNGE: insurance = "VIP Lounge";
  13331. default: insurance = "None";
  13332. }
  13333. if(PlayerData[playerid][pFaction] >= 0)
  13334. {
  13335. if(!strcmp(FactionInfo[PlayerData[playerid][pFaction]][fShortName], "None", true))
  13336. {
  13337. strcpy(faction, FactionInfo[PlayerData[playerid][pFaction]][fName]);
  13338. }
  13339. else
  13340. {
  13341. strcpy(faction, FactionInfo[PlayerData[playerid][pFaction]][fShortName]);
  13342. }
  13343. format(facrank, sizeof(facrank), "%s (%i)", FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], PlayerData[playerid][pFactionRank]);
  13344. if(PlayerData[playerid][pDivision] >= 0)
  13345. {
  13346. strcpy(division, FactionDivisions[PlayerData[playerid][pFaction]][PlayerData[playerid][pDivision]]);
  13347. }
  13348. else
  13349. {
  13350. division = "None";
  13351. }
  13352. }
  13353. else
  13354. {
  13355. faction = "None";
  13356. facrank = "N/A (0)";
  13357. division = "None";
  13358. }
  13359. if(PlayerData[playerid][pGang] >= 0)
  13360. {
  13361. strcpy(gang, GangInfo[PlayerData[playerid][pGang]][gName]);
  13362. format(gangrank, sizeof(gangrank), "%s (%i)", GangRanks[PlayerData[playerid][pGang]][PlayerData[playerid][pGangRank]], PlayerData[playerid][pGangRank]);
  13363. if(PlayerData[playerid][pCrew] >= 0)
  13364. {
  13365. strcpy(gangcrew, GangCrews[PlayerData[playerid][pGang]][PlayerData[playerid][pCrew]]);
  13366. }
  13367. }
  13368. else
  13369. {
  13370. gang = "None";
  13371. gangrank = "N/A (0)";
  13372. gangcrew = "None";
  13373. }
  13374. /*switch(PlayerData[playerid][pDonator])
  13375. {
  13376. case 0:
  13377. maxarmor = 100.0;
  13378. case 1, 2:
  13379. maxarmor = 125.0;
  13380. case 3:
  13381. maxarmor = 150.0;
  13382. }*/
  13383. if(playerid == MAX_PLAYERS)
  13384. {
  13385. health = PlayerData[playerid][pHealth];
  13386. armor = PlayerData[playerid][pArmor];
  13387. }
  13388. else
  13389. {
  13390. GetPlayerHealth(playerid, health);
  13391. GetPlayerArmour(playerid, armor);
  13392. }
  13393. if(PlayerData[playerid][pJob] != JOB_NONE)
  13394. {
  13395. format(job, sizeof(job), "%s (%i)", GetJobName(PlayerData[playerid][pJob]), GetJobLevel(playerid, PlayerData[playerid][pJob]));
  13396. }
  13397. else
  13398. {
  13399. job = "None";
  13400. }
  13401. if(PlayerData[playerid][pSecondJob] != JOB_NONE)
  13402. {
  13403. format(secondjob, sizeof(secondjob), "%s (%i)", GetJobName(PlayerData[playerid][pSecondJob]), GetJobLevel(playerid, PlayerData[playerid][pSecondJob]));
  13404. }
  13405. else
  13406. {
  13407. secondjob = "None";
  13408. }
  13409. new totalwealth = PlayerData[playerid][pCash] + PlayerData[playerid][pBank];
  13410. foreach(new i : House)
  13411. {
  13412. if(HouseInfo[i][hExists] && PlayerData[playerid][pID] == HouseInfo[i][hOwnerID])
  13413. {
  13414. totalwealth += HouseInfo[i][hCash];
  13415. }
  13416. }
  13417. foreach(new i : Business)
  13418. {
  13419. if(BusinessInfo[i][bExists] && PlayerData[playerid][pID] == BusinessInfo[i][bOwnerID])
  13420. {
  13421. totalwealth += BusinessInfo[i][bCash];
  13422. }
  13423. }
  13424. switch(PlayerData[playerid][pJailType])
  13425. {
  13426. case 0: jailtype = "None";
  13427. case 1: jailtype = "OOC jail";
  13428. case 2: jailtype = "OOC prison";
  13429. case 3: jailtype = "IC prison";
  13430. }
  13431. SendClientMessageEx(targetid, COLOR_DARKGREEN, "___________________________________________________________________________________");
  13432. format(string, sizeof(string), "{B5B5B5}Statistics of: {FFFFFF}%s {B5B5B5}| Time: {FFFFFF}%s", name, GetDateStats());
  13433. SendClientMessageEx(targetid, COLOR_WHITE, string);
  13434. format(string, sizeof(string), "Level: %i | Gender: %s | Age: %i | Cash: %s | Bank: %s | Hours: %s | Ph: %i | Channel: %i",
  13435. PlayerData[playerid][pLevel], gender, PlayerData[playerid][pAge], FormatNumber(PlayerData[playerid][pCash]), FormatNumber(PlayerData[playerid][pBank]), FormatNumber(PlayerData[playerid][pHours], 0), PlayerData[playerid][pPhone], PlayerData[playerid][pChannel]);
  13436. SendClientMessage(targetid, COLOR_WHITE, string);
  13437. format(string, sizeof(string), "{B5B5B5}Total Wealth: %s | Experience: %s/%s | Next Level: %s | Upgrade Points: %i",
  13438. FormatNumber(totalwealth), FormatNumber(PlayerData[playerid][pEXP], 0), FormatNumber((PlayerData[playerid][pLevel] * 4), 0), FormatNumber((PlayerData[playerid][pLevel] + 1) * 5000), PlayerData[playerid][pUpgradePoints]);
  13439. SendClientMessage(targetid, COLOR_WHITE, string);
  13440. format(string, sizeof(string), "Inventory Skill: %i/5 | Addict Skill: %i/3 | Trader Skill: %i/3 | Asset Skill: %i/4 | Labor Skill: %i/5",
  13441. PlayerData[playerid][pInventoryUpgrade], PlayerData[playerid][pAddictUpgrade], PlayerData[playerid][pTraderUpgrade], PlayerData[playerid][pAssetUpgrade], PlayerData[playerid][pLaborUpgrade]);
  13442. SendClientMessage(targetid, COLOR_WHITE, string);
  13443. format(string, sizeof(string), "{B5B5B5}Job: %s | Job 2: %s | Crimes Commited: %s | Times Arrested: %s | Wanted Level: %i | Insurance: %s",
  13444. job, secondjob, FormatNumber(PlayerData[playerid][pCrimes], 0), FormatNumber(PlayerData[playerid][pArrested], 0), PlayerData[playerid][pWantedLevel], insurance);
  13445. SendClientMessage(targetid, COLOR_WHITE, string);
  13446. format(string, sizeof(string), "Faction: %s | Rank: %s | Division: %s | Gang: %s | Rank: %s | Crew: %s",
  13447. faction, facrank, division, gang, gangrank, gangcrew);
  13448. SendClientMessage(targetid, COLOR_WHITE, string);
  13449. format(string, sizeof(string), "{B5B5B5}Donator: %s {B5B5B5}| Double XP: %i Or? | Cookies: %s | Paycheck: %s | Playing Time: %i/60 min",
  13450. GetVIPRankEx(PlayerData[playerid][pDonator]), PlayerData[playerid][pDoubleXP], FormatNumber(PlayerData[playerid][pCookies], 0), FormatNumber(PlayerData[playerid][pPaycheck]), PlayerData[playerid][pMinutes]);
  13451. SendClientMessage(targetid, COLOR_WHITE, string);
  13452. format(string, sizeof(string), "Weapon Restriction: %i hours | Married To: %s | DJ Rank: %d | Trucking XP: %d | Trucking Level: %d.",
  13453. PlayerData[playerid][pWeaponRestricted], PlayerData[playerid][pMarriedName], PlayerData[playerid][pDJ], PlayerData[playerid][pTruckingXP], PlayerData[playerid][pTruckingLevel]);
  13454. SendClientMessage(targetid, COLOR_WHITE, string);
  13455. format(string, sizeof(string), "{B5B5B5}Warnings: %i | DM Warnings: %i/3 | Report Warnings: %i/3 | Jail Type: %s | Jail Time: %s sec",
  13456. PlayerData[playerid][pWarnings], PlayerData[playerid][pDMWarnings], PlayerData[playerid][pReportWarns], jailtype, FormatNumber(PlayerData[playerid][pJailTime], 0));
  13457. SendClientMessage(targetid, COLOR_WHITE, string);
  13458. if(PlayerData[targetid][pAdmin] > 0)
  13459. {
  13460. format(string, sizeof(string), "Interior: %i | Virtual: %i | FPS: %i | AFK: %s | Raports: %s | Help Requests: %s | Newbie Replies: %s.",
  13461. (playerid == MAX_PLAYERS) ? (PlayerData[playerid][pInterior]) : (GetPlayerInterior(playerid)), (playerid == MAX_PLAYERS) ? (PlayerData[playerid][pWorld]) : (GetPlayerVirtualWorld(playerid)), (playerid == MAX_PLAYERS) ? (0) : (PlayerData[playerid][pFPS]), (playerid == MAX_PLAYERS) ? ("No") : ((PlayerData[playerid][pAFK]) ? ("Yes") : ("No")), FormatNumber(PlayerData[playerid][pReports], 0), FormatNumber(PlayerData[playerid][pHelpRequests], 0), FormatNumber(PlayerData[playerid][pNewbies], 0));
  13462. SendClientMessage(targetid, COLOR_LIGHTRED, string);
  13463. }
  13464. SendClientMessageEx(targetid, COLOR_DARKGREEN, "___________________________________________________________________________________");
  13465. }
  13466. DisplayInventory(playerid, targetid = INVALID_PLAYER_ID)
  13467. {
  13468. new string[800];
  13469. if(targetid == INVALID_PLAYER_ID) targetid = playerid;
  13470. SendClientMessageEx(targetid, COLOR_DARKGREEN, "___________________________________________________________________________________");
  13471. format(string, sizeof(string), "{B5B5B5}Inventory of: {FFFFFF}%s {B5B5B5}| Time: {FFFFFF}%s", GetPlayerNameEx(playerid), GetDateStats());
  13472. SendClientMessageEx(targetid, COLOR_WHITE, string);
  13473. format(string, sizeof(string), "Weed: %i/%ig | Cocaine: %i/%ig | Meth: %i/%ig | Painkillers: %i/%i | Seeds: %i/%i", PlayerData[playerid][pWeed], GetPlayerCapacity(playerid, CAPACITY_WEED),
  13474. PlayerData[playerid][pCocaine], GetPlayerCapacity(playerid, CAPACITY_COCAINE), PlayerData[playerid][pMeth], GetPlayerCapacity(playerid, CAPACITY_METH), PlayerData[playerid][pPainkillers], GetPlayerCapacity(playerid, CAPACITY_PAINKILLERS), PlayerData[playerid][pSeeds], GetPlayerCapacity(playerid, CAPACITY_SEEDS));
  13475. SendClientMessageEx(targetid, COLOR_WHITE, string);
  13476. format(string, sizeof(string), "{B5B5B5}Materials: %s/%s | Ephedrine: %i/%ig | Muriatic acid: %i/10 | Baking soda: %i/3", FormatNumber(PlayerData[playerid][pMaterials], 0), FormatNumber(GetPlayerCapacity(playerid, CAPACITY_MATERIALS), 0),
  13477. PlayerData[playerid][pEphedrine], GetPlayerCapacity(playerid, CAPACITY_EPHEDRINE), PlayerData[playerid][pMuriaticAcid], PlayerData[playerid][pBakingSoda]);
  13478. SendClientMessageEx(targetid, COLOR_WHITE, string);
  13479. format(string, sizeof(string), "Fishing rod: %s | Fish bait: %i/20 | Boombox: %s | MP3 player: %s | Phonebook: %s", (PlayerData[playerid][pFishingRod]) ? ("Yes") : ("No"), PlayerData[playerid][pFishingBait], (PlayerData[playerid][pBoombox]) ? ("Yes") : ("No"), (PlayerData[playerid][pMP3Player]) ? ("Yes") : ("No"), (PlayerData[playerid][pPhonebook]) ? ("Yes") : ("No"));
  13480. SendClientMessageEx(targetid, COLOR_WHITE, string);
  13481. format(string, sizeof(string), "{B5B5B5}Drivers license: %s | Components: %s | Cigars: %s | Spraycans: %i/20 | Bombs: %i/3", (PlayerData[playerid][pCarLicense]) ? ("Yes") : ("No"), FormatNumber(PlayerData[playerid][pComponents], 0), FormatNumber(PlayerData[playerid][pCigars], 0), PlayerData[playerid][pSpraycans], PlayerData[playerid][pBombs]);
  13482. SendClientMessageEx(targetid, COLOR_WHITE, string);
  13483. format(string, sizeof(string), "Walkie talkie: %s | Mobile phone: %s | First aid kits: %i/20 | Police scanner: %s", (PlayerData[playerid][pWalkieTalkie]) ? ("Yes") : ("No"), (PlayerData[playerid][pPhone]) ? ("Yes") : ("No"), PlayerData[playerid][pFirstAid], (PlayerData[playerid][pPoliceScanner]) ? ("Yes") : ("No"));
  13484. SendClientMessageEx(targetid, COLOR_WHITE, string);
  13485. format(string, sizeof(string), "{B5B5B5}Gasoline: %i/20L | Bodykits: %i/10 | Rimkits: %i/5 | Rope: %i/10 | Watch: %s | GPS: %s", PlayerData[playerid][pGasCan], PlayerData[playerid][pBodykits], PlayerData[playerid][pRimkits], PlayerData[playerid][pRope], (PlayerData[playerid][pWatch]) ? ("Yes") : ("No"), (PlayerData[playerid][pGPS]) ? ("Yes") : ("No"));
  13486. SendClientMessageEx(targetid, COLOR_WHITE, string);
  13487. format(string, sizeof(string), "Diamond: %s | Oil: %i/%iL | Skates: %s | Crowbar: %i/5", FormatNumber(PlayerData[playerid][pDiamonds], 0), PlayerData[playerid][pOil], GetPlayerCapacity(playerid, CAPACITY_OIL), (PlayerData[playerid][pSkates]) ? ("Yes") : ("No"), PlayerData[playerid][pCrowbar]);
  13488. SendClientMessageEx(targetid, COLOR_WHITE, string);
  13489. SendClientMessageEx(targetid, COLOR_DARKGREEN, "___________________________________________________________________________________");
  13490. return 1;
  13491. }
  13492. stock LoginTDControl( playerid, bool:show ) {
  13493. if( show == true ) {
  13494. LoginTD[ playerid ][ 0 ] = CreatePlayerTextDraw(playerid,0.000000, 309.750000, "LD_SPAC:white");
  13495. PlayerTextDrawLetterSize(playerid,LoginTD[ playerid ][ 0 ], 0.000000, 0.000000);
  13496. PlayerTextDrawTextSize(playerid,LoginTD[ playerid ][ 0 ], 640.000000, 33.687500);
  13497. PlayerTextDrawAlignment(playerid,LoginTD[ playerid ][ 0 ], 1);
  13498. PlayerTextDrawColor(playerid,LoginTD[ playerid ][ 0 ], 0x2e9cd1FF);
  13499. PlayerTextDrawSetShadow(playerid,LoginTD[ playerid ][ 0 ], 0);
  13500. PlayerTextDrawSetOutline(playerid,LoginTD[ playerid ][ 0 ], 0);
  13501. PlayerTextDrawFont(playerid,LoginTD[ playerid ][ 0 ], 4);
  13502. PlayerTextDrawSetSelectable(playerid,LoginTD[ playerid ][ 0 ], 0);
  13503. LoginTD[ playerid ][ 1 ] = CreatePlayerTextDraw(playerid,0.000000, 58.187500, "LD_SPAC:white");
  13504. PlayerTextDrawLetterSize(playerid, LoginTD[ playerid ][ 1 ], 0.000000, 0.000000);
  13505. PlayerTextDrawTextSize(playerid, LoginTD[ playerid ][ 1 ], 640.000000, 33.687500);
  13506. PlayerTextDrawAlignment(playerid, LoginTD[ playerid ][ 1 ], 1);
  13507. PlayerTextDrawColor(playerid, LoginTD[ playerid ][ 1 ], 0x2e9cd1FF);
  13508. PlayerTextDrawSetShadow(playerid, LoginTD[ playerid ][ 1 ], 0);
  13509. PlayerTextDrawSetOutline(playerid, LoginTD[ playerid ][ 1 ], 0);
  13510. PlayerTextDrawFont(playerid, LoginTD[ playerid ][ 1 ], 4);
  13511. PlayerTextDrawSetSelectable(playerid,LoginTD[ playerid ][ 1 ], 0);
  13512. LoginTD[ playerid ][ 2 ] = CreatePlayerTextDraw(playerid,0.000000, 62.125000, "LD_SPAC:white");
  13513. PlayerTextDrawLetterSize(playerid, LoginTD[ playerid ][ 2 ], 0.000000, 0.000000);
  13514. PlayerTextDrawTextSize(playerid, LoginTD[ playerid ][ 2 ], 640.000000, 25.812500);
  13515. PlayerTextDrawAlignment(playerid, LoginTD[ playerid ][ 2 ], 1);
  13516. PlayerTextDrawColor(playerid, LoginTD[ playerid ][ 2 ], 255);
  13517. PlayerTextDrawSetShadow(playerid, LoginTD[ playerid ][ 2 ], 0);
  13518. PlayerTextDrawSetOutline(playerid, LoginTD[ playerid ][ 2 ], 0);
  13519. PlayerTextDrawFont(playerid, LoginTD[ playerid ][ 2 ], 4);
  13520. PlayerTextDrawSetSelectable(playerid,LoginTD[ playerid ][ 2 ], 0);
  13521. LoginTD[ playerid ][ 3 ] = CreatePlayerTextDraw(playerid,259.000000, 65.187500, " Ultimate");
  13522. PlayerTextDrawLetterSize(playerid, LoginTD[ playerid ][ 3 ], 0.486499, 1.897498);
  13523. PlayerTextDrawAlignment(playerid, LoginTD[ playerid ][ 3 ], 1);
  13524. PlayerTextDrawColor(playerid, LoginTD[ playerid ][ 3 ], 0x2e9cd1FF);
  13525. PlayerTextDrawSetShadow(playerid, LoginTD[ playerid ][ 3 ], 0);
  13526. PlayerTextDrawSetOutline(playerid, LoginTD[ playerid ][ 3 ], 1);
  13527. PlayerTextDrawBackgroundColor(playerid, LoginTD[ playerid ][ 3 ], 255);
  13528. PlayerTextDrawFont(playerid, LoginTD[ playerid ][ 3 ], 3);
  13529. PlayerTextDrawSetProportional(playerid, LoginTD[ playerid ][ 3 ], 1);
  13530. PlayerTextDrawSetSelectable(playerid,LoginTD[ playerid ][ 3 ], 0);
  13531. LoginTD[ playerid ][ 4 ] = CreatePlayerTextDraw(playerid,50.500000, 65.625000, "welcome to");
  13532. PlayerTextDrawLetterSize(playerid, LoginTD[ playerid ][ 4 ], 0.449999, 1.600000);
  13533. PlayerTextDrawAlignment(playerid, LoginTD[ playerid ][ 4 ], 1);
  13534. PlayerTextDrawColor(playerid, LoginTD[ playerid ][ 4 ], -1);
  13535. PlayerTextDrawSetShadow(playerid, LoginTD[ playerid ][ 4 ], 0);
  13536. PlayerTextDrawSetOutline(playerid, LoginTD[ playerid ][ 4 ], 1);
  13537. PlayerTextDrawBackgroundColor(playerid, LoginTD[ playerid ][ 4 ], 255);
  13538. PlayerTextDrawFont(playerid, LoginTD[ playerid ][ 4 ], 2);
  13539. PlayerTextDrawSetProportional(playerid, LoginTD[ playerid ][ 4 ], 1);
  13540. PlayerTextDrawSetSelectable(playerid,LoginTD[ playerid ][ 4 ], 0);
  13541. LoginTD[ playerid ][ 5 ] = CreatePlayerTextDraw(playerid,464.500000, 66.937500, "roleplay");
  13542. PlayerTextDrawLetterSize(playerid, LoginTD[ playerid ][ 5 ], 0.449999, 1.600000);
  13543. PlayerTextDrawAlignment(playerid, LoginTD[ playerid ][ 5 ], 1);
  13544. PlayerTextDrawColor(playerid, LoginTD[ playerid ][ 5 ], -1);
  13545. PlayerTextDrawSetShadow(playerid, LoginTD[ playerid ][ 5 ], 0);
  13546. PlayerTextDrawSetOutline(playerid, LoginTD[ playerid ][ 5 ], 1);
  13547. PlayerTextDrawBackgroundColor(playerid, LoginTD[ playerid ][ 5 ], 255);
  13548. PlayerTextDrawFont(playerid, LoginTD[ playerid ][ 5 ], 2);
  13549. PlayerTextDrawSetProportional(playerid, LoginTD[ playerid ][ 5 ], 1);
  13550. PlayerTextDrawSetSelectable(playerid,LoginTD[ playerid ][ 5 ], 0);
  13551. LoginTD[ playerid ][ 6 ] = CreatePlayerTextDraw(playerid,206.000000, 66.937500, "]");
  13552. PlayerTextDrawLetterSize(playerid, LoginTD[ playerid ][ 6 ], 0.449999, 1.600000);
  13553. PlayerTextDrawAlignment(playerid, LoginTD[ playerid ][ 6 ], 1);
  13554. PlayerTextDrawColor(playerid, LoginTD[ playerid ][ 6 ], 0x2e9cd1FF);
  13555. PlayerTextDrawSetShadow(playerid, LoginTD[ playerid ][ 6 ], 0);
  13556. PlayerTextDrawSetOutline(playerid, LoginTD[ playerid ][ 6 ], 1);
  13557. PlayerTextDrawBackgroundColor(playerid, LoginTD[ playerid ][ 6 ], 255);
  13558. PlayerTextDrawFont(playerid, LoginTD[ playerid ][ 6 ], 2);
  13559. PlayerTextDrawSetProportional(playerid, LoginTD[ playerid ][ 6 ], 1);
  13560. PlayerTextDrawSetSelectable(playerid,LoginTD[ playerid ][ 6 ], 0);
  13561. LoginTD[ playerid ][ 7 ] = CreatePlayerTextDraw(playerid,409.500000, 66.937500, "]");
  13562. PlayerTextDrawLetterSize(playerid, LoginTD[ playerid ][ 7 ], 0.449999, 1.600000);
  13563. PlayerTextDrawAlignment(playerid, LoginTD[ playerid ][ 7 ], 1);
  13564. PlayerTextDrawColor(playerid, LoginTD[ playerid ][ 7 ], 0x2e9cd1FF);
  13565. PlayerTextDrawSetShadow(playerid, LoginTD[ playerid ][ 7 ], 0);
  13566. PlayerTextDrawSetOutline(playerid, LoginTD[ playerid ][ 7 ], 1);
  13567. PlayerTextDrawBackgroundColor(playerid, LoginTD[ playerid ][ 7 ], 255);
  13568. PlayerTextDrawFont(playerid, LoginTD[ playerid ][ 7 ], 2);
  13569. PlayerTextDrawSetProportional(playerid, LoginTD[ playerid ][ 7 ], 1);
  13570. PlayerTextDrawSetSelectable(playerid,LoginTD[ playerid ][ 7 ], 0);
  13571. LoginTD[ playerid ][ 8 ] = CreatePlayerTextDraw(playerid,0.000000, 313.687500, "LD_SPAC:white");
  13572. PlayerTextDrawLetterSize(playerid,LoginTD[ playerid ][ 8 ], 0.000000, 0.000000);
  13573. PlayerTextDrawTextSize(playerid,LoginTD[ playerid ][ 8 ], 640.000000, 25.375000);
  13574. PlayerTextDrawAlignment(playerid,LoginTD[ playerid ][ 8 ], 1);
  13575. PlayerTextDrawColor(playerid,LoginTD[ playerid ][ 8 ], 255);
  13576. PlayerTextDrawSetShadow(playerid,LoginTD[ playerid ][ 8 ], 0);
  13577. PlayerTextDrawSetOutline(playerid,LoginTD[ playerid ][ 8 ], 0);
  13578. PlayerTextDrawFont(playerid,LoginTD[ playerid ][ 8 ], 4);
  13579. PlayerTextDrawSetSelectable(playerid,LoginTD[ playerid ][ 8 ], 0);
  13580. LoginTD[ playerid ][ 9 ] = CreatePlayerTextDraw(playerid,222.500000, 318.062500, "version v1.3.4(e)");
  13581. PlayerTextDrawLetterSize(playerid,LoginTD[ playerid ][ 9 ], 0.449999, 1.600000);
  13582. PlayerTextDrawAlignment(playerid,LoginTD[ playerid ][ 9 ], 1);
  13583. PlayerTextDrawColor(playerid,LoginTD[ playerid ][ 9 ], 0x2e9cd1FF);
  13584. PlayerTextDrawSetShadow(playerid,LoginTD[ playerid ][ 9 ], 0);
  13585. PlayerTextDrawSetOutline(playerid,LoginTD[ playerid ][ 9 ], 1);
  13586. PlayerTextDrawBackgroundColor(playerid,LoginTD[ playerid ][ 9 ], 255);
  13587. PlayerTextDrawFont(playerid,LoginTD[ playerid ][ 9 ], 2);
  13588. PlayerTextDrawSetProportional(playerid,LoginTD[ playerid ][ 9 ], 1);
  13589. PlayerTextDrawSetSelectable(playerid,LoginTD[ playerid ][ 9 ], 0);
  13590. LoginTD[ playerid ][ 10 ] = CreatePlayerTextDraw(playerid,44.500000, 318.062500, "");
  13591. PlayerTextDrawLetterSize(playerid,LoginTD[ playerid ][ 10 ], 0.449999, 1.600000);
  13592. PlayerTextDrawAlignment(playerid,LoginTD[ playerid ][ 10 ], 1);
  13593. PlayerTextDrawColor(playerid,LoginTD[ playerid ][ 10 ], -1);
  13594. PlayerTextDrawSetShadow(playerid,LoginTD[ playerid ][ 10 ], 0);
  13595. PlayerTextDrawSetOutline(playerid,LoginTD[ playerid ][ 10 ], 1);
  13596. PlayerTextDrawBackgroundColor(playerid,LoginTD[ playerid ][ 10 ], 255);
  13597. PlayerTextDrawFont(playerid,LoginTD[ playerid ][ 10 ], 2);
  13598. PlayerTextDrawSetProportional(playerid,LoginTD[ playerid ][ 10 ], 1);
  13599. PlayerTextDrawSetSelectable(playerid,LoginTD[ playerid ][ 10 ], 0);
  13600. LoginTD[ playerid ][ 11 ] = CreatePlayerTextDraw(playerid,490.500000, 318.500000, "");
  13601. PlayerTextDrawLetterSize(playerid,LoginTD[ playerid ][ 11 ], 0.449999, 1.600000);
  13602. PlayerTextDrawAlignment(playerid,LoginTD[ playerid ][ 11 ], 1);
  13603. PlayerTextDrawColor(playerid,LoginTD[ playerid ][ 11 ], -1);
  13604. PlayerTextDrawSetShadow(playerid,LoginTD[ playerid ][ 11 ], 0);
  13605. PlayerTextDrawSetOutline(playerid,LoginTD[ playerid ][ 11 ], 1);
  13606. PlayerTextDrawBackgroundColor(playerid,LoginTD[ playerid ][ 11 ], 255);
  13607. PlayerTextDrawFont(playerid,LoginTD[ playerid ][ 11 ], 2);
  13608. PlayerTextDrawSetProportional(playerid,LoginTD[ playerid ][ 11 ], 1);
  13609. PlayerTextDrawSetSelectable(playerid,LoginTD[ playerid ][ 11 ], 0);
  13610. LoginTD[ playerid ][ 12 ] = CreatePlayerTextDraw(playerid,179.500000, 318.937500, "]");
  13611. PlayerTextDrawLetterSize(playerid,LoginTD[ playerid ][ 12 ], 0.449999, 1.600000);
  13612. PlayerTextDrawAlignment(playerid,LoginTD[ playerid ][ 12 ], 1);
  13613. PlayerTextDrawColor(playerid,LoginTD[ playerid ][ 12 ], 0x2e9cd1FF);
  13614. PlayerTextDrawSetShadow(playerid,LoginTD[ playerid ][ 12 ], 0);
  13615. PlayerTextDrawSetOutline(playerid,LoginTD[ playerid ][ 12 ], 1);
  13616. PlayerTextDrawBackgroundColor(playerid,LoginTD[ playerid ][ 12 ], 255);
  13617. PlayerTextDrawFont(playerid,LoginTD[ playerid ][ 12 ], 2);
  13618. PlayerTextDrawSetProportional(playerid,LoginTD[ playerid ][ 12 ], 1);
  13619. PlayerTextDrawSetSelectable(playerid,LoginTD[ playerid ][ 12 ], 0);
  13620. LoginTD[ playerid ][ 13 ] = CreatePlayerTextDraw(playerid,437.000000, 318.937500, "]");
  13621. PlayerTextDrawLetterSize(playerid,LoginTD[ playerid ][ 13 ], 0.449999, 1.600000);
  13622. PlayerTextDrawAlignment(playerid,LoginTD[ playerid ][ 13 ], 1);
  13623. PlayerTextDrawColor(playerid,LoginTD[ playerid ][ 13 ], 0x2e9cd1FF);
  13624. PlayerTextDrawSetShadow(playerid,LoginTD[ playerid ][ 13 ], 0);
  13625. PlayerTextDrawSetOutline(playerid,LoginTD[ playerid ][ 13 ], 1);
  13626. PlayerTextDrawBackgroundColor(playerid,LoginTD[ playerid ][ 13 ], 255);
  13627. PlayerTextDrawFont(playerid,LoginTD[ playerid ][ 13 ], 2);
  13628. PlayerTextDrawSetProportional(playerid,LoginTD[ playerid ][ 13 ], 1);
  13629. PlayerTextDrawSetSelectable(playerid,LoginTD[ playerid ][ 13 ], 0);
  13630. for( new i = 0; i < 14; i ++) {
  13631. PlayerTextDrawShow( playerid, LoginTD[ playerid ][ i ] );
  13632. }
  13633. }
  13634. }
  13635. ShowDialogToPlayer(playerid, dialogid)
  13636. {
  13637. new string[4096];
  13638. switch(dialogid)
  13639. {
  13640. case DIALOG_NEWUPGRADE:
  13641. {
  13642. format(string, sizeof(string), "Name\tLevel\n\
  13643. Inventory\t{ffff00}Currently Skill Level %i/5\n\
  13644. Addict\t{ffff00}Currently Skill Level is %i/3\n\
  13645. Trader\t{ffff00}Currently Skill Level %i/4\n\
  13646. Asset\t{ffff00}Currently Skill Level %i/4\n\
  13647. Labor\t{ffff00}Currently Skill Level %i/5\n\
  13648. Spawn Health\t{ffff00}Currently Spawn Health is %.1f/100\n\
  13649. Spawn Armor\t{ffff00}Currently Spawn Armour is %.1f/100\n",
  13650. PlayerData[playerid][pInventoryUpgrade],
  13651. PlayerData[playerid][pAddictUpgrade],
  13652. PlayerData[playerid][pTraderUpgrade],
  13653. PlayerData[playerid][pAssetUpgrade],
  13654. PlayerData[playerid][pLaborUpgrade],
  13655. PlayerData[playerid][pSpawnHealth],
  13656. PlayerData[playerid][pSpawnArmor]);
  13657. Dialog_Show(playerid, DIALOG_NEWUPGRADEONE, DIALOG_STYLE_TABLIST_HEADERS, "Upgrade List", string, "Upgrade", "Close");
  13658. }
  13659. case DIALOG_SETTINGS2:
  13660. {
  13661. format(string, sizeof(string), "Info\tStatus\n" \
  13662. "PM\t%s\n" \
  13663. "VIP\t%s\n" \
  13664. "Faction\t%s\n" \
  13665. "Gang\t%s\n" \
  13666. "Spawn Camera\t%s\n" \
  13667. "HUD\t%s\n" \
  13668. "Vehicle Camera\t%s\n" \
  13669. "<< Back",
  13670. (PlayerData[playerid][pTogglePM]== 1) ? ("{ff0000}Off") : ("{00FF00}On"),
  13671. (PlayerData[playerid][pToggleVIP]== 1) ? ("{ff0000}Off") : ("{00FF00}On"),
  13672. (PlayerData[playerid][pToggleFaction]== 1) ? ("{ff0000}Off") : ("{00FF00}On"),
  13673. (PlayerData[playerid][pToggleGang]== 1) ? ("{ff0000}Off") : ("{00FF00}On"),
  13674. (PlayerData[playerid][pToggleCam]== 1) ? ("{ff0000}Off") : ("{00FF00}On"),
  13675. (PlayerData[playerid][pToggleHUD]== 1) ? ("{ff0000}Off") : ("{00FF00}On"),
  13676. (PlayerData[playerid][pToggleVehCam] == 1) ? ("{ff0000}Off") : ("{00FF00}On"));
  13677. Dialog_Show(playerid, DIALOG_SETTINGS2, DIALOG_STYLE_TABLIST_HEADERS, "Settings", string, "Tog", "Close");
  13678. }
  13679. case DIALOG_SETTINGS:
  13680. {
  13681. format(string, sizeof(string), "Info\tStatus\n" \
  13682. "Textdraws\t%s\n" \
  13683. "OOC\t%s\n" \
  13684. "Global\t%s\n" \
  13685. "Phone\t%s\n" \
  13686. "Whisper\t%s\n" \
  13687. "Newbie\t%s\n" \
  13688. "WalkieTalkie\t%s\n" \
  13689. "Radio\t%s\n" \
  13690. "Streams\t%s\n" \
  13691. "News\t%s\n" \
  13692. "Next >>",
  13693. (PlayerData[playerid][pToggleTextdraws]== 1) ? ("{ff0000}Off") : ("{00FF00}On"),
  13694. (PlayerData[playerid][pToggleOOC]== 1) ? ("{ff0000}Off") : ("{00FF00}On"),
  13695. (PlayerData[playerid][pToggleGlobal]== 1) ? ("{ff0000}Off") : ("{00FF00}On"),
  13696. (PlayerData[playerid][pTogglePhone]== 1) ? ("{ff0000}Off") : ("{00FF00}On"),
  13697. (PlayerData[playerid][pToggleWhisper]== 1) ? ("{ff0000}Off") : ("{00FF00}On"),
  13698. (PlayerData[playerid][pToggleNewbie]== 1) ? ("{ff0000}Off") : ("{00FF00}On"),
  13699. (PlayerData[playerid][pToggleWT]== 1) ? ("{ff0000}Off") : ("{00FF00}On"),
  13700. (PlayerData[playerid][pToggleRadio]== 1) ? ("{ff0000}Off") : ("{00FF00}On"),
  13701. (PlayerData[playerid][pToggleMusic]== 1) ? ("{ff0000}Off") : ("{00FF00}On"),
  13702. (PlayerData[playerid][pToggleNews]== 1) ? ("{ff0000}Off") : ("{00FF00}On"));
  13703. Dialog_Show(playerid, DIALOG_SETTINGS, DIALOG_STYLE_TABLIST_HEADERS, "Settings", string, "Tog", "Close");
  13704. }
  13705. case DIALOG_POST_APPLICATION:
  13706. {
  13707. format(string, sizeof(string), "Name:\n\
  13708. Date of Birth:\n\
  13709. Are you male or female:\n\
  13710. Where are you from:\n\
  13711. Where do you currently live:\n\
  13712. Experience((150 words)):\n\
  13713. Why do you want to join((150 words)):\n");
  13714. Dialog_Show(playerid, DIALOG_POST_APPLICATION, DIALOG_STYLE_LIST, "PD Application ((IC))", string, "Submit", "Cancel");
  13715. }
  13716. case DIALOG_HELP:
  13717. {
  13718. Dialog_Show(playerid, DIALOG_HELP, DIALOG_STYLE_LIST, "List of Commands", "Chat\nGeneral\nUpgrades\nOthers\nGang\nFaction\nVIP\nJob", "Select", "Close");
  13719. }
  13720. case DIALOG_STATS:
  13721. {
  13722. Dialog_Show(playerid, DIALOG_STATS, DIALOG_STYLE_LIST, "My Statistics", "Stats\nInventory", "Select", "Cancel");
  13723. }
  13724. case DIALOG_ADNEW:
  13725. {
  13726. format(string, sizeof(string), "Input the advertisement you want to place");
  13727. Dialog_Show(playerid, DIALOG_ADNEW, DIALOG_STYLE_INPUT, "Advertisement", string, "Okay", "Cancel");
  13728. }
  13729. case DIALOG_FOOD:
  13730. {
  13731. format(string, sizeof(string), "Sprunk ($50)\nCigar($35)\nHot Dog($25)\nRope ($20)\nChocolate($15)");
  13732. Dialog_Show(playerid, DIALOG_FOOD, DIALOG_STYLE_LIST, "Select an item", string, "Buy", "Cancel");
  13733. }
  13734. case DIALOG_SKILL:
  13735. {
  13736. new jobstring1[64], jobstring2[64], jobstring3[64], jobstring4[64], jobstring5[64],
  13737. jobstring6[64], jobstring7[64], jobstring8[64];
  13738. if(GetJobLevel(playerid, JOB_COURIER) < 5)
  13739. {
  13740. if(PlayerData[playerid][pCourierSkill] < 50) {
  13741. format(jobstring1, sizeof(jobstring1), "Deliver %i more shipments to level up.", 50 - PlayerData[playerid][pCourierSkill]);
  13742. } else if(PlayerData[playerid][pCourierSkill] < 100) {
  13743. format(jobstring1, sizeof(jobstring1), "Deliver %i more shipments to level up.", 100 - PlayerData[playerid][pCourierSkill]);
  13744. } else if(PlayerData[playerid][pCourierSkill] < 200) {
  13745. format(jobstring1, sizeof(jobstring1), "Deliver %i more shipments to level up.", 200 - PlayerData[playerid][pCourierSkill]);
  13746. } else if(PlayerData[playerid][pCourierSkill] < 350) {
  13747. format(jobstring1, sizeof(jobstring1), "Deliver %i more shipments to level up.", 350 - PlayerData[playerid][pCourierSkill]);
  13748. }
  13749. }
  13750. else
  13751. {
  13752. format(jobstring1, sizeof(jobstring1), "You have reached the maximum skill level for this job.");
  13753. }
  13754. if(GetJobLevel(playerid, JOB_FISHERMAN) < 5)
  13755. {
  13756. if(PlayerData[playerid][pFishingSkill] < 50) {
  13757. format(jobstring2, sizeof(jobstring2), "Catch %i more fish to level up.", 50 - PlayerData[playerid][pFishingSkill]);
  13758. } else if(PlayerData[playerid][pFishingSkill] < 100) {
  13759. format(jobstring2, sizeof(jobstring2), "Catch %i more fish to level up.", 100 - PlayerData[playerid][pFishingSkill]);
  13760. } else if(PlayerData[playerid][pFishingSkill] < 200) {
  13761. format(jobstring2, sizeof(jobstring2), "Catch %i more fish to level up.", 200 - PlayerData[playerid][pFishingSkill]);
  13762. } else if(PlayerData[playerid][pFishingSkill] < 350) {
  13763. format(jobstring2, sizeof(jobstring2), "Catch %i more fish to level up.", 350 - PlayerData[playerid][pFishingSkill]);
  13764. }
  13765. }
  13766. else
  13767. {
  13768. format(jobstring2, sizeof(jobstring2), "You have reached the maximum skill level for this job.");
  13769. }
  13770. if(GetJobLevel(playerid, JOB_BODYGUARD) < 5)
  13771. {
  13772. if(PlayerData[playerid][pGuardSkill] < 25) {
  13773. format(jobstring3, sizeof(jobstring3), "Sell %i more vests to level up.", 25 - PlayerData[playerid][pGuardSkill]);
  13774. } else if(PlayerData[playerid][pGuardSkill] < 50) {
  13775. format(jobstring3, sizeof(jobstring3), "Sell %i more vests to level up.", 50 - PlayerData[playerid][pGuardSkill]);
  13776. } else if(PlayerData[playerid][pGuardSkill] < 100) {
  13777. format(jobstring3, sizeof(jobstring3), "Sell %i more vests to level up.", 100 - PlayerData[playerid][pGuardSkill]);
  13778. } else if(PlayerData[playerid][pGuardSkill] < 200) {
  13779. format(jobstring3, sizeof(jobstring3), "Sell %i more vests to level up.", 200 - PlayerData[playerid][pGuardSkill]);
  13780. }
  13781. }
  13782. else
  13783. {
  13784. format(jobstring3, sizeof(jobstring3),"You have reached the maximum skill level for this job.");
  13785. }
  13786. if(GetJobLevel(playerid, JOB_WEAPONDEALER) < 5)
  13787. {
  13788. if(PlayerData[playerid][pWeaponSkill] < 50) {
  13789. format(jobstring4, sizeof(jobstring4), "Sell %i more weapons to level up.", 50 - PlayerData[playerid][pWeaponSkill]);
  13790. } else if(PlayerData[playerid][pWeaponSkill] < 100) {
  13791. format(jobstring4, sizeof(jobstring4), "Sell %i more weapons to level up.", 100 - PlayerData[playerid][pWeaponSkill]);
  13792. } else if(PlayerData[playerid][pWeaponSkill] < 200) {
  13793. format(jobstring4, sizeof(jobstring4), "Sell %i more weapons to level up.", 200 - PlayerData[playerid][pWeaponSkill]);
  13794. } else if(PlayerData[playerid][pWeaponSkill] < 500) {
  13795. format(jobstring4, sizeof(jobstring4), "Sell %i more weapons to level up.", 500 - PlayerData[playerid][pWeaponSkill]);
  13796. }
  13797. }
  13798. else
  13799. {
  13800. format(jobstring4, sizeof(jobstring4), "You have reached the maximum skill level for this job.");
  13801. }
  13802. if(GetJobLevel(playerid, JOB_MECHANIC) < 5)
  13803. {
  13804. if(PlayerData[playerid][pMechanicSkill] < 25) {
  13805. format(jobstring5, sizeof(jobstring5), "Fix & Refuel %i more vehicles to level up.", 25 - PlayerData[playerid][pMechanicSkill]);
  13806. } else if(PlayerData[playerid][pMechanicSkill] < 50) {
  13807. format(jobstring5, sizeof(jobstring5), "Fix & Refuel %i more vehicles to level up.", 50 - PlayerData[playerid][pMechanicSkill]);
  13808. } else if(PlayerData[playerid][pMechanicSkill] < 100) {
  13809. format(jobstring5, sizeof(jobstring5), "Fix & Refuel %i more vehicles to level up.", 100 - PlayerData[playerid][pMechanicSkill]);
  13810. } else if(PlayerData[playerid][pMechanicSkill] < 200) {
  13811. format(jobstring5, sizeof(jobstring5), "Fix & Refuel %i more vehicles to level up.", 200 - PlayerData[playerid][pMechanicSkill]);
  13812. }
  13813. }
  13814. else
  13815. {
  13816. format(jobstring5, sizeof(jobstring5), "You have reached the maximum skill level for this job.");
  13817. }
  13818. if(GetJobLevel(playerid, JOB_DRUGDEALER) < 5)
  13819. {
  13820. if(PlayerData[playerid][pSmugglerSkill] < 25) {
  13821. format(jobstring6, sizeof(jobstring6), "Smuggle %i more packages to level up.", 25 - PlayerData[playerid][pSmugglerSkill]);
  13822. } else if(PlayerData[playerid][pSmugglerSkill] < 50) {
  13823. format(jobstring6, sizeof(jobstring6), "Smuggle %i more packages to level up.", 50 - PlayerData[playerid][pSmugglerSkill]);
  13824. } else if(PlayerData[playerid][pSmugglerSkill] < 75) {
  13825. format(jobstring6, sizeof(jobstring6), "Smuggle %i more packages to level up.", 75 - PlayerData[playerid][pSmugglerSkill]);
  13826. } else if(PlayerData[playerid][pSmugglerSkill] < 100) {
  13827. format(jobstring6, sizeof(jobstring6), "Smuggle %i more packages to level up.", 100 - PlayerData[playerid][pSmugglerSkill]);
  13828. }
  13829. }
  13830. else
  13831. {
  13832. format(jobstring6, sizeof(jobstring6), "You have reached the maximum skill level for this job.");
  13833. }
  13834. if(GetJobLevel(playerid, JOB_LAWYER) < 5)
  13835. {
  13836. if(PlayerData[playerid][pLawyerSkill] < 25) {
  13837. format(jobstring7, sizeof(jobstring7), "Defend %i more clients to level up.", 25 - PlayerData[playerid][pLawyerSkill]);
  13838. } else if(PlayerData[playerid][pLawyerSkill] < 50) {
  13839. format(jobstring7, sizeof(jobstring7), "Defend %i more clients to level up.", 50 - PlayerData[playerid][pLawyerSkill]);
  13840. } else if(PlayerData[playerid][pLawyerSkill] < 100) {
  13841. format(jobstring7, sizeof(jobstring7), "Defend %i more clients to level up.", 100 - PlayerData[playerid][pLawyerSkill]);
  13842. } else if(PlayerData[playerid][pLawyerSkill] < 200) {
  13843. format(jobstring7, sizeof(jobstring7), "Defend %i more clients to level up.", 200 - PlayerData[playerid][pLawyerSkill]);
  13844. }
  13845. }
  13846. else
  13847. {
  13848. format(jobstring7, sizeof(jobstring7), "You have reached the maximum skill level for this job.");
  13849. }
  13850. if(GetJobLevel(playerid, JOB_DETECTIVE) < 5)
  13851. {
  13852. if(PlayerData[playerid][pDetectiveSkill] < 50) {
  13853. format(jobstring8, sizeof(jobstring8), "Find %i more people to level up.", 50 - PlayerData[playerid][pDetectiveSkill]);
  13854. } else if(PlayerData[playerid][pDetectiveSkill] < 100) {
  13855. format(jobstring8, sizeof(jobstring8), "Find %i more people to level up.", 100 - PlayerData[playerid][pDetectiveSkill]);
  13856. } else if(PlayerData[playerid][pDetectiveSkill] < 200) {
  13857. format(jobstring8, sizeof(jobstring8), "You need to find %i more people to level up.", 200 - PlayerData[playerid][pDetectiveSkill]);
  13858. } else if(PlayerData[playerid][pDetectiveSkill] < 400) {
  13859. format(jobstring8, sizeof(jobstring8), "Find %i more people to level up.", 400 - PlayerData[playerid][pDetectiveSkill]);
  13860. }
  13861. }
  13862. else
  13863. {
  13864. format(jobstring8, sizeof(jobstring8), "You have reached the maximum skill level for this job.");
  13865. }
  13866. format(string, sizeof(string), "Job Courier\t{ffff00}Level: %d\t%s\n" \
  13867. "Job Lawyer\t{ffff00}Level: %d\t%s\n" \
  13868. "Job Detective\t{ffff00}Level: %d\t%s\n" \
  13869. "Job Fisherman\t{ffff00}Level: %d\t%s\n" \
  13870. "Job Weapon Dealer\t{ffff00}Level: %d\t%s\n" \
  13871. "Job Drug Dealer\t{ffff00}Level: %d\t%s\n" \
  13872. "Job Mechanic\t{ffff00}Level: %d\t%s\n" \
  13873. "Job Bodyguard\t{ffff00}Level: %d\t%s\n" \
  13874. "Job Trucker\t{ffff00}Level: %d\tCurrently XP: %d",
  13875. GetJobLevel(playerid, JOB_COURIER), jobstring1,
  13876. GetJobLevel(playerid, JOB_LAWYER), jobstring7,
  13877. GetJobLevel(playerid, JOB_DETECTIVE), jobstring8,
  13878. GetJobLevel(playerid, JOB_FISHERMAN), jobstring2,
  13879. GetJobLevel(playerid, JOB_WEAPONDEALER), jobstring4,
  13880. GetJobLevel(playerid, JOB_DRUGDEALER), jobstring6,
  13881. GetJobLevel(playerid, JOB_MECHANIC), jobstring5,
  13882. GetJobLevel(playerid, JOB_BODYGUARD), jobstring3,
  13883. PlayerData[playerid][pTruckingLevel], PlayerData[playerid][pTruckingXP]);
  13884. Dialog_Show(playerid, DIALOG_SKILL, DIALOG_STYLE_TABLIST, "My job skills", string, "Close", "");
  13885. }
  13886. case DIALOG_BUYVEHICLENEW:
  13887. {
  13888. Dialog_Show(playerid, DIALOG_BUYVEHICLENEW, DIALOG_STYLE_LIST, "Vehicle Menu", "Browse as Model\nBrowse as List", "Select", "");
  13889. }
  13890. case DIALOG_NEWBIE:
  13891. {
  13892. Dialog_Show(playerid, DIALOG_NEWBIE, DIALOG_STYLE_INPUT, "Ask Newbie Question", "Please input your question\nPlease bare in mind only script/server related questions will be answered.", "Send", "Cancel");
  13893. }
  13894. case ACCOUNT_CREATION:
  13895. {
  13896. new genderstring[12];
  13897. switch(PlayerData[playerid][pGender])
  13898. {
  13899. case 1: genderstring = "Male";
  13900. case 2: genderstring = "Female";
  13901. default: genderstring = "Unspecified";
  13902. }
  13903. format(string, sizeof(string), "Name\t%s\n\
  13904. Gender\t%s\n\
  13905. Age\t%d\n\
  13906. Accent\t%s\n\
  13907. Skin\t%d\n\
  13908. Complete",
  13909. GetPlayerNameEx(playerid),
  13910. genderstring,
  13911. PlayerData[playerid][pAge],
  13912. PlayerData[playerid][pAccent],
  13913. PlayerData[playerid][pSkin]);
  13914. Dialog_Show(playerid, ACCOUNT_CREATION, DIALOG_STYLE_TABLIST, "Account Registration", string, "Select", "");
  13915. }
  13916. case DIALOG_REGISTER:
  13917. {
  13918. Dialog_Show(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Account Registration", "Welcome to Old School Roleplay\n\nEnter your password of choice below to register:", "Register", "");
  13919. }
  13920. case DIALOG_LOGIN:
  13921. {
  13922. Dialog_Show(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "{FFFF00}Login Authentication", "{afafaf}Welcome to {00aa00}Old School Roleplay.\n\n{afafaf}Enter your account password below to login:", "Login", "");
  13923. SendClientMessage(playerid, COLOR_OLDSCHOOL, "[SERVER]{ffffff} You have 60 seconds to login otherwise you will be kicked from the server.");
  13924. showmotd(playerid);
  13925. }
  13926. case DIALOG_GENDER:
  13927. {
  13928. Dialog_Show(playerid, DIALOG_GENDER, DIALOG_STYLE_LIST, "Please choose your character's gender.", "Male\nFemale", "Select", "");
  13929. }
  13930. case DIALOG_AGE:
  13931. {
  13932. Dialog_Show(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "Please enter your character's age.", "Please input the age of your character below (10-99):", "Submit", "Back");
  13933. }
  13934. case DIALOG_REFERRAL:
  13935. {
  13936. Dialog_Show(playerid, DIALOG_REFERRAL, DIALOG_STYLE_INPUT, "Have you been referred here by anyone?", "Please enter the name of the player who referred you here:\n(You can click on 'Skip' if you haven't been referred by anyone.)", "Submit", "Skip");
  13937. }
  13938. case DIALOG_ATM:
  13939. {
  13940. format(string, sizeof(string), "What would you like to do today? (Your account balance is %s.)", FormatNumber(PlayerData[playerid][pBank]));
  13941. Dialog_Show(playerid, DIALOG_ATM, DIALOG_STYLE_LIST, string, "Cash deposit\nCash withdraw", "Select", "Cancel");
  13942. }
  13943. case DIALOG_ATMDEPOSIT:
  13944. {
  13945. format(string, sizeof(string), "How much would you like to deposit? (Your account balance is %s.)", FormatNumber(PlayerData[playerid][pBank]));
  13946. Dialog_Show(playerid, DIALOG_ATMDEPOSIT, DIALOG_STYLE_INPUT, "ATM Deposit", string, "Select", "Cancel");
  13947. }
  13948. case DIALOG_ATMWITHDRAW:
  13949. {
  13950. format(string, sizeof(string), "How much would you like to withdraw? (Your account balance is %s.)", FormatNumber(PlayerData[playerid][pBank]));
  13951. Dialog_Show(playerid, DIALOG_ATMWITHDRAW, DIALOG_STYLE_INPUT, "ATM Withdraw", string, "Select", "Cancel");
  13952. }
  13953. case DIALOG_BUYCLOTHINGTYPE:
  13954. {
  13955. Dialog_Show(playerid, DIALOG_BUYCLOTHINGTYPE, DIALOG_STYLE_LIST, "Choose a browsing method.", "Browse by Model\nBrowse by List", "Select", "Back");
  13956. }
  13957. case DIALOG_BUYCLOTHING:
  13958. {
  13959. new index = -1;
  13960. for(new i = 0; i < sizeof(clothingArray); i ++)
  13961. {
  13962. if(!strcmp(clothingArray[i][clothingType], clothingTypes[PlayerData[playerid][pCategory]]))
  13963. {
  13964. if(index == -1)
  13965. {
  13966. index = i;
  13967. }
  13968. format(string, sizeof(string), "%s\n%s", string, clothingArray[i][clothingName]);
  13969. }
  13970. }
  13971. PlayerData[playerid][pClothingIndex] = index;
  13972. Dialog_Show(playerid, DIALOG_BUYCLOTHING, DIALOG_STYLE_LIST, "Choose an item in order to preview it.", string, "Select", "Back");
  13973. }
  13974. case DIALOG_BUYCLOTHES:
  13975. {
  13976. new businessid = GetInsideBusiness(playerid);
  13977. if(businessid >= 0 && BusinessInfo[businessid][bType] == BUSINESS_CLOTHES)
  13978. {
  13979. format(string, sizeof(string), "%s's %s [%i products]", BusinessInfo[businessid][bOwner], bizInteriors[BusinessInfo[businessid][bType]][intType], BusinessInfo[businessid][bProducts]);
  13980. if(PlayerData[playerid][pDonator] > 0) {
  13981. Dialog_Show(playerid, DIALOG_BUYCLOTHES, DIALOG_STYLE_INPUT, string, "NOTE: New clothes are free for VIP members.\n\nPlease input the ID of the skin you wish to purchase.\n(( List of skins: http://wiki.sa-mp.com/wiki/Skins:All ))", "Submit", "Cancel");
  13982. } else {
  13983. Dialog_Show(playerid, DIALOG_BUYCLOTHES, DIALOG_STYLE_INPUT, string, "NOTE: New clothes costs $2,000.\n\nPlease input the ID of the skin you wish to purchase.\n(( List of skins: http://wiki.sa-mp.com/wiki/Skins:All ))", "Submit", "Cancel");
  13984. }
  13985. }
  13986. }
  13987. case DIALOG_FACTIONPAY1:
  13988. {
  13989. string = "#\tRank\tPaycheck";
  13990. for(new i = 0; i < FactionInfo[PlayerData[playerid][pFactionEdit]][fRankCount]; i ++)
  13991. {
  13992. format(string, sizeof(string), "%s\n%i\t%s\t{00AA00}%s{FFFFFF}", string, i, FactionRanks[PlayerData[playerid][pFactionEdit]][i], FormatNumber(FactionInfo[PlayerData[playerid][pFactionEdit]][fPaycheck][i]));
  13993. }
  13994. new header[128];
  13995. format(header, sizeof(header), "%s - {FFD700}$%i available/$%i budget", FactionInfo[PlayerData[playerid][pFactionEdit]][fName], FormatNumber(FactionInfo[PlayerData[playerid][pFactionEdit]][fBudget] - GetTotalFactionPay(PlayerData[playerid][pFactionEdit])), FormatNumber(FactionInfo[PlayerData[playerid][pFactionEdit]][fBudget]));
  13996. Dialog_Show(playerid, DIALOG_FACTIONPAY1, DIALOG_STYLE_TABLIST_HEADERS, header, string, "Change", "Cancel");
  13997. }
  13998. case DIALOG_PHONEBOOK:
  13999. {
  14000. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM phonebook ORDER BY name ASC LIMIT %i, %i", (PlayerData[playerid][pPage] - 1) * MAX_LISTED_NUMBERS, MAX_LISTED_NUMBERS);
  14001. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_VIEW_PHONEBOOK, playerid);
  14002. }
  14003. case DIALOG_LANDBUILDTYPE:
  14004. {
  14005. Dialog_Show(playerid, DIALOG_LANDBUILDTYPE, DIALOG_STYLE_LIST, "Choose your browsing method.", "Browse by Model\nBrowse by List", "Select", "Back");
  14006. }
  14007. case DIALOG_LANDBUILD1:
  14008. {
  14009. for(new i = 0; i < sizeof(landCategories); i ++)
  14010. {
  14011. format(string, sizeof(string), "%s\n%s", string, landCategories[i]);
  14012. }
  14013. Dialog_Show(playerid, DIALOG_LANDBUILD1, DIALOG_STYLE_LIST, "Choose a category to browse.", string, "Select", "Back");
  14014. }
  14015. case DIALOG_LANDBUILD2:
  14016. {
  14017. new index = -1;
  14018. for(new i = 0; i < sizeof(landArray); i ++)
  14019. {
  14020. if(!strcmp(landArray[i][fCategory], landCategories[PlayerData[playerid][pCategory]]))
  14021. {
  14022. if(index == -1)
  14023. {
  14024. index = i;
  14025. }
  14026. format(string, sizeof(string), "%s\n%s (%s)", string, landArray[i][fName], FormatNumber(landArray[i][fPrice]));
  14027. }
  14028. }
  14029. PlayerData[playerid][pFurnitureIndex] = index;
  14030. Dialog_Show(playerid, DIALOG_LANDBUILD2, DIALOG_STYLE_LIST, "Choose an item in order to preview it.", string, "Select", "Back");
  14031. }
  14032. case DIALOG_LANDMENU:
  14033. {
  14034. new
  14035. landid = GetNearbyLand(playerid);
  14036. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT COUNT(*) FROM landobjects WHERE landid = %i", LandInfo[landid][lID]);
  14037. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LAND_MAINMENU, playerid);
  14038. }
  14039. case DIALOG_LANDOBJECTMENU:
  14040. {
  14041. if(IsGateObject(PlayerData[playerid][pSelected]))
  14042. {
  14043. Dialog_Show(playerid, DIALOG_LANDOBJECTMENU, DIALOG_STYLE_LIST, "Choose how you want to edit this object.", "Edit object\nEdit gate destination\nDuplicate object\nSell object", "Select", "Back");
  14044. }
  14045. else
  14046. {
  14047. Dialog_Show(playerid, DIALOG_LANDOBJECTMENU, DIALOG_STYLE_LIST, "Choose how you want to edit this object.", "Edit object\nDuplicate object\nSell object", "Select", "Back");
  14048. }
  14049. }
  14050. case DIALOG_LANDOBJECTS:
  14051. {
  14052. new landid = GetNearbyLand(playerid);
  14053. if(landid >= 0 && HasLandPerms(playerid, landid))
  14054. {
  14055. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM landobjects WHERE landid = %i ORDER BY id DESC LIMIT %i, %i", LandInfo[landid][lID], (PlayerData[playerid][pPage] - 1) * MAX_LISTED_OBJECTS, MAX_LISTED_OBJECTS);
  14056. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LIST_LANDOBJECTS, playerid);
  14057. }
  14058. }
  14059. case DIALOG_MP3PLAYER:
  14060. {
  14061. Dialog_Show(playerid, DIALOG_MP3PLAYER, DIALOG_STYLE_LIST, "MP3 player", "Custom URL\nUploaded Music\nRadio Stations\nStop Music\nVIP Music", "Select", "Cancel");
  14062. }
  14063. case DIALOG_MP3RADIO:
  14064. {
  14065. Dialog_Show(playerid, DIALOG_MP3RADIO, DIALOG_STYLE_LIST, "Radio Stations", "Browse Genres\nSearch by Name", "Select", "Back");
  14066. }
  14067. case DIALOG_MP3RADIOGENRES:
  14068. {
  14069. new genre[32] = "n/a";
  14070. for(new i = 0; i < sizeof(radioGenreList); i ++)
  14071. {
  14072. if(strcmp(radioGenreList[i][rGenre], genre) != 0)
  14073. {
  14074. strcpy(genre, radioGenreList[i][rGenre]);
  14075. strcat(string, genre);
  14076. strcat(string, "\n");
  14077. }
  14078. }
  14079. Dialog_Show(playerid, DIALOG_MP3RADIOGENRES, DIALOG_STYLE_LIST, "Choose a genre to browse stations in.", string, "Select", "Back");
  14080. }
  14081. case DIALOG_MP3RADIOSUBGENRES:
  14082. {
  14083. for(new i = 0; i < sizeof(radioGenreList); i ++)
  14084. {
  14085. if(!strcmp(radioGenreList[i][rGenre], PlayerData[playerid][pGenre]))
  14086. {
  14087. format(string, sizeof(string), "%s\n%s", string, radioGenreList[i][rSubgenre]);
  14088. }
  14089. }
  14090. Dialog_Show(playerid, DIALOG_MP3RADIOSUBGENRES, DIALOG_STYLE_LIST, "Choose a subgenre to browse stations in.", string, "Select", "Back");
  14091. }
  14092. case DIALOG_MP3RADIORESULTS:
  14093. {
  14094. if(PlayerData[playerid][pSearch])
  14095. {
  14096. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT name FROM radiostations WHERE name LIKE '%%%e%%' OR subgenre LIKE '%%%e%%' ORDER BY name LIMIT %i, %i", PlayerData[playerid][pGenre], PlayerData[playerid][pGenre], (PlayerData[playerid][pPage] - 1) * MAX_LISTED_STATIONS, MAX_LISTED_STATIONS);
  14097. mysql_tquery(connectionID, queryBuffer, "Radio_ListStations", "i", playerid);
  14098. }
  14099. else
  14100. {
  14101. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT name FROM radiostations WHERE genre = '%e' AND subgenre = '%e' ORDER BY name LIMIT %i, %i", PlayerData[playerid][pGenre], PlayerData[playerid][pSubgenre], (PlayerData[playerid][pPage] - 1) * MAX_LISTED_STATIONS, MAX_LISTED_STATIONS);
  14102. mysql_tquery(connectionID, queryBuffer, "Radio_ListStations", "i", playerid);
  14103. }
  14104. }
  14105. case DIALOG_MP3RADIOSEARCH:
  14106. {
  14107. Dialog_Show(playerid, DIALOG_MP3RADIOSEARCH, DIALOG_STYLE_INPUT, "Search by Name", "Enter the full or partial name of the radio station:", "Submit", "Back");
  14108. }
  14109. /*case DIALOG_MP3APISEARCH:
  14110. {
  14111. Dialog_Show(playerid, DIALOG_MP3APISEARCH, DIALOG_STYLE_INPUT, "Search by Name", "Enter the full or partial name of the radio station:", "Submit", "Back");
  14112. }*/
  14113. case DIALOG_GANGSTASH:
  14114. {
  14115. format(string, sizeof(string), "Weapons\nKevlar Vest\nDrugs\nClothes\nCrafting\nMaterials (%d/%d)\nCash ($%d/$%d)", GangInfo[PlayerData[playerid][pGang]][gMaterials], GetGangStashCapacity(PlayerData[playerid][pGang], STASH_CAPACITY_MATERIALS), GangInfo[PlayerData[playerid][pGang]][gCash], GetGangStashCapacity(PlayerData[playerid][pGang], STASH_CAPACITY_CASH));
  14116. Dialog_Show(playerid, DIALOG_GANGSTASH, DIALOG_STYLE_LIST, "Gang Stash", string, "Select", "Cancel");
  14117. }
  14118. case DIALOG_GANGSTASHVEST:
  14119. {
  14120. format(string, sizeof(string), "Withdraw (R%i+)\nChange Rank", GangInfo[PlayerData[playerid][pGang]][gVestRank]);
  14121. Dialog_Show(playerid, DIALOG_GANGSTASHVEST, DIALOG_STYLE_LIST, "Gang stash | Kevlar Vest (Costs 200 materials.)", string, "Select", "Back");
  14122. }
  14123. case DIALOG_GANGSTASHWEAPONS1:
  14124. {
  14125. new gangstring[1260];
  14126. gangstring = "Amount\tName\tRank\t";
  14127. format(gangstring, sizeof(gangstring), "%s\n\
  14128. [%i]\t 9mm\t (R%i+)\n\
  14129. [%i]\t Sdpistol\t (R%i+)\n\
  14130. [%i]\t Deagle\t (R%i+)\n\
  14131. [%i]\t Shotgun\t (R%i+)\n\
  14132. [%i]\t Tec-9\t (R%i+)\n\
  14133. [%i]\t Micro Uzi\t (R%i+)\n\
  14134. [%i]\t MP5\t (R%i+)\n\
  14135. [%i]\t AK-47\t (R%i+)\n\
  14136. [%i]\t Rifle\t (R%i+)",
  14137. gangstring,
  14138. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_9MM], GangInfo[PlayerData[playerid][pGang]][gWeaponRanks][GANGWEAPON_9MM],
  14139. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_SDPISTOL], GangInfo[PlayerData[playerid][pGang]][gWeaponRanks][GANGWEAPON_SDPISTOL],
  14140. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_DEAGLE], GangInfo[PlayerData[playerid][pGang]][gWeaponRanks][GANGWEAPON_DEAGLE],
  14141. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_SHOTGUN], GangInfo[PlayerData[playerid][pGang]][gWeaponRanks][GANGWEAPON_SHOTGUN],
  14142. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_TEC9], GangInfo[PlayerData[playerid][pGang]][gWeaponRanks][GANGWEAPON_TEC9],
  14143. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_UZI], GangInfo[PlayerData[playerid][pGang]][gWeaponRanks][GANGWEAPON_UZI],
  14144. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_MP5], GangInfo[PlayerData[playerid][pGang]][gWeaponRanks][GANGWEAPON_MP5],
  14145. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_AK47], GangInfo[PlayerData[playerid][pGang]][gWeaponRanks][GANGWEAPON_AK47],
  14146. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_RIFLE], GangInfo[PlayerData[playerid][pGang]][gWeaponRanks][GANGWEAPON_RIFLE]);
  14147. Dialog_Show(playerid, DIALOG_GANGSTASHWEAPONS1, DIALOG_STYLE_TABLIST_HEADERS, "Gang stash | Weapons", gangstring, "Select", "Back");
  14148. }
  14149. case DIALOG_GANGSTASHDRUGS1:
  14150. {
  14151. format(string, sizeof(string), "Weed (%i/%ig)\nCocaine (%i/%ig)\nMeth (%i/%ig)\nPainkillers (%i/%i)",
  14152. GangInfo[PlayerData[playerid][pGang]][gWeed], GetGangStashCapacity(PlayerData[playerid][pGang], STASH_CAPACITY_WEED), GangInfo[PlayerData[playerid][pGang]][gCocaine], GetGangStashCapacity(PlayerData[playerid][pGang], STASH_CAPACITY_COCAINE), GangInfo[PlayerData[playerid][pGang]][gMeth], GetGangStashCapacity(PlayerData[playerid][pGang], STASH_CAPACITY_METH), GangInfo[PlayerData[playerid][pGang]][gPainkillers], GetGangStashCapacity(PlayerData[playerid][pGang], STASH_CAPACITY_PAINKILLERS));
  14153. Dialog_Show(playerid, DIALOG_GANGSTASHDRUGS1, DIALOG_STYLE_LIST, "Gang stash | Drugs", string, "Select", "Back");
  14154. }
  14155. case DIALOG_GANGSTASHDRUGS2:
  14156. {
  14157. if(PlayerData[playerid][pSelected] == ITEM_WEED) {
  14158. Dialog_Show(playerid, DIALOG_GANGSTASHDRUGS2, DIALOG_STYLE_LIST, "Gang stash | Weed", "Withdraw\nDeposit", "Select", "Back");
  14159. } else if(PlayerData[playerid][pSelected] == ITEM_COCAINE) {
  14160. Dialog_Show(playerid, DIALOG_GANGSTASHDRUGS2, DIALOG_STYLE_LIST, "Gang stash | Cocaine", "Withdraw\nDeposit", "Select", "Back");
  14161. } else if(PlayerData[playerid][pSelected] == ITEM_METH) {
  14162. Dialog_Show(playerid, DIALOG_GANGSTASHDRUGS2, DIALOG_STYLE_LIST, "Gang stash | Meth", "Withdraw\nDeposit", "Select", "Back");
  14163. } else if(PlayerData[playerid][pSelected] == ITEM_PAINKILLERS) {
  14164. Dialog_Show(playerid, DIALOG_GANGSTASHDRUGS2, DIALOG_STYLE_LIST, "Gang stash | Painkillers", "Withdraw\nDeposit", "Select", "Back");
  14165. }
  14166. }
  14167. case DIALOG_GANGSTASHCRAFT:
  14168. {
  14169. format(string, sizeof(string), "Gang stash | Crafting (Your safe has %i materials.)", GangInfo[PlayerData[playerid][pGang]][gMaterials]);
  14170. Dialog_Show(playerid, DIALOG_GANGSTASHCRAFT, DIALOG_STYLE_TABLIST_HEADERS, string, "#\tWeapon\tCost\n1\t9mm\t100 materials\n2\tSdpistol\t150 materials\n3\tShotgun\t200 materials\n4\tMicro SMG\t500 materials\n5\tTec-9\t500 materials\n6\tMP5\t1000 materials\n7\tRifle\t1000 materials\n8\tDesert Eagle\t2000 materials\n9\tAK-47\t3000 materials", "Craft", "Back");
  14171. }
  14172. case DIALOG_GANGSTASHMATS:
  14173. {
  14174. format(string, sizeof(string), "Withdraw (%i/%i)\nDeposit", GangInfo[PlayerData[playerid][pGang]][gMaterials], GetGangStashCapacity(PlayerData[playerid][pGang], STASH_CAPACITY_MATERIALS));
  14175. Dialog_Show(playerid, DIALOG_GANGSTASHMATS, DIALOG_STYLE_LIST, "Gang stash | Materials", string, "Select", "Back");
  14176. }
  14177. case DIALOG_GANGSTASHCASH:
  14178. {
  14179. format(string, sizeof(string), "Withdraw ($%i/$%i)\nDeposit", GangInfo[PlayerData[playerid][pGang]][gCash], GetGangStashCapacity(PlayerData[playerid][pGang], STASH_CAPACITY_CASH));
  14180. Dialog_Show(playerid, DIALOG_GANGSTASHCASH, DIALOG_STYLE_LIST, "Gang stash | Cash", string, "Select", "Back");
  14181. }
  14182. case DIALOG_GANGWITHDRAW:
  14183. {
  14184. if(PlayerData[playerid][pSelected] == ITEM_WEED) {
  14185. format(string, sizeof(string), "How much weed would you like to withdraw? (The safe contains %i/%i grams.)", GangInfo[PlayerData[playerid][pGang]][gWeed], GetGangStashCapacity(PlayerData[playerid][pGang], STASH_CAPACITY_WEED));
  14186. } else if(PlayerData[playerid][pSelected] == ITEM_COCAINE) {
  14187. format(string, sizeof(string), "How much cocaine would you like to withdraw? (The safe contains %i/%i grams.)", GangInfo[PlayerData[playerid][pGang]][gCocaine], GetGangStashCapacity(PlayerData[playerid][pGang], STASH_CAPACITY_COCAINE));
  14188. } else if(PlayerData[playerid][pSelected] == ITEM_METH) {
  14189. format(string, sizeof(string), "How much meth would you like to withdraw? (The safe contains %i/%i grams.)", GangInfo[PlayerData[playerid][pGang]][gMeth], GetGangStashCapacity(PlayerData[playerid][pGang], STASH_CAPACITY_METH));
  14190. } else if(PlayerData[playerid][pSelected] == ITEM_PAINKILLERS) {
  14191. format(string, sizeof(string), "How much painkillers would you like to withdraw? (The safe contains %i/%i.)", GangInfo[PlayerData[playerid][pGang]][gPainkillers], GetGangStashCapacity(PlayerData[playerid][pGang], STASH_CAPACITY_PAINKILLERS));
  14192. } else if(PlayerData[playerid][pSelected] == ITEM_MATERIALS) {
  14193. format(string, sizeof(string), "How much materials would you like to withdraw? (The safe contains %i/%i.)", GangInfo[PlayerData[playerid][pGang]][gMaterials], GetGangStashCapacity(PlayerData[playerid][pGang], STASH_CAPACITY_MATERIALS));
  14194. } else if(PlayerData[playerid][pSelected] == ITEM_CASH) {
  14195. format(string, sizeof(string), "How much cash would you like to withdraw? (The safe contains $%i/$%i.)", GangInfo[PlayerData[playerid][pGang]][gCash], GetGangStashCapacity(PlayerData[playerid][pGang], STASH_CAPACITY_CASH));
  14196. }
  14197. Dialog_Show(playerid, DIALOG_GANGWITHDRAW, DIALOG_STYLE_INPUT, "Gang stash | Withdraw", string, "Submit", "Back");
  14198. }
  14199. case DIALOG_GANGDEPOSIT:
  14200. {
  14201. if(PlayerData[playerid][pSelected] == ITEM_WEED) {
  14202. format(string, sizeof(string), "How much weed would you like to deposit? (The safe contains %i/%i grams.)", GangInfo[PlayerData[playerid][pGang]][gWeed], GetGangStashCapacity(PlayerData[playerid][pGang], STASH_CAPACITY_WEED));
  14203. } else if(PlayerData[playerid][pSelected] == ITEM_COCAINE) {
  14204. format(string, sizeof(string), "How much cocaine would you like to deposit? (The safe contains %i/%i grams.)", GangInfo[PlayerData[playerid][pGang]][gCocaine], GetGangStashCapacity(PlayerData[playerid][pGang], STASH_CAPACITY_COCAINE));
  14205. } else if(PlayerData[playerid][pSelected] == ITEM_METH) {
  14206. format(string, sizeof(string), "How much meth would you like to deposit? (The safe contains %i/%i grams.)", GangInfo[PlayerData[playerid][pGang]][gMeth], GetGangStashCapacity(PlayerData[playerid][pGang], STASH_CAPACITY_METH));
  14207. } else if(PlayerData[playerid][pSelected] == ITEM_PAINKILLERS) {
  14208. format(string, sizeof(string), "How much painkillers would you like to deposit? (The safe contains %i/%i.)", GangInfo[PlayerData[playerid][pGang]][gPainkillers], GetGangStashCapacity(PlayerData[playerid][pGang], STASH_CAPACITY_PAINKILLERS));
  14209. } else if(PlayerData[playerid][pSelected] == ITEM_MATERIALS) {
  14210. format(string, sizeof(string), "How much materials would you like to deposit? (The safe contains %i/%i.)", GangInfo[PlayerData[playerid][pGang]][gMaterials], GetGangStashCapacity(PlayerData[playerid][pGang], STASH_CAPACITY_MATERIALS));
  14211. } else if(PlayerData[playerid][pSelected] == ITEM_CASH) {
  14212. format(string, sizeof(string), "How much cash would you like to deposit? (The safe contains $%i/$%i.)", GangInfo[PlayerData[playerid][pGang]][gCash], GetGangStashCapacity(PlayerData[playerid][pGang], STASH_CAPACITY_CASH));
  14213. }
  14214. Dialog_Show(playerid, DIALOG_GANGDEPOSIT, DIALOG_STYLE_INPUT, "Gang stash | Deposit", string, "Submit", "Back");
  14215. }
  14216. case DIALOG_GANGARMSPRICES:
  14217. {
  14218. format(string, sizeof(string), "#\tWeapon\tPrice\tCost\n1\tMicro Uzi\t$%i\t500 materials\n2\tTec-9\t$%i\t500 materials\n3\tMP5\t$%i\t1000 materials\n4\tDesert Eagle\t$%i\t2000 materials\n5\tMolotov\t$%i\t5000 materials\n6\tAK-47\t$%i\t3000 materials\n7\tM4\t$%i\t4000 materials\n8\tSniper\t$%i\t6500 materials\n9\tSawnoff Shotgun\t$%i\t3000 materials",
  14219. GangInfo[PlayerData[playerid][pGang]][gArmsPrices][0], GangInfo[PlayerData[playerid][pGang]][gArmsPrices][1], GangInfo[PlayerData[playerid][pGang]][gArmsPrices][2], GangInfo[PlayerData[playerid][pGang]][gArmsPrices][3], GangInfo[PlayerData[playerid][pGang]][gArmsPrices][4], GangInfo[PlayerData[playerid][pGang]][gArmsPrices][5], GangInfo[PlayerData[playerid][pGang]][gArmsPrices][6], GangInfo[PlayerData[playerid][pGang]][gArmsPrices][7], GangInfo[PlayerData[playerid][pGang]][gArmsPrices][8]);
  14220. Dialog_Show(playerid, DIALOG_GANGARMSPRICES, DIALOG_STYLE_TABLIST_HEADERS, "Choose a weapon price to edit.", string, "Change", "Back");
  14221. }
  14222. case DIALOG_GANGARMSDEALER:
  14223. {
  14224. Dialog_Show(playerid, DIALOG_GANGARMSDEALER, DIALOG_STYLE_LIST, "Arms dealer", "Buy Guns\nEdit", "Select", "Cancel");
  14225. }
  14226. case DIALOG_GANGARMSWEAPONS:
  14227. {
  14228. new
  14229. title[48];
  14230. format(title, sizeof(title), "Gang arms dealer (Materials available: %i.)", GangInfo[PlayerData[playerid][pDealerGang]][gArmsMaterials]);
  14231. format(string, sizeof(string), "#\tWeapon\tPrice\tCost\n1\tMicro Uzi\t$%i\t500 materials\n2\tTec-9\t$%i\t500 materials\n3\tMP5\t$%i\t1000 materials\n4\tDesert Eagle\t$%i\t2000 materials\n5\tMolotov\t$%i\t5000 materials\n6\tAK-47\t$%i\t3000 materials\n7\tM4\t$%i\t4000 materials\n8\tSniper\t$%i\t6500 materials\n9\tSawnoff Shotgun\t$%i\t3000 materials",
  14232. GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][0], GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][1], GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][2], GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][3], GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][4], GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][5], GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][6], GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][7],
  14233. GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][8]);
  14234. Dialog_Show(playerid, DIALOG_GANGARMSWEAPONS, DIALOG_STYLE_TABLIST_HEADERS, title, string, "Buy", "Back");
  14235. }
  14236. case DIALOG_GANGARMSEDIT:
  14237. {
  14238. format(string, sizeof(string), "Arms dealer (Materials available: %i.)", GangInfo[PlayerData[playerid][pGang]][gArmsMaterials]);
  14239. Dialog_Show(playerid, DIALOG_GANGARMSEDIT, DIALOG_STYLE_LIST, string, "Edit prices\nDeposit mats\nWithdraw mats", "Select", "Back");
  14240. }
  14241. case GangStashDepositMats:
  14242. {
  14243. format(string, sizeof(string), "How much materials would you like to deposit? (This arms dealer contains %i materials.)", GangInfo[PlayerData[playerid][pGang]][gArmsMaterials]);
  14244. Dialog_Show(playerid, GangStashDepositMats, DIALOG_STYLE_INPUT, "Arms dealer | Deposit", string, "Submit", "Back");
  14245. }
  14246. case GangStashWithdrawMats:
  14247. {
  14248. format(string, sizeof(string), "How much materials would you like to withdraw? (This arms dealer contains %i materials.)", GangInfo[PlayerData[playerid][pGang]][gArmsMaterials]);
  14249. Dialog_Show(playerid, GangStashWithdrawMats, DIALOG_STYLE_INPUT, "Arms dealer | Withdraw", string, "Submit", "Back");
  14250. }
  14251. case DIALOG_CRACKTRUNK:
  14252. {
  14253. if(VehicleInfo[PlayerData[playerid][pCocaineFrom]][vWeed]/20 > 0) format(string, sizeof(string), "%s\nWeed (%ig)", string, VehicleInfo[PlayerData[playerid][pCocaineFrom]][vWeed]/20);
  14254. if(VehicleInfo[PlayerData[playerid][pCocaineFrom]][vCocaine]/20 > 0) format(string, sizeof(string), "%s\nCocaine (%ig)", string, VehicleInfo[PlayerData[playerid][pCocaineFrom]][vCocaine]/20);
  14255. if(VehicleInfo[PlayerData[playerid][pCocaineFrom]][vMeth]/20 > 0) format(string, sizeof(string), "%s\nMeth (%ig)", string, VehicleInfo[PlayerData[playerid][pCocaineFrom]][vMeth]/20);
  14256. if(VehicleInfo[PlayerData[playerid][pCocaineFrom]][vPainkillers]/20 > 0) format(string, sizeof(string), "%s\nPainkillers (%ig)", string, VehicleInfo[PlayerData[playerid][pCocaineFrom]][vPainkillers]/20);
  14257. if(VehicleInfo[PlayerData[playerid][pCocaineFrom]][vMaterials]/20 > 0) format(string, sizeof(string), "%s\nMaterials (%i)", string, VehicleInfo[PlayerData[playerid][pCocaineFrom]][vMaterials]/20);
  14258. if(VehicleInfo[PlayerData[playerid][pCocaineFrom]][vCash]/20 > 0) format(string, sizeof(string), "%s\nCash ($%i)", string, VehicleInfo[PlayerData[playerid][pCocaineFrom]][vCash]/20);
  14259. for(new x = 0; x < 5; x ++)
  14260. {
  14261. if(VehicleInfo[PlayerData[playerid][pCocaineFrom]][vWeapons][x] != 0)
  14262. {
  14263. format(string, sizeof(string), "%s\n%s", string, GetWeaponNameEx(VehicleInfo[PlayerData[playerid][pCocaineFrom]][vWeapons][x]));
  14264. }
  14265. }
  14266. Dialog_Show(playerid, DIALOG_CRACKTRUNK, DIALOG_STYLE_LIST, "Choose ONE item to take from the trunk.", string, "Take", "Cancel");
  14267. }
  14268. case DIALOG_RULES:
  14269. {
  14270. Dialog_Show(playerid, DIALOG_RULES, DIALOG_STYLE_LIST, "List of Server Rules", "No third-party modifications such as cheats\nNo exploiting\nNo non-RP advertisements\nNo death-match\nNo spawn-killing\nNo revenge-killing\nNo non-RP car raming.\nNo heli-blading\nNo meta-gaming\nNo money farming\nNo lying to administrators\nRobbery Policy\nScamming Policy\nList of all rules may be available at theroleplay.com", "Close", "");
  14271. }
  14272. case DIALOG_LOCATE:
  14273. {
  14274. Dialog_Show(playerid, DIALOG_LOCATE, DIALOG_STYLE_LIST, "GPS - Select Destination", "Job Locations\nNearest Businesses\nGeneral Locations\nFind Turfs\nFind Points\nMore Locations\nMy Houses\nMy Businesses", "Select", "Close");
  14275. }
  14276. case DIALOG_FACTIONEQUIPMENT:
  14277. {
  14278. new lockerid = GetNearbyLocker(playerid);
  14279. string = "Weapon\tPrice\n";
  14280. if(LockerInfo[lockerid][locKevlar][0]) { format(string, sizeof(string), "%sKevlar Vest\t$%i\n", string, LockerInfo[lockerid][locKevlar][1]); }
  14281. if(LockerInfo[lockerid][locMedKit][0]) { format(string, sizeof(string), "%sMedkit\t$%i\n", string, LockerInfo[lockerid][locMedKit][1]); }
  14282. if(LockerInfo[lockerid][locNitestick][0]) { format(string, sizeof(string), "%sNitestick\t$%i\n", string, LockerInfo[lockerid][locNitestick][1]); }
  14283. if(LockerInfo[lockerid][locMace][0]) { format(string, sizeof(string), "%sMace\t$%i\n", string, LockerInfo[lockerid][locMace][1]); }
  14284. if(LockerInfo[lockerid][locDeagle][0]) { format(string, sizeof(string), "%sDeagle\t$%i\n", string, LockerInfo[lockerid][locDeagle][1]); }
  14285. if(LockerInfo[lockerid][locShotgun][0]) { format(string, sizeof(string), "%sShotgun\t$%i\n", string, LockerInfo[lockerid][locShotgun][1]); }
  14286. if(LockerInfo[lockerid][locMP5][0]) { format(string, sizeof(string), "%sMP5\t$%i\n", string, LockerInfo[lockerid][locMP5][1]); }
  14287. if(LockerInfo[lockerid][locM4][0]) { format(string, sizeof(string), "%sM4\t$%i\n", string, LockerInfo[lockerid][locM4][1]); }
  14288. if(LockerInfo[lockerid][locSpas12][0]) { format(string, sizeof(string), "%sSPAS-12\t$%i\n", string, LockerInfo[lockerid][locSpas12][1]); }
  14289. if(LockerInfo[lockerid][locSniper][0]) { format(string, sizeof(string), "%sSniper\t$%i\n", string, LockerInfo[lockerid][locSniper][1]); }
  14290. if(LockerInfo[lockerid][locCamera][0]) { format(string, sizeof(string), "%sCamera\t$%i\n", string, LockerInfo[lockerid][locCamera][1]); }
  14291. if(LockerInfo[lockerid][locFireExt][0]) { format(string, sizeof(string), "%sFire Extinguisher\t$%i\n", string, LockerInfo[lockerid][locFireExt][1]); }
  14292. if(LockerInfo[lockerid][locPainKillers][0]) { format(string, sizeof(string), "%sPainkillers\t$%i\n", string, LockerInfo[lockerid][locPainKillers][1]); }
  14293. Dialog_Show(playerid, DIALOG_FACTIONEQUIPMENT, DIALOG_STYLE_TABLIST_HEADERS, "Locker", string, "Select", "Cancel");
  14294. }
  14295. case DIALOG_CREATEQUIZ:
  14296. {
  14297. if(CreateQuiz == -1)
  14298. {
  14299. CreateQuiz = 0;
  14300. Dialog_Show(playerid, DIALOG_CREATEQUIZ, DIALOG_STYLE_INPUT, "Create A Quiz - Enter Question", "What should the question be? (displayed globally)", "Submit", "Back");
  14301. }
  14302. if(CreateQuiz == 1)
  14303. {
  14304. Dialog_Show(playerid, DIALOG_CREATEQUIZ, DIALOG_STYLE_INPUT, "Create A Quiz - Enter Answer", "What should the answer be? (displayed once answered)", "Submit", "Back");
  14305. }
  14306. }
  14307. case DIALOG_DELETEOBJECT:
  14308. {
  14309. format(string, sizeof(string), "Object %i selected\n{FFFFFF}Would you really like to {FF0000}delete{FFFFFF} it?", PlayerData[playerid][pSelected]);
  14310. Dialog_Show(playerid, DIALOG_DELETEOBJECT, DIALOG_STYLE_MSGBOX, "Delete Mode - Dynamic Object Selected", string, "Yes", "No");
  14311. }
  14312. case DIALOG_PAINTBALL:
  14313. {
  14314. string = "Name\tType\tCurrent Players\n";
  14315. format(string, sizeof(string), "%sDeathmatch Arena\tFFA\t%i\n", string, GetArenaPlayers(1));
  14316. format(string, sizeof(string), "%sTeam Deathmatch Arena\tTDM\t%i\n", string, GetArenaPlayers(2));
  14317. format(string, sizeof(string), "%sDeagle Arena\t1Shot\t%i\n", string, GetArenaPlayers(3));
  14318. format(string, sizeof(string), "%sSniper Arena\t1Shot\t%i\n", string, GetArenaPlayers(4));
  14319. Dialog_Show(playerid, DIALOG_PAINTBALL, DIALOG_STYLE_TABLIST_HEADERS, "Paintball", string, "Select", "Cancel");
  14320. }
  14321. case DIALOG_ADDSTATION:
  14322. {
  14323. Dialog_Show(playerid, DIALOG_ADDSTATION, DIALOG_STYLE_INPUT, "Radio Station Manager", "Enter the link of the station you'd like to add", "Add", "Cancel");
  14324. }
  14325. }
  14326. return 1;
  14327. }
  14328. GetArenaPlayers(arena)
  14329. {
  14330. new players;
  14331. foreach(new i : Player)
  14332. {
  14333. if(PlayerData[i][pPaintball] == arena)
  14334. {
  14335. players++;
  14336. }
  14337. }
  14338. return players;
  14339. }
  14340. SetPlayerToSpawn(playerid)
  14341. {
  14342. if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING)
  14343. {
  14344. SetSpawnInfo(playerid, NO_TEAM, PlayerData[playerid][pSkin], 820.5590, -1342.6283, 13.5216, 90.0000, 0, 0, 0, 0, 0, 0);
  14345. TogglePlayerSpectating(playerid, 0);
  14346. }
  14347. else
  14348. {
  14349. if(IsPlayerInAnyVehicle(playerid))
  14350. {
  14351. new
  14352. Float:x,
  14353. Float:y,
  14354. Float:z;
  14355. GetPlayerPos(playerid, x, y, z);
  14356. SetPlayerPos(playerid, x, y, z + 5.0);
  14357. }
  14358. switch(GetPlayerState(playerid))
  14359. {
  14360. case PLAYER_STATE_NONE, PLAYER_STATE_WASTED:
  14361. {
  14362. SpawnPlayer(playerid);
  14363. }
  14364. default:
  14365. {
  14366. OnPlayerSpawn(playerid);
  14367. }
  14368. }
  14369. }
  14370. PlayerData[playerid][pACTime] = gettime() + 2;
  14371. }
  14372. SetPlayerToFacePlayer(playerid, targetid)
  14373. {
  14374. new
  14375. Float:px,
  14376. Float:py,
  14377. Float:pz,
  14378. Float:tx,
  14379. Float:ty,
  14380. Float:tz;
  14381. GetPlayerPos(targetid, tx, ty, tz);
  14382. GetPlayerPos(playerid, px, py, pz);
  14383. SetPlayerFacingAngle(playerid, 180.0 - atan2(px - tx, py - ty));
  14384. }
  14385. forward SavePlayerVariables(playerid);
  14386. public SavePlayerVariables(playerid)
  14387. {
  14388. if(PlayerData[playerid][pLogged] && !PlayerData[playerid][pAdminDuty] && !PlayerData[playerid][pUndercover][0])
  14389. {
  14390. if(GetPlayerState(playerid) != PLAYER_STATE_SPECTATING && !IsPlayerInRangeOfPoint(playerid, 2.0, 0.0, 0.0, 0.0) && !PlayerData[playerid][pJoinedEvent] && PlayerData[playerid][pPaintball] == 0 && !PlayerData[playerid][pAcceptedHelp] && PlayerData[playerid][pDueling] == INVALID_PLAYER_ID && PlayerData[playerid][pPreviewHouse] == -1)
  14391. {
  14392. SavePlayerWeapons(playerid);
  14393. GetPlayerCameraPos(playerid, PlayerData[playerid][pCameraX], PlayerData[playerid][pCameraY], PlayerData[playerid][pCameraZ]);
  14394. GetPlayerPos(playerid, PlayerData[playerid][pPosX], PlayerData[playerid][pPosY], PlayerData[playerid][pPosZ]);
  14395. GetPlayerFacingAngle(playerid, PlayerData[playerid][pPosA]);
  14396. if(!PlayerData[playerid][pHHCheck])
  14397. {
  14398. GetPlayerHealth(playerid, PlayerData[playerid][pHealth]);
  14399. GetPlayerArmour(playerid, PlayerData[playerid][pArmor]);
  14400. }
  14401. PlayerData[playerid][pInterior] = GetPlayerInterior(playerid);
  14402. PlayerData[playerid][pWorld] = GetPlayerVirtualWorld(playerid);
  14403. }
  14404. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET camera_x = '%f', camera_y = '%f', camera_z = '%f', pos_x = '%f', pos_y = '%f', pos_z = '%f', pos_a = '%f', interior = %i, world = %i, health = '%f', armor = '%f', minutes = %i, warnings = %i, injured = %i, hospital = %i, upgradepoints = %i, spawnhealth = '%f', spawnarmor = '%f', jailtype = %i, jailtime = %i WHERE uid = %i", PlayerData[playerid][pCameraX], PlayerData[playerid][pCameraY],
  14405. PlayerData[playerid][pCameraZ], PlayerData[playerid][pPosX], PlayerData[playerid][pPosY], PlayerData[playerid][pPosZ], PlayerData[playerid][pPosA], PlayerData[playerid][pInterior], PlayerData[playerid][pWorld], PlayerData[playerid][pHealth], PlayerData[playerid][pArmor], PlayerData[playerid][pMinutes], PlayerData[playerid][pWarnings], PlayerData[playerid][pInjured], PlayerData[playerid][pHospital], PlayerData[playerid][pUpgradePoints], PlayerData[playerid][pSpawnHealth],
  14406. PlayerData[playerid][pSpawnArmor], PlayerData[playerid][pJailType], PlayerData[playerid][pJailTime], PlayerData[playerid][pID]);
  14407. mysql_tquery(connectionID, queryBuffer);
  14408. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET newbiemuted = %i, helpmuted = %i, admuted = %i, livemuted = %i, globalmuted = %i, reportmuted = %i, reportwarns = %i, fightstyle = %i, cookies = %i, toggletextdraws = %i, toggleooc = %i, togglephone = %i, toggleadmin = %i, togglehelper = %i, togglenewbie = %i, togglewt = %i, togglevip = %i WHERE uid = %i", PlayerData[playerid][pNewbieMuted], PlayerData[playerid][pHelpMuted], PlayerData[playerid][pAdMuted],
  14409. PlayerData[playerid][pLiveMuted], PlayerData[playerid][pGlobalMuted], PlayerData[playerid][pReportMuted], PlayerData[playerid][pReportWarns], PlayerData[playerid][pFightStyle], PlayerData[playerid][pCookies], PlayerData[playerid][pToggleTextdraws], PlayerData[playerid][pToggleOOC], PlayerData[playerid][pTogglePhone], PlayerData[playerid][pToggleAdmin], PlayerData[playerid][pToggleHelper], PlayerData[playerid][pToggleNewbie], PlayerData[playerid][pToggleWT],
  14410. PlayerData[playerid][pToggleVIP], PlayerData[playerid][pID]);
  14411. mysql_tquery(connectionID, queryBuffer);
  14412. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET togglereports = %i, togglewhisper = %i, togglebug = %i, newbiemutetime = %i, reportmutetime = %i, globalmutetime = %i, adminhide = %i, totalpatients = %i, totalfires = %i, scanneron = %i, rarecooldown = %i WHERE uid = %i",
  14413. PlayerData[playerid][pToggleReports], PlayerData[playerid][pToggleWhisper], PlayerData[playerid][pToggleBug], PlayerData[playerid][pNewbieMuteTime], PlayerData[playerid][pReportMuteTime], PlayerData[playerid][pGlobalMuteTime], PlayerData[playerid][pAdminHide], PlayerData[playerid][pTotalPatients], PlayerData[playerid][pTotalFires], PlayerData[playerid][pScannerOn], PlayerData[playerid][pRareTime], PlayerData[playerid][pID]);
  14414. mysql_tquery(connectionID, queryBuffer);
  14415. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET weed = %d, cocaine = %d, meth = %d, materials = %d, rope = %d, spraycans = %d WHERE uid = %i",
  14416. PlayerData[playerid][pWeed], PlayerData[playerid][pCocaine], PlayerData[playerid][pMeth], PlayerData[playerid][pMaterials], PlayerData[playerid][pRope], PlayerData[playerid][pSpraycans], PlayerData[playerid][pID]);
  14417. mysql_tquery(connectionID, queryBuffer);
  14418. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET togglevehicle = %d WHERE uid = %d", PlayerData[playerid][pToggleVehCam], PlayerData[playerid][pID]);
  14419. mysql_tquery(connectionID, queryBuffer);
  14420. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET gunlicense = %d, housealarm = %i where uid = %d", PlayerData[playerid][pGunLicense], PlayerData[playerid][pHouseAlarm], PlayerData[playerid][pID]);
  14421. mysql_tquery(connectionID, queryBuffer);
  14422. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET chatstyle = %i WHERE uid = %i", PlayerData[playerid][pChatstyle], PlayerData[playerid][pID]);
  14423. mysql_tquery(connectionID, queryBuffer);
  14424. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET spawntype = %i, spawnhouse = %i WHERE uid = %i", PlayerData[playerid][pSpawnSelect], PlayerData[playerid][pSpawnHouse], PlayerData[playerid][pID]);
  14425. mysql_tquery(connectionID, queryBuffer);
  14426. }
  14427. }
  14428. SavePlayerWeapons(playerid)
  14429. {
  14430. if(PlayerData[playerid][pLogged] && !PlayerData[playerid][pJoinedEvent] && PlayerData[playerid][pPaintball] == 0 && PlayerData[playerid][pDueling] == INVALID_PLAYER_ID)
  14431. {
  14432. // Saving weapons.
  14433. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET \
  14434. `weapon_0` = %i, \
  14435. `weapon_1` = %i, \
  14436. `weapon_2` = %i, \
  14437. `weapon_3` = %i, \
  14438. `weapon_4` = %i, \
  14439. `weapon_5` = %i, \
  14440. `weapon_6` = %i, \
  14441. `weapon_7` = %i, \
  14442. `weapon_8` = %i, \
  14443. `weapon_9` = %i, \
  14444. `weapon_10` = %i, \
  14445. `weapon_11` = %i, \
  14446. `weapon_12` = %i \
  14447. WHERE `uid` = %i",
  14448. PlayerData[playerid][pWeapons][0],
  14449. PlayerData[playerid][pWeapons][1],
  14450. PlayerData[playerid][pWeapons][2],
  14451. PlayerData[playerid][pWeapons][3],
  14452. PlayerData[playerid][pWeapons][4],
  14453. PlayerData[playerid][pWeapons][5],
  14454. PlayerData[playerid][pWeapons][6],
  14455. PlayerData[playerid][pWeapons][7],
  14456. PlayerData[playerid][pWeapons][8],
  14457. PlayerData[playerid][pWeapons][9],
  14458. PlayerData[playerid][pWeapons][10],
  14459. PlayerData[playerid][pWeapons][11],
  14460. PlayerData[playerid][pWeapons][12],
  14461. PlayerData[playerid][pID]);
  14462. mysql_tquery(connectionID, queryBuffer);
  14463. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET ammo_0 = %i, ammo_1 = %i, ammo_2 = %i, ammo_3 = %i, ammo_4 = %i, ammo_5 = %i, ammo_6 = %i, ammo_7 = %i, ammo_8 = %i, ammo_9 = %i, ammo_10 = %i, ammo_11 = %i, ammo_12 = %i WHERE uid = %i",
  14464. PlayerData[playerid][pAmmo][0], PlayerData[playerid][pAmmo][1], PlayerData[playerid][pAmmo][2], PlayerData[playerid][pAmmo][3], PlayerData[playerid][pAmmo][4], PlayerData[playerid][pAmmo][5], PlayerData[playerid][pAmmo][6], PlayerData[playerid][pAmmo][7], PlayerData[playerid][pAmmo][8], PlayerData[playerid][pAmmo][9], PlayerData[playerid][pAmmo][10], PlayerData[playerid][pAmmo][11], PlayerData[playerid][pGunsAmmo][12], PlayerData[playerid][pID]);
  14465. mysql_tquery(connectionID, queryBuffer);
  14466. }
  14467. }
  14468. SendPaycheck(playerid)
  14469. {
  14470. // Paycheck amounts are temporary until a job system is put in place.
  14471. PlayerData[playerid][pPaycheck] += min(PlayerData[playerid][pLevel], 21) * 250;
  14472. new str[2000], coordsstring[286];
  14473. new paycheck = PlayerData[playerid][pPaycheck];
  14474. new interest, rate;
  14475. new tax = (paycheck / 100) * gTax; // gTax = tax
  14476. new rent = 0, renting = -1; // temp
  14477. new total = paycheck - tax;
  14478. // If the player is a VIP, adjust his interest rate accordingly.
  14479. if(PlayerData[playerid][pDonator] == 0)
  14480. {
  14481. rate = 1;
  14482. }
  14483. if(PlayerData[playerid][pDonator] == 1)
  14484. {
  14485. rate = 3;
  14486. }
  14487. if(PlayerData[playerid][pDonator] == 2)
  14488. {
  14489. rate = 6;
  14490. }
  14491. if(PlayerData[playerid][pDonator] == 3)
  14492. {
  14493. rate = 8;
  14494. }
  14495. //Calculate the interest due.
  14496. interest = (PlayerData[playerid][pBank] / 1000) * rate;
  14497. //If the calculated interest is above $25000, then we need to shut that shit down and set the interest to $25,000 to avoid the previous exploit.
  14498. if(interest > 25000)
  14499. {
  14500. interest = 25000;
  14501. }
  14502. total += interest;
  14503. if(PlayerData[playerid][pRentingHouse])
  14504. {
  14505. foreach(new i : House)
  14506. {
  14507. if(HouseInfo[i][hExists] && HouseInfo[i][hID] == PlayerData[playerid][pRentingHouse] && HouseInfo[i][hRentPrice] > 0)
  14508. {
  14509. rent = HouseInfo[i][hRentPrice];
  14510. renting = i;
  14511. }
  14512. }
  14513. }
  14514. format(coordsstring, sizeof(coordsstring), "_____________ Paycheck _______________\n");
  14515. strcat(str, coordsstring);
  14516. format(coordsstring, sizeof(coordsstring), "Paycheck: {33CC33}+%s\n", FormatNumber(paycheck));
  14517. strcat(str, coordsstring);
  14518. if(PlayerData[playerid][pFaction] >= 0 && FactionInfo[PlayerData[playerid][pFaction]][fPaycheck][PlayerData[playerid][pFactionRank]] > 0)
  14519. {
  14520. format(coordsstring, sizeof(coordsstring), "Faction Pay: {33CC33}+%s\n", FormatNumber(FactionInfo[PlayerData[playerid][pFaction]][fPaycheck][PlayerData[playerid][pFactionRank]]));
  14521. total += FactionInfo[PlayerData[playerid][pFaction]][fPaycheck][PlayerData[playerid][pFactionRank]];
  14522. strcat(str, coordsstring);
  14523. }
  14524. format(coordsstring, sizeof(coordsstring), "Interest: {33CC33}+%s {C8C8C8}(rate: %.1f) (max: $25,000)\n", FormatNumber(interest), floatdiv(float(rate), 10));
  14525. strcat(str, coordsstring);
  14526. format(coordsstring, sizeof(coordsstring), "Income Tax: {FF6347}-%s {C8C8C8}(%i percent)\n", FormatNumber(tax), gTax);
  14527. strcat(str, coordsstring);
  14528. if(renting != -1)
  14529. {
  14530. if(total >= rent || PlayerData[playerid][pBank] >= rent)
  14531. {
  14532. if(total >= rent)
  14533. {
  14534. total -= rent;
  14535. }
  14536. else
  14537. {
  14538. PlayerData[playerid][pBank] -= rent;
  14539. }
  14540. format(coordsstring, sizeof(coordsstring), "Rent Paid: {FF6347}-%s\n", FormatNumber(rent));
  14541. strcat(str, coordsstring);
  14542. HouseInfo[renting][hCash] += rent;
  14543. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET cash = %i WHERE id = %i", HouseInfo[renting][hCash], HouseInfo[renting][hID]);
  14544. mysql_tquery(connectionID, queryBuffer);
  14545. }
  14546. else
  14547. {
  14548. rent = -1;
  14549. }
  14550. }
  14551. switch(PlayerData[playerid][pDonator])
  14552. {
  14553. case 1:
  14554. {
  14555. format(coordsstring, sizeof(coordsstring), "VIP Bonus: $1,500\n");
  14556. total+= 1500;
  14557. }
  14558. case 2:
  14559. {
  14560. format(coordsstring, sizeof(coordsstring), "VIP Bonus: $2,000\n");
  14561. total+= 2000;
  14562. }
  14563. case 3:
  14564. {
  14565. format(coordsstring, sizeof(coordsstring), "VIP Bonus: $2,500\n");
  14566. total+= 2500;
  14567. }
  14568. }
  14569. strcat(str, coordsstring);
  14570. format(coordsstring, sizeof(coordsstring), "Old Balance: %s\n", FormatNumber(PlayerData[playerid][pBank]));
  14571. strcat(str, coordsstring);
  14572. format(coordsstring, sizeof(coordsstring), "______________________________________\n");
  14573. strcat(str, coordsstring);
  14574. format(coordsstring, sizeof(coordsstring), "New Balance: %s", FormatNumber(PlayerData[playerid][pBank] + total));
  14575. strcat(str, coordsstring);
  14576. SendClientMessageEx(playerid, COLOR_AQUA, "You have played %i/25 minutes this hour and earned your paycheck.", PlayerData[playerid][pMinutes]);
  14577. ShowPlayerFooter(playerid, "~y~Payday~n~~w~Paycheck");
  14578. Dialog_Show(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "Paycheck", str, "Okay", "");
  14579. if(rent == -1)
  14580. {
  14581. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET rentinghouse = 0 WHERE uid = %i", PlayerData[playerid][pID]);
  14582. mysql_tquery(connectionID, queryBuffer);
  14583. PlayerData[playerid][pRentingHouse] = 0;
  14584. SendClientMessage(playerid, COLOR_RED, "You couldn't afford to pay rent and were evicted as a result.");
  14585. }
  14586. AddToTaxVault(-total);
  14587. AddToTaxVault(tax);
  14588. if((gDoubleXP) || PlayerData[playerid][pDoubleXP] > 0)
  14589. PlayerData[playerid][pEXP] += 2;
  14590. else
  14591. PlayerData[playerid][pEXP]++;
  14592. if(PlayerData[playerid][pGang] >= 0)
  14593. {
  14594. GiveGangPoints(PlayerData[playerid][pGang], 1);
  14595. }
  14596. PlayerData[playerid][pHours]++;
  14597. // PlayerData[playerid][pCookies] += 3;
  14598. // SendClientMessageEx(playerid, COLOR_AQUA, "You've received {00aa00}'3 Cookies'{33CCFF} for playing 1 hour.");
  14599. PlayerData[playerid][pBank] += total;
  14600. PlayerData[playerid][pMinutes] = 0;
  14601. PlayerData[playerid][pPaycheck] = 0;
  14602. // reward player (ToiletDuck)
  14603. if(gHReward)
  14604. {
  14605. switch(PlayerData[playerid][pHours])
  14606. {
  14607. case 2:
  14608. {
  14609. SendClientMessageEx(playerid, COLOR_LIGHTRED, "You may now possess/use weapons!");
  14610. SendClientMessageEx(playerid, COLOR_GLOBAL, " You have reached 2 Playing hours (/phrewards) to check all the Playing hours rewards!");
  14611. }
  14612. case 8:
  14613. {
  14614. SendClientMessageEx(playerid, COLOR_YELLOW, "_______________________________________________________________________");
  14615. SendClientMessageEx(playerid, COLOR_GLOBAL, "* _-= "#SERVER_NAME" Automate Playing Hours Reward =-_ *");
  14616. SendClientMessageEx(playerid, COLOR_GLOBAL, " You receive 10 First aid Kit and 1 Rim Kit for spending 8 Hours of Time in Playing");
  14617. SendClientMessageEx(playerid, COLOR_YELLOW, "_______________________________________________________________________");
  14618. PlayerData[playerid][pFirstAid] += 10;
  14619. PlayerData[playerid][pRimkits] += 1;
  14620. }
  14621. case 25:
  14622. {
  14623. SendClientMessageEx(playerid, COLOR_YELLOW, "_______________________________________________________________________");
  14624. SendClientMessageEx(playerid, COLOR_GLOBAL, "* _-= "#SERVER_NAME" Automate Playing Hours Reward =-_ *");
  14625. SendClientMessageEx(playerid, COLOR_GLOBAL, " You receive 15 Cookies for spending 25 Hours of Time in Playing ");
  14626. SendClientMessageEx(playerid, COLOR_YELLOW, "_______________________________________________________________________");
  14627. PlayerData[playerid][pCookies] += 15; //rewardplay
  14628. }
  14629. case 48:
  14630. {
  14631. SendClientMessageEx(playerid, COLOR_YELLOW, "_______________________________________________________________________");
  14632. SendClientMessageEx(playerid, COLOR_GLOBAL, "* _-= "#SERVER_NAME" Automate Playing Hours Reward =-_ *");
  14633. SendClientMessageEx(playerid, COLOR_GLOBAL, " You receive 5 Upgrade Points and 1 Exp Token for spending 48 Hours of Time in Playing");
  14634. SendClientMessageEx(playerid, COLOR_YELLOW, "_______________________________________________________________________");
  14635. PlayerData[playerid][pUpgradePoints] += 5;
  14636. PlayerData[playerid][pEXP] += 1;
  14637. }
  14638. case 60:
  14639. {
  14640. SendClientMessageEx(playerid, COLOR_YELLOW, "_______________________________________________________________________");
  14641. SendClientMessageEx(playerid, COLOR_GLOBAL, "* _-= "#SERVER_NAME" Automate Playing Hours Reward =-_ *");
  14642. SendClientMessageEx(playerid, COLOR_GLOBAL, " You receive 50g Narcotic Drugs and 50,000 Materials for spending 60 Hours of Time in Playing");
  14643. SendClientMessageEx(playerid, COLOR_YELLOW, "_______________________________________________________________________");
  14644. PlayerData[playerid][pWeed] += 50;
  14645. PlayerData[playerid][pCocaine] += 50;
  14646. PlayerData[playerid][pMaterials] += 50000;
  14647. }
  14648. case 85:
  14649. {
  14650. SendClientMessageEx(playerid, COLOR_YELLOW, "_______________________________________________________________________");
  14651. SendClientMessageEx(playerid, COLOR_GLOBAL, "* _-= "#SERVER_NAME" Automate Playing Hours Reward =-_ *");
  14652. SendClientMessageEx(playerid, COLOR_GLOBAL, " You receive $100,000 of Cash and 2 Exp Token for spending 85 Hours of Time in Playing");
  14653. SendClientMessageEx(playerid, COLOR_YELLOW, "_______________________________________________________________________");
  14654. GivePlayerCash(playerid, 100000);
  14655. PlayerData[playerid][pEXP] += 2;
  14656. }
  14657. case 100:
  14658. {
  14659. SendClientMessageEx(playerid, COLOR_YELLOW, "_______________________________________________________________________");
  14660. SendClientMessageEx(playerid, COLOR_GLOBAL, "* _-= "#SERVER_NAME" Automate Playing Hours Reward =-_ *");
  14661. SendClientMessageEx(playerid, COLOR_GLOBAL, " You receive 20 Cookies for spending 100 Hours of Time in Playing");
  14662. SendClientMessageEx(playerid, COLOR_YELLOW, "_______________________________________________________________________");
  14663. PlayerData[playerid][pCookies] += 20;
  14664. }
  14665. case 120:
  14666. {
  14667. SendClientMessageEx(playerid, COLOR_YELLOW, "_______________________________________________________________________");
  14668. SendClientMessageEx(playerid, COLOR_GLOBAL, "* _-= "#SERVER_NAME" Automate Playing Hours Reward =-_ *");
  14669. SendClientMessageEx(playerid, COLOR_GLOBAL, " You receive 7 Days Gold VIP for spending 120 Hours of Time in Playing");
  14670. SendClientMessageEx(playerid, COLOR_YELLOW, "_______________________________________________________________________");
  14671. if(PlayerData[playerid][pDonator] < 2)
  14672. {
  14673. new days;
  14674. PlayerData[playerid][pDonator] = 2;
  14675. PlayerData[playerid][pVIPTime] = gettime() + (days * 86400);
  14676. PlayerData[playerid][pVIPCooldown] = 0;
  14677. //SavePlayerVarriables(playerid);
  14678. }
  14679. }
  14680. case 180:
  14681. {
  14682. SendClientMessageEx(playerid, COLOR_YELLOW, "_______________________________________________________________________");
  14683. SendClientMessageEx(playerid, COLOR_GLOBAL, "* _-= "#SERVER_NAME" Automate Playing Hours Reward =-_ *");
  14684. SendClientMessageEx(playerid, COLOR_GLOBAL, " You receive 1 Car for spending 180 Hours of Time in Playing");
  14685. SendClientMessageEx(playerid, COLOR_YELLOW, "_______________________________________________________________________");
  14686. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO flags VALUES(null, %i, 'Server', NOW(), 'Reward Vehicle.')", PlayerData[playerid][pID]);
  14687. mysql_tquery(connectionID, queryBuffer);
  14688. }
  14689. case 260:
  14690. {
  14691. SendClientMessageEx(playerid, COLOR_YELLOW, "_______________________________________________________________________");
  14692. SendClientMessageEx(playerid, COLOR_GLOBAL, "* _-= "#SERVER_NAME" Automate Playing Hours Reward =-_ *");
  14693. SendClientMessageEx(playerid, COLOR_GLOBAL, " You receive 2 Exp Tokens, 2 Rim Kits, 15 First aid Kit for spending 260 Hours of Time in Playing");
  14694. SendClientMessageEx(playerid, COLOR_YELLOW, "_______________________________________________________________________");
  14695. PlayerData[playerid][pEXP] += 2;
  14696. PlayerData[playerid][pFirstAid] += 15;
  14697. PlayerData[playerid][pRimkits] += 2;
  14698. }
  14699. case 300:
  14700. {
  14701. SendClientMessageEx(playerid, COLOR_YELLOW, "_______________________________________________________________________");
  14702. SendClientMessageEx(playerid, COLOR_GLOBAL, "* _-= "#SERVER_NAME" Automate Playing Hours Reward =-_ *");
  14703. SendClientMessageEx(playerid, COLOR_GLOBAL, " You receive 7 Days Gold VIP Voucher, 1 Car Voucher, 1 Rim Kit, 3 Exp Tokens for spending 300 Hours of Time in Playing");
  14704. SendClientMessageEx(playerid, COLOR_YELLOW, "_______________________________________________________________________");
  14705. PlayerData[playerid][pEXP] += 3;
  14706. if(PlayerData[playerid][pDonator] < 2)
  14707. {
  14708. new days;
  14709. PlayerData[playerid][pDonator] = 2;
  14710. PlayerData[playerid][pVIPTime] = gettime() + (days * 86400);
  14711. PlayerData[playerid][pVIPCooldown] = 0;
  14712. //SavePlayerVarriables(playerid);
  14713. }
  14714. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO flags VALUES(null, %i, 'Server', NOW(), 'Reward Vehicle.')", PlayerData[playerid][pID]);
  14715. mysql_tquery(connectionID, queryBuffer);
  14716. PlayerData[playerid][pRimkits] += 3;
  14717. }
  14718. }
  14719. }
  14720. if(PlayerData[playerid][pWeaponRestricted] > 0)
  14721. {
  14722. PlayerData[playerid][pWeaponRestricted]--;
  14723. }
  14724. if((!gDoubleXP) && PlayerData[playerid][pDoubleXP] > 0)
  14725. {
  14726. PlayerData[playerid][pDoubleXP]--;
  14727. if(PlayerData[playerid][pDoubleXP] > 0)
  14728. SendClientMessageEx(playerid, COLOR_YELLOW, "Your double XP token expires in %i more hours.", PlayerData[playerid][pDoubleXP]);
  14729. else
  14730. SendClientMessage(playerid, COLOR_YELLOW, "Your double XP token has expired.");
  14731. }
  14732. if(PlayerData[playerid][pHours] >= 20)
  14733. {
  14734. AwardAchievement(playerid, "Regular");
  14735. }
  14736. if(PlayerData[playerid][pHours] >= 40)
  14737. {
  14738. AwardAchievement(playerid, "Addicted");
  14739. }
  14740. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET minutes = 0, hours = hours + 1, exp = %i, bank = %i, paycheck = 0, weaponrestricted = %i, doublexp = %i WHERE uid = %i", PlayerData[playerid][pEXP], PlayerData[playerid][pBank], PlayerData[playerid][pWeaponRestricted], PlayerData[playerid][pDoubleXP], PlayerData[playerid][pID]);
  14741. mysql_tquery(connectionID, queryBuffer);
  14742. gTotalHours++;
  14743. SaveServerInfo();
  14744. }
  14745. AddToTaxVault(amount)
  14746. {
  14747. gVault += amount;
  14748. SaveServerInfo();
  14749. }
  14750. SaveMysqlInformation()
  14751. {
  14752. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE `server_info` SET \
  14753. `totalconnections` = %i, `tax` = %i, `govvault` = %i", gConnections, gTax, gVault);
  14754. mysql_tquery(connectionID, queryBuffer, "OnSaveMysqlInfo");
  14755. }
  14756. func OnSaveMysqlInfo()
  14757. {
  14758. if(cache_affected_rows(connectionID) > 0)
  14759. {
  14760. // printf("saved");
  14761. }
  14762. else
  14763. {
  14764. // printf("fucks");
  14765. }
  14766. return 1;
  14767. }
  14768. SaveServerInfo()
  14769. {
  14770. new File:file = fopen("server_info.ini", io_write);
  14771. SaveMysqlInformation();
  14772. if(file)
  14773. {
  14774. new
  14775. string[255];
  14776. format(string, sizeof(string), "%i|%i|%i|%s|%s|%i|%i|%i|%i|%i|%i|%i|%i|%s|%s|%i|%i|%i|%i|", gTax, gVault, gPlayerRecord, gRecordDate, gServerMOTD, gConnections, gTotalRegistered, gTotalKills, gTotalDeaths, gTotalHours, gAnticheatBans, gDoubleXP, RobberyInfo[rTime], adminMOTD, helperMOTD, MaxCapCount[0], MaxCapCount[1], gacooldown, gNewsVault);
  14777. fwrite(file, string);
  14778. fclose(file);
  14779. }
  14780. }
  14781. LoadObjects()
  14782. {
  14783. CreateDynamicObject(3055, 2071.46143, -1831.12000, 13.68281, 0.00000, 0.00000, 90.00000);
  14784. CreateDynamicObject(3055, 1843.35388, -1855.81506, 13.09352, 0.00000, 0.00000, 90.00000);
  14785. CreateDynamicObject(3055, 1025.12244, -1029.34338, 32.27671, 0.00000, 0.00000, 0.00000);
  14786. CreateDynamicObject(3055, 719.81921, -462.47787, 16.34370, 0.00000, 0.00000, 0.00000);
  14787. CreateDynamicObject(3055, -99.94527, 1111.47241, 16.62420, 0.00000, 0.00000, 0.00000);
  14788. CreateDynamicObject(3055, -99.94527, 1111.47241, 21.64419, 0.00000, 0.00000, 0.00000);
  14789. CreateDynamicObject(3055, -1420.79822, 2591.23022, 52.79280, 0.00000, 0.00000, 0.00000);
  14790. CreateDynamicObject(3055, -1420.79822, 2591.23022, 57.77278, 0.00000, 0.00000, 0.00000);
  14791. CreateDynamicObject(3055, -2425.93945, 1028.25513, 47.49768, 0.00000, 0.00000, 0.00000);
  14792. CreateDynamicObject(3055, -2425.93945, 1028.25513, 52.47769, 0.00000, 0.00000, 0.00000);
  14793. CreateDynamicObject(3055, -1904.72595, 277.80399, 38.01996, 0.00000, 0.00000, 0.00000);
  14794. CreateDynamicObject(3055, -1904.72595, 277.80399, 43.01995, 0.00000, 0.00000, 0.00000);
  14795. CreateDynamicObject(3055, 1968.21545, 2162.34033, 11.35032, 0.00000, 0.00000, 90.00000);
  14796. CreateDynamicObject(3055, 2386.81738, 1043.47742, 10.54739, 0.00000, 0.00000, 0.00000);
  14797. CreateDynamicObject(3055, 488.70782, -1735.24133, 11.63138, 0.00000, 0.00000, 170.00000);
  14798. CreateDynamicObject(3055, 2004.66003, 2303.51660, 10.82031, 0.00000, 0.00000, 0.00000);
  14799. CreateDynamicObject(3055, 2004.66003, 2317.93896, 10.82031, 0.00000, 0.00000, 0.00000);
  14800. // Gym objects
  14801. CreateDynamicObject(2916, 772.496765, 5.770771, 999.879760, 0.000000, 0.000000, -90.000000);
  14802. CreateDynamicObject(2916, 772.527404, 5.051626, 999.879760, 0.000000, 0.000000, -90.000000);
  14803. //==========================Salon Plovila By Johnson===========================//
  14804. new sbokolo[9];
  14805. new sbstaklo[24];
  14806. new sbplafon[4];
  14807. new sbpod[4];
  14808. new sbstubovi[18];
  14809. new sbdrzac[3];
  14810. //drug house
  14811. CreateDynamicObject(12938, 2149.36597, -1700.65686, 17.98168, 0.00000, 0.00000, -88.80000);
  14812. CreateDynamicObject(12940, 2148.39282, -1666.28088, 17.90306, 0.00000, 0.00000, -87.24002);
  14813. CreateDynamicObject(1264, 2175.75977, -1664.65320, 14.57031, 3.14159, 0.00000, 2.53073);
  14814. CreateDynamicObject(1264, 2175.12280, -1664.71887, 14.57031, 3.14159, 0.00000, 2.53073);
  14815. CreateDynamicObject(1264, 2174.78638, -1664.25952, 14.57031, 3.14159, 0.00000, 2.53073);
  14816. CreateDynamicObject(1264, 2175.23853, -1663.81653, 14.57031, 3.14159, 0.00000, 2.53073);
  14817. CreateDynamicObject(1264, 2174.99268, -1664.23755, 14.86930, 3.14159, 0.00000, 2.53073);
  14818. CreateDynamicObject(1264, 2175.29199, -1664.69495, 14.86930, 3.14159, 0.00000, 2.53073);
  14819. CreateDynamicObject(1264, 2175.41211, -1664.20374, 14.86930, 3.14159, 0.00000, 2.53073);
  14820. CreateDynamicObject(14497, 2150.76831, -1692.10657, 14.58194, 0.00000, 0.00000, 0.00000);
  14821. CreateDynamicObject(1710, 2139.34204, -1677.13025, 14.07798, 0.00000, 0.00000, 59.88000);
  14822. CreateDynamicObject(1710, 2142.60400, -1681.23267, 14.07798, 0.00000, 0.00000, 147.48000);
  14823. CreateDynamicObject(1710, 2144.61060, -1676.07129, 14.07798, 0.00000, 0.00000, -98.57999);
  14824. CreateDynamicObject(1264, 2149.87866, -1668.77222, 14.27568, 3.14159, 0.00000, 2.53073);
  14825. CreateDynamicObject(1264, 2149.90942, -1668.16968, 14.27568, 3.14159, 0.00000, 2.53073);
  14826. CreateDynamicObject(1264, 2149.88501, -1667.67004, 14.27568, 3.14159, 0.00000, 2.53073);
  14827. CreateDynamicObject(1264, 2149.51147, -1668.22961, 14.27568, 3.14159, 0.00000, 2.53073);
  14828. CreateDynamicObject(1264, 2142.06396, -1672.97314, 14.27568, 3.14159, 0.00000, 2.53073);
  14829. CreateDynamicObject(1264, 2141.83276, -1672.45911, 14.27568, 3.14159, 0.00000, 2.53073);
  14830. CreateDynamicObject(1264, 2141.17041, -1672.52234, 14.27568, 3.14159, 0.00000, 2.53073);
  14831. CreateDynamicObject(1292, 2142.60107, -1698.29944, 14.58457, 0.00000, 0.00000, -135.00002);
  14832. CreateDynamicObject(1292, 2144.95630, -1668.28503, 14.58457, 0.00000, 0.00000, 35.45998);
  14833. CreateDynamicObject(1369, 2138.32373, -1697.41809, 14.67586, 0.00000, 0.00000, 145.91997);
  14834. CreateDynamicObject(1362, 2152.49536, -1692.97339, 14.66582, 0.00000, 0.00000, 0.00000);
  14835. CreateDynamicObject(1362, 2147.37793, -1695.83325, 14.66582, 0.00000, 0.00000, 0.00000);
  14836. CreateDynamicObject(1362, 2156.25806, -1684.60071, 14.66582, 0.00000, 0.00000, 0.00000);
  14837. CreateDynamicObject(1362, 2156.22729, -1686.21960, 14.66582, 0.00000, 0.00000, 0.00000);
  14838. CreateDynamicObject(1362, 2141.84131, -1677.72009, 14.66582, 0.00000, 0.00000, 0.00000);
  14839. CreateDynamicObject(1211, 2153.03320, -1684.62415, 14.13390, 68.93999, 91.92005, 0.00000);
  14840. CreateDynamicObject(1211, 2139.59253, -1683.14478, 14.13390, 68.93999, 91.92005, -99.89999);
  14841. CreateDynamicObject(1299, 2145.62036, -1701.98303, 14.04797, 0.00000, 0.00000, 0.00000);
  14842. CreateDynamicObject(1327, 2145.38452, -1678.47900, 14.43393, -3.00000, 44.82001, 133.98000);
  14843. CreateDynamicObject(1440, 2143.98193, -1687.22375, 14.59416, 0.00000, 0.00000, 89.82001);
  14844. CreateDynamicObject(1440, 2147.37256, -1666.01880, 14.59416, 0.00000, 0.00000, 7.92000);
  14845. CreateDynamicObject(1227, 2128.45239, -1693.67664, 14.87828, 0.00000, 0.00000, 270.59988);
  14846. CreateDynamicObject(1227, 2128.56006, -1696.48328, 14.87828, 0.00000, 0.00000, 270.59988);
  14847. CreateDynamicObject(1227, 2167.95361, -1692.68176, 14.87583, 0.00000, 0.00000, 90.96001);
  14848. CreateDynamicObject(1227, 2167.93604, -1695.25269, 14.87583, 0.00000, 0.00000, 90.96001);
  14849. CreateDynamicObject(1264, 2168.69727, -1691.36865, 14.45872, 3.14159, 0.00000, 2.53073);
  14850. CreateDynamicObject(1264, 2168.02222, -1691.11560, 14.45872, 3.14159, 0.00000, 2.53073);
  14851. CreateDynamicObject(1264, 2168.88184, -1691.91138, 14.45872, 3.14159, 0.00000, 2.53073);
  14852. CreateDynamicObject(1264, 2168.54468, -1693.94714, 14.45872, 3.14159, 0.00000, 2.53073);
  14853. CreateDynamicObject(1264, 2168.28540, -1696.57434, 14.45872, 3.14159, 0.00000, 2.53073);
  14854. CreateDynamicObject(1264, 2167.50439, -1696.73254, 14.45872, 3.14159, 0.00000, 2.53073);
  14855. CreateDynamicObject(1264, 2167.46704, -1693.87158, 15.91056, 3.14159, 0.00000, 2.53073);
  14856. CreateDynamicObject(1946, 2148.16333, -1691.21643, 14.21075, 0.00000, 0.00000, 0.00000);
  14857. CreateDynamicObject(1946, 2141.51416, -1678.62427, 14.23054, 0.00000, 0.00000, 0.00000);
  14858. CreateDynamicObject(946, 2147.35400, -1667.18530, 16.26323, 3.14159, 0.00000, -175.98010);
  14859. CreateDynamicObject(946, 2148.11987, -1698.82495, 16.26323, 3.14159, 0.00000, 361.68005);
  14860. CreateDynamicObject(19868, 2162.65942, -1718.58044, 14.28498, 0.00000, 0.00000, 0.72000);
  14861. CreateDynamicObject(19868, 2167.85425, -1718.52075, 14.28498, 0.00000, 0.00000, 0.72000);
  14862. CreateDynamicObject(19868, 2170.76270, -1715.86023, 14.28498, 0.00000, 0.00000, 82.01997);
  14863. CreateDynamicObject(19868, 2171.30444, -1710.68750, 14.28498, 0.00000, 0.00000, 86.99994);
  14864. CreateDynamicObject(19868, 2168.83154, -1707.44458, 14.28498, 0.00000, 0.00000, 165.89992);
  14865. CreateDynamicObject(19868, 2159.98926, -1715.91345, 14.28498, 0.00000, 0.00000, -84.83998);
  14866. CreateDynamicObject(19868, 2160.48926, -1710.82532, 14.28498, 0.00000, 0.00000, -106.01999);
  14867. CreateDynamicObject(946, 2161.38257, -1717.29382, 16.41716, 3.14159, 0.00000, 309.17996);
  14868. CreateDynamicObject(1946, 2166.35425, -1715.52869, 14.39479, 0.00000, 0.00000, 0.00000);
  14869. CreateDynamicObject(946, 2170.12476, -1709.08154, 16.60114, 3.14159, 0.00000, 492.30029);
  14870. CreateDynamicObject(18663, 2137.72095, -1655.48169, 15.45434, 0.00000, 0.00000, 2.76000);
  14871. CreateDynamicObject(18663, 2131.69751, -1662.99036, 15.40218, 0.00000, 0.00000, 92.76000);
  14872. CreateDynamicObject(18663, 2155.69482, -1654.35889, 15.50738, 0.00000, 0.00000, 3.00000);
  14873. CreateDynamicObject(18663, 2155.78320, -1656.58044, 15.44910, 16.02000, 0.42000, 3.00000);
  14874. CreateDynamicObject(18663, 2166.64160, -1671.72937, 15.54291, 0.00000, 0.00000, 2.64000);
  14875. CreateDynamicObject(18663, 2164.26465, -1704.31567, 15.45391, 0.00000, 0.00000, 91.25999);
  14876. CreateDynamicObject(18663, 2139.51953, -1711.24780, 15.46285, 0.00000, 0.00000, 1.26000);
  14877. CreateDynamicObject(18663, 2132.32568, -1704.96716, 15.46772, 0.00000, 0.00000, -88.86000);
  14878. CreateDynamicObject(18663, 2134.03784, -1704.96008, 15.46772, -59.22000, 178.31992, -88.86000);
  14879. CreateDynamicObject(2672, 2149.63647, -1695.53955, 14.37355, 0.00000, 0.00000, 0.00000);
  14880. CreateDynamicObject(2672, 2142.94458, -1675.05530, 14.37355, 0.00000, 0.00000, 0.00000);
  14881. CreateDynamicObject(19868, 2181.57593, -1654.95923, 14.28498, 0.00000, 0.00000, 79.19994);
  14882. CreateDynamicObject(19868, 2181.03491, -1656.71863, 14.28498, 0.00000, 0.00000, 67.61992);
  14883. CreateDynamicObject(19868, 2174.55078, -1659.72925, 14.28498, 0.00000, 0.00000, -24.24007);
  14884. CreateDynamicObject(19868, 2171.31445, -1656.17920, 14.28498, 0.00000, 0.00000, -70.98006);
  14885. CreateDynamicObject(19868, 2172.50854, -1652.10095, 14.28498, 0.00000, 0.00000, -140.82008);
  14886. CreateDynamicObject(19868, 2177.09375, -1651.07593, 14.28498, 0.00000, 0.00000, -191.40012);
  14887. CreateDynamicObject(19868, 2179.64380, -1651.64246, 14.28498, 0.00000, 0.00000, -198.24010);
  14888. CreateDynamicObject(2629, 2174.67749, -1652.40247, 14.05883, 0.00000, 0.00000, 23.40000);
  14889. CreateDynamicObject(2629, 2172.73193, -1654.55139, 14.05883, 0.00000, 0.00000, 70.13999);
  14890. CreateDynamicObject(2629, 2179.14209, -1652.88477, 14.05883, 0.00000, 0.00000, -31.08002);
  14891. CreateDynamicObject(11730, 2172.68091, -1658.40649, 14.08169, 0.00000, 0.00000, 136.14001);
  14892. CreateDynamicObject(11730, 2172.12280, -1657.50256, 14.08169, 0.00000, 0.00000, 117.36003);
  14893. CreateDynamicObject(11730, 2138.01465, -1679.24353, 14.08057, 0.00000, 0.00000, 126.71999);
  14894. CreateDynamicObject(11730, 2138.09863, -1677.57227, 14.08057, 0.00000, 37.56000, 83.03996);
  14895. CreateDynamicObject(11730, 2137.73022, -1678.23840, 14.08057, 0.00000, 0.00000, 95.21998);
  14896. CreateDynamicObject(11730, 2139.29150, -1680.90515, 14.08057, -1.86000, 54.06001, 126.71999);
  14897. CreateDynamicObject(11730, 2157.13599, -1689.40576, 14.08040, -34.26001, 7.32001, 197.69989);
  14898. CreateDynamicObject(2632, 2179.62744, -1656.36475, 14.08060, -1.32000, 1.44000, -113.22002);
  14899. CreateDynamicObject(19868, 2172.24170, -1652.47778, 14.28498, 0.00000, 0.00000, -140.82008);
  14900. CreateDynamicObject(19868, 2171.15210, -1655.78076, 14.28498, 0.00000, 0.00000, -70.98006);
  14901. CreateDynamicObject(19868, 2174.04639, -1659.50635, 14.28498, 0.00000, 0.00000, -24.24007);
  14902. CreateDynamicObject(19868, 2180.80786, -1657.27942, 14.28498, 0.00000, 0.00000, 67.61992);
  14903. CreateDynamicObject(19868, 2181.66284, -1654.51196, 14.28498, 0.00000, 0.00000, 79.19994);
  14904. CreateDynamicObject(19868, 2170.77539, -1715.32190, 14.28498, 0.00000, 0.00000, 82.01997);
  14905. CreateDynamicObject(19868, 2171.25781, -1710.27747, 14.28498, 0.00000, 0.00000, 86.99994);
  14906. CreateDynamicObject(19868, 2168.06226, -1707.29675, 14.28498, 0.00000, 0.00000, 165.89992);
  14907. CreateDynamicObject(19868, 2160.33423, -1711.65112, 14.28498, 0.00000, 0.00000, -106.01999);
  14908. CreateDynamicObject(19868, 2159.93555, -1716.53259, 14.28498, 0.00000, 0.00000, -84.83998);
  14909. CreateDynamicObject(19868, 2163.12598, -1718.62549, 14.28498, 0.00000, 0.00000, 0.72000);
  14910. CreateDynamicObject(19868, 2168.21167, -1718.47168, 14.28498, 0.00000, 0.00000, 0.72000);
  14911. CreateDynamicObject(2063, 2139.78345, -1691.31750, 14.92751, 0.00000, 0.00000, 62.93998);
  14912. CreateDynamicObject(2063, 2156.92480, -1674.36243, 14.92751, -8.58000, 0.00000, -128.28003);
  14913. CreateDynamicObject(2693, 2156.10254, -1690.90527, 14.77523, 0.00000, 0.00000, -129.65997);
  14914. CreateDynamicObject(2693, 2180.54004, -1659.34082, 14.77523, 0.00000, 0.00000, 7.08001);
  14915. CreateDynamicObject(2692, 2139.13208, -1697.93457, 14.64941, 0.00000, 0.00000, 164.04004);
  14916. CreateDynamicObject(2691, 2147.18018, -1664.98438, 15.45279, 0.00000, 0.00000, 2.70000);
  14917. CreateDynamicObject(2696, 2166.55762, -1669.55566, 15.54572, 0.00000, 0.00000, 91.73999);
  14918. CreateDynamicObject(2680, 2173.17603, -1658.13184, 15.07598, 0.00000, 0.00000, 122.88004);
  14919. CreateDynamicObject(2680, 2172.68091, -1657.39270, 15.07598, 0.00000, 0.00000, 122.88004);
  14920. CreateDynamicObject(2695, 2166.47974, -1704.25659, 15.90061, 0.00000, 0.00000, 0.00000);
  14921. CreateDynamicObject(2696, 2165.87915, -1704.27734, 15.90174, 0.00000, 0.00000, 0.00000);
  14922. CreateDynamicObject(2696, 2138.15430, -1678.12537, 15.11956, 0.00000, 0.00000, 122.16007);
  14923. CreateDynamicObject(2695, 2147.29517, -1667.27710, 17.82212, -2.16000, 63.42003, 4.50000);
  14924. CreateDynamicObject(3594, 2144.26611, -1647.42957, 14.39655, 0.00000, 0.00000, 38.64000);
  14925. CreateDynamicObject(3594, 2146.87744, -1647.16541, 14.39655, -11.27999, -2.46000, -31.02000);
  14926. CreateDynamicObject(13450, 2147.77856, -1683.46472, 16.23255, 0.00000, 0.00000, -88.43999);
  14927. //end of drug house
  14928. CreateDynamicObject(10830, 227.62132, -1923.22278, 7.67234, 0.00000, 0.00000, 45.00000);
  14929. sbokolo[0] = CreateDynamicObject(18763, 232.01503, -1887.42603, -1.23565, 0.00000, 90.00000, 90.00000);
  14930. sbpod[0] = CreateDynamicObject(18766, 232.08464, -1892.43225, -0.23280, 90.00000, 0.00000, 0.00000);
  14931. sbpod[1] = CreateDynamicObject(18766, 232.08459, -1897.42212, -0.23280, 90.00000, 0.00000, 0.00000);
  14932. sbpod[2] = CreateDynamicObject(18766, 222.44701, -1892.43225, -0.23580, 90.00000, 0.00000, 0.00000);
  14933. sbpod[3] = CreateDynamicObject(18766, 222.44710, -1897.42212, -0.23580, 90.00000, 0.00000, 0.00000);
  14934. CreateDynamicObject(1569, 230.49959, -1889.96826, 0.22397, 0.00000, 0.00000, 0.00000);
  14935. CreateDynamicObject(1569, 233.50180, -1889.95703, 0.22400, 0.00000, 0.00000, 180.00000);
  14936. sbstubovi[0] = CreateDynamicObject(18762, 236.60831, -1890.42493, 1.11630, 0.00000, 0.00000, 0.00000);
  14937. sbstubovi[1] = CreateDynamicObject(18762, 217.92990, -1890.42859, 1.11630, 0.00000, 0.00000, 0.00000);
  14938. sbstubovi[2] = CreateDynamicObject(18762, 217.91879, -1899.42847, 1.11630, 0.00000, 0.00000, 0.00000);
  14939. sbstubovi[3] = CreateDynamicObject(18762, 236.56694, -1899.43579, 1.11627, 0.00000, 0.00000, 0.00000);
  14940. sbstaklo[0] = CreateDynamicObject(1649, 237.02290, -1892.87329, 1.93570, 0.00000, 0.00000, 90.00000);
  14941. sbstaklo[1] = CreateDynamicObject(1649, 237.02290, -1897.30957, 1.93570, 0.00000, 0.00000, 90.00000);
  14942. sbstubovi[4] = CreateDynamicObject(18762, 236.60880, -1892.42627, 4.10698, 0.00000, 90.00000, 90.00000);
  14943. sbstubovi[5] = CreateDynamicObject(18762, 236.60931, -1897.41687, 4.10698, 0.00000, 90.00000, 90.00000);
  14944. sbstaklo[2] = CreateDynamicObject(1649, 217.44431, -1892.81067, 1.93570, 0.00000, 0.00000, 90.00000);
  14945. sbstaklo[3] = CreateDynamicObject(1649, 217.44431, -1897.24561, 1.93570, 0.00000, 0.00000, 90.00000);
  14946. sbstaklo[4] = CreateDynamicObject(1649, 220.36880, -1899.90735, 1.93570, 0.00000, 0.00000, 0.00000);
  14947. sbstaklo[5] = CreateDynamicObject(1649, 224.80780, -1899.90735, 1.93570, 0.00000, 0.00000, 0.00000);
  14948. sbstaklo[6] = CreateDynamicObject(1649, 233.84129, -1899.91089, 1.93570, 0.00000, 0.00000, 0.00000);
  14949. sbstubovi[6] = CreateDynamicObject(18762, 227.29352, -1899.41577, 1.11627, 0.00000, 0.00000, 0.00000);
  14950. sbstubovi[7] = CreateDynamicObject(18762, 231.19859, -1899.41272, 1.11627, 0.00000, 0.00000, 0.00000);
  14951. sbstaklo[7] = CreateDynamicObject(1649, 233.90800, -1890.00073, 1.93570, 0.00000, 0.00000, 0.00000);
  14952. sbstaklo[8] = CreateDynamicObject(1649, 229.47430, -1890.00757, 1.93570, 0.00000, 0.00000, 0.00000);
  14953. sbstaklo[9] = CreateDynamicObject(1649, 225.06120, -1890.00525, 1.93570, 0.00000, 0.00000, 0.00000);
  14954. sbstaklo[10] = CreateDynamicObject(1649, 220.65520, -1889.99878, 1.93570, 0.00000, 0.00000, 0.00000);
  14955. sbstubovi[8] = CreateDynamicObject(18762, 217.92990, -1892.42615, 4.10700, 0.00000, 90.00000, 90.00000);
  14956. sbstubovi[9] = CreateDynamicObject(18762, 217.93100, -1897.40393, 4.10700, 0.00000, 90.00000, 90.00000);
  14957. sbstubovi[10] = CreateDynamicObject(18762, 220.92108, -1899.40784, 4.10700, 0.00000, 90.00000, 0.00000);
  14958. sbstubovi[11] = CreateDynamicObject(18762, 225.88821, -1899.40955, 4.10700, 0.00000, 90.00000, 0.00000);
  14959. sbstubovi[12] = CreateDynamicObject(18762, 230.88657, -1899.40881, 4.10700, 0.00000, 90.00000, 0.00000);
  14960. sbstubovi[13] = CreateDynamicObject(18762, 233.60590, -1899.41174, 4.10400, 0.00000, 90.00000, 0.00000);
  14961. sbstubovi[14] = CreateDynamicObject(18762, 220.87581, -1890.42175, 4.10700, 0.00000, 90.00000, 0.00000);
  14962. sbstubovi[15] = CreateDynamicObject(18762, 225.85605, -1890.41602, 4.10700, 0.00000, 90.00000, 0.00000);
  14963. sbstubovi[16] = CreateDynamicObject(18762, 230.83852, -1890.42114, 4.10700, 0.00000, 90.00000, 0.00000);
  14964. sbstubovi[17] = CreateDynamicObject(18762, 233.67039, -1890.42407, 4.10400, 0.00000, 90.00000, 0.00000);
  14965. sbstaklo[11] = CreateDynamicObject(1649, 225.92171, -1892.23962, 1.92710, 0.00000, 0.00000, 90.00000);
  14966. CreateDynamicObject(957, 217.96065, -1892.01025, 3.57752, 0.00000, 0.00000, 0.00000);
  14967. CreateDynamicObject(957, 217.96060, -1894.95557, 3.57750, 0.00000, 0.00000, 0.00000);
  14968. CreateDynamicObject(957, 217.96060, -1897.57678, 3.57750, 0.00000, 0.00000, 0.00000);
  14969. CreateDynamicObject(957, 236.57330, -1895.04114, 3.57750, 0.00000, 0.00000, 0.00000);
  14970. CreateDynamicObject(957, 236.57330, -1892.47766, 3.57750, 0.00000, 0.00000, 0.00000);
  14971. CreateDynamicObject(957, 236.57330, -1897.48560, 3.57750, 0.00000, 0.00000, 0.00000);
  14972. CreateDynamicObject(1705, 222.85506, -1893.48596, 0.26072, 0.00000, 0.00000, -127.26001);
  14973. CreateDynamicObject(1705, 223.06474, -1890.94031, 0.26072, 0.00000, 0.00000, -87.84000);
  14974. CreateDynamicObject(2165, 221.13570, -1891.48718, 0.26442, 0.00000, 0.00000, -111.29999);
  14975. CreateDynamicObject(1714, 219.32925, -1891.17285, 0.26550, 0.00000, 0.00000, 49.31999);
  14976. CreateDynamicObject(2164, 217.62427, -1892.27893, 0.26550, 0.00000, 0.00000, 90.00000);
  14977. CreateDynamicObject(2162, 217.58629, -1894.05273, 0.26520, 0.00000, 0.00000, 90.00000);
  14978. sbdrzac[0] = CreateDynamicObject(1840, 222.06306, -1899.58289, 0.07727, 0.00000, 0.00000, 90.00000);
  14979. sbdrzac[1] = CreateDynamicObject(1840, 222.06306, -1899.58289, 0.54430, 0.00000, 0.00000, 90.00000);
  14980. sbdrzac[2] = CreateDynamicObject(1840, 222.06306, -1899.58289, 0.99568, 0.00000, 0.00000, 90.00000);
  14981. new sbtablet = CreateDynamicObject(1581, 222.04913, -1899.39368, 1.46628, 30.00000, 0.00000, 0.00000);
  14982. CreateDynamicObject(1808, 217.81059, -1895.11035, 0.26430, 0.00000, 0.00000, 90.00000);
  14983. CreateDynamicObject(1817, 235.31012, -1897.77161, 0.26370, 0.00000, 0.00000, 90.00000);
  14984. CreateDynamicObject(1705, 236.29819, -1895.17407, 0.26070, 0.00000, 0.00000, 270.00000);
  14985. CreateDynamicObject(1705, 236.31973, -1896.94727, 0.26070, 0.00000, 0.00000, 270.00000);
  14986. CreateDynamicObject(1817, 235.31010, -1896.27588, 0.26070, 0.00000, 0.00000, 90.00000);
  14987. CreateDynamicObject(1705, 233.12219, -1896.23462, 0.26070, 0.00000, 0.00000, 90.00000);
  14988. CreateDynamicObject(1705, 233.20573, -1898.01257, 0.26070, 0.00000, 0.00000, 90.00000);
  14989. CreateDynamicObject(1808, 236.64676, -1893.92896, 0.26430, 0.00000, 0.00000, 270.00000);
  14990. CreateDynamicObject(2855, 234.79961, -1895.79944, 0.39360, 0.00000, 0.00000, 90.00000);
  14991. CreateDynamicObject(2852, 234.76706, -1896.53711, 0.76534, 0.00000, 0.00000, 78.00000);
  14992. CreateDynamicObject(3406, 221.85310, -1900.96802, -1.95470, 0.00000, 0.00000, 0.00000);
  14993. CreateDynamicObject(3406, 230.62439, -1900.96838, -1.95471, 0.00000, 0.00000, 0.00000);
  14994. CreateDynamicObject(3406, 239.41240, -1900.96802, -1.95470, 0.00000, 0.00000, 0.00000);
  14995. CreateDynamicObject(3406, 248.21049, -1900.96802, -1.95470, 0.00000, 0.00000, 0.00000);
  14996. CreateDynamicObject(3406, 213.06870, -1900.96802, -1.95770, 0.00000, 0.00000, 0.00000);
  14997. CreateDynamicObject(3406, 208.67303, -1900.97485, -1.95470, 0.00000, 0.00000, 0.00000);
  14998. CreateDynamicObject(3406, 243.34529, -1905.81555, -1.95470, 0.00000, 0.00000, 90.00000);
  14999. CreateDynamicObject(3406, 234.57146, -1905.81116, -1.95470, 0.00000, 0.00000, 90.00000);
  15000. CreateDynamicObject(3406, 225.75140, -1905.82300, -1.95470, 0.00000, 0.00000, 90.00000);
  15001. CreateDynamicObject(3406, 216.98486, -1905.84912, -1.95470, 0.00000, 0.00000, 90.00000);
  15002. CreateDynamicObject(3406, 209.25938, -1905.81360, -1.95470, 0.00000, 0.00000, 90.00000);
  15003. CreateDynamicObject(3406, 243.34024, -1914.60327, -1.95470, 0.00000, 0.00000, 90.00000);
  15004. CreateDynamicObject(3406, 234.58673, -1914.59497, -1.95470, 0.00000, 0.00000, 90.00000);
  15005. CreateDynamicObject(3406, 225.75047, -1914.60510, -1.95470, 0.00000, 0.00000, 90.00000);
  15006. CreateDynamicObject(3406, 216.97945, -1914.63110, -1.95470, 0.00000, 0.00000, 90.00000);
  15007. CreateDynamicObject(3406, 209.25095, -1914.61133, -1.95470, 0.00000, 0.00000, 90.00000);
  15008. sbplafon[0] = CreateDynamicObject(18766, 232.08459, -1897.42212, 4.34620, 90.00000, 0.00000, 0.00000);
  15009. sbplafon[1] = CreateDynamicObject(18766, 232.08459, -1892.43225, 4.34620, 90.00000, 0.00000, 0.00000);
  15010. sbplafon[2] = CreateDynamicObject(18766, 222.44710, -1897.42212, 4.34920, 90.00000, 0.00000, 0.00000);
  15011. sbplafon[3] = CreateDynamicObject(18766, 222.44701, -1892.43225, 4.34920, 90.00000, 0.00000, 0.00000);
  15012. new sbdrzacstakla = CreateDynamicObject(18762, 225.91580, -1892.46228, 4.08700, 0.00000, 90.00000, 90.00000);
  15013. CreateDynamicObject(957, 225.97185, -1894.70349, 3.55753, 0.00000, 0.00000, 0.00000);
  15014. sbstaklo[12] = CreateDynamicObject(1649, 225.06120, -1890.00525, 1.93570, 0.00000, 0.00000, 180.00000);
  15015. sbstaklo[13] = CreateDynamicObject(1649, 220.65520, -1889.99878, 1.93570, 0.00000, 0.00000, 180.00000);
  15016. sbstaklo[14] = CreateDynamicObject(1649, 229.47430, -1890.00757, 1.93570, 0.00000, 0.00000, 180.00000);
  15017. sbstaklo[15] = CreateDynamicObject(1649, 233.90800, -1890.00073, 1.93570, 0.00000, 0.00000, 180.00000);
  15018. sbstaklo[16] = CreateDynamicObject(1649, 220.36880, -1899.90735, 1.93570, 0.00000, 0.00000, 180.00000);
  15019. sbstaklo[17] = CreateDynamicObject(1649, 224.80780, -1899.90735, 1.93570, 0.00000, 0.00000, 180.00000);
  15020. sbstaklo[18] = CreateDynamicObject(1649, 233.84129, -1899.91089, 1.93570, 0.00000, 0.00000, 180.00000);
  15021. sbstaklo[19] = CreateDynamicObject(1649, 237.02290, -1897.30957, 1.93570, 0.00000, 0.00000, 270.00000);
  15022. sbstaklo[20] = CreateDynamicObject(1649, 237.02290, -1892.87329, 1.93570, 0.00000, 0.00000, 270.00000);
  15023. sbstaklo[21] = CreateDynamicObject(1649, 217.44431, -1897.24561, 1.93570, 0.00000, 0.00000, 270.00000);
  15024. sbstaklo[22] = CreateDynamicObject(1649, 217.44431, -1892.81067, 1.93570, 0.00000, 0.00000, 270.00000);
  15025. sbstaklo[23] = CreateDynamicObject(1649, 225.92171, -1892.23962, 1.92710, 0.00000, 0.00000, 270.00000);
  15026. sbokolo[1] = CreateDynamicObject(18762, 237.49001, -1892.42627, -0.23820, 0.00000, 90.00000, 90.00000);
  15027. sbokolo[2] = CreateDynamicObject(18762, 237.49001, -1897.41687, -0.23820, 0.00000, 90.00000, 90.00000);
  15028. sbokolo[3] = CreateDynamicObject(18762, 235.49940, -1889.50037, -0.23820, 0.00000, 90.00000, 0.00000);
  15029. sbokolo[4] = CreateDynamicObject(18762, 228.04156, -1889.43481, -0.23820, 0.00000, 90.00000, 0.00000);
  15030. sbokolo[5] = CreateDynamicObject(18762, 223.03407, -1889.43311, -0.23820, 0.00000, 90.00000, 0.00000);
  15031. sbokolo[6] = CreateDynamicObject(18762, 218.94020, -1889.43188, -0.23820, 0.00000, 90.00000, 0.00000);
  15032. sbokolo[7] = CreateDynamicObject(18762, 216.92986, -1897.44165, -0.23820, 0.00000, 90.00000, 90.00000);
  15033. sbokolo[8] = CreateDynamicObject(18762, 216.94025, -1892.43689, -0.23820, 0.00000, 90.00000, 90.00000);
  15034. CreateDynamicObject(1327, 238.60159, -1890.46545, -0.27430, 0.00000, 0.00000, 0.00000);
  15035. CreateDynamicObject(1327, 238.60980, -1898.99902, -0.27430, 0.00000, 0.00000, 0.00000);
  15036. CreateDynamicObject(1327, 238.58611, -1895.00085, -0.27430, 0.00000, 0.00000, 0.00000);
  15037. CreateDynamicObject(1327, 216.44234, -1898.99622, -0.27431, 0.00000, 0.00000, 0.00000);
  15038. CreateDynamicObject(1327, 216.48050, -1890.29663, -0.27430, 0.00000, 0.00000, 0.00000);
  15039. CreateDynamicObject(1327, 216.45580, -1895.04614, -0.27430, 0.00000, 0.00000, 0.00000);
  15040. for(new i = 0; i < sizeof(sbdrzac); i++)
  15041. {
  15042. SetDynamicObjectMaterial(sbdrzac[i], 0, 10793, "car_ship_sfse", "ws_shipmetal1", 0xFF585858);
  15043. }
  15044. for(new i = 0; i < sizeof(sbokolo); i++)
  15045. {
  15046. SetDynamicObjectMaterial(sbokolo[i], 0, 8565, "vgsebuild01", "ws_stonewall", 0xFFFFFFFF);
  15047. }
  15048. for(new i = 0; i < sizeof(sbstaklo); i++)
  15049. {
  15050. SetDynamicObjectMaterial(sbstaklo[i], 0, 19325, "lsmall_shops", "lsmall_window01", 0xFF000000);
  15051. }
  15052. for(new i = 0; i < sizeof(sbpod); i++)
  15053. {
  15054. SetDynamicObjectMaterial(sbpod[i], 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15055. }
  15056. for(new i = 0; i < sizeof(sbplafon); i++)
  15057. {
  15058. SetDynamicObjectMaterial(sbplafon[i], 0, 10932, "station_sfse", "ws_stationfloor", 0xFFFFFFFF);
  15059. }
  15060. for(new i = 0; i < sizeof(sbstubovi); i++)
  15061. {
  15062. SetDynamicObjectMaterial(sbstubovi[i], 0, 8839, "vgsecarshow", "sw_wallbrick_06", 0xFFFFFFFF);
  15063. }
  15064. SetDynamicObjectMaterial(sbtablet, 0,2361, "shopping_freezers", "white", 0xFF000000);
  15065. SetDynamicObjectMaterial(sbdrzacstakla, 0,8839, "vgsecarshow", "sw_wallbrick_06", 0xFFFFFFFF);
  15066. new sbznak = CreateObject(19327, 233.1028, -1889.9772, 3.2088, 0.0000, 0.0000, -179.6312);
  15067. SetObjectMaterialText(sbznak, "o", 0, 50, "Webdings", 24, 0, -1, 0, 1);
  15068. new tackatablet = CreateObject(19327, 222.0348, -1899.3527, 1.4603, -21.0000, 0.0000, -179.5616);
  15069. SetObjectMaterialText(tackatablet, ".", 0, 50, "Arial", 24, 0, -1, 0, 1);
  15070. new salonplovilatxt = CreateObject(19327, 232.0401, -1889.9959, 3.1343, 0.0000, 0.0000, 179.8686);
  15071. SetObjectMaterialText(salonplovilatxt, "BOATS", 0, 90, "Arial", 24, 0, -1, 0, 1);
  15072. //LAPD Improvments
  15073. CreateDynamicObject(1886,1581.56628418,-1633.38085938,16.76438522,0.00000000,0.00000000,308.90148926); //object(shop_sec_cam) (1)
  15074. CreateDynamicObject(983, 1544.6878662109, -1620.4252929688, 13.038116455078, 0.000000, 0.000000, 0.000000); //
  15075. CreateDynamicObject(983, 1544.7156982422, -1635.9808349609, 13.237470626831, 0.000000, 0.000000, 0.000000); //
  15076. CreateDynamicObject(1344, 1544.7709960938, -1617.0625, 13.191030502319, 0.000000, 0.000000, 180); //
  15077. CreateDynamicObject(13644, 1582.6353759766, -1639.0125732422, 10.541254043579, 0.000000, 19.14501953125, 268.55499267578); //
  15078. // CreateDynamicObject(968, 1544.6878662109, -1630.7757568359, 13.28281211853, 0.000000, 90, 90); //
  15079. CreateDynamicObject(969, 1635.2663574219, -1852.6921386719, 12.548987388611, 0.000000, 0.000000, 179.99450683594); //
  15080. // CreateDynamicObject(968, 371.0055847168, 1006.9255981445, 28.540819168091, 0.000000, 90, 194.10095214844); //
  15081. CreateDynamicObject(1496, 1564.2520751953, -1667.3739013672, 27.395606994629, 0.000000, 0.000000, 0.000000); //
  15082. CreateDynamicObject(12814, 264.49127197266, 1882.6428222656, 16.587562561035, 0, 0, 0);
  15083. CreateDynamicObject(991, 226.45503234863, 1872.4094238281, 13.949615478516, 0, 0, 270.27062988281);
  15084. CreateDynamicObject(997, 1539.8282470703, -1700.0535888672, 12.981607437134, 0, 0, 0); // LAPD Fences
  15085. CreateDynamicObject(997, 1542.4503173828, -1651.2196044922, 12.981607437134, 0, 0, 180.54052734375);
  15086. CreateDynamicObject(994, 1539.3397216797, -1691.8165283203, 12.546875, 0, 0, 270.27026367188);
  15087. CreateDynamicObject(994, 1539.3963623047, -1683.8302001953, 12.546875, 0, 0, 270.27026367188);
  15088. CreateDynamicObject(994, 1539.3836669922, -1675.6118164063, 12.546875, 0, 0, 270.27026367188);
  15089. CreateDynamicObject(994, 1539.4741210938, -1667.2700195313, 12.546875, 0, 0, 270.27026367188);
  15090. CreateDynamicObject(994, 1539.4909667969, -1659.4807128906, 12.546875, 0, 0, 270.27026367188);
  15091. CreateDynamicObject(994, 1539.5007324219, -1652.0588378906, 12.546875, 0, 0, 270.27026367188);
  15092. CreateDynamicObject(3029, 22076.4624,-2046.4349,13.5469, 0, 0, 268.69067382813); // Drug Factory Doors
  15093. CreateDynamicObject(1569, 1167.8109130859, 1362.78515625, 9.8125076293945, 0.000000, 0.000000, 0.000000); // Senate Door
  15094. CreateDynamicObject(10832, 296.68603515625, -1549.5653076172, 77.338836669922, 0.000000, 0.000000, 162.94946289063); //
  15095. CreateDynamicObject(3029, 2223.58203125, 1598.2083740234, 998.9765625, 0, 0, 268.69067382813);
  15096. //begin new map for LAPD garage area
  15097. CreateDynamicObject(9825,1589.80004883,-1617.50000000,12.39999962,0.00000000,359.99993896,0.00000000); //object(carspaces3_sfw02) (1)
  15098. CreateDynamicObject(18452,1557.19995117,-1610.59997559,15.30000019,0.00000000,0.00000000,0.00000000); //object(cw_tscanopy01) (1)
  15099. CreateDynamicObject(1686,1557.19995117,-1613.59997559,12.60000038,0.00000000,0.00000000,90.00000000); //object(petrolpumpnew) (1)
  15100. CreateDynamicObject(1686,1557.09997559,-1607.90002441,12.60000038,0.00000000,0.00000000,89.99499512); //object(petrolpumpnew) (2)
  15101. CreateDynamicObject(3458,1581.69921875,-1605.09960938,13.89999962,0.00000000,0.00000000,179.99450684); //object(vgncarshade1) (1)
  15102. CreateDynamicObject(1251,1560.69921875,-1610.89941406,12.50000000,0.00000000,0.00000000,0.00000000); //object(smashbar) (1)
  15103. CreateDynamicObject(1251,1553.59997559,-1610.80004883,12.50000000,0.00000000,0.00000000,0.00000000); //object(smashbar) (2)
  15104. CreateDynamicObject(1251,1557.09997559,-1612.80004883,12.50000000,0.00000000,0.00000000,270.00000000); //object(smashbar) (3)
  15105. CreateDynamicObject(1251,1557.19995117,-1608.69995117,12.50000000,0.00000000,0.00000000,269.99499512); //object(smashbar) (4)
  15106. CreateDynamicObject(1251,1557.09997559,-1614.30004883,12.50000000,0.00000000,0.00000000,270.00000000); //object(smashbar) (5)
  15107. CreateDynamicObject(1251,1557.30004883,-1607.09997559,12.50000000,0.00000000,0.00000000,269.99450684); //object(smashbar) (6)
  15108. CreateDynamicObject(1237,1560.69995117,-1613.59997559,12.60000038,0.00000000,0.00000000,0.00000000); //object(strtbarrier01) (1)
  15109. CreateDynamicObject(1237,1560.69995117,-1607.90002441,12.60000038,0.00000000,0.00000000,0.00000000); //object(strtbarrier01) (2)
  15110. CreateDynamicObject(1237,1553.59997559,-1607.80004883,12.60000038,0.00000000,0.00000000,0.00000000); //object(strtbarrier01) (3)
  15111. CreateDynamicObject(1237,1553.40002441,-1613.50000000,12.60000038,0.00000000,0.00000000,0.00000000); //object(strtbarrier01) (4)
  15112. CreateDynamicObject(1251,1548.40002441,-1632.90002441,12.50000000,0.00000000,0.00000000,270.00000000); //object(smashbar) (7)
  15113. CreateDynamicObject(1251,1555.30004883,-1632.90002441,12.50000000,0.00000000,0.00000000,270.00000000); //object(smashbar) (8)
  15114. CreateDynamicObject(1251,1562.00000000,-1632.90002441,12.50000000,0.00000000,0.00000000,270.00000000); //object(smashbar) (9)
  15115. CreateDynamicObject(1251,1568.59997559,-1632.90002441,12.50000000,0.00000000,0.00000000,270.00000000); //object(smashbar) (10)
  15116. CreateDynamicObject(1251,1575.19921875,-1632.89941406,12.50000000,0.00000000,0.00000000,270.00000000); //object(smashbar) (11)
  15117. CreateDynamicObject(1251,1578.50000000,-1632.90002441,12.50000000,0.00000000,0.00000000,270.00000000); //object(smashbar) (12)
  15118. CreateDynamicObject(1251,1548.50000000,-1622.90002441,12.50000000,0.00000000,0.00000000,270.00000000); //object(smashbar) (13)
  15119. CreateDynamicObject(1251,1554.19995117,-1622.90002441,12.50000000,0.00000000,0.00000000,270.00000000); //object(smashbar) (14)
  15120. CreateDynamicObject(1251,1560.59997559,-1622.90002441,12.50000000,0.00000000,0.00000000,270.00000000); //object(smashbar) (15)
  15121. CreateDynamicObject(1251,1567.40002441,-1622.90002441,12.50000000,0.00000000,0.00000000,270.00000000); //object(smashbar) (16)
  15122. CreateDynamicObject(1251,1573.69995117,-1622.90002441,12.50000000,0.00000000,0.00000000,270.00000000); //object(smashbar) (17)
  15123. CreateDynamicObject(1251,1553.09997559,-1617.50000000,12.69999981,0.00000000,0.00000000,270.00000000); //object(smashbar) (21)
  15124. CreateDynamicObject(1251,1559.69995117,-1617.50000000,12.69999981,0.00000000,0.00000000,270.00000000); //object(smashbar) (20)
  15125. CreateDynamicObject(1251,1566.40002441,-1617.50000000,12.69999981,0.00000000,0.00000000,270.00000000); //object(smashbar) (22)
  15126. CreateDynamicObject(1251,1573.00000000,-1617.50000000,12.69999981,0.00000000,0.00000000,270.00000000); //object(smashbar) (23)
  15127. CreateDynamicObject(1251,1573.69995117,-1617.50000000,12.69999981,0.00000000,0.00000000,270.00000000); //object(smashbar) (24)
  15128. CreateDynamicObject(1215,1561.90002441,-1602.80004883,12.89999962,0.00000000,0.00000000,0.00000000); //object(bollardlight) (1)
  15129. CreateDynamicObject(1215,1566.09997559,-1602.90002441,12.89999962,0.00000000,0.00000000,0.00000000); //object(bollardlight) (2)
  15130. CreateDynamicObject(1215,1570.50000000,-1602.90002441,12.89999962,0.00000000,0.00000000,0.00000000); //object(bollardlight) (3)
  15131. CreateDynamicObject(1215,1574.90002441,-1602.90002441,12.89999962,0.00000000,0.00000000,0.00000000); //object(bollardlight) (4)
  15132. CreateDynamicObject(1215,1579.19995117,-1602.90002441,12.89999962,0.00000000,0.00000000,0.00000000); //object(bollardlight) (5)
  15133. CreateDynamicObject(1215,1583.59997559,-1602.90002441,12.89999962,0.00000000,0.00000000,0.00000000); //object(bollardlight) (6)
  15134. CreateDynamicObject(1215,1587.80004883,-1602.90002441,12.89999962,0.00000000,0.00000000,0.00000000); //object(bollardlight) (7)
  15135. CreateDynamicObject(3263,1543.90002441,-1624.00000000,12.39999962,0.00000000,0.00000000,272.00000000); //object(privatesign2) (1)
  15136. CreateDynamicObject(3263,1543.59997559,-1630.69995117,12.39999962,0.00000000,0.00000000,269.99951172); //object(privatesign2) (2)
  15137. CreateDynamicObject(997,1550.19995117,-1622.69995117,12.50000000,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier3) (1)
  15138. CreateDynamicObject(997,1553.40002441,-1622.69995117,12.50000000,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier3) (2)
  15139. CreateDynamicObject(997,1556.59997559,-1622.69995117,12.50000000,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier3) (3)
  15140. CreateDynamicObject(997,1559.80004883,-1622.69995117,12.50000000,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier3) (4)
  15141. CreateDynamicObject(997,1564.30004883,-1622.69995117,12.50000000,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier3) (5)
  15142. CreateDynamicObject(997,1574.00000000,-1617.69995117,12.50000000,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier3) (9)
  15143. CreateDynamicObject(997,1570.80004883,-1617.69995117,12.50000000,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier3) (10)
  15144. CreateDynamicObject(997,1567.59997559,-1617.69995117,12.50000000,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier3) (11)
  15145. CreateDynamicObject(997,1564.40002441,-1617.69995117,12.50000000,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier3) (12)
  15146. CreateDynamicObject(997,1559.80004883,-1617.69995117,12.50000000,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier3) (13)
  15147. CreateDynamicObject(997,1556.59997559,-1617.69995117,12.50000000,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier3) (14)
  15148. CreateDynamicObject(997,1553.40002441,-1617.69995117,12.50000000,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier3) (15)
  15149. CreateDynamicObject(997,1550.19995117,-1617.69995117,12.50000000,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier3) (16)
  15150. CreateDynamicObject(997,1547.00000000,-1617.69995117,12.50000000,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier3) (17)
  15151. CreateDynamicObject(997,1547.00000000,-1622.69921875,12.50000000,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier3) (18)
  15152. CreateDynamicObject(997,1577.00000000,-1622.80004883,12.50000000,0.00000000,0.00000000,38.00000000); //object(lhouse_barrier3) (20)
  15153. CreateDynamicObject(997,1577.19995117,-1617.69995117,12.50000000,0.00000000,0.00000000,315.99621582); //object(lhouse_barrier3) (21)
  15154. CreateDynamicObject(4732,1539.40002441,-1609.19995117,25.20000076,0.00000000,0.00000000,236.00000000); //object(billbrdlan2_06) (1)
  15155. CreateDynamicObject(9697,1604.09997559,-1655.09997559,12.60000038,0.00000000,0.00000000,269.99996948); //object(carspaces3_sfw) (2)
  15156. CreateDynamicObject(3458,1605.50000000,-1623.19995117,13.89999962,0.00000000,0.00000000,89.99450684); //object(vgncarshade1) (1)
  15157. CreateDynamicObject(997,1546.19995117,-1633.09997559,12.50000000,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier3) (18)
  15158. CreateDynamicObject(997,1549.40002441,-1633.09997559,12.50000000,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier3) (18)
  15159. CreateDynamicObject(997,1552.59997559,-1633.09997559,12.50000000,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier3) (18)
  15160. CreateDynamicObject(997,1555.80004883,-1633.09997559,12.50000000,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier3) (18)
  15161. CreateDynamicObject(997,1559.00000000,-1633.09997559,12.50000000,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier3) (18)
  15162. CreateDynamicObject(997,1562.19995117,-1633.09997559,12.50000000,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier3) (18)
  15163. CreateDynamicObject(997,1565.40002441,-1633.09997559,12.50000000,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier3) (18)
  15164. CreateDynamicObject(997,1568.59997559,-1633.09997559,12.50000000,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier3) (18)
  15165. CreateDynamicObject(997,1571.80004883,-1633.09997559,12.50000000,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier3) (18)
  15166. CreateDynamicObject(997,1604.59997559,-1633.00000000,12.50000000,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier3) (18)
  15167. CreateDynamicObject(997,1601.40002441,-1633.00000000,12.50000000,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier3) (18)
  15168. CreateDynamicObject(997,1598.19995117,-1633.00000000,12.50000000,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier3) (18)
  15169. CreateDynamicObject(997,1595.00000000,-1632.90002441,12.50000000,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier3) (18)
  15170. CreateDynamicObject(997,1591.80004883,-1632.90002441,12.50000000,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier3) (18)
  15171. CreateDynamicObject(997,1588.59997559,-1632.90002441,12.50000000,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier3) (18)
  15172. CreateDynamicObject(997,1588.59997559,-1633.00000000,12.50000000,0.00000000,0.00000000,90.00000000); //object(lhouse_barrier3) (18)
  15173. CreateDynamicObject(997,1588.59997559,-1629.90002441,12.50000000,0.00000000,0.00000000,90.00000000); //object(lhouse_barrier3) (18)
  15174. CreateDynamicObject(997,1588.59997559,-1626.80004883,12.50000000,0.00000000,0.00000000,90.00000000); //object(lhouse_barrier3) (18)
  15175. CreateDynamicObject(997,1588.69995117,-1623.50000000,12.50000000,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier3) (18)
  15176. CreateDynamicObject(997,1592.00000000,-1623.50000000,12.50000000,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier3) (18)
  15177. CreateDynamicObject(1251,1591.80004883,-1623.30004883,12.50000000,0.00000000,0.00000000,270.00000000); //object(smashbar) (11)
  15178. CreateDynamicObject(1251,1588.40002441,-1626.69995117,12.50000000,0.00000000,0.00000000,0.00000000); //object(smashbar) (1)
  15179. CreateDynamicObject(1251,1588.40002441,-1629.80004883,12.50000000,0.00000000,0.00000000,0.00000000); //object(smashbar) (1)
  15180. CreateDynamicObject(1251,1591.80004883,-1633.19995117,12.50000000,0.00000000,0.00000000,270.00000000); //object(smashbar) (11)
  15181. CreateDynamicObject(1231,1564.09997559,-1620.30004883,15.30000019,0.00000000,0.00000000,0.00000000); //object(streetlamp2) (1)
  15182. CreateDynamicObject(1231,1557.40002441,-1620.30004883,15.30000019,0.00000000,0.00000000,0.00000000); //object(streetlamp2) (4)
  15183. CreateDynamicObject(1231,1550.90002441,-1620.30004883,15.30000019,0.00000000,0.00000000,0.00000000); //object(streetlamp2) (5)
  15184. CreateDynamicObject(1232,1588.59997559,-1623.00000000,15.00000000,0.00000000,0.00000000,0.00000000); //object(streetlamp1) (1)
  15185. CreateDynamicObject(1232,1595.09997559,-1623.00000000,15.00000000,0.00000000,0.00000000,0.00000000); //object(streetlamp1) (2)
  15186. CreateDynamicObject(1297,1540.50000000,-1603.30004883,15.80000019,0.00000000,0.00000000,137.99993896); //object(lamppost1) (1)
  15187. CreateDynamicObject(1297,1540.90002441,-1616.69995117,15.80000019,0.00000000,0.00000000,213.99926758); //object(lamppost1) (2)
  15188. CreateDynamicObject(1368,1554.40002441,-1620.40002441,13.19999981,0.00000000,0.00000000,0.00000000); //object(cj_blocker_bench) (1)
  15189. CreateDynamicObject(8168,1571.80004883,-1620.30004883,14.30000019,0.00000000,0.00000000,15.99993896); //object(vgs_guardhouse01) (1)
  15190. CreateDynamicObject(1251,1574.90002441,-1626.40002441,12.39999962,0.00000000,0.00000000,180.00000000); //object(smashbar) (1)
  15191. CreateDynamicObject(1251,1575.00000000,-1626.40002441,12.39999962,0.00000000,0.00000000,0.00000000); //object(smashbar) (1)
  15192. CreateDynamicObject(1251,1574.90002441,-1629.30004883,12.39999962,0.00000000,0.00000000,179.99450684); //object(smashbar) (1)
  15193. CreateDynamicObject(1251,1575.00000000,-1629.30004883,12.39999962,0.00000000,0.00000000,0.00000000); //object(smashbar) (1)
  15194. CreateDynamicObject(2921,1574.30004883,-1622.80004883,15.80000019,0.00000000,0.00000000,92.00000000); //object(kmb_cam) (1)
  15195. CreateDynamicObject(2921,1549.30004883,-1637.09997559,21.00000000,0.00000000,0.00000000,277.99954224); //object(kmb_cam) (2)
  15196. CreateDynamicObject(2922,1572.69995117,-1622.69995117,13.80000019,0.00000000,0.00000000,178.00000000); //object(kmb_keypad) (1)
  15197. CreateDynamicObject(2922,1575.40002441,-1618.50000000,13.69999981,0.00000000,0.00000000,269.99996948); //object(kmb_keypad) (2)
  15198. CreateDynamicObject(1886,1555.19995117,-1608.90002441,17.60000038,0.00000000,2.00000000,60.00000000); //object(shop_sec_cam) (1)
  15199. CreateDynamicObject(1886,1560.00000000,-1612.50000000,17.70000076,0.00000000,0.00000000,237.99998474); //object(shop_sec_cam) (2)
  15200. CreateDynamicObject(1368,1560.90002441,-1620.40002441,13.19999981,0.00000000,0.00000000,179.99993896); //object(cj_blocker_bench) (2)
  15201. CreateDynamicObject(983,1544.50000000,-1620.69995117,13.19999981,0.00000000,0.00000000,0.00000000); //object(fenceshit3) (1)
  15202. CreateDynamicObject(983,1543.40002441,-1635.80004883,13.19999981,0.00000000,0.00000000,0.00000000); //object(fenceshit3) (2)
  15203. //LAPD-Chink Gates-LSSD-FDSA-All Saints
  15204. CreateDynamicObject(18030, 2092.279296875, 2817.1181640625, -14.807208061218, 0.000000, 0.000000, 0.000000); //
  15205. CreateDynamicObject(2951, 2109.0756835938, 2812.5268554688, -17.188125610352, 0.000000, 0.000000, 270.67498779297); //
  15206. CreateDynamicObject(2951, 2087.53515625, 2803.2150878906, -17.674396514893, 0.000000, 0.000000, 0.000000); //
  15207. CreateDynamicObject(3386, 2103.3381347656, 2830.3115234375, -17.174396514893, 0.000000, 0.000000, 0.000000); //
  15208. CreateDynamicObject(3387, 2103.4313964844, 2826.3564453125, -17.174396514893, 0.000000, 0.000000, 0.000000); //
  15209. CreateDynamicObject(3389, 2101.015625, 2830.6564941406, -17.174396514893, 0.000000, 0.000000, 91.894958496094); //
  15210. CreateDynamicObject(1997, 2071.7292480469, 2806.0947265625, -17.174396514893, 0.000000, 0.000000, 93.295013427734); //
  15211. CreateDynamicObject(1997, 2071.7165527344, 2807.8830566406, -17.174396514893, 0.000000, 0.000000, 91.310028076172); //
  15212. CreateDynamicObject(1997, 2071.7561035156, 2809.45703125, -17.174396514893, 0.000000, 0.000000, 91.310028076172); //
  15213. CreateDynamicObject(3384, 2103.1545410156, 2822.3237304688, -15.731789588928, 0.000000, 0.000000, 0.000000); //
  15214. CreateDynamicObject(3383, 2100.4477539063, 2827.2509765625, -17.174396514893, 0.000000, 0.000000, 0.000000); //
  15215. CreateDynamicObject(3383, 2100.5051269531, 2822.8688964844, -17.174396514893, 0.000000, 0.000000, 0.000000); //
  15216. CreateDynamicObject(3383, 2094.5844726563, 2825.0227050781, -17.174396514893, 0.000000, 0.000000, 0.000000); //
  15217. CreateDynamicObject(1796, 2100.0754394531, 2808.0727539063, -17.174396514893, 0.000000, 0.000000, 179.28002929688); //
  15218. CreateDynamicObject(1796, 2098.4482421875, 2808.1791992188, -17.174396514893, 0.000000, 0.000000, 178.9150390625); //
  15219. CreateDynamicObject(1796, 2102.0798339844, 2807.9851074219, -17.174396514893, 0.000000, 0.000000, 179.05505371094); //
  15220. CreateDynamicObject(2239, 2103.4404296875, 2804.8537597656, -17.174396514893, 0.000000, 0.000000, 218.75506591797); //
  15221. CreateDynamicObject(2184, 2085.3012695313, 2828.1159667969, -17.174396514893, 0.000000, 0.000000, 0.000000); //
  15222. CreateDynamicObject(1671, 2086.1975097656, 2829.4157714844, -16.714181900024, 0.000000, 0.000000, 0.000000); //
  15223. CreateDynamicObject(2190, 2087.134765625, 2828.1010742188, -16.398658752441, 0.000000, 0.000000, 230.5249786377); //
  15224. CreateDynamicObject(2854, 2085.673828125, 2828.6516113281, -16.398658752441, 0.000000, 0.000000, 133.07997131348); //
  15225. CreateDynamicObject(2946, 2081.85546875, 2831.0966796875, -17.174396514893, 0.000000, 0.000000, 91.310028076172); //
  15226. CreateDynamicObject(10182, 1145.3453369141, -1326.4350585938, 14.297383308411, 0.000000, 0.000000, 0.000000); //
  15227. CreateDynamicObject(16656, 1421.5529785156, -2445.5986328125, -9.6055564880371, 0.000000, 0.000000, 0.000000); //
  15228. CreateDynamicObject(1997, 1430.8905029297, -2437.8049316406, -12.598474502563, 0.000000, 0.000000, 269.9599609375); //
  15229. CreateDynamicObject(3384, 1431.6123046875, -2441.9572753906, -11.155867576599, 0.000000, 0.000000, 0.000000); //
  15230. CreateDynamicObject(1886, 1426.7391357422, -2451.6730957031, -7.6691589355469, 0.000000, 358.01501464844, 182.52499389648); //
  15231. CreateDynamicObject(2951, 1420.4285888672, -2442.7119140625, -13.105556488037, 0.000000, 0.000000, 270.44995117188); //
  15232. CreateDynamicObject(2951, 1420.4750976563, -2450.1713867188, -13.098474502563, 0.000000, 0.000000, 270.53997802734); //
  15233. CreateDynamicObject(2946, 1425.0671386719, -2436.9409179688, -12.605556488037, 0.000000, 0.000000, 268.69006347656); //
  15234. CreateDynamicObject(2606, 1422.2109375, -2436.7719726563, -10.66157245636, 0.000000, 0.000000, 0.000000); //
  15235. CreateDynamicObject(1999, 1421.7412109375, -2437.5876464844, -12.605556488037, 0.000000, 0.000000, 0.000000); //
  15236. CreateDynamicObject(2356, 1422.6676025391, -2438.5456542969, -12.605556488037, 0.000000, 0.000000, 0.000000); //
  15237. //CreateDynamicObject(11008, 1530.6383056641, -2167.5698242188, 19.045516967773, 0.000000, 0.000000, 0.000000); //
  15238. CreateDynamicObject(8356, 1560.9700927734, -2091.2924804688, 12.568482398987, 0.000000, 0.000000, 180); //
  15239. CreateDynamicObject(8356, 1600.9536132813, -2091.2219238281, 12.568482398987, 0.000000, 0.000000, 180); //
  15240. CreateDynamicObject(8356, 1501.1728515625, -2091.2724609375, 12.568482398987, 0.000000, 0.000000, 180); //
  15241. //CreateDynamicObject(5711, 1581.1998291016, -2159.6352539063, 16.031856536865, 0.000000, 0.000000, 180); //
  15242. //CreateDynamicObject(16564, 1618.6606445313, -2164.0412597656, 12.494687080383, 0.000000, 0.000000, 90); //
  15243. CreateDynamicObject(8356, 1640.9392089844, -2091.2358398438, 12.568482398987, 0.000000, 0.000000, 179.99450683594); //
  15244. //CreateDynamicObject(12839, 1604.3753662109, -2180.419921875, 16.050001144409, 0.000000, 0.000000, 0.000000); //
  15245. CreateDynamicObject(994, 2222.9479980469, -1707.8178710938, 12.554218292236, 0.000000, 0.000000, 83.25); //
  15246. CreateDynamicObject(994, 2222.2282714844, -1714.1044921875, 12.554218292236, 0.000000, 0.000000, 83.248901367188); //
  15247. CreateDynamicObject(994, 2221.666015625, -1720.4332275391, 12.554218292236, 0.000000, 0.000000, 84.998901367188); //
  15248. CreateDynamicObject(997, 2221.5944824219, -1720.4653320313, 12.554218292236, 0.000000, 0.000000, 270.39489746094); //
  15249. CreateDynamicObject(997, 2221.6120605469, -1723.6779785156, 12.554218292236, 0.000000, 0.000000, 308.13818359375); //
  15250. CreateDynamicObject(997, 2223.5490722656, -1726.2283935547, 12.554218292236, 0.000000, 0.000000, 343.46838378906); //
  15251. CreateDynamicObject(994, 2232.9912109375, -1727.2038574219, 12.554218292236, 0.000000, 0.000000, 179.2939453125); //
  15252. CreateDynamicObject(994, 2239.298828125, -1727.1459960938, 12.554218292236, 0.000000, 0.000000, 180.29138183594); //
  15253. CreateDynamicObject(994, 2245.6069335938, -1727.1053466797, 12.554218292236, 0.000000, 0.000000, 180.29113769531); //
  15254. CreateDynamicObject(994, 2230.0375976563, -1702.1334228516, 12.554218292236, 0.000000, 0.000000, 174.55895996094); //
  15255. CreateDynamicObject(994, 2245.8688964844, -1720.8118896484, 12.554218292236, 0.000000, 0.000000, 267.63110351563); //
  15256. //CreateDynamicObject(971, 1588.966796875, -1637.9287109375, 14.952730178833, 0.000000, 0.000000, 179.99450683594); //
  15257. CreateDynamicObject(1495, 1582.6011962891, -1637.8992919922, 12.552812576294, 0.000000, 0.000000, 0.000000); //
  15258. CreateDynamicObject(8210, 1618.8397216797, -1780.4431152344, 15.639604568481, 0.000000, 0.000000, 344.89477539063); //
  15259. CreateDynamicObject(8210, 1652.6362304688, -1789.5369873047, 15.639604568481, 0.000000, 0.000000, 344.89379882813); //
  15260. // CreateDynamicObject(5043, 1843.36719, -1856.32031, 13.87500, 356.85840, 0.00000, 3.14159);
  15261. SetTimer("UpdateSpeedo", 300, true);
  15262. //VAGOSI DZIBA
  15263. new vagosidziba;
  15264. vagosidziba = CreateDynamicObject(17859, 1938.658325, -2078.947998, 14.732399, 0.000000, 0.000000, 90.000000, -1, -1, -1, 300.00, 300.00);
  15265. SetDynamicObjectMaterial(vagosidziba, 0, -1, "none", "none", 0xFFCCCC00);
  15266. vagosidziba = CreateDynamicObject(18980, 1925.502685, -2096.079833, 12.541700, 0.000000, 90.000000, 0.000000, -1, -1, -1, 300.00, 300.00);
  15267. SetDynamicObjectMaterial(vagosidziba, 0, 10101, "2notherbuildsfe", "ferry_build14", 0x00000000);
  15268. vagosidziba = CreateDynamicObject(18980, 1925.493652, -2062.981445, 12.541700, 0.000000, 90.000000, 0.000000, -1, -1, -1, 300.00, 300.00);
  15269. SetDynamicObjectMaterial(vagosidziba, 0, 10101, "2notherbuildsfe", "ferry_build14", 0x00000000);
  15270. vagosidziba = CreateDynamicObject(19377, 1946.319946, -2096.516601, 16.657899, 0.000000, 0.000000, 90.000000, -1, -1, -1, 300.00, 300.00);
  15271. SetDynamicObjectMaterial(vagosidziba, 0, -1, "none", "none", 0xFFCCCC00);
  15272. vagosidziba = CreateDynamicObject(19377, 1939.209838, -2096.496826, 16.657899, 0.000000, 0.000000, 90.000000, -1, -1, -1, 300.00, 300.00);
  15273. SetDynamicObjectMaterial(vagosidziba, 0, -1, "none", "none", 0xFFCCCC00);
  15274. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  15275. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  15276. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  15277. vagosidziba = CreateDynamicObject(8673, 1927.179809, -2096.193115, 14.478300, 0.000000, 0.000000, 0.000000, -1, -1, -1, 300.00, 300.00);
  15278. vagosidziba = CreateDynamicObject(8673, 1923.441040, -2062.816162, 14.478300, 0.000000, 0.000000, 0.000000, -1, -1, -1, 300.00, 300.00);
  15279. vagosidziba = CreateDynamicObject(8673, 1927.177001, -2062.816162, 14.478300, 0.000000, 0.000000, 0.000000, -1, -1, -1, 300.00, 300.00);
  15280. vagosidziba = CreateDynamicObject(8673, 1913.009155, -2072.459960, 14.478300, 0.000000, 0.000000, 90.000000, -1, -1, -1, 300.00, 300.00);
  15281. vagosidziba = CreateDynamicObject(8673, 1923.477539, -2096.189941, 14.478300, 0.000000, 0.000000, 0.000000, -1, -1, -1, 300.00, 300.00);
  15282. vagosidziba = CreateDynamicObject(8673, 1913.011352, -2085.751464, 14.478300, 0.000000, 0.000000, 90.000000, -1, -1, -1, 300.00, 300.00);
  15283. vagosidziba = CreateDynamicObject(1507, 1934.375488, -2074.480957, 12.545499, 0.000000, 0.000000, 90.000000, -1, -1, -1, 300.00, 300.00);
  15284. vagosidziba = CreateDynamicObject(1735, 1928.810058, -2076.785888, 12.545700, 0.000000, 0.000000, 90.000000, -1, -1, -1, 300.00, 300.00);
  15285. vagosidziba = CreateDynamicObject(1728, 1933.711303, -2075.505371, 12.546899, 0.000000, 0.000000, -90.000000, -1, -1, -1, 300.00, 300.00);
  15286. vagosidziba = CreateDynamicObject(1729, 1930.494873, -2074.961669, 12.546699, 0.000000, 0.000000, 34.000000, -1, -1, -1, 300.00, 300.00);
  15287. vagosidziba = CreateDynamicObject(19997, 1930.517333, -2076.637451, 12.546919, 0.000000, 0.000000, 0.000000, -1, -1, -1, 300.00, 300.00);
  15288. vagosidziba = CreateDynamicObject(19997, 1932.057373, -2077.397460, 12.546919, 0.000000, 0.000000, 0.000000, -1, -1, -1, 300.00, 300.00);
  15289. vagosidziba = CreateDynamicObject(1729, 1930.495849, -2078.301513, 12.546699, 0.000000, 0.000000, -202.000000, -1, -1, -1, 300.00, 300.00);
  15290. vagosidziba = CreateDynamicObject(19997, 1932.074218, -2075.776367, 12.546919, 0.000000, 0.000000, 0.000000, -1, -1, -1, 300.00, 300.00);
  15291. vagosidziba = CreateDynamicObject(1729, 1932.839233, -2078.844482, 12.546699, 0.000000, 0.000000, -120.000000, -1, -1, -1, 300.00, 300.00);
  15292. vagosidziba = CreateDynamicObject(1421, 1916.544311, -2093.898193, 13.182593, 0.000000, 0.000000, 90.000000, -1, -1, -1, 300.00, 300.00);
  15293. vagosidziba = CreateDynamicObject(1362, 1916.291381, -2092.280029, 13.105099, 0.000000, 0.000000, 0.000000, -1, -1, -1, 300.00, 300.00);
  15294. vagosidziba = CreateDynamicObject(3594, 1914.325073, -2092.428710, 12.418370, 0.000000, 0.000000, 0.000000, -1, -1, -1, 300.00, 300.00);
  15295. vagosidziba = CreateDynamicObject(3594, 1914.324462, -2092.238525, 13.418399, 0.000000, 0.000000, 0.000000, -1, -1, -1, 300.00, 300.00);
  15296. vagosidziba = CreateDynamicObject(3594, 1914.324462, -2092.238525, 14.418399, 0.000000, 0.000000, 0.000000, -1, -1, -1, 300.00, 300.00);
  15297. vagosidziba = CreateDynamicObject(1362, 1933.950683, -2072.348388, 13.105099, 0.000000, 0.000000, 0.000000, -1, -1, -1, 300.00, 300.00);
  15298. vagosidziba = CreateDynamicObject(1421, 1933.920532, -2079.723632, 13.232595, 0.000000, 0.000000, 90.000000, -1, -1, -1, 300.00, 300.00);
  15299. vagosidziba = CreateDynamicObject(1421, 1916.536499, -2090.430908, 13.182593, 0.000000, 0.000000, 90.000000, -1, -1, -1, 300.00, 300.00);
  15300. //IDLEWOOD
  15301. CreateDynamicObject(1569, 2033.43005, -1884.31006, 12.56000, 0.00000, 0.00000, 0.00000);
  15302. CreateDynamicObject(1566, 2040.81006, -1884.20996, 13.98000, 0.00000, 0.00000, 0.00000);
  15303. CreateDynamicObject(1566, 2043.97400, -1884.20801, 13.98000, 0.00000, 0.00000, 180.00000);
  15304. CreateDynamicObject(3806, 2045.80005, -1884.12000, 13.24000, 0.00000, 0.00000, 90.00000);
  15305. CreateDynamicObject(3806, 2038.93994, -1884.12000, 13.24000, 0.00000, 0.00000, 90.00000);
  15306. CreateDynamicObject(1825, 2045.56006, -1880.44995, 12.56000, 0.00000, 0.00000, -18.00000);
  15307. CreateDynamicObject(1825, 2039.06006, -1881.06995, 12.56000, 0.00000, 0.00000, -55.00000);
  15308. CreateDynamicObject(2800, 2045.38000, -1880.44995, 13.25000, 0.00000, 0.00000, 0.00000);
  15309. CreateDynamicObject(2959, 2056.64990, -1884.23596, 12.54000, 0.00000, 0.00000, -90.00000);
  15310. CreateDynamicObject(16769, 2055.85010, -1891.91003, 11.89000, 0.00000, -1.00000, 180.00000);
  15311. CreateDynamicObject(19996, 2058.53003, -1883.62000, 12.50000, 0.00000, 0.00000, -156.00000);
  15312. CreateDynamicObject(19996, 2059.37988, -1883.08997, 12.50000, 0.00000, 0.00000, -105.00000);
  15313. CreateDynamicObject(1566, 2065.80005, -1884.03003, 13.98000, 0.00000, 0.00000, 0.00000);
  15314. CreateDynamicObject(2773, 2066.94995, -1882.04004, 13.10000, 0.00000, 0.00000, 90.00000);
  15315. CreateDynamicObject(2773, 2065.04004, -1882.04004, 13.10000, 0.00000, 0.00000, 90.00000);
  15316. CreateDynamicObject(9345, 2043.64001, -1867.67004, 12.78000, 0.00000, 0.00000, -345.00000);
  15317. CreateDynamicObject(892, 2053.78003, -1865.45996, 13.00000, 0.00000, 0.00000, 0.00000);
  15318. CreateDynamicObject(892, 2060.59009, -1869.20996, 12.75000, 0.00000, 0.00000, 0.00000);
  15319. CreateDynamicObject(892, 2065.31006, -1866.25000, 12.97000, 0.00000, 0.00000, 0.00000);
  15320. CreateDynamicObject(870, 2064.01001, -1866.39001, 13.18000, 0.00000, 0.00000, 0.00000);
  15321. CreateDynamicObject(870, 2049.64990, -1867.44995, 13.23000, 0.00000, 0.00000, 0.00000);
  15322. CreateDynamicObject(870, 2060.09009, -1868.73999, 13.20000, 0.00000, 0.00000, 0.00000);
  15323. CreateDynamicObject(747, 2062.12012, -1866.87000, 12.92000, 0.00000, 0.00000, -25.00000);
  15324. CreateDynamicObject(747, 2046.65002, -1867.47998, 12.84000, 0.00000, 0.00000, -62.00000);
  15325. CreateDynamicObject(1302, 2048.46997, -1883.89001, 12.61000, 0.00000, 0.00000, 180.00000);
  15326. CreateDynamicObject(1341, 2034.32996, -1875.83997, 13.44000, 0.00000, 0.00000, -25.00000);
  15327. CreateDynamicObject(1342, 2036.64001, -1873.56995, 13.56000, 0.00000, 0.00000, -58.00000);
  15328. CreateDynamicObject(759, 2044.23999, -1868.98999, 12.13000, 0.00000, 0.00000, 0.00000);
  15329. CreateDynamicObject(3515, 2043.70996, -1867.69995, 13.38000, 0.00000, 0.00000, 0.00000);
  15330. CreateDynamicObject(747, 2041.55005, -1868.77002, 12.84000, 0.00000, 0.00000, -62.00000);
  15331. CreateDynamicObject(892, 2037.64001, -1866.97998, 13.00000, 0.00000, 0.00000, 0.00000);
  15332. CreateDynamicObject(892, 2050.11011, -1868.26001, 13.00000, 0.00000, 0.00000, 0.00000);
  15333. CreateDynamicObject(892, 2046.18005, -1864.80005, 13.00000, 0.00000, 0.00000, 0.00000);
  15334. CreateDynamicObject(759, 2038.93005, -1870.15002, 12.13000, 0.00000, 0.00000, 0.00000);
  15335. CreateDynamicObject(870, 2054.13989, -1865.92004, 13.23000, 0.00000, 0.00000, 0.00000);
  15336. CreateDynamicObject(759, 2057.66992, -1866.18005, 12.13000, 0.00000, 0.00000, 0.00000);
  15337. CreateDynamicObject(1332, 2070.91992, -1882.83997, 13.51000, 0.00000, 0.00000, 90.00000);
  15338. CreateDynamicObject(1343, 2071.12012, -1881.43994, 13.30000, 0.00000, 0.00000, 90.00000);
  15339. CreateDynamicObject(9345, 2059.84009, -1866.68994, 12.78000, 0.00000, 0.00000, -180.00000);
  15340. CreateDynamicObject(789, 2055.17993, -1875.65002, 25.86000, 0.00000, 0.00000, 0.00000);
  15341. CreateDynamicObject(10433, 1568.81995, -1690.81006, 2125.00000, 0.00000, 0.00000, 0.00000);
  15342. CreateDynamicObject(10433, 2054.75000, -1883.68994, 6.82000, 0.00000, 0.00000, 90.00000);
  15343. CreateDynamicObject(870, 2052.69995, -1877.68005, 12.83000, 0.00000, 0.00000, 0.00000);
  15344. CreateDynamicObject(870, 2052.77002, -1876.27002, 12.83000, 0.00000, 0.00000, 0.00000);
  15345. CreateDynamicObject(870, 2051.62988, -1878.35999, 12.83000, 0.00000, 0.00000, -63.00000);
  15346. CreateDynamicObject(870, 2050.13989, -1877.90002, 12.83000, 0.00000, 0.00000, -193.00000);
  15347. CreateDynamicObject(870, 2049.87012, -1876.23999, 12.83000, 0.00000, 0.00000, -236.00000);
  15348. CreateDynamicObject(870, 2051.51001, -1875.35999, 12.83000, 0.00000, 0.00000, -302.00000);
  15349. CreateDynamicObject(1367, 2076.19995, -1878.23999, 13.13500, 0.00000, 0.00000, 90.00000);
  15350. CreateDynamicObject(1421, 2072.29004, -1885.85999, 13.32000, 0.00000, 0.00000, 90.00000);
  15351. CreateDynamicObject(19447, 2069.89990, -1887.32996, 12.46000, 0.00000, 90.00000, 0.00000);
  15352. CreateDynamicObject(19953, 2030.72998, -1886.26001, 12.43000, 0.10000, 0.00000, -21.00000);
  15353. CreateDynamicObject(1226, 2014.29004, -1872.14001, 16.34000, 0.00000, 0.00000, 135.00000);
  15354. CreateDynamicObject(1226, 2025.91003, -1864.90002, 16.34000, 0.00000, 0.00000, 90.00000);
  15355. CreateDynamicObject(19984, 2026.34998, -1913.18994, 12.54000, 0.00000, 0.00000, 10.00000);
  15356. CreateDynamicObject(19912, 2070.53003, -1882.43005, 9.80000, 0.00000, 0.00000, 0.00000);
  15357. CreateDynamicObject(19912, 2058.98999, -1882.43005, 9.80000, 0.00000, 0.00000, 0.00000);
  15358. CreateDynamicObject(19912, 2047.44995, -1882.43005, 9.80000, 0.00000, 0.00000, 0.00000);
  15359. CreateDynamicObject(19912, 2043.14001, -1882.43005, 9.79000, 0.00000, 0.00000, 0.00000);
  15360. CreateDynamicObject(1574, 2009.14001, -1870.51001, 12.54000, 0.00000, 0.00000, 0.00000);
  15361. //GRass
  15362. new TempObject;
  15363. TempObject = CreateDynamicObject(19447, 2069.89966, -1877.61829, 12.46600, 0.00000, 90.00000, 0.00000);
  15364. SetDynamicObjectMaterial(TempObject, 0, 9495, "vict_sfw", "Grass_128HV", 0xFFFFFFFF);
  15365. TempObject = CreateDynamicObject(19447, 2069.89966, -1868.00403, 12.46600, 0.00000, 90.00000, 0.00000);
  15366. SetDynamicObjectMaterial(TempObject, 0, 9495, "vict_sfw", "Grass_128HV", 0xFFFFFFFF);
  15367. //BACKYARD
  15368. TempObject = CreateDynamicObject(18981, 2027.82996, -1881.08997, 12.05400, 0.00000, 90.00000, 45.00000);
  15369. SetDynamicObjectMaterial(TempObject, 0, 8529, "vgsmotelgrnd", "greyground256128", 0xFFFFFFFF);
  15370. TempObject = CreateDynamicObject(18766, 2029.12000, -1913.35999, 12.06000, 90.00000, 90.00000, 0.00000);
  15371. SetDynamicObjectMaterial(TempObject, 0, 8529, "vgsmotelgrnd", "greyground256128", 0xFFFFFFFF);
  15372. TempObject = CreateDynamicObject(18766, 2029.12000, -1917.33997, 12.08000, 90.00000, 90.00000, 0.00000);
  15373. SetDynamicObjectMaterial(TempObject, 0, 8529, "vgsmotelgrnd", "greyground256128", 0xFFFFFFFF);
  15374. TempObject = CreateDynamicObject(18766, 2025.78003, -1865.93994, 12.07000, 90.00000, 90.00000, 90.00000);
  15375. SetDynamicObjectMaterial(TempObject, 0, 8529, "vgsmotelgrnd", "greyground256128", 0xFFFFFFFF);
  15376. TempObject = CreateDynamicObject(7191, 2029.92004, -1886.23999, 12.46000, 0.00000, 90.00000, 180.00000);
  15377. SetDynamicObjectMaterial(TempObject, 0, 8529, "vgsmotelgrnd", "greyground256128", 0xFFFFFFFF);
  15378. TempObject = CreateDynamicObject(7191, 2028.60999, -1886.22998, 12.45800, 0.00000, 90.00000, 180.00000);
  15379. SetDynamicObjectMaterial(TempObject, 0, 8529, "vgsmotelgrnd", "greyground256128", 0xFFFFFFFF);
  15380. TempObject = CreateDynamicObject(18766, 2011.93994, -1875.81006, 12.06000, 90.00000, 90.00000, -45.00000);
  15381. SetDynamicObjectMaterial(TempObject, 0, 8529, "vgsmotelgrnd", "greyground256128", 0xFFFFFFFF);
  15382. TempObject = CreateDynamicObject(18766, 2019.01001, -1868.73999, 12.06000, 90.00000, 90.00000, -45.00000);
  15383. SetDynamicObjectMaterial(TempObject, 0, 8529, "vgsmotelgrnd", "greyground256128", 0xFFFFFFFF);
  15384. //CHAIR
  15385. TempObject = CreateDynamicObject(1280, 2007.50000, -1871.95996, 12.94000, 0.00000, 0.00000, -47.00000);
  15386. SetDynamicObjectMaterial(TempObject, 1, 5405, "laealpha", "floorboard256128", 0xFFFFFFFF);
  15387. TempObject = CreateDynamicObject(1280, 2012.15002, -1867.66003, 12.94000, 0.00000, 0.00000, -47.00000);
  15388. SetDynamicObjectMaterial(TempObject, 1, 5405, "laealpha", "floorboard256128", 0xFFFFFFFF);
  15389. TempObject = CreateDynamicObject(1280, 2057.20996, -1870.47998, 12.94000, 0.00000, 0.00000, 75.00000);
  15390. SetDynamicObjectMaterial(TempObject, 1, 5405, "laealpha", "floorboard256128", 0xFFFFFFFF);
  15391. TempObject = CreateDynamicObject(1280, 2046.08997, -1870.57996, 12.94000, 0.00000, 0.00000, 105.00000);
  15392. SetDynamicObjectMaterial(TempObject, 1, 5405, "laealpha", "floorboard256128", 0xFFFFFFFF);
  15393. //WHITE
  15394. TempObject = CreateDynamicObject(19717, 2071.90991, -1871.69995, 0.54000, 270.00000, 0.00000, 0.00000);
  15395. SetDynamicObjectMaterial(TempObject, 0, 1675, "wshxrefhse", "greygreensubuild_128", 0xFFFFFFFF);
  15396. TempObject = CreateDynamicObject(19717, 2071.87988, -1867.90002, 0.54000, 270.00000, 0.00000, 0.00000);
  15397. SetDynamicObjectMaterial(TempObject, 0, 1675, "wshxrefhse", "greygreensubuild_128", 0xFFFFFFFF);
  15398. //TEXT(s)
  15399. new tmpobj;
  15400. tmpobj = CreateDynamicObject(19327, 2072.01001, -1870.16003, 16.99000, 0.00000, 0.00000, 90.00000);
  15401. SetDynamicObjectMaterialText(tmpobj, 0, "Idlewood\nCenter", OBJECT_MATERIAL_SIZE_256x128, "Tahoma", 50, 1, 0xFF00FF08, 0x00000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
  15402. tmpobj = CreateDynamicObject(19327, 2043.54004, -1883.77002, 16.22000, 0.00000, 0.00000, 180.00000);
  15403. SetDynamicObjectMaterialText(tmpobj, 0, "Idlewood", OBJECT_MATERIAL_SIZE_256x128, "Impact", 60, 1, 0xFFC70039, 0x00000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
  15404. tmpobj = CreateDynamicObject(19327, 2041.19995, -1883.76001, 16.22000, 0.00000, 0.00000, 180.00000);
  15405. SetDynamicObjectMaterialText(tmpobj, 0, "Restaurant", OBJECT_MATERIAL_SIZE_256x128, "Impact", 56, 1, 0xFFC70039, 0x0000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
  15406. tmpobj = CreateDynamicObject(19327, 2066.38989, -1883.83997, 16.22000, 0.00000, 0.00000, 180.00000);
  15407. SetDynamicObjectMaterialText(tmpobj, 0, "Idlewood", OBJECT_MATERIAL_SIZE_256x128, "Impact", 65, 1, 0xFFC70039, 0x00000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
  15408. tmpobj = CreateDynamicObject(19327, 2064.25000, -1883.83801, 16.22000, 0.00000, 0.00000, 180.00000);
  15409. SetDynamicObjectMaterialText(tmpobj, 0, "CLUB", OBJECT_MATERIAL_SIZE_256x128, "Impact", 70, 1, 0xFFC70039, 0x00000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
  15410. //MARK
  15411. TempObject = CreateDynamicObject(19442, 2067.08008, -1884.01001, 16.21000, 90.00000, 0.00000, 90.00000);
  15412. SetDynamicObjectMaterial(TempObject, 0, 3975, "lanbloke", "p_floor3", 0xFFFFFFFF);
  15413. TempObject = CreateDynamicObject(19442, 2063.58008, -1884.01001, 16.21000, 90.00000, 0.00000, 90.00000);
  15414. SetDynamicObjectMaterial(TempObject, 0, 3975, "lanbloke", "p_floor3", 0xFFFFFFFF);
  15415. TempObject = CreateDynamicObject(19442, 2071.88989, -1870.20996, 16.99000, 90.00000, 0.00000, 0.00000);
  15416. SetDynamicObjectMaterial(TempObject, 0, 3975, "lanbloke", "p_floor3", 0xFFFFFFFF);
  15417. TempObject = CreateDynamicObject(19444, 2044.15002, -1883.89001, 16.21000, 90.00000, 0.00000, 90.00000);
  15418. SetDynamicObjectMaterial(TempObject, 0, 3975, "lanbloke", "p_floor3", 0xFFFFFFFF);
  15419. TempObject = CreateDynamicObject(19444, 2040.65002, -1883.89001, 16.21000, 90.00000, 0.00000, 90.00000);
  15420. SetDynamicObjectMaterial(TempObject, 0, 3975, "lanbloke", "p_floor3", 0xFFFFFFFF);
  15421. //FLOOR
  15422. TempObject = CreateDynamicObject(19437, 2071.14990, -1870.18994, 12.47000, 0.00000, 90.00000, 90.00000);
  15423. SetDynamicObjectMaterial(TempObject, 0, 8529, "vgsmotelgrnd", "greyground256128", 0xFFFFFFFF);
  15424. //WALLS
  15425. TempObject = CreateDynamicObject(4091, 2050.62988, -1891.17004, 1.80000, 95.00000, 270.00000, 270.00000);
  15426. SetDynamicObjectMaterial(TempObject, 0, 1675, "wshxrefhse", "greygreensubuild_128", 0xFF393636);
  15427. TempObject = CreateDynamicObject(18980, 2070.86011, -1884.44995, 4.45000, 0.00000, 0.00000, 0.00000);
  15428. SetDynamicObjectMaterial(TempObject, 0, 1675, "wshxrefhse", "greygreensubuild_128", 0xFFFFFFFF);
  15429. TempObject = CreateDynamicObject(18980, 2058.83813, -1884.45605, 16.44000, 90.00000, 0.00000, 90.00000);
  15430. SetDynamicObjectMaterial(TempObject, 0, 1675, "wshxrefhse", "greygreensubuild_128", 0xFFFFFFFF);
  15431. TempObject = CreateDynamicObject(18980, 2044.18994, -1884.45996, 16.44000, 90.00000, 0.00000, 90.00000);
  15432. SetDynamicObjectMaterial(TempObject, 0, 1675, "wshxrefhse", "greygreensubuild_128", 0xFFFFFFFF);
  15433. TempObject = CreateDynamicObject(18980, 2059.35010, -1884.31006, 4.46000, 0.00000, 0.00000, 90.00000);
  15434. SetDynamicObjectMaterial(TempObject, 0, 1675, "wshxrefhse", "greygreensubuild_128", 0xFFFFFFFF);
  15435. //WindowsX1
  15436. TempObject = CreateDynamicObject(2691, 2045.74573, -1884.05420, 14.09000, 0.00000, 0.00000, 180.00000);
  15437. SetDynamicObjectMaterial(TempObject, 0, 8488, "flamingo1", "shopwindowlow2_256", 0xFFFFFFFF);
  15438. TempObject = CreateDynamicObject(2691, 2038.84460, -1884.06177, 14.09000, 0.00000, 0.00000, 180.00000);
  15439. SetDynamicObjectMaterial(TempObject, 0, 8488, "flamingo1", "shopwindowlow2_256", 0xFFFFFFFF);
  15440. TempObject = CreateDynamicObject(19325, 2067.22998, -1884.15002, 13.30000, 0.00000, 0.00000, 90.00000);
  15441. SetDynamicObjectMaterial(TempObject, 0, 3306, "cunte_house1", "pinkfence_law", 0xFF2C3E50);
  15442. TempObject = CreateDynamicObject(19325, 2062.26001, -1884.15002, 13.30000, 0.00000, 0.00000, 90.00000);
  15443. SetDynamicObjectMaterial(TempObject, 0, 3306, "cunte_house1", "pinkfence_law", 0xFF2C3E50);
  15444. TempObject = CreateDynamicObject(19325, 2062.54004, -1884.13000, 13.30000, 0.00000, 0.00000, 90.00000);
  15445. SetDynamicObjectMaterial(TempObject, 0, 3306, "cunte_house1", "pinkfence_law", 0xFF2C3E50);
  15446. TempObject = CreateDynamicObject(19325, 2067.30005, -1884.12000, 13.30000, 0.00000, 0.00000, 90.00000);
  15447. SetDynamicObjectMaterial(TempObject, 0, 3306, "cunte_house1", "pinkfence_law", 0xFF2C3E50);
  15448. //CLUB
  15449. TempObject = CreateDynamicObject(2920, 2059.21997, -1884.10999, 15.25000, 90.00000, 0.00000, 90.50000);
  15450. SetDynamicObjectMaterial(TempObject, 0, 1675, "wshxrefhse", "greygreensubuild_128", 0xFFFFFFFF);
  15451. TempObject = CreateDynamicObject(2920, 2070.98999, -1884.10999, 15.25000, -90.00000, 0.00000, 89.00000);
  15452. SetDynamicObjectMaterial(TempObject, 0, 1675, "wshxrefhse", "greygreensubuild_128", 0xFFFFFFFF);
  15453. TempObject = CreateDynamicObject(2920, 2070.17993, -1884.06995, 8.33000, 0.00000, 0.00000, 90.00000);
  15454. SetDynamicObjectMaterial(TempObject, 0, 1675, "wshxrefhse", "greygreensubuild_128", 0xFFFFFFFF);
  15455. TempObject = CreateDynamicObject(2920, 2071.03003, -1884.07800, 12.68000, -90.00000, 0.00000, 90.00000);
  15456. SetDynamicObjectMaterial(TempObject, 0, 1675, "wshxrefhse", "greygreensubuild_128", 0xFFFFFFFF);
  15457. TempObject = CreateDynamicObject(2920, 2059.06006, -1884.07996, 12.72000, 90.00000, 0.00000, 90.00000);
  15458. SetDynamicObjectMaterial(TempObject, 0, 1675, "wshxrefhse", "greygreensubuild_128", 0xFFFFFFFF);
  15459. TempObject = CreateDynamicObject(2920, 2065.68994, -1884.00000, 8.33000, 0.00000, 0.00000, 90.00000);
  15460. SetDynamicObjectMaterial(TempObject, 0, 1675, "wshxrefhse", "greygreensubuild_128", 0xFFFFFFFF);
  15461. TempObject = CreateDynamicObject(2920, 2067.50000, -1883.98999, 8.33000, 0.00000, 0.00000, 90.00000);
  15462. SetDynamicObjectMaterial(TempObject, 0, 1675, "wshxrefhse", "greygreensubuild_128", 0xFFFFFFFF);
  15463. TempObject = CreateDynamicObject(2920, 2059.92993, -1884.06006, 8.33000, 0.00000, 0.00000, 90.00000);
  15464. SetDynamicObjectMaterial(TempObject, 0, 1675, "wshxrefhse", "greygreensubuild_128", 0xFFFFFFFF);
  15465. //RED
  15466. tmpobj = CreateDynamicObject(4085, 2049.51001, -1859.04004, 5.85000, 0.00000, 0.00000, 0.00000);
  15467. SetDynamicObjectMaterialText(tmpobj, 0, ".", OBJECT_MATERIAL_SIZE_256x128, "Tahoma", 50, 1, 0xFFFFFFFF, 0xFFC70039, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
  15468. //Fence
  15469. TempObject = CreateDynamicObject(4100, 2071.89990, -1860.83997, 13.35000, 0.00000, 0.00000, 50.00000);
  15470. SetDynamicObjectMaterial(TempObject, 0, 3306, "cunte_house1", "pinkfence_law", 0xFFBFBEBE);
  15471. TempObject = CreateDynamicObject(4100, 2071.75000, -1878.97998, 13.35000, 0.00000, 0.00000, 50.00000);
  15472. SetDynamicObjectMaterial(TempObject, 0, 3306, "cunte_house1", "pinkfence_law", 0xFFBFBEBE);
  15473. TempObject = CreateDynamicObject(4100, 2065.10010, -1863.40002, 13.35000, 0.00000, 0.00000, -40.00000);
  15474. SetDynamicObjectMaterial(TempObject, 0, 3306, "cunte_house1", "pinkfence_law", 0xFFBFBEBE);
  15475. TempObject = CreateDynamicObject(4100, 2051.37988, -1863.35999, 13.35000, 0.00000, 0.00000, -40.00000);
  15476. SetDynamicObjectMaterial(TempObject, 0, 3306, "cunte_house1", "pinkfence_law", 0xFFBFBEBE);
  15477. TempObject = CreateDynamicObject(4100, 2039.05005, -1863.34998, 13.35000, 0.00000, 0.00000, -40.00000);
  15478. SetDynamicObjectMaterial(TempObject, 0, 3306, "cunte_house1", "pinkfence_law", 0xFFBFBEBE);
  15479. TempObject = CreateDynamicObject(4100, 2031.83997, -1887.13000, 13.35000, 0.00000, 0.00000, 50.00000);
  15480. SetDynamicObjectMaterial(TempObject, 0, 3306, "cunte_house1", "pinkfence_law", 0xFFBFBEBE);
  15481. TempObject = CreateDynamicObject(4100, 2031.89001, -1869.91003, 13.35000, 0.00000, 0.00000, 50.00000);
  15482. SetDynamicObjectMaterial(TempObject, 0, 3306, "cunte_house1", "pinkfence_law", 0xFFBFBEBE);
  15483. TempObject = CreateDynamicObject(4100, 2016.18994, -1867.92004, 13.35000, 0.00000, 0.00000, 5.30000);
  15484. SetDynamicObjectMaterial(TempObject, 0, 3306, "cunte_house1", "pinkfence_law", 0xFFBFBEBE);
  15485. TempObject = CreateDynamicObject(4100, 2028.00000, -1863.30005, 13.35000, 0.00000, 0.00000, -40.30000);
  15486. SetDynamicObjectMaterial(TempObject, 0, 3306, "cunte_house1", "pinkfence_law", 0xFFBFBEBE);
  15487. //
  15488. // kladionica
  15489. new kladionicazgrada = CreateDynamicObjectEx(4683, 1613.25781, -1185.44531, 29.87500, 0.00000, 0.00000, 0.00000, 600, 600 );
  15490. SetDynamicObjectMaterial(kladionicazgrada, 13, 1649, "wglass", "carshowwin2", 0xFF1E90FF);
  15491. new kladionicapod = CreateDynamicObjectEx(18981, 1603.50989, -1184.82800, 22.86577, 0.00000, 90.00000, 0.00000, 600, 600 );
  15492. SetDynamicObjectMaterial(kladionicapod, 0, 14594, "papaerchaseoffice", "ab_mottleGrey");
  15493. new kladionicazida = CreateDynamicObjectEx(19461, 1596.31006, -1172.24036, 22.21210, 0.00000, 0.00000, 90.00000, 600, 600 );
  15494. new kladionicazida1 =CreateDynamicObjectEx(19461, 1610.96448, -1172.24036, 28.85720, 0.00000, 0.00000, 90.00000, 600, 600 );
  15495. new kladionicazida2 =CreateDynamicObjectEx(19461, 1610.92456, -1172.24036, 22.21210, 0.00000, 0.00000, 90.00000, 600, 600 );
  15496. new kladionicazida3 =CreateDynamicObjectEx(19461, 1595.99011, -1172.24036, 28.85720, 0.00000, 0.00000, 90.00000, 600, 600 );
  15497. new kladionicazida4 =CreateDynamicObjectEx(19377, 1603.55811, -1172.23083, 28.03900, 0.00000, 0.00000, 90.00000, 600, 600 );
  15498. new kladionicazida5 =CreateDynamicObjectEx(19461, 1586.69641, -1172.24036, 22.21210, 0.00000, 0.00000, 90.00000, 600, 600 );
  15499. SetDynamicObjectMaterial(kladionicazida, 0, 9495, "vict_sfw", "newall10_seamless", 0xFFFFFFFF);
  15500. SetDynamicObjectMaterial(kladionicazida1, 0, 9495, "vict_sfw", "newall10_seamless", 0xFFFFFFFF);
  15501. SetDynamicObjectMaterial(kladionicazida2, 0, 9495, "vict_sfw", "newall10_seamless", 0xFFFFFFFF);
  15502. SetDynamicObjectMaterial(kladionicazida3, 0, 9495, "vict_sfw", "newall10_seamless", 0xFFFFFFFF);
  15503. SetDynamicObjectMaterial(kladionicazida4, 0, 9495, "vict_sfw", "newall10_seamless", 0xFFFFFFFF);
  15504. SetDynamicObjectMaterial(kladionicazida5, 0, 9495, "vict_sfw", "newall10_seamless", 0xFFFFFFFF);
  15505. new kladionicazidb =CreateDynamicObjectEx(19377, 1615.83875, -1177.01831, 23.66054, 0.00000, 0.00000, 0.00000, 600, 600 );
  15506. new kladionicazidb1 =CreateDynamicObjectEx(19377, 1615.83875, -1186.64417, 23.66050, 0.00000, 0.00000, 0.00000, 600, 600 );
  15507. new kladionicazidb2 =CreateDynamicObjectEx(19377, 1591.15698, -1177.08191, 23.66050, 0.00000, 0.00000, 0.00000, 600, 600 );
  15508. new kladionicazidb3 =CreateDynamicObjectEx(19377, 1591.15698, -1186.71619, 23.68050, 0.00000, 0.00000, 0.00000, 600, 600 );
  15509. new kladionicazidb4 =CreateDynamicObjectEx(19377, 1615.33777, -1187.83545, 23.68050, 0.00000, 0.00000, 90.00000, 600, 600 );
  15510. new kladionicazidb5 =CreateDynamicObjectEx(19377, 1614.49048, -1182.14246, 23.68050, 0.00000, 0.00000, 90.00000, 600, 600 );
  15511. new kladionicazidb6 =CreateDynamicObjectEx(19377, 1591.82751, -1182.14246, 23.68050, 0.00000, 0.00000, 90.00000, 600, 600 );
  15512. new kladionicazidb7 =CreateDynamicObjectEx(19377, 1606.08228, -1183.92529, 31.77270, 0.00000, 0.00000, 90.00000, 600, 600 );
  15513. new kladionicazidb8 =CreateDynamicObjectEx(19377, 1596.46167, -1183.92529, 31.77270, 0.00000, 0.00000, 90.00000, 600, 600 );
  15514. SetDynamicObjectMaterial(kladionicazidb, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15515. SetDynamicObjectMaterial(kladionicazidb1, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15516. SetDynamicObjectMaterial(kladionicazidb2, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15517. SetDynamicObjectMaterial(kladionicazidb3, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15518. SetDynamicObjectMaterial(kladionicazidb4, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15519. SetDynamicObjectMaterial(kladionicazidb5, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15520. SetDynamicObjectMaterial(kladionicazidb6, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15521. SetDynamicObjectMaterial(kladionicazidb7, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15522. SetDynamicObjectMaterial(kladionicazidb8, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15523. new kladionicazidc = CreateDynamicObjectEx(19461, 1591.16248, -1176.63647, 27.92030, 90.00000, 0.00000, 0.00000, 600, 600 );
  15524. new kladionicazidc1 =CreateDynamicObjectEx(19461, 1597.57642, -1187.11926, 27.92030, 90.00000, 0.00000, 90.00000, 600, 600 );
  15525. new kladionicazidc2 =CreateDynamicObjectEx(19461, 1608.04248, -1187.11719, 27.92030, 90.00000, 0.00000, 90.00000, 600, 600 );
  15526. new kladionicazidc3 = CreateDynamicObjectEx(19377, 1596.55652, -1186.87769, 23.66050, 0.00000, 0.00000, 0.00000, 600, 600 );
  15527. new kladionicazidc4 = CreateDynamicObjectEx(19377, 1609.67480, -1186.87097, 23.66050, 0.00000, 0.00000, 0.00000, 600, 600 );
  15528. SetDynamicObjectMaterial(kladionicazidc, 0, 3310, "sw_poorhouse", "sw_wallbrick_06", 0xFFFFFFFF);
  15529. SetDynamicObjectMaterial(kladionicazidc1, 0, 3310, "sw_poorhouse", "sw_wallbrick_06", 0xFFFFFFFF);
  15530. SetDynamicObjectMaterial(kladionicazidc2, 0, 3310, "sw_poorhouse", "sw_wallbrick_06", 0xFFFFFFFF);
  15531. SetDynamicObjectMaterial(kladionicazidc3, 0, 3310, "sw_poorhouse", "sw_wallbrick_06", 0xFFFFFFFF);
  15532. SetDynamicObjectMaterial(kladionicazidc4, 0, 3310, "sw_poorhouse", "sw_wallbrick_06", 0xFFFFFFFF);
  15533. new kladionicazidd = CreateDynamicObjectEx(19377, 1596.06470, -1187.13208, 23.68050, 0.00000, 0.00000, 90.00000, 600, 600 );
  15534. new kladionicazidd1 =CreateDynamicObjectEx(19377, 1605.69470, -1187.13208, 23.68050, 0.00000, 0.00000, 90.00000, 600, 600 );
  15535. SetDynamicObjectMaterial(kladionicazidd, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15536. SetDynamicObjectMaterial(kladionicazidd1, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15537. new kladionicaplafon = CreateDynamicObjectEx(18981, 1603.50989, -1184.82800, 28.53574, 0.00000, 90.00000, 0.00000, 600, 600 );
  15538. SetDynamicObjectMaterial(kladionicaplafon, 0, 10926, "shops_sfse", "bathtile01_int");
  15539. new kladionicastubovi = CreateDynamicObjectEx(18980, 1601.61267, -1171.95984, 22.90260, 0.00000, 0.00000, 0.00000, 600, 600 );
  15540. new kladionicastubovi1 =CreateDynamicObjectEx(18980, 1605.60901, -1171.95984, 22.90255, 0.00000, 0.00000, 0.00000, 600, 600 );
  15541. new kladionicastubovi2 =CreateDynamicObjectEx(18980, 1603.69446, -1177.92273, 22.90260, 0.00000, 0.00000, 0.00000, 600, 600 );
  15542. new kladionicastubovi3 =CreateDynamicObjectEx(18980, 1608.90015, -1177.95801, 22.90260, 0.00000, 0.00000, 0.00000, 600, 600 );
  15543. new kladionicastubovi4 =CreateDynamicObjectEx(18980, 1609.88928, -1176.96765, 22.90260, 0.00000, 0.00000, 0.00000, 600, 600 );
  15544. new kladionicastubovi5 =CreateDynamicObjectEx(18980, 1610.88586, -1175.97070, 22.90260, 0.00000, 0.00000, 0.00000, 600, 600 );
  15545. new kladionicastubovi6 =CreateDynamicObjectEx(18980, 1610.02222, -1182.43176, 22.90255, 0.00000, 0.00000, 0.00000, 600, 600 );
  15546. new kladionicastubovi7 =CreateDynamicObjectEx(18980, 1596.24390, -1182.41479, 22.90260, 0.00000, 0.00000, 0.00000, 600, 600 );
  15547. SetDynamicObjectMaterial(kladionicastubovi, 0, 9239, "stuff2_sfn", "ahoodfence2", 0xFFFFFFFF);
  15548. SetDynamicObjectMaterial(kladionicastubovi1, 0, 9239, "stuff2_sfn", "ahoodfence2", 0xFFFFFFFF);
  15549. SetDynamicObjectMaterial(kladionicastubovi2, 0, 9239, "stuff2_sfn", "ahoodfence2", 0xFFFFFFFF);
  15550. SetDynamicObjectMaterial(kladionicastubovi3, 0, 9239, "stuff2_sfn", "ahoodfence2", 0xFFFFFFFF);
  15551. SetDynamicObjectMaterial(kladionicastubovi4, 0, 9239, "stuff2_sfn", "ahoodfence2", 0xFFFFFFFF);
  15552. SetDynamicObjectMaterial(kladionicastubovi5, 0, 9239, "stuff2_sfn", "ahoodfence2", 0xFFFFFFFF);
  15553. SetDynamicObjectMaterial(kladionicastubovi6, 0, 9239, "stuff2_sfn", "ahoodfence2", 0xFFFFFFFF);
  15554. SetDynamicObjectMaterial(kladionicastubovi7, 0, 9239, "stuff2_sfn", "ahoodfence2", 0xFFFFFFFF);
  15555. new kladionicadrvo = CreateDynamicObjectEx(18980, 1601.52979, -1183.90881, 11.64930, 0.00000, 0.00000, 0.00000, 600, 600 );
  15556. new kladionicadrvo1 =CreateDynamicObjectEx(18980, 1600.52869, -1183.90881, 11.64930, 0.00000, 0.00000, 0.00000, 600, 600 );
  15557. new kladionicadrvo2 =CreateDynamicObjectEx(18980, 1602.51782, -1183.90881, 11.64930, 0.00000, 0.00000, 0.00000, 600, 600 );
  15558. new kladionicadrvo3 =CreateDynamicObjectEx(18980, 1603.50427, -1183.90881, 11.64930, 0.00000, 0.00000, 0.00000, 600, 600 );
  15559. new kladionicadrvo4 =CreateDynamicObjectEx(18980, 1604.50415, -1183.90881, 11.64930, 0.00000, 0.00000, 0.00000, 600, 600 );
  15560. new kladionicadrvo5 =CreateDynamicObjectEx(18980, 1605.50476, -1183.90881, 11.64930, 0.00000, 0.00000, 0.00000, 600, 600 );
  15561. new kladionicadrvo6 =CreateDynamicObjectEx(18980, 1583.27441, -1182.55127, 23.30358, 0.00000, 90.00000, 0.00000, 600, 600 );
  15562. new kladionicadrvo7 =CreateDynamicObjectEx(18980, 1590.76392, -1184.77881, 23.30360, 0.00000, 90.00000, 90.00000, 600, 600 );
  15563. new kladionicadrvo8 =CreateDynamicObjectEx(19373, 1603.61169, -1172.27905, 25.14080, 0.00000, 0.00000, 90.00000, 600, 600 );
  15564. new kladionicadrvo9 =CreateDynamicObjectEx(18762, 1610.06055, -1185.22778, 23.30360, 0.00000, 90.00000, 90.00000, 600, 600 );
  15565. new kladionicadrvo10 =CreateDynamicObjectEx(18980, 1608.25720, -1187.48010, 23.30358, 0.00000, 90.00000, 0.00000, 600, 600 );
  15566. new kladionicadrvo11 =CreateDynamicObjectEx(18762, 1596.18225, -1185.09119, 23.30360, 0.00000, 90.00000, 90.00000, 600, 600 );
  15567. SetDynamicObjectMaterial(kladionicadrvo, 0, 12954, "sw_furniture", "CJ_WOOD5");
  15568. SetDynamicObjectMaterial(kladionicadrvo1, 0, 12954, "sw_furniture", "CJ_WOOD5");
  15569. SetDynamicObjectMaterial(kladionicadrvo2, 0, 12954, "sw_furniture", "CJ_WOOD5");
  15570. SetDynamicObjectMaterial(kladionicadrvo3, 0, 12954, "sw_furniture", "CJ_WOOD5");
  15571. SetDynamicObjectMaterial(kladionicadrvo4, 0, 12954, "sw_furniture", "CJ_WOOD5");
  15572. SetDynamicObjectMaterial(kladionicadrvo5, 0, 12954, "sw_furniture", "CJ_WOOD5");
  15573. SetDynamicObjectMaterial(kladionicadrvo6, 0, 12954, "sw_furniture", "CJ_WOOD5");
  15574. SetDynamicObjectMaterial(kladionicadrvo7, 0, 12954, "sw_furniture", "CJ_WOOD5");
  15575. SetDynamicObjectMaterial(kladionicadrvo8, 0, 12954, "sw_furniture", "CJ_WOOD5");
  15576. SetDynamicObjectMaterial(kladionicadrvo9, 0, 12954, "sw_furniture", "CJ_WOOD5");
  15577. SetDynamicObjectMaterial(kladionicadrvo10, 0, 12954, "sw_furniture", "CJ_WOOD5");
  15578. SetDynamicObjectMaterial(kladionicadrvo11, 0, 12954, "sw_furniture", "CJ_WOOD5");
  15579. new kladionicastaklo = CreateDynamicObjectEx(19325, 1602.98059, -1183.87366, 27.18433, 0.00000, 0.00000, 90.00000, 600, 600 );
  15580. SetDynamicObjectMaterial(kladionicastaklo, 7, 2361, "lsmall_shops", "lsmall_window01", 0xFF1E90FF);
  15581. new kladionicastaklo1 = CreateDynamicObjectEx(19325, 1603.00061, -1183.87366, 22.08650, 0.00000, 0.00000, 90.00000, 600, 600 );
  15582. SetDynamicObjectMaterial(kladionicastaklo1, 7, 2361, "lsmall_shops", "lsmall_window01", 0xFF1E90FF);
  15583. new kladionicacrno = CreateDynamicObjectEx(19089, 1606.31897, -1183.88452, 28.82430, 0.00000, 0.00000, 0.00000, 600, 600 );
  15584. new kladionicacrno1 =CreateDynamicObjectEx(19089, 1599.67725, -1183.88452, 28.82426, 0.00000, 0.00000, 0.00000, 600, 600 );
  15585. new kladionicacrno2 =CreateDynamicObjectEx(2228, 1601.73376, -1184.04797, 23.74020, 0.00000, 0.00000, 0.00000, 600, 600 );
  15586. new kladionicacrno3 =CreateDynamicObjectEx(2228, 1604.40369, -1184.00403, 23.74020, 0.00000, 0.00000, 0.00000, 600, 600 );
  15587. SetDynamicObjectMaterial(kladionicacrno, 0, 2361, "shopping_freezers", "white", 0xFF000000 );
  15588. SetDynamicObjectMaterial(kladionicacrno1, 0, 2361, "shopping_freezers", "white", 0xFF000000 );
  15589. SetDynamicObjectMaterial(kladionicacrno2, 0, 2361, "shopping_freezers", "white", 0xFF000000 );
  15590. SetDynamicObjectMaterial(kladionicacrno3, 0, 2361, "shopping_freezers", "white", 0xFF000000 );
  15591. new kladionicamonitori =CreateDynamicObjectEx(2269, 1601.75073, -1183.58044, 24.29400, 0.00000, 0.00000, 180.00000, 600, 600 );
  15592. new kladionicamonitori1 =CreateDynamicObjectEx(2269, 1604.41089, -1183.58044, 24.29400, 0.00000, 0.00000, 180.00000, 600, 600 );
  15593. SetDynamicObjectMaterial(kladionicamonitori, 0, 2361, "shopping_freezers", "white", 0xFF000000 );
  15594. SetDynamicObjectMaterial(kladionicamonitori, 1, 2361, "shopping_freezers", "white", 0xFF000000 );
  15595. SetDynamicObjectMaterial(kladionicamonitori1, 0, 2361, "shopping_freezers", "white", 0xFF000000 );
  15596. SetDynamicObjectMaterial(kladionicamonitori1, 1, 2361, "shopping_freezers", "white", 0xFF000000 );
  15597. new kladionicamonitoridisplay = CreateDynamicObjectEx(2269, 1601.72986, -1184.54053, 24.29400, 0.00000, 0.00000, 0.00000, 600, 600 );
  15598. new kladionicamonitoridisplay1 = CreateDynamicObjectEx(2269, 1604.39087, -1184.54053, 24.29400, 0.00000, 0.00000, 0.00000, 600, 600 );
  15599. SetDynamicObjectMaterial(kladionicamonitoridisplay, 0, 2361, "shopping_freezers", "white", 0xFF5B5959);
  15600. SetDynamicObjectMaterial(kladionicamonitoridisplay, 1, 2361, "shopping_freezers", "white", 0xFF000000 );
  15601. SetDynamicObjectMaterial(kladionicamonitoridisplay1, 0, 2361, "shopping_freezers", "white", 0xFF5B5959);
  15602. SetDynamicObjectMaterial(kladionicamonitoridisplay1, 1, 2361, "shopping_freezers", "white", 0xFF000000 );
  15603. new kladinicatv = CreateDynamicObjectEx(2267, 1594.68054, -1182.00647, 26.36200, 0.00000, 0.00000, 180.00000, 600, 600 );
  15604. new kladinicatv1 =CreateDynamicObjectEx(2267, 1592.37964, -1182.02454, 26.36200, 0.00000, 0.00000, 180.00000, 600, 600 );
  15605. new kladinicatv2 =CreateDynamicObjectEx(2267, 1591.28271, -1179.18567, 26.36200, 0.00000, 0.00000, 90.00000, 600, 600 );
  15606. new kladinicatv3 =CreateDynamicObjectEx(2267, 1591.28271, -1174.12000, 26.36200, 0.00000, 0.00000, 90.00000, 600, 600 );
  15607. new kladinicatv4 =CreateDynamicObjectEx(2267, 1600.88318, -1183.66992, 27.07310, 15.00000, 0.00000, 180.00000, 600, 600 );
  15608. new kladinicatv5 =CreateDynamicObjectEx(2267, 1602.74304, -1183.66992, 27.07310, 15.00000, 0.00000, 180.00000, 600, 600 );
  15609. new kladinicatv6 =CreateDynamicObjectEx(2267, 1605.02539, -1183.66992, 27.07310, 15.00000, 0.00000, 180.00000, 600, 600 );
  15610. SetDynamicObjectMaterial(kladinicatv, 1, 2361, "shopping_freezers", "white", 0xFF5B5959);
  15611. SetDynamicObjectMaterial(kladinicatv, 0, 2361, "shopping_freezers", "white", 0xFF000000 );
  15612. SetDynamicObjectMaterial(kladinicatv1, 1, 2361, "shopping_freezers", "white", 0xFF5B5959);
  15613. SetDynamicObjectMaterial(kladinicatv1, 0, 2361, "shopping_freezers", "white", 0xFF000000 );
  15614. SetDynamicObjectMaterial(kladinicatv2, 1, 2361, "shopping_freezers", "white", 0xFF5B5959);
  15615. SetDynamicObjectMaterial(kladinicatv2, 0, 2361, "shopping_freezers", "white", 0xFF000000 );
  15616. SetDynamicObjectMaterial(kladinicatv3, 1, 2361, "shopping_freezers", "white", 0xFF5B5959);
  15617. SetDynamicObjectMaterial(kladinicatv3, 0, 2361, "shopping_freezers", "white", 0xFF000000 );
  15618. SetDynamicObjectMaterial(kladinicatv4, 1, 2361, "shopping_freezers", "white", 0xFF5B5959);
  15619. SetDynamicObjectMaterial(kladinicatv4, 0, 2361, "shopping_freezers", "white", 0xFF000000 );
  15620. SetDynamicObjectMaterial(kladinicatv5, 1, 2361, "shopping_freezers", "white", 0xFF5B5959);
  15621. SetDynamicObjectMaterial(kladinicatv5, 0, 2361, "shopping_freezers", "white", 0xFF000000 );
  15622. SetDynamicObjectMaterial(kladinicatv6, 1, 2361, "shopping_freezers", "white", 0xFF5B5959);
  15623. SetDynamicObjectMaterial(kladinicatv6, 0, 2361, "shopping_freezers", "white", 0xFF000000 );
  15624. new kladionicasofa = CreateDynamicObjectEx(1726, 1595.56189, -1173.21997, 23.36310, 0.00000, 0.00000, -90.00000, 600, 600 );
  15625. new kladionicasofa1 =CreateDynamicObjectEx(1726, 1591.76196, -1175.24329, 23.36310, 0.00000, 0.00000, 90.00000, 600, 600 );
  15626. new kladionicasofa2 =CreateDynamicObjectEx(1726, 1591.76196, -1180.05066, 23.36310, 0.00000, 0.00000, 90.00000, 600, 600 );
  15627. new kladionicasofa3 =CreateDynamicObjectEx(1726, 1595.56189, -1178.04944, 23.36310, 0.00000, 0.00000, -90.00000, 600, 600 );
  15628. SetDynamicObjectMaterial(kladionicasofa, 1, 1726, "mrk_couches2", "mrk_couches2", 0xFF5C3317);
  15629. SetDynamicObjectMaterial(kladionicasofa1, 1, 1726, "mrk_couches2", "mrk_couches2", 0xFF5C3317);
  15630. SetDynamicObjectMaterial(kladionicasofa2, 1, 1726, "mrk_couches2", "mrk_couches2", 0xFF5C3317);
  15631. SetDynamicObjectMaterial(kladionicasofa3, 1, 1726, "mrk_couches2", "mrk_couches2", 0xFF5C3317);
  15632. new kladionicasvetla = CreateDynamicObjectEx(18075, 1603.18420, -1178.09473, 28.02204, 0.00000, 0.00000, 0.00000, 600, 600 );
  15633. SetDynamicObjectMaterial(kladionicasvetla, 0, 2361, "shopping_freezers", "white", 0xFF000000 );
  15634. new kladionicastolovi = CreateDynamicObjectEx(2024, 1594.10144, -1174.75171, 23.33760, 0.00000, 0.00000, 90.00000, 600, 600 );
  15635. new kladionicastolovi1 = CreateDynamicObjectEx(2024, 1594.10144, -1179.54236, 23.33760, 0.00000, 0.00000, 90.00000, 600, 600 );
  15636. SetDynamicObjectMaterial(kladionicastolovi, 0, 2024, "hi_cutbnkcoch", "green_glass_64", 0xFF1E90FF);
  15637. SetDynamicObjectMaterial(kladionicastolovi1, 0, 2024, "hi_cutbnkcoch", "green_glass_64", 0xFF1E90FF);
  15638. new kladionicavrata = CreateDynamicObjectEx(1533, 1602.10535, -1172.40747, 23.39380, 0.00000, 0.00000, 0.00000, 600, 600 );
  15639. new kladionicavrata1 =CreateDynamicObjectEx(1533, 1603.59973, -1172.40747, 23.39380, 0.00000, 0.00000, 0.00000, 600, 600 );
  15640. new kladionicavrata2 =CreateDynamicObjectEx(1533, 1603.48279, -1170.75000, 22.97130, 0.00000, 0.00000, 180.00000, 600, 600 );
  15641. new kladionicavrata3 =CreateDynamicObjectEx(1533, 1604.98010, -1170.75000, 22.97130, 0.00000, 0.00000, 180.00000, 600, 600 );
  15642. SetDynamicObjectMaterial(kladionicavrata, 2, 12954, "sw_furniture", "CJ_WOOD5");
  15643. SetDynamicObjectMaterial(kladionicavrata, 1, 1533, "new_shop_door", "CJ_GEN_GLASS2", 0xFFD3D3D3);
  15644. SetDynamicObjectMaterial(kladionicavrata1, 2, 12954, "sw_furniture", "CJ_WOOD5");
  15645. SetDynamicObjectMaterial(kladionicavrata1, 1, 1533, "new_shop_door", "CJ_GEN_GLASS2", 0xFFD3D3D3);
  15646. SetDynamicObjectMaterial(kladionicavrata2, 2, 12954, "sw_furniture", "CJ_WOOD5");
  15647. SetDynamicObjectMaterial(kladionicavrata2, 1, 1533, "new_shop_door", "CJ_GEN_GLASS2", 0xFFD3D3D3);
  15648. SetDynamicObjectMaterial(kladionicavrata3, 2, 12954, "sw_furniture", "CJ_WOOD5");
  15649. SetDynamicObjectMaterial(kladionicavrata3, 1, 1533, "new_shop_door", "CJ_GEN_GLASS2", 0xFFD3D3D3);
  15650. new kladionicasm;
  15651. kladionicasm = CreateDynamicObjectEx(19325,1602.383,-1187.023,24.425,0.000,0.000,-90.000, 600, 600 );
  15652. SetDynamicObjectMaterialText(kladionicasm, 0, "Play Hard", 140, "Ariel", 50, 1, -14774017, 0, 0 );
  15653. kladionicasm = CreateDynamicObjectEx(19325,1601.407,-1187.041,23.925,0.000,0.000,-89.999, 600, 600 );
  15654. SetDynamicObjectMaterialText(kladionicasm, 0, "Go Pro", 140, "Ariel", 50, 1, -14774017, 0, 0 );
  15655. kladionicasm = CreateDynamicObjectEx(19325,1600.744,-1187.023,23.465,0.000,0.000,-90.300, 600, 600 );
  15656. SetDynamicObjectMaterialText(kladionicasm, 0, "C", 140, "Webdings", 120, 0, -14774017, 0, 0 );
  15657. //kladionicaostalo
  15658. CreateDynamicObjectEx(2785, 1613.08350, -1181.69861, 24.18680, 0.00000, 0.00000, 180.00000, 600, 600 );
  15659. CreateDynamicObjectEx(2723, 1611.41431, -1180.74683, 23.71766, 0.00000, 0.00000, 0.00000, 600, 600 );
  15660. CreateDynamicObjectEx(2723, 1612.21484, -1180.74683, 23.71770, 0.00000, 0.00000, 0.00000, 600, 600 );
  15661. CreateDynamicObjectEx(2723, 1613.09509, -1180.74683, 23.71770, 0.00000, 0.00000, 0.00000, 600, 600 );
  15662. CreateDynamicObjectEx(2723, 1613.97693, -1180.74683, 23.71770, 0.00000, 0.00000, 0.00000, 600, 600 );
  15663. CreateDynamicObjectEx(2723, 1614.81799, -1180.74683, 23.71770, 0.00000, 0.00000, 0.00000, 600, 600 );
  15664. CreateDynamicObjectEx(2785, 1615.45728, -1176.65295, 24.18680, 0.00000, 0.00000, -90.00000, 600, 600 );
  15665. CreateDynamicObjectEx(2723, 1614.31067, -1178.32434, 23.71770, 0.00000, 0.00000, 0.00000, 600, 600 );
  15666. CreateDynamicObjectEx(2723, 1614.31067, -1177.48315, 23.71770, 0.00000, 0.00000, 0.00000, 600, 600 );
  15667. CreateDynamicObjectEx(2723, 1614.31067, -1176.64258, 23.71770, 0.00000, 0.00000, 0.00000, 600, 600 );
  15668. CreateDynamicObjectEx(2723, 1614.31067, -1175.85938, 23.71770, 0.00000, 0.00000, 0.00000, 600, 600 );
  15669. CreateDynamicObjectEx(2723, 1614.31067, -1175.01880, 23.71770, 0.00000, 0.00000, 0.00000, 600, 600 );
  15670. CreateDynamicObjectEx(2640, 1609.00818, -1177.02319, 24.08360, 0.00000, 0.00000, -90.00000, 600, 600 );
  15671. CreateDynamicObjectEx(2640, 1609.98047, -1176.01904, 24.08360, 0.00000, 0.00000, -90.00000, 600, 600 );
  15672. CreateDynamicObjectEx(2640, 1610.85034, -1176.91724, 24.08360, 0.00000, 0.00000, 90.00000, 600, 600 );
  15673. CreateDynamicObjectEx(2640, 1609.88965, -1177.90479, 24.08360, 0.00000, 0.00000, 90.00000, 600, 600 );
  15674. CreateDynamicObjectEx(2723, 1611.92273, -1176.82996, 23.71770, 0.00000, 0.00000, 0.00000, 600, 600 );
  15675. CreateDynamicObjectEx(2723, 1611.14575, -1177.96631, 23.71770, 0.00000, 0.00000, 0.00000, 600, 600 );
  15676. CreateDynamicObjectEx(2723, 1607.64783, -1177.18713, 23.71770, 0.00000, 0.00000, 0.00000, 600, 600 );
  15677. CreateDynamicObjectEx(2723, 1608.76501, -1175.87769, 23.71770, 0.00000, 0.00000, 0.00000, 600, 600 );
  15678. CreateDynamicObjectEx(3437, 1616.35083, -1182.19800, 22.43962, 0.00000, 90.00000, 0.00000, 600, 600 );
  15679. CreateDynamicObjectEx(2231, 1603.92358, -1177.98218, 27.38870, 20.00000, 0.00000, 0.00000, 600, 600 );
  15680. CreateDynamicObjectEx(2231, 1603.37305, -1177.83435, 27.38870, 20.00000, 0.00000, 180.00000, 600, 600 );
  15681. CreateDynamicObjectEx(3437, 1615.89221, -1178.09009, 22.43960, 0.00000, 90.00000, 90.00000, 600, 600 );
  15682. CreateDynamicObjectEx(19808, 1601.71838, -1184.27588, 24.18712, 0.00000, 0.00000, 0.00000, 600, 600 );
  15683. CreateDynamicObjectEx(19808, 1604.41272, -1184.21570, 24.18712, 0.00000, 0.00000, 0.00000, 600, 600 );
  15684. CreateDynamicObjectEx(1671, 1601.72827, -1185.30908, 23.78600, 0.00000, 0.00000, 180.00000, 600, 600 );
  15685. CreateDynamicObjectEx(2816, 1593.60681, -1179.19226, 23.86990, 0.00000, 0.00000, 0.00000, 600, 600 );
  15686. CreateDynamicObjectEx(2208, 1601.82214, -1184.50793, 28.60330, 180.00000, 0.00000, 0.00000, 600, 600 );
  15687. CreateDynamicObjectEx(957, 1602.02148, -1184.59045, 27.65637, 0.00000, 0.00000, 0.00000, 600, 600 );
  15688. CreateDynamicObjectEx(957, 1603.15967, -1184.59045, 27.65640, 0.00000, 0.00000, 0.00000, 600, 600 );
  15689. CreateDynamicObjectEx(957, 1604.42065, -1184.59045, 27.65640, 0.00000, 0.00000, 0.00000, 600, 600 );
  15690. CreateDynamicObjectEx(1671, 1604.46570, -1185.30908, 23.78600, 0.00000, 0.00000, 180.00000, 600, 600 );
  15691. CreateDynamicObjectEx(19325, 1595.51294, -1172.23181, 25.34454, 0.00000, 0.00000, 90.00000, 600, 600 );
  15692. CreateDynamicObjectEx(19325, 1588.87891, -1172.23181, 25.34454, 0.00000, 0.00000, 90.00000, 600, 600 );
  15693. CreateDynamicObjectEx(19325, 1607.05762, -1172.23181, 25.34454, 0.00000, 0.00000, 90.00000, 600, 600 );
  15694. CreateDynamicObjectEx(19325, 1613.68921, -1172.23181, 25.34454, 0.00000, 0.00000, 90.00000, 600, 600 );
  15695. // --------------------------------< Mechanic > ------------------------------------------ //
  15696. CreateDynamicObject(11387, 1938.19714, -1574.17957, 16.07544, 0.00000, 0.00000, -89.15997);
  15697. CreateDynamicObject(11389, 1954.06860, -1564.53979, 15.85070, 0.00000, 0.00000, -449.10004);
  15698. CreateDynamicObject(11391, 1945.76685, -1556.60034, 13.97530, 0.00000, 0.00000, -88.98000);
  15699. CreateDynamicObject(5532, 1979.91541, -1576.38586, 20.66209, 0.00000, 0.00000, -88.38000);
  15700. CreateDynamicObject(11326, 2019.61536, -1599.76355, 14.92121, 0.00000, 0.00000, -270.59991);
  15701. CreateDynamicObject(923, 1954.61389, -1575.37744, 13.57085, 0.00000, 0.00000, 0.00000);
  15702. CreateDynamicObject(923, 1954.68970, -1578.03662, 13.57085, 0.00000, 0.00000, -48.18000);
  15703. CreateDynamicObject(923, 1961.86426, -1574.97534, 13.57085, 0.00000, 0.00000, 0.00000);
  15704. CreateDynamicObject(922, 1970.68567, -1589.12769, 13.57559, 0.00000, 0.00000, 91.74000);
  15705. CreateDynamicObject(925, 1970.03296, -1585.53931, 12.59574, 0.00000, 0.00000, -87.59999);
  15706. CreateDynamicObject(17951, 1937.57910, -1560.28455, 14.43111, 0.00000, 0.00000, 0.00000);
  15707. CreateDynamicObject(17951, 1958.03430, -1574.08643, 14.42060, 0.00000, 0.00000, 90.36003);
  15708. CreateDynamicObject(17951, 1958.03455, -1574.06641, 15.11645, 0.00000, 0.00000, 90.36003);
  15709. CreateDynamicObject(14826, 1989.33679, -1592.96106, 13.29721, 0.00000, 0.00000, 270.11993);
  15710. CreateDynamicObject(14826, 1959.42993, -1605.15576, 13.29721, 0.00000, 0.00000, 470.28012);
  15711. CreateDynamicObject(19425, 1978.87634, -1590.87891, 12.57487, 0.00000, 0.00000, 1.68000);
  15712. CreateDynamicObject(19425, 1979.89893, -1590.86145, 12.57020, 0.00000, 0.00000, 1.68000);
  15713. CreateDynamicObject(11326, 1963.69446, -1609.21631, 14.92121, 0.00000, 0.00000, -358.67990);
  15714. CreateDynamicObject(2922, 1973.21143, -1600.57849, 13.97022, 0.00000, 0.00000, 0.00000);
  15715. CreateDynamicObject(2198, 1939.60779, -1567.92358, 12.70980, 0.00000, 0.00000, 90.60000);
  15716. CreateDynamicObject(2186, 1940.73486, -1572.64490, 12.71051, 0.00000, 0.00000, -179.63998);
  15717. CreateDynamicObject(2182, 1947.77332, -1571.76135, 12.70937, 0.00000, 0.00000, 181.68002);
  15718. CreateDynamicObject(2181, 1939.32800, -1570.39026, 12.70823, 0.00000, 0.00000, 90.84000);
  15719. CreateDynamicObject(2164, 1945.41162, -1573.21497, 12.70905, 0.00000, 0.00000, 180.59996);
  15720. CreateDynamicObject(2165, 1947.75256, -1567.21411, 12.71034, 0.00000, 0.00000, -89.45999);
  15721. CreateDynamicObject(1721, 1947.07275, -1568.03613, 12.71045, 0.00000, 0.00000, -89.27998);
  15722. CreateDynamicObject(1721, 1946.66626, -1572.08289, 12.71045, 0.00000, 0.00000, -55.43998);
  15723. CreateDynamicObject(1721, 1940.05396, -1570.04810, 12.71045, 0.00000, 0.00000, 91.74002);
  15724. CreateDynamicObject(1721, 1941.14050, -1567.31104, 12.71045, 0.00000, 0.00000, 91.74002);
  15725. CreateDynamicObject(1676, 1943.46484, -1586.30334, 14.30219, 0.00000, 0.00000, 0.00000);
  15726. CreateDynamicObject(1676, 1945.51257, -1586.30701, 14.30219, 0.00000, 0.00000, 0.00000);
  15727. CreateDynamicObject(1650, 1941.43677, -1586.11792, 13.21206, 0.00000, 0.00000, 0.00000);
  15728. CreateDynamicObject(1650, 1941.44873, -1586.27734, 13.21206, 0.00000, 0.00000, 0.00000);
  15729. CreateDynamicObject(1650, 1941.08105, -1586.18433, 13.21206, 0.00000, 0.00000, -30.78000);
  15730. CreateDynamicObject(1650, 1947.24316, -1586.20044, 13.20952, 0.00000, 0.00000, 93.66002);
  15731. CreateDynamicObject(1650, 1947.40405, -1586.19177, 13.20952, 0.00000, 0.00000, 93.66002);
  15732. CreateDynamicObject(1650, 1947.56519, -1586.18311, 13.20952, 0.00000, 0.00000, 93.66002);
  15733. CreateDynamicObject(1215, 1931.62671, -1602.51697, 13.01522, 0.00000, 0.00000, 0.00000);
  15734. CreateDynamicObject(1215, 1942.22290, -1604.50208, 13.01522, 0.00000, 0.00000, 0.00000);
  15735. CreateDynamicObject(1215, 2011.01172, -1602.47937, 13.00364, 0.00000, 0.00000, 0.00000);
  15736. CreateDynamicObject(1215, 2001.11780, -1604.30420, 13.00364, 0.00000, 0.00000, 0.00000);
  15737. CreateDynamicObject(939, 1982.65649, -1607.75000, 13.11219, 0.00000, 0.00000, -88.92001);
  15738. CreateDynamicObject(3576, 1955.79248, -1615.50574, 13.98947, 0.00000, 0.00000, 0.00000);
  15739. CreateDynamicObject(3576, 1953.09497, -1612.78406, 13.98947, 0.00000, 0.00000, 89.93998);
  15740. CreateDynamicObject(19817, 1978.42810, -1605.43335, 11.77546, 0.00000, 0.00000, -180.35997);
  15741. CreateDynamicObject(19899, 1974.00366, -1605.22058, 12.83894, 0.00000, 0.00000, 0.00000);
  15742. CreateDynamicObject(19907, 2002.75476, -1570.48083, 12.56207, 0.00000, 0.00000, 449.87997);
  15743. CreateDynamicObject(19817, 2000.43469, -1572.70581, 12.64815, 0.00000, 0.00000, 0.00000);
  15744. CreateDynamicObject(19872, 1995.59875, -1572.85876, 10.84902, 0.00000, 0.00000, 0.00000);
  15745. CreateDynamicObject(11388, 1954.02051, -1564.49719, 19.41262, 0.00000, 0.00000, -89.03999);
  15746. CreateDynamicObject(11393, 2017.67419, -1580.00183, 14.42911, 0.00000, 0.00000, 0.00000);
  15747. CreateDynamicObject(14826, 2006.60181, -1574.19165, 13.37573, 0.00000, 0.00000, 467.81992);
  15748. CreateDynamicObject(17951, 2008.61206, -1568.90906, 13.41685, 0.00000, 0.00000, 0.00000);
  15749. CreateDynamicObject(11391, 1998.15320, -1565.87292, 13.96399, 0.00000, 0.00000, -90.29996);
  15750. CreateDynamicObject(11393, 1988.91077, -1568.45825, 14.12789, 0.00000, 0.00000, 268.07999);
  15751. CreateDynamicObject(925, 1969.87012, -1583.18237, 12.59574, 0.00000, 0.00000, -87.59999);
  15752. CreateDynamicObject(922, 1970.38574, -1579.39392, 13.57559, 0.00000, 0.00000, 91.74000);
  15753. CreateDynamicObject(19817, 1965.90161, -1561.09741, 12.08665, 0.00000, 0.00000, 0.72000);
  15754. CreateDynamicObject(17951, 1937.59912, -1560.28381, 15.19127, 0.00000, 0.00000, 0.36000);
  15755. CreateDynamicObject(930, 2014.99951, -1582.80908, 13.16166, 0.00000, 0.00000, 27.12000);
  15756. CreateDynamicObject(19872, 2017.20850, -1586.25916, 11.08814, -4.62000, 0.48000, 86.70000);
  15757. CreateDynamicObject(19545, 1932.58557, -1571.02380, 12.57320, 0.00000, 0.00000, 0.00000);
  15758. CreateDynamicObject(19545, 1947.60132, -1571.01697, 12.57320, 0.00000, 0.00000, 0.00000);
  15759. CreateDynamicObject(19545, 1962.62415, -1571.04993, 12.58735, 0.00000, 0.00000, 0.00000);
  15760. CreateDynamicObject(19545, 1979.12390, -1582.40906, 12.66414, 0.00000, 0.00000, 88.98003);
  15761. CreateDynamicObject(19545, 1979.14209, -1594.69434, 12.61443, 0.00000, 0.00000, 90.35996);
  15762. CreateDynamicObject(19377, 1985.49158, -1583.84290, 23.35495, 0.00000, 0.00000, -5.70000);
  15763. CreateDynamicObject(19377, 1985.98157, -1579.05835, 23.35495, 0.00000, 0.00000, -5.70000);
  15764. CreateDynamicObject(19377, 1985.98157, -1579.05835, 12.93738, 0.00000, 0.00000, -5.70000);
  15765. CreateDynamicObject(19377, 1985.49158, -1583.84290, 12.95711, 0.00000, 0.00000, -5.70000);
  15766. new opstinaintathlonezidg =CreateDynamicObject(19377, 630.03021, -113.12850, -75.60600, 0.00000, 0.00000, 90.00000);
  15767. new opstinaintathlonezid = CreateDynamicObject(19377, 666.62512, -84.33140, -73.28210, 0.00000, 0.00000, 80.00000);
  15768. new opstinaintathlonezid1 =CreateDynamicObject(19377, 661.90118, -87.12520, -73.28210, 0.00000, 0.00000, 0.00000);
  15769. new opstinaintathlonezid2 =CreateDynamicObject(19377, 674.51343, -88.87746, -73.28210, 0.00000, 0.00000, 40.00000);
  15770. new opstinaintathlonezid3 =CreateDynamicObject(19377, 677.41028, -95.12473, -73.28210, 0.00000, 0.00000, 0.00000);
  15771. new opstinaintathlonezid4 =CreateDynamicObject(19377, 674.45599, -103.24913, -73.28210, 0.00000, 0.00000, -40.00000);
  15772. new opstinaintathlonezid5 =CreateDynamicObject(19377, 666.62512, -107.76390, -73.28210, 0.00000, 0.00000, -80.00000);
  15773. new opstinaintathlonezid6 =CreateDynamicObject(19377, 661.90118, -104.71550, -73.28210, 0.00000, 0.00000, 0.00000);
  15774. new opstinaintathlonezid7 =CreateDynamicObject(19377, 661.89948, -104.47710, -83.67000, 0.00000, 0.00000, 0.00000);
  15775. new opstinaintathlonezid8 =CreateDynamicObject(19377, 661.89948, -87.37440, -83.67000, 0.00000, 0.00000, 0.00000);
  15776. new opstinaintathlonezid9 =CreateDynamicObject(19377, 665.36133, -82.62030, -75.60600, 0.00000, 0.00000, 90.00000);
  15777. new opstinaintathlonezid10 =CreateDynamicObject(19377, 658.46655, -82.61582, -71.57480, 0.00000, 0.00000, 90.00000);
  15778. new opstinaintathlonezid11 =CreateDynamicObject(19377, 648.95477, -82.61580, -71.57480, 0.00000, 0.00000, 90.00000);
  15779. new opstinaintathlonezid12 =CreateDynamicObject(19396, 652.40198, -82.66890, -78.29890, 0.00000, 0.00000, 90.00000);
  15780. new opstinaintathlonezid13 =CreateDynamicObject(19377, 660.61700, -77.86745, -75.60600, 0.00000, 0.00000, 0.00000);
  15781. new opstinaintathlonezid14 =CreateDynamicObject(19377, 655.88336, -73.11671, -75.60600, 0.00000, 0.00000, 90.00000);
  15782. new opstinaintathlonezid15 =CreateDynamicObject(19377, 646.28180, -73.11590, -75.60600, 0.00000, 0.00000, 90.00000);
  15783. new opstinaintathlonezid16 =CreateDynamicObject(19377, 644.20990, -77.89880, -75.60600, 0.00000, 0.00000, 0.00000);
  15784. new opstinaintathlonezid17 =CreateDynamicObject(19377, 636.65820, -73.11586, -75.60600, 0.00000, 0.00000, 90.00000);
  15785. new opstinaintathlonezid18 =CreateDynamicObject(19377, 628.73895, -76.77615, -75.60600, 0.00000, 0.00000, -40.00000);
  15786. new opstinaintathlonezid19 =CreateDynamicObject(19377, 625.60681, -85.31715, -75.60600, 0.00000, 0.00000, 0.00000);
  15787. new opstinaintathlonezid20 =CreateDynamicObject(19377, 625.60681, -94.92460, -75.60600, 0.00000, 0.00000, 0.00000);
  15788. new opstinaintathlonezid21 =CreateDynamicObject(19377, 625.60681, -104.55610, -75.60600, 0.00000, 0.00000, 0.00000);
  15789. new opstinaintathlonezid22 =CreateDynamicObject(19377, 626.04303, -105.89893, -80.77422, 0.00000, 0.00000, 312.04071);
  15790. new opstinaintathlonezid23 =CreateDynamicObject(19377, 628.85492, -109.00580, -80.77420, 0.00000, 0.00000, 312.04071);
  15791. new opstinaintathlonezid24 =CreateDynamicObject(19377, 627.27020, -109.58454, -75.60600, 0.00000, 0.00000, 90.00000);
  15792. new opstinaintathlonezid25 =CreateDynamicObject(19377, 632.03192, -114.32162, -75.60600, 0.00000, 0.00000, 0.00000);
  15793. new opstinaintathlonezid26 =CreateDynamicObject(19377, 639.55231, -113.12850, -75.60600, 0.00000, 0.00000, 90.00000);
  15794. new opstinaintathlonezid27 =CreateDynamicObject(19377, 644.29022, -113.91904, -75.60600, 0.00000, 0.00000, 0.00000);
  15795. new opstinaintathlonezid28 =CreateDynamicObject(19377, 649.18329, -109.13893, -71.57480, 0.00000, 0.00000, 90.00000);
  15796. new opstinaintathlonezid29 =CreateDynamicObject(19377, 658.81219, -109.13890, -71.57480, 0.00000, 0.00000, 90.00000);
  15797. new opstinaintathlonezid30 =CreateDynamicObject(19377, 665.36127, -109.15321, -75.60600, 0.00000, 0.00000, 90.00000);
  15798. new opstinaintathlonezid31 =CreateDynamicObject(19396, 652.41138, -109.11591, -78.29891, 0.00000, 0.00000, 90.00000);
  15799. new opstinaintathlonezid32 =CreateDynamicObject(19377, 660.59772, -113.88275, -75.60600, 0.00000, 0.00000, 0.00000);
  15800. new opstinaintathlonezid33 =CreateDynamicObject(19377, 655.69916, -118.78771, -75.60600, 0.00000, 0.00000, 90.00000);
  15801. new opstinaintathlonezid34 =CreateDynamicObject(19377, 646.07312, -118.78770, -75.60600, 0.00000, 0.00000, 90.00000);
  15802. SetDynamicObjectMaterial(opstinaintathlonezid, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15803. SetDynamicObjectMaterial(opstinaintathlonezid1, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15804. SetDynamicObjectMaterial(opstinaintathlonezid2, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15805. SetDynamicObjectMaterial(opstinaintathlonezid3, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15806. SetDynamicObjectMaterial(opstinaintathlonezid4, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15807. SetDynamicObjectMaterial(opstinaintathlonezid5, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15808. SetDynamicObjectMaterial(opstinaintathlonezid6, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15809. SetDynamicObjectMaterial(opstinaintathlonezid7, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15810. SetDynamicObjectMaterial(opstinaintathlonezid8, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15811. SetDynamicObjectMaterial(opstinaintathlonezid9, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15812. SetDynamicObjectMaterial(opstinaintathlonezid10, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15813. SetDynamicObjectMaterial(opstinaintathlonezid11, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15814. SetDynamicObjectMaterial(opstinaintathlonezid12, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15815. SetDynamicObjectMaterial(opstinaintathlonezid13, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15816. SetDynamicObjectMaterial(opstinaintathlonezid14, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15817. SetDynamicObjectMaterial(opstinaintathlonezid15, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15818. SetDynamicObjectMaterial(opstinaintathlonezid16, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15819. SetDynamicObjectMaterial(opstinaintathlonezid17, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15820. SetDynamicObjectMaterial(opstinaintathlonezid18, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15821. SetDynamicObjectMaterial(opstinaintathlonezid19, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15822. SetDynamicObjectMaterial(opstinaintathlonezid20, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15823. SetDynamicObjectMaterial(opstinaintathlonezid21, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15824. SetDynamicObjectMaterial(opstinaintathlonezid22, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15825. SetDynamicObjectMaterial(opstinaintathlonezid23, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15826. SetDynamicObjectMaterial(opstinaintathlonezid24, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15827. SetDynamicObjectMaterial(opstinaintathlonezid25, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15828. SetDynamicObjectMaterial(opstinaintathlonezid26, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15829. SetDynamicObjectMaterial(opstinaintathlonezid27, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15830. SetDynamicObjectMaterial(opstinaintathlonezid28, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15831. SetDynamicObjectMaterial(opstinaintathlonezid29, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15832. SetDynamicObjectMaterial(opstinaintathlonezid30, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15833. SetDynamicObjectMaterial(opstinaintathlonezid31, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15834. SetDynamicObjectMaterial(opstinaintathlonezid32, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15835. SetDynamicObjectMaterial(opstinaintathlonezid33, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15836. SetDynamicObjectMaterial(opstinaintathlonezid34, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15837. SetDynamicObjectMaterial(opstinaintathlonezidg, 0, 3980, "cityhall_lan", "LAcityhwal1");
  15838. new opstinaintathlonedrvo = CreateDynamicObject(19458, 666.77692, -85.29599, -79.12100, -0.08000, 0.00000, 90.00000);
  15839. new opstinaintathlonedrvo1 =CreateDynamicObject(19458, 666.68890, -83.63480, -77.44910, 0.00000, 90.00000, 90.00000);
  15840. new opstinaintathlonedrvo2 =CreateDynamicObject(19461, 674.33673, -88.68752, -79.15932, 0.00000, 0.00000, 40.00000);
  15841. new opstinaintathlonedrvo3 =CreateDynamicObject(19461, 661.90607, -87.11475, -79.15930, 0.00000, 0.00000, 0.00000);
  15842. new opstinaintathlonedrvo4 =CreateDynamicObject(19461, 677.39032, -95.51983, -77.07301, 0.00000, 0.00000, 0.00000);
  15843. new opstinaintathlonedrvo5 =CreateDynamicObject(19461, 674.41040, -103.29371, -79.15930, 0.00000, 0.00000, -40.00000);
  15844. new opstinaintathlonedrvo6 =CreateDynamicObject(19458, 666.76172, -108.47266, -77.44910, 0.00000, 90.00000, 90.00000);
  15845. new opstinaintathlonedrvo7 =CreateDynamicObject(19458, 666.74353, -106.80576, -79.12100, -0.08000, 0.00000, 90.00000);
  15846. new opstinaintathlonedrvo8 =CreateDynamicObject(19461, 661.91052, -104.72173, -79.15930, 0.00000, 0.00000, 0.00000);
  15847. new opstinaintathlonedrvo9 =CreateDynamicObject(19461, 661.87378, -104.72050, -80.79680, 0.00000, 0.00000, 0.00000);
  15848. new opstinaintathlonedrvo10 =CreateDynamicObject(19461, 665.29529, -109.14634, -80.79680, 0.00000, 0.00000, 90.00000);
  15849. new opstinaintathlonedrvo11 =CreateDynamicObject(19461, 665.34991, -82.66392, -80.79680, 0.00000, 0.00000, 90.00000);
  15850. new opstinaintathlonedrvo12 =CreateDynamicObject(19461, 661.87378, -87.16640, -80.79680, 0.00000, 0.00000, 0.00000);
  15851. new opstinaintathlonedrvo13 =CreateDynamicObject(19461, 660.60931, -77.90871, -80.79680, 0.00000, 0.00000, 0.00000);
  15852. new opstinaintathlonedrvo14 =CreateDynamicObject(19461, 658.58612, -73.13094, -80.79680, 0.00000, 0.00000, 90.00000);
  15853. new opstinaintathlonedrvo15 =CreateDynamicObject(19461, 649.06354, -73.14380, -80.79680, 0.00000, 0.00000, 90.00000);
  15854. new opstinaintathlonedrvo16 =CreateDynamicObject(19461, 644.21991, -77.98660, -80.79680, 0.00000, 0.00000, 0.00000);
  15855. new opstinaintathlonedrvo17 =CreateDynamicObject(19461, 644.20142, -78.01320, -80.79680, 0.00000, 0.00000, 0.00000);
  15856. new opstinaintathlonedrvo18 =CreateDynamicObject(19461, 639.38110, -73.12821, -80.79680, 0.00000, 0.00000, 90.00000);
  15857. new opstinaintathlonedrvo19 =CreateDynamicObject(19461, 629.78619, -73.12492, -80.79680, 0.00000, 0.00000, 90.00000);
  15858. new opstinaintathlonedrvo20 =CreateDynamicObject(19461, 628.74042, -76.78050, -80.79680, 0.00000, 0.00000, -40.00000);
  15859. new opstinaintathlonedrvo21 =CreateDynamicObject(19461, 625.61047, -78.69132, -80.79680, 0.00000, 0.00000, 0.00000);
  15860. new opstinaintathlonedrvo22 =CreateDynamicObject(19461, 625.63580, -88.31848, -80.79680, 0.00000, 0.00000, 0.00000);
  15861. new opstinaintathlonedrvo23 =CreateDynamicObject(19461, 624.61279, -89.48550, -79.09740, 0.00000, 90.00000, 0.00000);
  15862. new opstinaintathlonedrvo24 =CreateDynamicObject(19461, 626.26422, -89.49500, -80.75850, 0.00000, 0.00000, 0.00000);
  15863. new opstinaintathlonedrvo25 =CreateDynamicObject(19461, 621.54028, -84.73660, -80.75850, 0.00000, 0.00000, 90.00000);
  15864. new opstinaintathlonedrvo26 =CreateDynamicObject(19461, 626.26416, -99.08847, -80.75850, 0.00000, 0.00000, 0.00000);
  15865. new opstinaintathlonedrvo27 =CreateDynamicObject(19461, 624.61279, -99.11010, -79.09740, 0.00000, 90.00000, 0.00000);
  15866. new opstinaintathlonedrvo28 =CreateDynamicObject(19461, 625.63300, -108.18704, -80.79680, 0.00000, 0.00000, 0.00000);
  15867. new opstinaintathlonedrvo29 =CreateDynamicObject(19461, 621.54034, -103.85158, -80.75850, 0.00000, 0.00000, 90.00000);
  15868. new opstinaintathlonedrvo30 =CreateDynamicObject(19461, 627.30493, -109.56429, -80.79680, 0.00000, 0.00000, 90.00000);
  15869. new opstinaintathlonedrvo31 =CreateDynamicObject(19461, 632.03607, -114.44640, -80.79680, -0.08000, 0.00000, 0.00000);
  15870. new opstinaintathlonedrvo32 =CreateDynamicObject(19461, 629.74561, -113.11581, -80.79680, 0.00000, 0.00000, 90.00000);
  15871. new opstinaintathlonedrvo33 =CreateDynamicObject(19461, 639.37738, -113.11460, -80.79680, 0.00000, 0.00000, 90.00000);
  15872. new opstinaintathlonedrvo34 =CreateDynamicObject(19461, 644.28583, -115.09500, -80.79680, -0.08000, 0.00000, 0.00000);
  15873. new opstinaintathlonedrvo35 =CreateDynamicObject(18762, 641.87567, -109.79960, -79.55340, 0.00000, 90.00000, 0.00000);
  15874. new opstinaintathlonedrvo36 =CreateDynamicObject(18762, 636.87628, -109.79960, -79.55340, 0.00000, 90.00000, 0.00000);
  15875. new opstinaintathlonedrvo37 =CreateDynamicObject(19461, 644.29199, -113.93302, -80.79680, 0.00000, 0.00000, 0.00000);
  15876. new opstinaintathlonedrvo38 =CreateDynamicObject(19461, 648.80786, -118.78540, -80.79680, 0.00000, 0.00000, 90.00000);
  15877. new opstinaintathlonedrvo39 =CreateDynamicObject(19461, 658.43280, -118.78391, -80.79680, 0.00000, 0.00000, 90.00000);
  15878. new opstinaintathlonedrvo40 =CreateDynamicObject(19461, 660.57996, -114.00549, -80.79680, 0.00000, 0.00000, 0.00000);
  15879. SetDynamicObjectMaterial(opstinaintathlonedrvo, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15880. SetDynamicObjectMaterial(opstinaintathlonedrvo1, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15881. SetDynamicObjectMaterial(opstinaintathlonedrvo2, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15882. SetDynamicObjectMaterial(opstinaintathlonedrvo3, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15883. SetDynamicObjectMaterial(opstinaintathlonedrvo4, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15884. SetDynamicObjectMaterial(opstinaintathlonedrvo5, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15885. SetDynamicObjectMaterial(opstinaintathlonedrvo6, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15886. SetDynamicObjectMaterial(opstinaintathlonedrvo7, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15887. SetDynamicObjectMaterial(opstinaintathlonedrvo8, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15888. SetDynamicObjectMaterial(opstinaintathlonedrvo9, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15889. SetDynamicObjectMaterial(opstinaintathlonedrvo10, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15890. SetDynamicObjectMaterial(opstinaintathlonedrvo11, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15891. SetDynamicObjectMaterial(opstinaintathlonedrvo12, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15892. SetDynamicObjectMaterial(opstinaintathlonedrvo13, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15893. SetDynamicObjectMaterial(opstinaintathlonedrvo14, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15894. SetDynamicObjectMaterial(opstinaintathlonedrvo15, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15895. SetDynamicObjectMaterial(opstinaintathlonedrvo16, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15896. SetDynamicObjectMaterial(opstinaintathlonedrvo17, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15897. SetDynamicObjectMaterial(opstinaintathlonedrvo18, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15898. SetDynamicObjectMaterial(opstinaintathlonedrvo19, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15899. SetDynamicObjectMaterial(opstinaintathlonedrvo20, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15900. SetDynamicObjectMaterial(opstinaintathlonedrvo21, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15901. SetDynamicObjectMaterial(opstinaintathlonedrvo22, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15902. SetDynamicObjectMaterial(opstinaintathlonedrvo23, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15903. SetDynamicObjectMaterial(opstinaintathlonedrvo24, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15904. SetDynamicObjectMaterial(opstinaintathlonedrvo25, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15905. SetDynamicObjectMaterial(opstinaintathlonedrvo26, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15906. SetDynamicObjectMaterial(opstinaintathlonedrvo27, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15907. SetDynamicObjectMaterial(opstinaintathlonedrvo28, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15908. SetDynamicObjectMaterial(opstinaintathlonedrvo29, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15909. SetDynamicObjectMaterial(opstinaintathlonedrvo30, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15910. SetDynamicObjectMaterial(opstinaintathlonedrvo31, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15911. SetDynamicObjectMaterial(opstinaintathlonedrvo32, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15912. SetDynamicObjectMaterial(opstinaintathlonedrvo33, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15913. SetDynamicObjectMaterial(opstinaintathlonedrvo34, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15914. SetDynamicObjectMaterial(opstinaintathlonedrvo35, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15915. SetDynamicObjectMaterial(opstinaintathlonedrvo36, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15916. SetDynamicObjectMaterial(opstinaintathlonedrvo37, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15917. SetDynamicObjectMaterial(opstinaintathlonedrvo38, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15918. SetDynamicObjectMaterial(opstinaintathlonedrvo39, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15919. SetDynamicObjectMaterial(opstinaintathlonedrvo40, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  15920. new opstinaintathlonezidb = CreateDynamicObject(19377, 628.68365, -109.85345, -75.60600, 0.00000, 0.00000, 40.00000);
  15921. new opstinaintathlonezidb1 = CreateDynamicObject(19461, 625.61780, -94.48410, -79.24720, 0.00000, 0.00000, 0.00000);
  15922. new opstinaintathlonezidb2 =CreateDynamicObject(19358, 640.21472, -83.54597, -78.33775, 0.00000, 0.00000, 90.00000);
  15923. new opstinaintathlonezidb3 =CreateDynamicObject(19358, 628.30621, -83.54600, -78.33780, 0.00000, 0.00000, 90.00000);
  15924. SetDynamicObjectMaterial(opstinaintathlonezidb, 0, 9495, "vict_sfw", "newall10_seamless", 0xFFFFFFFF);
  15925. SetDynamicObjectMaterial(opstinaintathlonezidb1, 0, 9495, "vict_sfw", "newall10_seamless", 0xFFFFFFFF);
  15926. SetDynamicObjectMaterial(opstinaintathlonezidb2, 0, 9495, "vict_sfw", "newall10_seamless", 0xFFFFFFFF);
  15927. SetDynamicObjectMaterial(opstinaintathlonezidb3, 0, 9495, "vict_sfw", "newall10_seamless", 0xFFFFFFFF);
  15928. new athloneopstinaintstubovi = CreateDynamicObject(18980, 662.79163, -84.45060, -78.19510, 0.00000, 0.00000, 0.00000);
  15929. new athloneopstinaintstubovi1 =CreateDynamicObject(18980, 650.32031, -95.88281, -78.19510, 0.00000, 0.00000, 0.00000);
  15930. new athloneopstinaintstubovi2 =CreateDynamicObject(18980, 643.88342, -108.62588, -78.19510, 0.00000, 0.00000, 0.00000);
  15931. new athloneopstinaintstubovi3 =CreateDynamicObject(18980, 643.30560, -104.42500, -78.19510, 0.00000, 0.00000, 0.00000);
  15932. new athloneopstinaintstubovi4 =CreateDynamicObject(18980, 643.30560, -87.51801, -78.19510, 0.00000, 0.00000, 0.00000);
  15933. new athloneopstinaintstubovi5 =CreateDynamicObject(18980, 643.81207, -83.19390, -78.19510, 0.00000, 0.00000, 0.00000);
  15934. new athloneopstinaintstubovi6 =CreateDynamicObject(18980, 634.40680, -79.84310, -78.19510, 0.00000, 0.00000, 0.00000);
  15935. new athloneopstinaintstubovi7 =CreateDynamicObject(18980, 662.73395, -107.59574, -78.19510, 0.00000, 0.00000, 0.00000);
  15936. SetDynamicObjectMaterial(athloneopstinaintstubovi, 0, 6056, "venice_law", "stonewall_la", 0xFFFFFFFF);
  15937. SetDynamicObjectMaterial(athloneopstinaintstubovi1, 0, 6056, "venice_law", "stonewall_la", 0xFFFFFFFF);
  15938. SetDynamicObjectMaterial(athloneopstinaintstubovi2, 0, 6056, "venice_law", "stonewall_la", 0xFFFFFFFF);
  15939. SetDynamicObjectMaterial(athloneopstinaintstubovi3, 0, 6056, "venice_law", "stonewall_la", 0xFFFFFFFF);
  15940. SetDynamicObjectMaterial(athloneopstinaintstubovi4, 0, 6056, "venice_law", "stonewall_la", 0xFFFFFFFF);
  15941. SetDynamicObjectMaterial(athloneopstinaintstubovi5, 0, 6056, "venice_law", "stonewall_la", 0xFFFFFFFF);
  15942. SetDynamicObjectMaterial(athloneopstinaintstubovi6, 0, 6056, "venice_law", "stonewall_la", 0xFFFFFFFF);
  15943. SetDynamicObjectMaterial(athloneopstinaintstubovi7, 0, 6056, "venice_law", "stonewall_la", 0xFFFFFFFF);
  15944. new opstinaithloneintcrno = CreateDynamicObject(19089, 632.07318, -83.49660, -76.06700, 0.00000, 90.00000, 0.00000);
  15945. new opstinaithloneintcrno1 =CreateDynamicObject(19089, 632.07690, -83.50200, -76.04700, 0.00000, 0.00000, 0.00000);
  15946. new opstinaithloneintcrno2 =CreateDynamicObject(19089, 644.13342, -83.49210, -76.06700, 0.00000, 90.00000, 0.00000);
  15947. new opstinaithloneintcrno3 =CreateDynamicObject(19089, 636.75488, -83.50200, -76.04700, 0.00000, 0.00000, 0.00000);
  15948. SetDynamicObjectMaterial(opstinaithloneintcrno, 0, 2361, "shopping_freezers", "white", 0xFF000000);
  15949. SetDynamicObjectMaterial(opstinaithloneintcrno1, 0, 2361, "shopping_freezers", "white", 0xFF000000);
  15950. SetDynamicObjectMaterial(opstinaithloneintcrno2, 0, 2361, "shopping_freezers", "white", 0xFF000000);
  15951. SetDynamicObjectMaterial(opstinaithloneintcrno3, 0, 2361, "shopping_freezers", "white", 0xFF000000);
  15952. new opstinaathloneintpod = CreateDynamicObject(18981, 674.34088, -96.06480, -78.90170, 0.00000, 90.00000, 0.00000);
  15953. new opstinaathloneintpod1 =CreateDynamicObject(18981, 649.38062, -96.06480, -80.41410, 0.00000, 90.00000, 0.00000);
  15954. new opstinaathloneintpod2 =CreateDynamicObject(18981, 624.38440, -96.06480, -80.41410, 0.00000, 90.00000, 0.00000);
  15955. new opstinaathloneintpod3 =CreateDynamicObject(18981, 649.41278, -71.05640, -80.41410, 0.00000, 90.00000, 0.00000);
  15956. new opstinaathloneintpod4 =CreateDynamicObject(18981, 624.40436, -71.11646, -80.41410, 0.00000, 90.00000, 0.00000);
  15957. new opstinaathloneintpod5 =CreateDynamicObject(18981, 624.38440, -121.02770, -80.41410, 0.00000, 90.00000, 0.00000);
  15958. new opstinaathloneintpod6 =CreateDynamicObject(18981, 649.38062, -121.02770, -80.41410, 0.00000, 90.00000, 0.00000);
  15959. SetDynamicObjectMaterial(opstinaathloneintpod, 0, 14594, "papaerchaseoffice", "ab_mottleGrey");
  15960. SetDynamicObjectMaterial(opstinaathloneintpod1, 0, 14594, "papaerchaseoffice", "ab_mottleGrey");
  15961. SetDynamicObjectMaterial(opstinaathloneintpod2, 0, 14594, "papaerchaseoffice", "ab_mottleGrey");
  15962. SetDynamicObjectMaterial(opstinaathloneintpod3, 0, 14594, "papaerchaseoffice", "ab_mottleGrey");
  15963. SetDynamicObjectMaterial(opstinaathloneintpod4, 0, 14594, "papaerchaseoffice", "ab_mottleGrey");
  15964. SetDynamicObjectMaterial(opstinaathloneintpod5, 0, 14594, "papaerchaseoffice", "ab_mottleGrey");
  15965. SetDynamicObjectMaterial(opstinaathloneintpod6, 0, 14594, "papaerchaseoffice", "ab_mottleGrey");
  15966. new opstinaintathloneplafon = CreateDynamicObject(18981, 674.39478, -95.09790, -71.28810, 0.00000, 90.00000, 0.00000);
  15967. new opstinaintathloneplafon1 =CreateDynamicObject(18981, 649.38062, -96.06480, -71.28810, 0.00000, 90.00000, 0.00000);
  15968. new opstinaintathloneplafon2 =CreateDynamicObject(18981, 649.38062, -121.02770, -71.28810, 0.00000, 90.00000, 0.00000);
  15969. new opstinaintathloneplafon3 =CreateDynamicObject(18981, 624.38440, -121.02770, -71.28810, 0.00000, 90.00000, 0.00000);
  15970. new opstinaintathloneplafon4 =CreateDynamicObject(18981, 624.38440, -96.06480, -71.28810, 0.00000, 90.00000, 0.00000);
  15971. new opstinaintathloneplafon5 =CreateDynamicObject(18981, 649.39362, -71.11540, -71.28810, 0.00000, 90.00000, 0.00000);
  15972. new opstinaintathloneplafon6 =CreateDynamicObject(18981, 624.40442, -71.11650, -71.28810, 0.00000, 90.00000, 0.00000);
  15973. SetDynamicObjectMaterial(opstinaintathloneplafon, 0, 10926, "shops_sfse", "bathtile01_int", 0xFF8B4C39);
  15974. SetDynamicObjectMaterial(opstinaintathloneplafon1, 0, 10926, "shops_sfse", "bathtile01_int", 0xFF8B4C39);
  15975. SetDynamicObjectMaterial(opstinaintathloneplafon2, 0, 10926, "shops_sfse", "bathtile01_int", 0xFF8B4C39);
  15976. SetDynamicObjectMaterial(opstinaintathloneplafon3, 0, 10926, "shops_sfse", "bathtile01_int", 0xFF8B4C39);
  15977. SetDynamicObjectMaterial(opstinaintathloneplafon4, 0, 10926, "shops_sfse", "bathtile01_int", 0xFF8B4C39);
  15978. SetDynamicObjectMaterial(opstinaintathloneplafon5, 0, 10926, "shops_sfse", "bathtile01_int", 0xFF8B4C39);
  15979. SetDynamicObjectMaterial(opstinaintathloneplafon6, 0, 10926, "shops_sfse", "bathtile01_int", 0xFF8B4C39);
  15980. new opstinaathlonekancelarijep = CreateDynamicObject(19377, 649.02307, -77.40660, -76.02560, 0.00000, 90.00000, 90.00000);
  15981. new opstinaathlonekancelarijep1 = CreateDynamicObject(19377, 658.60931, -77.40660, -76.02560, 0.00000, 90.00000, 90.00000);
  15982. new opstinaathlonekancelarijep2 = CreateDynamicObject(19377, 649.26868, -114.41124, -76.02560, 0.00000, 90.00000, 90.00000);
  15983. new opstinaathlonekancelarijep3 = CreateDynamicObject(19377, 658.90045, -114.43725, -76.02560, 0.00000, 90.00000, 90.00000);
  15984. SetDynamicObjectMaterial(opstinaathlonekancelarijep, 0, 10926, "shops_sfse", "bathtile01_int", 0xFF8B4C39);
  15985. SetDynamicObjectMaterial(opstinaathlonekancelarijep1, 0, 10926, "shops_sfse", "bathtile01_int", 0xFF8B4C39);
  15986. SetDynamicObjectMaterial(opstinaathlonekancelarijep2, 0, 10926, "shops_sfse", "bathtile01_int", 0xFF8B4C39);
  15987. SetDynamicObjectMaterial(opstinaathlonekancelarijep3, 0, 10926, "shops_sfse", "bathtile01_int", 0xFF8B4C39);
  15988. new opstinaintathloneprozori = CreateDynamicObject(19466, 625.70062, -85.94160, -78.46710, 0.00000, 0.00000, 0.00000);
  15989. new opstinaintathloneprozori1 =CreateDynamicObject(19358, 625.62653, -90.83600, -80.11360, 45.00000, 0.00000, 0.00000);
  15990. new opstinaintathloneprozori2 =CreateDynamicObject(19358, 625.62653, -97.96420, -80.11360, 45.00000, 0.00000, 0.00000);
  15991. new opstinaintathloneprozori3 =CreateDynamicObject(19466, 625.69885, -102.38997, -78.46712, 0.00000, 0.00000, 0.00000);
  15992. SetDynamicObjectMaterial(opstinaintathloneprozori, 0, 3979, "civic01_lan", "sl_laglasswall2", 0xFF1E90FF);
  15993. SetDynamicObjectMaterial(opstinaintathloneprozori1, 0, 3979, "civic01_lan", "sl_laglasswall2", 0xFF1E90FF);
  15994. SetDynamicObjectMaterial(opstinaintathloneprozori2, 0, 3979, "civic01_lan", "sl_laglasswall2", 0xFF1E90FF);
  15995. SetDynamicObjectMaterial(opstinaintathloneprozori3, 0, 3979, "civic01_lan", "sl_laglasswall2", 0xFF1E90FF);
  15996. new opstinaintathlonestakla = CreateDynamicObject(19325, 628.75568, -83.49660, -78.12170, 0.00000, 0.00000, 90.00000);
  15997. new opstinaintathlonestakla1 =CreateDynamicObject(19325, 640.07196, -83.49660, -78.12170, 0.00000, 0.00000, 90.00000);
  15998. new opstinaintathlonestakla2 =CreateDynamicObject(19325, 647.57391, -82.70230, -78.12170, 0.00000, 0.00000, 90.00000);
  15999. new opstinaintathlonestakla3 =CreateDynamicObject(19325, 657.24365, -82.70232, -78.12170, 0.00000, 0.00000, 90.00000);
  16000. new opstinaintathlonestakla4 =CreateDynamicObject(19325, 657.31396, -109.11961, -78.12171, 0.00000, 0.00000, 90.00000);
  16001. new opstinaintathlonestakla5 =CreateDynamicObject(19325, 647.57391, -109.11960, -78.12170, 0.00000, 0.00000, 90.00000);
  16002. new opstinaintathlonestakla6 =CreateDynamicObject(19325, 629.93542, -108.01970, -73.54840, 0.00000, 0.00000, 312.00000);
  16003. new opstinaintathlonestakla7 =CreateDynamicObject(19325, 627.08929, -104.96125, -73.54842, 0.00000, 0.00000, 312.00000);
  16004. new opstinaintathlonestakla8 =CreateDynamicObject(19325, 643.72156, -85.57745, -78.66464, 80.00000, 0.00000, 0.00000);
  16005. new opstinaintathlonestakla9 =CreateDynamicObject(19325, 643.69373, -106.29720, -78.66460, -80.00000, 0.00000, 0.00000);
  16006. SetDynamicObjectMaterial(opstinaintathlonestakla, 0, 2361, "lsmall_shops", "lsmall_window01", 0xFF1E90FF);
  16007. SetDynamicObjectMaterial(opstinaintathlonestakla1, 0, 2361, "lsmall_shops", "lsmall_window01", 0xFF1E90FF);
  16008. SetDynamicObjectMaterial(opstinaintathlonestakla2, 0, 2361, "lsmall_shops", "lsmall_window01", 0xFF1E90FF);
  16009. SetDynamicObjectMaterial(opstinaintathlonestakla3, 0, 2361, "lsmall_shops", "lsmall_window01", 0xFF1E90FF);
  16010. SetDynamicObjectMaterial(opstinaintathlonestakla4, 0, 2361, "lsmall_shops", "lsmall_window01", 0xFF1E90FF);
  16011. SetDynamicObjectMaterial(opstinaintathlonestakla5, 0, 2361, "lsmall_shops", "lsmall_window01", 0xFF1E90FF);
  16012. SetDynamicObjectMaterial(opstinaintathlonestakla6, 0, 2361, "lsmall_shops", "lsmall_window01", 0xFF1E90FF);
  16013. SetDynamicObjectMaterial(opstinaintathlonestakla7, 0, 2361, "lsmall_shops", "lsmall_window01", 0xFF1E90FF);
  16014. SetDynamicObjectMaterial(opstinaintathlonestakla8, 0, 2361, "lsmall_shops", "lsmall_window01", 0xFF1E90FF);
  16015. SetDynamicObjectMaterial(opstinaintathlonestakla9, 0, 2361, "lsmall_shops", "lsmall_window01", 0xFF1E90FF);
  16016. new opstinaintathloneplazma = CreateDynamicObject(2267, 628.30969, -83.41081, -77.97473, 0.00000, 0.00000, 180.00000);
  16017. new opstinaintathloneplazma1 =CreateDynamicObject(2267, 640.22369, -83.43540, -77.97470, 0.00000, 0.00000, 180.00000);
  16018. SetDynamicObjectMaterial(opstinaintathloneplazma, 1, 2361, "shopping_freezers", "white", 0xFF5B5959);
  16019. SetDynamicObjectMaterial(opstinaintathloneplazma, 0, 2361, "shopping_freezers", "white", 0xFF000000);
  16020. SetDynamicObjectMaterial(opstinaintathloneplazma1, 1, 2361, "shopping_freezers", "white", 0xFF5B5959);
  16021. SetDynamicObjectMaterial(opstinaintathloneplazma1, 0, 2361, "shopping_freezers", "white", 0xFF000000);
  16022. new opstinaintathlonezast = CreateDynamicObject(19458, 659.00098, -99.97622, -82.33400, -40.00000, 0.00000, 90.00000);
  16023. new opstinaintathlonezast1 =CreateDynamicObject(19458, 659.00098, -91.86590, -82.33400, -40.00000, 0.00000, 90.00000);
  16024. SetDynamicObjectMaterial(opstinaintathlonezast, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  16025. SetDynamicObjectMaterial(opstinaintathlonezast1, 0, 12954, "sw_furniture", "CJ_WOOD5", 0xFFFFFFFF);
  16026. new opstinaintathlonevrata = CreateDynamicObject(1491, 651.63452, -109.10800, -79.97020, 0.00000, 0.00000, 0.00000);
  16027. SetDynamicObjectMaterial(opstinaintathlonevrata, 0, 1569, "adam_v_doort", "ws_guardhousedoor", 0xFFFFFFFF);
  16028. new dodatakplafon = CreateDynamicObject(18981, 675.47900, -120.01958, -71.28810, 0.00000, 90.00000, 0.00000);
  16029. SetDynamicObjectMaterial(dodatakplafon, 0, 3979, "civic01_lan", "sl_laglasswall2", 0xFF1E90FF);
  16030. //ostaloopstinaint
  16031. CreateDynamicObject(14394, 660.80750, -95.93260, -79.21160, 0.00000, 0.00000, 0.00000);
  16032. CreateDynamicObject(2030, 626.27869, -85.95230, -79.64500, 0.00000, 0.00000, 0.00000);
  16033. CreateDynamicObject(2030, 626.22418, -90.97360, -79.64500, 0.00000, 0.00000, 0.00000);
  16034. CreateDynamicObject(2030, 626.22418, -98.08510, -79.64500, 0.00000, 0.00000, 0.00000);
  16035. CreateDynamicObject(2030, 626.27875, -102.44759, -79.64500, 0.00000, 0.00000, 0.00000);
  16036. CreateDynamicObject(14409, 629.51630, -105.59517, -80.34965, 0.00000, 0.00000, 312.04074);
  16037. CreateDynamicObject(2209, 642.74908, -109.54320, -79.95400, 0.00000, 0.00000, 180.00000);
  16038. CreateDynamicObject(2209, 640.54437, -109.54320, -79.95400, 0.00000, 0.00000, 180.00000);
  16039. CreateDynamicObject(2209, 638.32220, -109.54320, -79.95400, 0.00000, 0.00000, 180.00000);
  16040. CreateDynamicObject(2209, 636.17377, -109.54321, -79.95400, 0.00000, 0.00000, 180.00000);
  16041. CreateDynamicObject(19089, 636.75488, -83.50200, -76.04700, 0.00000, 0.00000, 0.00000);
  16042. CreateDynamicObject(1897, 625.62518, -84.89540, -78.60280, 0.00000, 0.00000, 0.00000);
  16043. CreateDynamicObject(1897, 625.56738, -85.95110, -77.55540, 0.00000, -90.00000, -90.00000);
  16044. CreateDynamicObject(1897, 625.62451, -103.59120, -78.60280, 0.00000, 0.00000, 0.00000);
  16045. CreateDynamicObject(1897, 625.57739, -102.36510, -77.55540, 0.00000, -90.00000, -90.00000);
  16046. CreateDynamicObject(1897, 625.57739, -102.36510, -78.98882, 0.00000, -90.00000, -90.00000);
  16047. CreateDynamicObject(1897, 625.63733, -101.36090, -78.60280, 0.00000, 0.00000, 0.00000);
  16048. CreateDynamicObject(1897, 625.63275, -87.19853, -78.60280, 0.00000, 0.00000, 0.00000);
  16049. CreateDynamicObject(1897, 625.56738, -85.95112, -78.98882, 0.00000, -90.00000, -90.00000);
  16050. CreateDynamicObject(1897, 625.64496, -89.77599, -78.60280, 0.00000, 0.00000, 0.00000);
  16051. CreateDynamicObject(1897, 625.64124, -99.41479, -78.60280, 0.00000, 0.00000, 0.00000);
  16052. CreateDynamicObject(1897, 625.58588, -98.18000, -77.55680, 0.00000, -90.00000, -90.00000);
  16053. CreateDynamicObject(1897, 625.58588, -95.95420, -77.55680, 0.00000, -90.00000, -90.00000);
  16054. CreateDynamicObject(1897, 625.58588, -93.72840, -77.55680, 0.00000, -90.00000, -90.00000);
  16055. CreateDynamicObject(1897, 625.58588, -91.52940, -77.55680, 0.00000, -90.00000, -90.00000);
  16056. CreateDynamicObject(1897, 625.58588, -90.80700, -77.55680, 0.00000, -90.00000, -90.00000);
  16057. CreateDynamicObject(957, 625.97467, -100.38590, -78.97880, 0.00000, 180.00000, 180.00000);
  16058. CreateDynamicObject(957, 625.87830, -88.32170, -78.97880, 0.00000, 180.00000, 180.00000);
  16059. CreateDynamicObject(957, 625.97467, -96.46550, -78.97880, 0.00000, 180.00000, 180.00000);
  16060. CreateDynamicObject(957, 625.97467, -94.32830, -78.97880, 0.00000, 180.00000, 180.00000);
  16061. CreateDynamicObject(957, 625.97467, -92.21470, -78.97880, 0.00000, 180.00000, 180.00000);
  16062. CreateDynamicObject(970, 660.09564, -91.88626, -79.45350, 0.00000, -40.00000, 0.00000);
  16063. CreateDynamicObject(970, 660.12927, -99.98650, -79.45350, 0.00000, -40.00000, 0.00000);
  16064. CreateDynamicObject(2315, 650.34064, -95.89874, -78.09620, -0.08000, 90.00000, 0.00000);
  16065. CreateDynamicObject(2315, 650.30090, -95.89836, -79.51530, -0.08000, -90.00000, 0.00000);
  16066. CreateDynamicObject(2315, 643.34088, -87.54068, -78.09620, -0.08000, 90.00000, 0.00000);
  16067. CreateDynamicObject(2315, 643.29565, -87.54087, -79.51530, -0.08000, -90.00000, 0.00000);
  16068. CreateDynamicObject(2315, 643.28198, -104.42378, -79.51530, -0.08000, -90.00000, 0.00000);
  16069. CreateDynamicObject(2315, 643.33002, -104.44360, -78.09620, -0.08000, 90.00000, 0.00000);
  16070. CreateDynamicObject(2030, 643.32550, -104.08462, -79.64500, 0.00000, 0.00000, 0.00000);
  16071. CreateDynamicObject(2030, 643.35559, -87.94286, -79.64500, 0.00000, 0.00000, 0.00000);
  16072. CreateDynamicObject(1811, 644.71716, -88.77499, -79.34870, 0.00000, 0.00000, 313.66730);
  16073. CreateDynamicObject(1811, 642.44525, -89.24929, -79.34870, 0.00000, 0.00000, 254.05786);
  16074. CreateDynamicObject(1811, 642.44653, -102.88531, -79.34870, 0.00000, 0.00000, 130.13995);
  16075. CreateDynamicObject(1811, 644.31219, -103.08139, -79.34870, 0.00000, 0.00000, 63.86169);
  16076. CreateDynamicObject(1811, 627.92981, -86.01850, -79.34870, 0.00000, 0.00000, 0.00000);
  16077. CreateDynamicObject(1811, 627.92981, -90.93860, -79.34870, 0.00000, 0.00000, 0.00000);
  16078. CreateDynamicObject(1811, 627.92981, -98.07280, -79.34870, 0.00000, 0.00000, 0.00000);
  16079. CreateDynamicObject(1811, 627.92981, -102.46020, -79.34870, 0.00000, 0.00000, 0.00000);
  16080. CreateDynamicObject(1811, 635.49139, -107.87420, -79.34870, 0.00000, 0.00000, 90.00000);
  16081. CreateDynamicObject(1811, 637.77881, -107.87420, -79.34870, 0.00000, 0.00000, 90.00000);
  16082. CreateDynamicObject(1811, 639.93292, -107.87420, -79.34870, 0.00000, 0.00000, 90.00000);
  16083. CreateDynamicObject(1811, 642.19196, -107.87415, -79.34870, 0.00000, 0.00000, 90.00000);
  16084. CreateDynamicObject(1806, 642.20758, -111.45820, -79.94030, 0.00000, 0.00000, 0.00000);
  16085. CreateDynamicObject(1806, 658.63849, -74.89175, -79.94030, 0.00000, 0.00000, 0.00000);
  16086. CreateDynamicObject(1806, 637.77881, -111.45820, -79.94030, 0.00000, 0.00000, 0.00000);
  16087. CreateDynamicObject(1806, 635.49139, -111.45820, -79.94030, 0.00000, 0.00000, 0.00000);
  16088. CreateDynamicObject(640, 661.47388, -85.19040, -79.41490, 0.00000, 0.00000, 0.00000);
  16089. CreateDynamicObject(640, 666.01703, -84.66341, -76.98325, 0.00000, 0.00000, 86.70212);
  16090. CreateDynamicObject(640, 661.47388, -102.50950, -79.41490, 0.00000, 0.00000, 0.00000);
  16091. CreateDynamicObject(640, 661.47388, -107.88960, -79.41490, 0.00000, 0.00000, 0.00000);
  16092. CreateDynamicObject(2816, 643.31097, -103.64680, -79.24140, 0.00000, 0.00000, 0.00000);
  16093. CreateDynamicObject(2816, 643.43970, -88.44480, -79.24140, 0.00000, 0.00000, 0.00000);
  16094. CreateDynamicObject(2253, 625.88348, -87.58610, -78.76670, 0.00000, 0.00000, 0.00000);
  16095. CreateDynamicObject(2253, 625.88348, -89.08930, -78.76670, 0.00000, 0.00000, 0.00000);
  16096. CreateDynamicObject(2253, 625.88348, -99.73520, -78.76670, 0.00000, 0.00000, 0.00000);
  16097. CreateDynamicObject(2253, 625.88348, -101.00310, -78.76670, 0.00000, 0.00000, 0.00000);
  16098. CreateDynamicObject(1817, 628.73590, -81.18795, -79.95783, 0.00000, 0.00000, 0.00000);
  16099. CreateDynamicObject(1817, 639.59589, -80.68150, -79.95780, 0.00000, 0.00000, 0.00000);
  16100. CreateDynamicObject(1817, 633.93317, -77.46697, -79.95783, 0.00000, 0.00000, 0.00000);
  16101. CreateDynamicObject(2290, 639.02917, -78.06230, -79.97610, 0.00000, 0.00000, 0.00000);
  16102. CreateDynamicObject(2290, 628.21399, -78.64378, -79.97610, 0.00000, 0.00000, 0.00000);
  16103. CreateDynamicObject(2290, 633.54919, -74.91982, -79.97610, 0.00000, 0.00000, 0.00000);
  16104. CreateDynamicObject(2252, 640.47894, -80.21136, -79.20330, 0.00000, 0.00000, 0.00000);
  16105. CreateDynamicObject(2252, 634.89307, -76.97001, -79.20330, 0.00000, 0.00000, 0.00000);
  16106. CreateDynamicObject(2252, 629.71106, -80.72469, -79.20330, 0.00000, 0.00000, 0.00000);
  16107. CreateDynamicObject(948, 635.11871, -80.05130, -80.16160, 0.00000, 0.00000, 0.00000);
  16108. CreateDynamicObject(948, 633.70306, -80.05126, -80.16164, 0.00000, 0.00000, 0.00000);
  16109. CreateDynamicObject(14455, 643.42993, -73.22305, -78.47224, 0.00000, 0.00000, 180.00000);
  16110. CreateDynamicObject(640, 661.47388, -90.55080, -79.41490, 0.00000, 0.00000, 0.00000);
  16111. CreateDynamicObject(640, 665.81433, -107.35336, -76.98325, 0.00000, 0.00000, 95.41958);
  16112. CreateDynamicObject(948, 650.32709, -95.17343, -80.16160, 0.00000, 0.00000, 0.00000);
  16113. CreateDynamicObject(948, 650.32709, -96.63380, -80.16160, 0.00000, 0.00000, 0.00000);
  16114. CreateDynamicObject(948, 625.94635, -104.19146, -80.16160, 0.00000, 0.00000, 0.00000);
  16115. CreateDynamicObject(948, 625.94598, -84.48155, -80.16160, 0.00000, 0.00000, 0.00000);
  16116. CreateDynamicObject(2894, 639.77661, -80.11692, -79.49731, 0.00000, 0.00000, 0.00000);
  16117. CreateDynamicObject(1533, 628.09088, -108.87543, -77.27138, 0.00000, 0.00000, 131.41745);
  16118. CreateDynamicObject(1533, 627.10388, -107.73789, -77.27138, 0.00000, 0.00000, 130.70224);
  16119. CreateDynamicObject(1533, 677.27008, -96.03189, -78.45134, 0.00000, 0.00000, 270.31757);
  16120. CreateDynamicObject(1533, 677.26648, -94.53089, -78.45134, 0.00000, 0.00000, 270.31757);
  16121. CreateDynamicObject(10932, 663.30194, -84.45351, -87.21690, 0.00000, 0.00000, 0.00000);
  16122. CreateDynamicObject(19893, 635.49139, -110.13210, -79.04570, 0.00000, 0.00000, 0.00000);
  16123. CreateDynamicObject(19893, 637.77881, -110.13210, -79.04570, 0.00000, 0.00000, 0.00000);
  16124. CreateDynamicObject(19893, 639.93292, -110.13210, -79.04570, 0.00000, 0.00000, 0.00000);
  16125. CreateDynamicObject(19893, 642.20758, -110.13210, -79.04570, 0.00000, 0.00000, 0.00000);
  16126. CreateDynamicObject(2161, 643.73938, -112.89420, -79.95420, 0.00000, 0.00000, 180.00000);
  16127. CreateDynamicObject(2163, 642.43500, -112.89024, -79.94180, 0.00000, 0.00000, 180.00000);
  16128. CreateDynamicObject(2167, 640.67438, -112.90337, -79.91360, 0.00000, 0.00000, 180.00000);
  16129. CreateDynamicObject(2164, 639.76129, -112.93200, -79.91360, 0.00000, 0.00000, 180.00000);
  16130. CreateDynamicObject(2164, 638.00177, -112.93200, -79.91360, 0.00000, 0.00000, 180.00000);
  16131. CreateDynamicObject(2164, 636.23688, -112.93200, -79.91360, 0.00000, 0.00000, 180.00000);
  16132. CreateDynamicObject(2894, 635.50372, -109.62946, -79.02720, 0.00000, 0.00000, 0.00000);
  16133. CreateDynamicObject(2690, 650.27289, -96.42448, -77.90593, 0.00000, 0.00000, 0.00000);
  16134. CreateDynamicObject(2690, 650.35260, -95.35569, -77.90590, 0.00000, 0.00000, 180.00000);
  16135. CreateDynamicObject(11710, 627.05072, -107.76850, -74.53440, 0.00000, 0.00000, 311.42770);
  16136. CreateDynamicObject(19787, 632.13702, -111.41712, -76.54530, 10.00000, 0.00000, 90.00000);
  16137. CreateDynamicObject(2207, 653.07501, -116.12050, -79.93630, 0.00000, 0.00000, 180.00000);
  16138. CreateDynamicObject(1714, 652.13806, -117.80235, -79.96360, 0.00000, 0.00000, 180.00000);
  16139. CreateDynamicObject(1727, 653.59235, -114.47710, -79.93870, 0.00000, 0.00000, -40.00000);
  16140. CreateDynamicObject(1727, 650.25983, -114.90266, -79.93870, 0.00000, 0.00000, 40.00000);
  16141. CreateDynamicObject(2164, 645.68073, -118.63110, -79.96960, 0.00000, 0.00000, 180.00000);
  16142. CreateDynamicObject(2164, 647.46039, -118.60310, -79.96960, 0.00000, 0.00000, 180.00000);
  16143. CreateDynamicObject(14455, 655.47131, -118.72634, -78.47220, 0.00000, 0.00000, 0.00000);
  16144. CreateDynamicObject(2163, 649.20062, -118.63110, -79.03260, 0.00000, 0.00000, 180.00000);
  16145. CreateDynamicObject(2162, 649.22919, -118.63110, -79.94440, 0.00000, 0.00000, 180.00000);
  16146. CreateDynamicObject(1726, 645.00787, -111.66827, -79.88450, 0.00000, 0.00000, 90.00000);
  16147. CreateDynamicObject(1726, 647.96295, -109.71831, -79.88450, 0.00000, 0.00000, -90.00000);
  16148. CreateDynamicObject(14455, 660.54919, -117.95032, -78.47220, 0.00000, 0.00000, 90.00000);
  16149. CreateDynamicObject(19787, 644.38165, -114.48017, -76.94630, 10.00000, 0.00000, 90.00000);
  16150. CreateDynamicObject(1817, 646.96698, -111.21815, -79.95780, 0.00000, 0.00000, 90.00000);
  16151. CreateDynamicObject(2253, 651.13812, -116.80521, -78.92980, 0.00000, 0.00000, 0.00000);
  16152. CreateDynamicObject(19893, 652.12128, -116.42018, -79.16170, 0.00000, 0.00000, 0.00000);
  16153. CreateDynamicObject(2894, 651.55731, -116.14957, -79.13648, 0.00000, 0.00000, 34.48423);
  16154. CreateDynamicObject(2252, 646.42346, -110.77756, -79.20530, 0.00000, 0.00000, 0.00000);
  16155. CreateDynamicObject(14834, 660.15924, -109.59376, -79.66059, 0.00000, 0.00000, 180.00000);
  16156. CreateDynamicObject(2260, 650.11292, -118.20687, -78.18145, 0.00000, 0.00000, 180.00000);
  16157. CreateDynamicObject(2265, 650.80261, -118.13276, -78.72180, 0.00000, 0.00000, 180.00000);
  16158. CreateDynamicObject(2262, 654.21777, -118.19831, -78.38730, 0.00000, 0.00000, 180.00000);
  16159. CreateDynamicObject(18084, 652.33887, -117.73293, -78.05145, 0.00000, 0.00000, 0.00000);
  16160. CreateDynamicObject(18084, 659.55408, -111.44402, -78.05140, 0.00000, 0.00000, 90.00000);
  16161. CreateDynamicObject(2828, 653.05249, -116.69225, -79.17720, 0.00000, 0.00000, 125.71690);
  16162. CreateDynamicObject(2239, 644.72064, -112.29126, -79.86860, 0.00000, 0.00000, 90.00000);
  16163. CreateDynamicObject(1569, 651.62665, -82.71125, -79.97024, 0.00000, 0.00000, 0.00000);
  16164. CreateDynamicObject(2181, 644.87842, -73.66960, -79.95080, 0.00000, 0.00000, 0.00000);
  16165. CreateDynamicObject(2181, 649.31622, -73.66960, -79.95080, 0.00000, 0.00000, 0.00000);
  16166. CreateDynamicObject(2181, 653.84491, -73.66960, -79.95080, 0.00000, 0.00000, 0.00000);
  16167. CreateDynamicObject(2181, 658.16254, -73.66959, -79.95080, 0.00000, 0.00000, 0.00000);
  16168. CreateDynamicObject(1806, 639.93292, -111.45820, -79.94030, 0.00000, 0.00000, 0.00000);
  16169. CreateDynamicObject(1806, 654.34387, -74.89170, -79.94030, 0.00000, 0.00000, 0.00000);
  16170. CreateDynamicObject(1806, 649.80573, -74.89170, -79.94030, 0.00000, 0.00000, 0.00000);
  16171. CreateDynamicObject(1806, 645.43958, -74.89170, -79.94030, 0.00000, 0.00000, 0.00000);
  16172. CreateDynamicObject(2164, 647.23346, -73.20974, -79.94410, 0.00000, 0.00000, 0.00000);
  16173. CreateDynamicObject(2164, 651.63318, -73.20970, -79.94410, 0.00000, 0.00000, 0.00000);
  16174. CreateDynamicObject(2164, 656.09192, -73.20970, -79.94410, 0.00000, 0.00000, 0.00000);
  16175. CreateDynamicObject(2181, 656.09192, -77.26020, -79.95080, 0.00000, 0.00000, 0.00000);
  16176. CreateDynamicObject(2181, 651.63318, -77.26020, -79.95080, 0.00000, 0.00000, 0.00000);
  16177. CreateDynamicObject(2181, 647.23352, -77.26020, -79.95080, 0.00000, 0.00000, 0.00000);
  16178. CreateDynamicObject(1806, 656.58954, -78.36084, -79.94030, 0.00000, 0.00000, 0.00000);
  16179. CreateDynamicObject(1806, 652.16882, -78.36080, -79.94030, 0.00000, 0.00000, 0.00000);
  16180. CreateDynamicObject(1806, 647.68329, -78.36080, -79.94030, 0.00000, 0.00000, 0.00000);
  16181. CreateDynamicObject(2200, 644.01807, -117.68100, -79.94760, 0.00000, 0.00000, 90.00000);
  16182. CreateDynamicObject(2241, 632.39355, -112.72945, -79.46980, 0.00000, 0.00000, 0.00000);
  16183. CreateDynamicObject(14439, 643.75452, -95.91390, -69.81030, 0.00000, 0.00000, 0.00000);
  16184. CreateDynamicObject(14439, 663.96240, -95.91393, -69.81030, 0.00000, 0.00000, 0.00000);
  16185. CreateDynamicObject(14439, 633.82617, 80.82190, -69.81030, 0.00000, 0.00000, 0.00000);
  16186. CreateDynamicObject(19158, 631.93738, -95.46360, -83.49860, 0.00000, 0.00000, 0.00000);
  16187. CreateDynamicObject(19158, 652.39771, -95.46357, -83.49860, 0.00000, 0.00000, 0.00000);
  16188. CreateDynamicObject(2613, 650.15491, -117.48537, -79.91563, 0.00000, 0.00000, 0.00000);
  16189. CreateDynamicObject(2257, 661.79547, -103.99761, -76.41720, 0.00000, 40.00000, -90.00000);
  16190. CreateDynamicObject(2257, 661.80475, -86.74609, -76.41720, 0.00000, -40.00000, -90.00000);
  16191. CreateDynamicObject(2258, 635.58722, -73.23920, -76.56381, 0.00000, 0.00000, 0.00000);
  16192. CreateDynamicObject(2256, 644.01782, -77.68080, -76.56380, 0.00000, 0.00000, -90.00000);
  16193. CreateDynamicObject(2010, 629.73047, -109.00214, -79.91438, 0.00000, 0.00000, 0.00000);
  16194. CreateDynamicObject(2010, 626.11053, -80.70605, -79.91438, 0.00000, 0.00000, 0.00000);
  16195. CreateDynamicObject(2010, 643.97717, -82.38253, -79.91438, 0.00000, 0.00000, 0.00000);
  16196. CreateDynamicObject(2010, 662.51752, -106.49671, -78.38544, 0.00000, 0.00000, 0.00000);
  16197. CreateDynamicObject(2010, 662.41052, -85.78848, -78.38544, 0.00000, 0.00000, 0.00000);
  16198. //INTERIJER BOLNICE BY:MUMIN
  16199. CreateDynamicObjectEx(19325, -2282.10498, 116.04528, -6.33510, 90.00000, 0.00000, 90.18001, 600.000, 600.000 );
  16200. CreateDynamicObjectEx(19325, -2275.52295, 116.04869, -6.33510, 90.00000, 0.00000, 90.18001, 600.000, 600.000 );
  16201. CreateDynamicObjectEx(3961, -2285.31030, 130.30286, -4.36321, 0.00000, 0.00000, 90.66001, 600.000, 600.000 );
  16202. CreateDynamicObjectEx(1569, -2330.58301, 112.93484, -6.40223, 0.00000, 0.00000, -90.11999, 600.000, 600.000 );
  16203. CreateDynamicObjectEx(1569, -2330.57104, 109.95349, -6.40223, 0.00000, 0.00000, -269.82010, 600.000, 600.000 );
  16204. CreateDynamicObjectEx(948, -2330.26855, 109.30609, -6.40290, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16205. CreateDynamicObjectEx(948, -2330.29541, 113.56786, -6.40290, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16206. CreateDynamicObjectEx(955, -2323.70898, 99.48238, -6.01688, 0.00000, 0.00000, -178.56001, 600.000, 600.000 );
  16207. CreateDynamicObjectEx(18755, -2272.10547, 111.65658, -4.37645, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16208. CreateDynamicObjectEx(1671, -2320.76099, 113.19901, -5.88380, 0.00000, 0.00000, -89.76000, 600.000, 600.000 );
  16209. CreateDynamicObjectEx(1726, -2329.07813, 122.57433, -6.40811, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16210. CreateDynamicObjectEx(1727, -2326.52881, 122.55769, -6.40772, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16211. CreateDynamicObjectEx(1726, -2329.83130, 119.36741, -6.40811, 0.00000, 0.00000, 90.18001, 600.000, 600.000 );
  16212. CreateDynamicObjectEx(1726, -2329.71436, 100.69326, -6.40811, 0.00000, 0.00000, 90.18001, 600.000, 600.000 );
  16213. CreateDynamicObjectEx(1726, -2326.67969, 99.79217, -6.40811, 0.00000, 0.00000, -179.94009, 600.000, 600.000 );
  16214. CreateDynamicObjectEx(1727, -2325.07983, 99.81741, -6.40772, 0.00000, 0.00000, -179.40001, 600.000, 600.000 );
  16215. CreateDynamicObjectEx(955, -2324.11963, 123.20577, -6.01688, 0.00000, 0.00000, 0.41997, 600.000, 600.000 );
  16216. CreateDynamicObjectEx(1823, -2328.15112, 119.83789, -6.39688, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16217. CreateDynamicObjectEx(1823, -2328.02661, 101.31773, -6.39688, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16218. CreateDynamicObjectEx(1969, -2283.07227, 116.84062, -5.81654, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16219. CreateDynamicObjectEx(1984, -2280.94287, 123.64344, -6.33649, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16220. CreateDynamicObjectEx(1969, -2283.06006, 117.66077, -5.81654, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16221. CreateDynamicObjectEx(1969, -2283.04883, 118.50089, -5.81654, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16222. CreateDynamicObjectEx(1969, -2283.04321, 119.33660, -5.81654, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16223. CreateDynamicObjectEx(1969, -2283.03442, 120.17873, -5.81654, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16224. CreateDynamicObjectEx(1969, -2283.02588, 121.02080, -5.81654, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16225. CreateDynamicObjectEx(2372, -2290.68164, 92.00401, -6.30313, 0.00000, 0.00000, -89.76001, 600.000, 600.000 );
  16226. CreateDynamicObjectEx(2372, -2287.70044, 91.98628, -6.30313, 0.00000, 0.00000, -89.76001, 600.000, 600.000 );
  16227. CreateDynamicObjectEx(2378, -2289.51831, 91.95734, -5.74177, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16228. CreateDynamicObjectEx(2378, -2290.16138, 91.95860, -5.74177, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16229. CreateDynamicObjectEx(2374, -2286.86230, 91.94845, -5.71057, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16230. CreateDynamicObjectEx(2374, -2287.86182, 91.91426, -5.71057, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16231. CreateDynamicObjectEx(2568, -2306.46973, 121.37341, -6.40023, 0.00000, 0.00000, -90.05998, 600.000, 600.000 );
  16232. CreateDynamicObjectEx(2568, -2306.48364, 104.09891, -6.40023, 0.00000, 0.00000, -90.05998, 600.000, 600.000 );
  16233. CreateDynamicObjectEx(2811, -2306.53638, 116.38536, -6.40610, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16234. CreateDynamicObjectEx(2811, -2306.59521, 105.86118, -6.40610, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16235. CreateDynamicObjectEx(2819, -2287.69775, 90.53571, -6.30606, 0.00000, 0.00000, 26.52000, 600.000, 600.000 );
  16236. CreateDynamicObjectEx(2819, -2289.57544, 91.32547, -6.30606, 0.00000, 0.00000, -53.04000, 600.000, 600.000 );
  16237. CreateDynamicObjectEx(2816, -2327.69849, 120.37637, -5.90266, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16238. CreateDynamicObjectEx(2862, -2283.08618, 119.35001, -5.56019, 0.00000, 0.00000, -77.16000, 600.000, 600.000 );
  16239. CreateDynamicObjectEx(2862, -2283.11670, 118.30354, -5.56019, 0.00000, 0.00000, -77.16000, 600.000, 600.000 );
  16240. CreateDynamicObjectEx(2894, -2322.12305, 109.90666, -5.28146, 0.00000, 0.00000, 90.30000, 600.000, 600.000 );
  16241. CreateDynamicObjectEx(16101, -2322.29810, 114.57059, -5.50658, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16242. CreateDynamicObjectEx(16101, -2322.22290, 107.85686, -5.50658, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16243. CreateDynamicObjectEx(16101, -2321.90967, 115.04766, -5.50658, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16244. CreateDynamicObjectEx(16101, -2321.87598, 107.35921, -5.50658, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16245. CreateDynamicObjectEx(1991, -2284.35107, 124.63752, -6.33295, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16246. CreateDynamicObjectEx(1996, -2283.36108, 124.61852, -6.33266, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16247. CreateDynamicObjectEx(2637, -2275.63281, 116.87468, -5.94136, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16248. CreateDynamicObjectEx(2636, -2274.90796, 117.59969, -5.72007, 0.00000, 0.00000, 89.82001, 600.000, 600.000 );
  16249. CreateDynamicObjectEx(2636, -2275.99512, 118.20351, -5.72007, 0.00000, 0.00000, 89.82001, 600.000, 600.000 );
  16250. CreateDynamicObjectEx(2636, -2277.49072, 116.67051, -5.72007, 0.00000, 0.00000, 206.04004, 600.000, 600.000 );
  16251. CreateDynamicObjectEx(2637, -2275.54785, 121.03192, -5.94136, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16252. CreateDynamicObjectEx(2636, -2274.96777, 120.31150, -5.72007, 0.00000, 0.00000, 269.94006, 600.000, 600.000 );
  16253. CreateDynamicObjectEx(2636, -2275.96899, 120.30746, -5.72007, 0.00000, 0.00000, 269.94006, 600.000, 600.000 );
  16254. CreateDynamicObjectEx(2636, -2274.91235, 121.90043, -5.72007, 0.00000, 0.00000, 89.82001, 600.000, 600.000 );
  16255. CreateDynamicObjectEx(2636, -2276.07739, 121.88678, -5.72007, 0.00000, 0.00000, 89.82001, 600.000, 600.000 );
  16256. CreateDynamicObjectEx(2848, -2275.99170, 117.09966, -5.51721, 0.00000, 0.00000, 149.81998, 600.000, 600.000 );
  16257. CreateDynamicObjectEx(2849, -2275.15088, 120.95564, -5.51900, 0.00000, 0.00000, 151.26004, 600.000, 600.000 );
  16258. CreateDynamicObjectEx(2863, -2275.96948, 120.91871, -5.51589, 0.00000, 0.00000, 32.58000, 600.000, 600.000 );
  16259. CreateDynamicObjectEx(2849, -2283.06201, 117.23722, -5.56056, 0.00000, 0.00000, 70.38000, 600.000, 600.000 );
  16260. CreateDynamicObjectEx(2849, -2283.03442, 120.40697, -5.56056, 0.00000, 0.00000, 70.38000, 600.000, 600.000 );
  16261. CreateDynamicObjectEx(11729, -2286.53052, 88.00983, -6.30408, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16262. CreateDynamicObjectEx(2372, -2285.85010, 90.70724, -6.30313, 0.00000, 0.00000, -180.59995, 600.000, 600.000 );
  16263. CreateDynamicObjectEx(11729, -2287.19165, 88.01793, -6.30408, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16264. CreateDynamicObjectEx(11729, -2287.85303, 88.02603, -6.30408, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16265. CreateDynamicObjectEx(11730, -2288.50903, 88.03293, -6.30304, 0.00000, 0.00000, -178.92003, 600.000, 600.000 );
  16266. CreateDynamicObjectEx(11729, -2289.15479, 88.04016, -6.30408, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16267. CreateDynamicObjectEx(11730, -2291.25073, 88.05096, -6.30304, 0.00000, 0.00000, -178.92003, 600.000, 600.000 );
  16268. CreateDynamicObjectEx(11729, -2291.91846, 88.07747, -6.30408, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16269. CreateDynamicObjectEx(11729, -2292.57983, 88.09290, -6.30408, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16270. CreateDynamicObjectEx(11730, -2293.21265, 88.05804, -6.30304, 0.00000, 0.00000, -178.92003, 600.000, 600.000 );
  16271. CreateDynamicObjectEx(11729, -2293.87988, 88.08451, -6.30408, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16272. CreateDynamicObjectEx(2009, -2304.83667, 123.41080, -6.34654, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16273. CreateDynamicObjectEx(2009, -2294.38647, 123.56502, -6.34654, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16274. CreateDynamicObjectEx(2009, -2295.87231, 98.58851, -6.34654, 0.00000, 0.00000, -179.75998, 600.000, 600.000 );
  16275. CreateDynamicObjectEx(2009, -2286.04419, 98.61220, -6.34654, 0.00000, 0.00000, -179.75998, 600.000, 600.000 );
  16276. CreateDynamicObjectEx(1789, -2298.48413, 103.75146, -5.93974, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16277. CreateDynamicObjectEx(2596, -2295.99683, 97.38039, -5.06379, 0.00000, 0.00000, 178.13989, 600.000, 600.000 );
  16278. CreateDynamicObjectEx(14532, -2298.04492, 101.34541, -5.37237, 0.00000, 0.00000, 51.90000, 600.000, 600.000 );
  16279. CreateDynamicObjectEx(3394, -2295.97656, 102.83901, -6.34567, 0.00000, 0.00000, 0.48000, 600.000, 600.000 );
  16280. CreateDynamicObjectEx(3394, -2298.99219, 105.74705, -6.34567, 0.00000, 0.00000, 89.58001, 600.000, 600.000 );
  16281. CreateDynamicObjectEx(2007, -2298.83960, 97.53035, -6.34797, 0.00000, 0.00000, -180.60004, 600.000, 600.000 );
  16282. CreateDynamicObjectEx(2007, -2299.81982, 97.54817, -6.34797, 0.00000, 0.00000, -180.60004, 600.000, 600.000 );
  16283. CreateDynamicObjectEx(2007, -2300.81934, 97.57800, -6.34797, 0.00000, 0.00000, -180.60004, 600.000, 600.000 );
  16284. CreateDynamicObjectEx(2132, -2302.13257, 97.53699, -6.34514, 0.00000, 0.00000, 179.46004, 600.000, 600.000 );
  16285. CreateDynamicObjectEx(2146, -2299.72510, 102.44625, -5.91432, 0.00000, 0.00000, 90.36001, 600.000, 600.000 );
  16286. CreateDynamicObjectEx(3396, -2305.13208, 101.65192, -6.34561, 0.00000, 0.00000, -179.51997, 600.000, 600.000 );
  16287. CreateDynamicObjectEx(2611, -2295.47607, 98.54935, -4.56569, 0.00000, 0.00000, -89.99997, 600.000, 600.000 );
  16288. CreateDynamicObjectEx(2133, -2304.13257, 97.55643, -6.34665, 0.00000, 0.00000, -180.89990, 600.000, 600.000 );
  16289. CreateDynamicObjectEx(2133, -2305.15674, 97.57429, -6.34665, 0.00000, 0.00000, -180.89990, 600.000, 600.000 );
  16290. CreateDynamicObjectEx(2131, -2285.54541, 100.60732, -6.34765, 0.00000, 0.00000, -90.11999, 600.000, 600.000 );
  16291. CreateDynamicObjectEx(11738, -2298.33862, 103.75805, -5.51516, 0.00000, 0.00000, -89.04002, 600.000, 600.000 );
  16292. CreateDynamicObjectEx(11736, -2298.59668, 103.77932, -5.52650, 0.00000, 0.00000, -84.00000, 600.000, 600.000 );
  16293. CreateDynamicObjectEx(11736, -2295.76221, 98.53619, -5.53405, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16294. CreateDynamicObjectEx(1671, -2297.67041, 98.62017, -5.88380, 0.00000, 0.00000, 88.32000, 600.000, 600.000 );
  16295. CreateDynamicObjectEx(2131, -2285.56763, 102.60718, -6.34765, 0.00000, 0.00000, -90.11999, 600.000, 600.000 );
  16296. CreateDynamicObjectEx(3396, -2294.67578, 99.38212, -6.34561, 0.00000, 0.00000, -179.51997, 600.000, 600.000 );
  16297. CreateDynamicObjectEx(3394, -2294.65869, 102.92637, -6.34567, 0.00000, 0.00000, 179.88004, 600.000, 600.000 );
  16298. CreateDynamicObjectEx(3396, -2292.29321, 105.65569, -6.34561, 0.00000, 0.00000, -269.81989, 600.000, 600.000 );
  16299. CreateDynamicObjectEx(2007, -2287.98584, 97.56025, -6.34797, 0.00000, 0.00000, -180.60004, 600.000, 600.000 );
  16300. CreateDynamicObjectEx(2007, -2288.97925, 97.59782, -6.34797, 0.00000, 0.00000, -180.60004, 600.000, 600.000 );
  16301. CreateDynamicObjectEx(2132, -2289.98877, 97.50880, -6.34514, 0.00000, 0.00000, 180.24002, 600.000, 600.000 );
  16302. CreateDynamicObjectEx(2133, -2291.97119, 97.50755, -6.34665, 0.00000, 0.00000, -180.89990, 600.000, 600.000 );
  16303. CreateDynamicObjectEx(2131, -2289.89258, 105.81284, -7.95152, 0.00000, 0.00000, 0.54001, 600.000, 600.000 );
  16304. CreateDynamicObjectEx(2146, -2291.14282, 101.17521, -5.91432, 0.00000, 0.00000, 180.30000, 600.000, 600.000 );
  16305. CreateDynamicObjectEx(14532, -2290.02930, 99.36216, -5.37237, 0.00000, 0.00000, 22.92000, 600.000, 600.000 );
  16306. CreateDynamicObjectEx(1789, -2292.57251, 100.41419, -5.93974, 0.00000, 0.00000, -90.17999, 600.000, 600.000 );
  16307. CreateDynamicObjectEx(11738, -2292.59619, 100.16084, -5.51516, 0.00000, 0.00000, -89.04002, 600.000, 600.000 );
  16308. CreateDynamicObjectEx(11736, -2292.57104, 100.46773, -5.52650, 0.00000, 0.00000, -20.64000, 600.000, 600.000 );
  16309. CreateDynamicObjectEx(3394, -2296.08179, 122.50771, -6.34567, 0.00000, 0.00000, 0.48000, 600.000, 600.000 );
  16310. CreateDynamicObjectEx(3396, -2296.08521, 118.98179, -6.34561, 0.00000, 0.00000, -0.05999, 600.000, 600.000 );
  16311. CreateDynamicObjectEx(2007, -2302.66187, 124.70490, -6.34797, 0.00000, 0.00000, -360.12003, 600.000, 600.000 );
  16312. CreateDynamicObjectEx(2007, -2301.66089, 124.70044, -6.34797, 0.00000, 0.00000, -360.12003, 600.000, 600.000 );
  16313. CreateDynamicObjectEx(2007, -2300.68042, 124.67647, -6.34797, 0.00000, 0.00000, -360.12003, 600.000, 600.000 );
  16314. CreateDynamicObjectEx(2132, -2299.65015, 124.81016, -6.34514, 0.00000, 0.00000, 359.76004, 600.000, 600.000 );
  16315. CreateDynamicObjectEx(2131, -2297.67065, 124.85100, -7.95152, 0.00000, 0.00000, 0.54001, 600.000, 600.000 );
  16316. CreateDynamicObjectEx(2131, -2305.27393, 121.15666, -6.34765, 0.00000, 0.00000, -270.23978, 600.000, 600.000 );
  16317. CreateDynamicObjectEx(2131, -2305.27100, 119.15028, -7.98221, 0.00000, 0.00000, -270.23978, 600.000, 600.000 );
  16318. CreateDynamicObjectEx(3394, -2298.62988, 116.67968, -6.34567, 0.00000, 0.00000, -90.00000, 600.000, 600.000 );
  16319. CreateDynamicObjectEx(2133, -2300.97974, 116.56272, -6.34665, 0.00000, 0.00000, -180.89990, 600.000, 600.000 );
  16320. CreateDynamicObjectEx(2146, -2299.55176, 120.74281, -5.91432, 0.00000, 0.00000, 90.36001, 600.000, 600.000 );
  16321. CreateDynamicObjectEx(14532, -2297.81616, 119.24883, -5.37237, 0.00000, 0.00000, 46.62000, 600.000, 600.000 );
  16322. CreateDynamicObjectEx(1789, -2299.36279, 122.42319, -5.93974, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16323. CreateDynamicObjectEx(11738, -2299.35767, 122.42834, -5.51516, 0.00000, 0.00000, -149.09998, 600.000, 600.000 );
  16324. CreateDynamicObjectEx(11736, -2300.97754, 116.45336, -5.29504, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16325. CreateDynamicObjectEx(2131, -2292.24756, 124.65993, -6.34765, 0.00000, 0.00000, -359.93982, 600.000, 600.000 );
  16326. CreateDynamicObjectEx(2131, -2290.22900, 124.73215, -7.95152, 0.00000, 0.00000, 0.54001, 600.000, 600.000 );
  16327. CreateDynamicObjectEx(2132, -2288.19653, 124.61774, -6.34514, 0.00000, 0.00000, 359.76004, 600.000, 600.000 );
  16328. CreateDynamicObjectEx(2133, -2286.21387, 124.59200, -6.34665, 0.00000, 0.00000, -359.57977, 600.000, 600.000 );
  16329. CreateDynamicObjectEx(3396, -2285.58154, 121.69205, -6.34561, 0.00000, 0.00000, -0.05999, 600.000, 600.000 );
  16330. CreateDynamicObjectEx(3396, -2290.28003, 116.79617, -6.34561, 0.00000, 0.00000, -89.94001, 600.000, 600.000 );
  16331. CreateDynamicObjectEx(2131, -2292.77954, 116.55872, -6.34765, 0.00000, 0.00000, -180.53999, 600.000, 600.000 );
  16332. CreateDynamicObjectEx(2007, -2294.89331, 122.53651, -6.34797, 0.00000, 0.00000, -269.81998, 600.000, 600.000 );
  16333. CreateDynamicObjectEx(2007, -2294.86108, 121.52983, -6.34797, 0.00000, 0.00000, -269.81998, 600.000, 600.000 );
  16334. CreateDynamicObjectEx(3396, -2294.87622, 119.07451, -6.34561, 0.00000, 0.00000, -180.42000, 600.000, 600.000 );
  16335. CreateDynamicObjectEx(2146, -2291.23828, 119.95589, -5.91432, 0.00000, 0.00000, 90.36001, 600.000, 600.000 );
  16336. CreateDynamicObjectEx(14532, -2292.77710, 118.64944, -5.37237, 0.00000, 0.00000, -42.84003, 600.000, 600.000 );
  16337. CreateDynamicObjectEx(1789, -2291.67480, 121.35912, -5.93974, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16338. CreateDynamicObjectEx(11738, -2291.78979, 121.38389, -5.51516, 0.00000, 0.00000, -149.09998, 600.000, 600.000 );
  16339. CreateDynamicObjectEx(11736, -2294.59937, 118.85513, -5.29504, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16340. CreateDynamicObjectEx(11736, -2289.83228, 117.26783, -5.29504, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16341. CreateDynamicObjectEx(11738, -2291.91016, 124.62045, -3.85432, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16342. CreateDynamicObjectEx(2611, -2286.49951, 97.13218, -4.56569, 0.00000, 0.00000, -180.78000, 600.000, 600.000 );
  16343. CreateDynamicObjectEx(2611, -2305.56885, 123.97935, -4.56569, 0.00000, 0.00000, -268.97998, 600.000, 600.000 );
  16344. CreateDynamicObjectEx(2611, -2295.27271, 124.15649, -4.56569, 0.00000, 0.00000, -269.87994, 600.000, 600.000 );
  16345. CreateDynamicObjectEx(1796, -2274.99292, 105.14752, -6.33085, 0.00000, 0.00000, -90.24000, 600.000, 600.000 );
  16346. CreateDynamicObjectEx(2435, -2271.84692, 103.33812, -6.33417, 0.00000, 0.00000, -89.70001, 600.000, 600.000 );
  16347. CreateDynamicObjectEx(1796, -2274.95752, 101.98156, -6.33085, 0.00000, 0.00000, -90.24000, 600.000, 600.000 );
  16348. CreateDynamicObjectEx(2435, -2271.84473, 100.09781, -6.33417, 0.00000, 0.00000, -89.70001, 600.000, 600.000 );
  16349. CreateDynamicObjectEx(1796, -2275.04858, 98.75821, -6.33085, 0.00000, 0.00000, -90.24000, 600.000, 600.000 );
  16350. CreateDynamicObjectEx(2435, -2271.89014, 97.31003, -6.33417, 0.00000, 0.00000, -89.70001, 600.000, 600.000 );
  16351. CreateDynamicObjectEx(1796, -2277.19336, 101.67596, -6.33085, 0.00000, 0.00000, 89.81998, 600.000, 600.000 );
  16352. CreateDynamicObjectEx(2435, -2280.27319, 100.18656, -6.33417, 0.00000, 0.00000, -270.66019, 600.000, 600.000 );
  16353. CreateDynamicObjectEx(1796, -2277.19531, 98.54158, -6.33085, 0.00000, 0.00000, 89.81998, 600.000, 600.000 );
  16354. CreateDynamicObjectEx(2435, -2280.13940, 97.25288, -6.33417, 0.00000, 0.00000, -270.66019, 600.000, 600.000 );
  16355. CreateDynamicObjectEx(1796, -2277.06030, 89.53638, -6.33085, 0.00000, 0.00000, 89.81998, 600.000, 600.000 );
  16356. CreateDynamicObjectEx(2435, -2280.18994, 88.16255, -6.33417, 0.00000, 0.00000, -269.82022, 600.000, 600.000 );
  16357. CreateDynamicObjectEx(1796, -2277.02295, 94.75317, -6.33085, 0.00000, 0.00000, 89.81998, 600.000, 600.000 );
  16358. CreateDynamicObjectEx(2435, -2280.15332, 96.12663, -6.33417, 0.00000, 0.00000, -269.82022, 600.000, 600.000 );
  16359. CreateDynamicObjectEx(1796, -2274.92700, 95.97235, -6.33085, 0.00000, 0.00000, -90.24000, 600.000, 600.000 );
  16360. CreateDynamicObjectEx(2435, -2271.86035, 94.27914, -6.33417, 0.00000, 0.00000, -89.70001, 600.000, 600.000 );
  16361. CreateDynamicObjectEx(1796, -2275.13672, 92.34847, -6.33085, 0.00000, 0.00000, -90.24000, 600.000, 600.000 );
  16362. CreateDynamicObjectEx(2435, -2271.77930, 90.80006, -6.33417, 0.00000, 0.00000, -89.70001, 600.000, 600.000 );
  16363. CreateDynamicObjectEx(1796, -2275.20410, 89.26386, -6.33085, 0.00000, 0.00000, -90.24000, 600.000, 600.000 );
  16364. CreateDynamicObjectEx(2435, -2271.76636, 87.71861, -6.33417, 0.00000, 0.00000, -89.70001, 600.000, 600.000 );
  16365. CreateDynamicObjectEx(3657, -2300.69409, 115.42684, -5.79941, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16366. CreateDynamicObjectEx(3657, -2289.81592, 115.43839, -5.79941, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16367. CreateDynamicObjectEx(3657, -2290.12061, 106.92603, -5.79941, 0.00000, 0.00000, -180.47997, 600.000, 600.000 );
  16368. CreateDynamicObjectEx(3657, -2300.84619, 106.90402, -5.79941, 0.00000, 0.00000, -180.47997, 600.000, 600.000 );
  16369. CreateDynamicObjectEx(3657, -2278.40137, 106.78431, -5.79941, 0.00000, 0.00000, -180.47997, 600.000, 600.000 );
  16370. CreateDynamicObjectEx(3657, -2281.26270, 101.48454, -5.79941, 0.00000, 0.00000, -89.75991, 600.000, 600.000 );
  16371. CreateDynamicObjectEx(3657, -2281.31104, 95.96449, -5.79941, 0.00000, 0.00000, -89.75991, 600.000, 600.000 );
  16372. CreateDynamicObjectEx(19325, -2322.28345, 111.19276, -2.40092, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16373. CreateDynamicObjectEx(19325, -2319.86108, 115.07748, -3.69217, 90.00000, 0.00000, -90.12000, 600.000, 600.000 );
  16374. CreateDynamicObjectEx(19325, -2319.79761, 107.32031, -3.69217, 90.00000, 0.00000, -90.12000, 600.000, 600.000 );
  16375. CreateDynamicObjectEx(1671, -2320.96362, 109.95673, -5.88380, 0.00000, 0.00000, -89.76000, 600.000, 600.000 );
  16376. CreateDynamicObjectEx(2163, -2317.89136, 114.02280, -6.33138, 0.00000, 0.00000, -90.06000, 600.000, 600.000 );
  16377. CreateDynamicObjectEx(2163, -2317.81616, 109.13745, -6.33138, 0.00000, 0.00000, -90.06000, 600.000, 600.000 );
  16378. CreateDynamicObjectEx(2165, -2321.31909, 112.57909, -6.36983, 0.00000, 0.00000, 90.12000, 600.000, 600.000 );
  16379. CreateDynamicObjectEx(2165, -2320.39746, 108.21793, -6.36983, 0.00000, 0.00000, 179.16000, 600.000, 600.000 );
  16380. CreateDynamicObjectEx(14902, -2326.99756, 108.73672, -6.00288, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16381. CreateDynamicObjectEx(14902, -2326.82153, 84.19997, -6.00288, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16382. CreateDynamicObjectEx(14902, -2315.71826, 88.22794, -6.00288, 0.00000, 0.00000, 90.05999, 600.000, 600.000 );
  16383. CreateDynamicObjectEx(14902, -2345.46802, 134.41643, -6.00288, 0.00000, 0.00000, 270.00000, 600.000, 600.000 );
  16384. CreateDynamicObjectEx(1823, -2295.86401, 115.03737, -6.39688, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16385. CreateDynamicObjectEx(1721, -2297.04565, 115.57928, -6.33434, 0.00000, 0.00000, -179.87988, 600.000, 600.000 );
  16386. CreateDynamicObjectEx(1721, -2297.66772, 115.56859, -6.33434, 0.00000, 0.00000, -179.87988, 600.000, 600.000 );
  16387. CreateDynamicObjectEx(1721, -2293.68896, 115.62017, -6.33434, 0.00000, 0.00000, -179.87988, 600.000, 600.000 );
  16388. CreateDynamicObjectEx(1721, -2293.06396, 115.60983, -6.33434, 0.00000, 0.00000, -179.87988, 600.000, 600.000 );
  16389. CreateDynamicObjectEx(1823, -2296.11255, 106.43763, -6.39688, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16390. CreateDynamicObjectEx(1721, -2293.10889, 106.70907, -6.33434, 0.00000, 0.00000, -360.77997, 600.000, 600.000 );
  16391. CreateDynamicObjectEx(1721, -2293.77808, 106.71681, -6.33434, 0.00000, 0.00000, -360.77997, 600.000, 600.000 );
  16392. CreateDynamicObjectEx(1721, -2297.13794, 106.69180, -6.33434, 0.00000, 0.00000, -360.77997, 600.000, 600.000 );
  16393. CreateDynamicObjectEx(1721, -2297.79858, 106.68490, -6.33434, 0.00000, 0.00000, -360.77997, 600.000, 600.000 );
  16394. CreateDynamicObjectEx(1721, -2276.03955, 106.56683, -6.33434, 0.00000, 0.00000, -360.77997, 600.000, 600.000 );
  16395. CreateDynamicObjectEx(1721, -2275.31812, 106.55317, -6.33434, 0.00000, 0.00000, -360.77997, 600.000, 600.000 );
  16396. CreateDynamicObjectEx(2069, -2271.66455, 100.87299, -6.32233, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16397. CreateDynamicObjectEx(2069, -2271.70117, 97.86909, -6.32233, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16398. CreateDynamicObjectEx(2069, -2271.62988, 104.13335, -6.32233, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16399. CreateDynamicObjectEx(2069, -2280.27612, 97.88002, -6.32233, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16400. CreateDynamicObjectEx(2069, -2280.37524, 100.94157, -6.32233, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16401. CreateDynamicObjectEx(2069, -2280.25098, 95.52490, -6.32233, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16402. CreateDynamicObjectEx(2069, -2280.20142, 88.83647, -6.32233, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16403. CreateDynamicObjectEx(2069, -2271.78125, 88.35712, -6.32233, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16404. CreateDynamicObjectEx(2069, -2271.83569, 91.41689, -6.32233, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16405. CreateDynamicObjectEx(2069, -2271.86475, 94.98038, -6.32233, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16406. CreateDynamicObjectEx(2245, -2327.51074, 101.84623, -5.67118, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16407. CreateDynamicObjectEx(2241, -2281.15820, 106.57458, -5.85025, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16408. CreateDynamicObjectEx(2241, -2274.63794, 115.27674, -5.85025, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16409. CreateDynamicObjectEx(948, -2317.39160, 106.61372, -6.40290, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16410. CreateDynamicObjectEx(948, -2317.35083, 115.66202, -6.40290, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16411. CreateDynamicObjectEx(2241, -2284.43018, 91.69456, -5.85025, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16412. CreateDynamicObjectEx(2267, -2282.97070, 91.07401, -4.70970, 0.00000, 0.00000, -179.57997, 600.000, 600.000 );
  16413. CreateDynamicObjectEx(19464, -2284.56519, 137.22704, -5.76351, 0.00000, 0.00000, -89.94002, 600.000, 600.000 );
  16414. new interijerbolnice[16];
  16415. interijerbolnice[0] = CreateDynamicObjectEx(19375, -2305.89844, 120.75169, -6.39870, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16416. interijerbolnice[1] = CreateDynamicObjectEx(19375, -2305.90259, 101.68427, -6.39870, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16417. interijerbolnice[2] = CreateDynamicObjectEx(19375, -2310.76880, 98.97707, -6.39870, 0.00000, 0.00000, 89.99998, 600.000, 600.000 );
  16418. interijerbolnice[3] = CreateDynamicObjectEx(19375, -2316.55078, 98.94240, -6.39870, 0.00000, 0.00000, 89.99998, 600.000, 600.000 );
  16419. interijerbolnice[4] = CreateDynamicObjectEx(19375, -2326.96411, 99.01592, -6.39870, 0.00000, 0.00000, 89.99998, 600.000, 600.000 );
  16420. interijerbolnice[5] = CreateDynamicObjectEx(19375, -2330.67236, 101.74663, -6.39870, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16421. interijerbolnice[6] = CreateDynamicObjectEx(19375, -2330.65210, 98.52275, -6.39870, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16422. interijerbolnice[7] = CreateDynamicObjectEx(19375, -2330.69604, 111.18682, -6.39870, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16423. interijerbolnice[8] = CreateDynamicObjectEx(19375, -2330.69629, 120.62688, -6.39870, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16424. interijerbolnice[9] = CreateDynamicObjectEx(19375, -2330.67749, 124.17667, -6.39870, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16425. interijerbolnice[10] = CreateDynamicObjectEx(19375, -2327.21191, 123.63595, -6.39870, 0.00000, 0.00000, 89.99998, 600.000, 600.000 );
  16426. interijerbolnice[11] = CreateDynamicObjectEx(19375, -2316.40356, 123.68134, -6.39870, 0.00000, 0.00000, 89.99998, 600.000, 600.000 );
  16427. interijerbolnice[12] = CreateDynamicObjectEx(19375, -2310.68115, 123.68867, -6.39870, 0.00000, 0.00000, 89.99998, 600.000, 600.000 );
  16428. interijerbolnice[13] = CreateDynamicObjectEx(19375, -2325.87256, 98.95345, -6.39870, 0.00000, 0.00000, 89.99998, 600.000, 600.000 );
  16429. interijerbolnice[14] = CreateDynamicObjectEx(19375, -2325.84888, 123.69380, -6.39870, 0.00000, 0.00000, 89.99998, 600.000, 600.000 );
  16430. interijerbolnice[15] = CreateDynamicObjectEx(19375, -2305.90991, 111.18351, 2.21916, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16431. for(new i = 0; i < sizeof(interijerbolnice); i++)
  16432. {
  16433. SetDynamicObjectMaterial(interijerbolnice[i], 0, 14847, "mp_policesf", "mp_cop_marble");
  16434. }
  16435. new interijerbolnice1[2];
  16436. interijerbolnice1[0] = CreateDynamicObjectEx(18981, -2318.37036, 111.31787, -6.89421, 0.00000, 90.00000, 0.00000, 600.000, 600.000 );
  16437. for(new i = 0; i < sizeof(interijerbolnice1); i++)
  16438. {
  16439. SetDynamicObjectMaterial(interijerbolnice1[i], 0, 14771, "int_brothelint3", "GB_nastybar12" );
  16440. }
  16441. new interijerbolnice2[8];
  16442. interijerbolnice2[0] = CreateDynamicObjectEx(19377, -2317.47705, 111.17188, -6.41957, 0.00000, 90.00000, 0.00000, 600.000, 600.000 );
  16443. interijerbolnice2[1] = CreateDynamicObjectEx(19377, -2306.97412, 111.15853, -6.41957, 0.00000, 90.00000, 0.00000, 600.000, 600.000 );
  16444. interijerbolnice2[2] = CreateDynamicObjectEx(19377, -2296.47681, 111.15432, -6.41957, 0.00000, 90.00000, 0.00000, 600.000, 600.000 );
  16445. interijerbolnice2[3] = CreateDynamicObjectEx(19377, -2285.99756, 111.14565, -6.41957, 0.00000, 90.00000, 0.00000, 600.000, 600.000 );
  16446. interijerbolnice2[4] = CreateDynamicObjectEx(19377, -2275.51636, 111.13313, -6.41957, 0.00000, 90.00000, 0.00000, 600.000, 600.000 );
  16447. interijerbolnice2[5] = CreateDynamicObjectEx(19377, -2279.82153, 101.51434, -6.41957, 0.00000, 90.00000, 0.00000, 600.000, 600.000 );
  16448. interijerbolnice2[6] = CreateDynamicObjectEx(19377, -2279.81787, 91.88251, -6.41957, 0.00000, 90.00000, 0.00000, 600.000, 600.000 );
  16449. interijerbolnice2[7] = CreateDynamicObjectEx(19377, -2290.31421, 92.08973, -6.41957, 0.00000, 90.00000, 0.00000, 600.000, 600.000 );
  16450. for(new i = 0; i < sizeof(interijerbolnice2); i++)
  16451. {
  16452. SetDynamicObjectMaterial(interijerbolnice2[i], 0, 14815, "whore_main", "Strip_Ceiling");
  16453. }
  16454. new interijerbolnice3[8];
  16455. interijerbolnice3[0] = CreateDynamicObjectEx(19378, -2300.62109, 120.67104, -6.43269, 0.00000, 90.00000, 0.00000, 600.000, 600.000 );
  16456. interijerbolnice3[1] = CreateDynamicObjectEx(19378, -2290.12451, 120.68269, -6.43269, 0.00000, 90.00000, 0.00000, 600.000, 600.000 );
  16457. interijerbolnice3[2] = CreateDynamicObjectEx(19377, -2279.60645, 120.74976, -6.41957, 0.00000, 90.00000, 0.00000, 600.000, 600.000 );
  16458. interijerbolnice3[3] = CreateDynamicObjectEx(19378, -2300.60400, 101.66847, -6.43269, 0.00000, 90.00000, 0.00000, 600.000, 600.000 );
  16459. interijerbolnice3[4] = CreateDynamicObjectEx(19378, -2290.13550, 101.67496, -6.43269, 0.00000, 90.00000, 0.00000, 600.000, 600.000 );
  16460. interijerbolnice3[5] = CreateDynamicObjectEx(19378, -2275.50610, 101.49702, -6.41527, 0.00000, 90.00000, 0.00000, 600.000, 600.000 );
  16461. interijerbolnice3[6] = CreateDynamicObjectEx(19378, -2275.50537, 91.87841, -6.41527, 0.00000, 90.00000, 0.00000, 600.000, 600.000 );
  16462. interijerbolnice3[7] = CreateDynamicObjectEx(19378, -2290.28442, 88.27329, -6.39011, 0.00000, 90.00000, 0.00000, 600.000, 600.000 );
  16463. for(new i = 0; i < sizeof(interijerbolnice3); i++)
  16464. {
  16465. SetDynamicObjectMaterial(interijerbolnice3[i], 0, 14777, "int_casinoint3", "GB_midbar05" );
  16466. }
  16467. new interijerbolnice4[49];
  16468. interijerbolnice4[0] = CreateDynamicObjectEx(19387, -2304.22949, 116.03176, -4.64799, 0.00000, 0.00000, -90.12000, 600.000, 600.000 );
  16469. interijerbolnice4[1] = CreateDynamicObjectEx(19450, -2295.41870, 120.82530, -4.64436, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16470. interijerbolnice4[2] = CreateDynamicObjectEx(19450, -2297.87695, 116.03960, -4.64436, 0.00000, 0.00000, -89.93999, 600.000, 600.000 );
  16471. interijerbolnice4[3] = CreateDynamicObjectEx(19387, -2286.42505, 116.04211, -4.64799, 0.00000, 0.00000, -90.12000, 600.000, 600.000 );
  16472. interijerbolnice4[4] = CreateDynamicObjectEx(19450, -2292.72632, 116.04372, -4.64436, 0.00000, 0.00000, -90.05999, 600.000, 600.000 );
  16473. interijerbolnice4[5] = CreateDynamicObjectEx(19450, -2301.09204, 125.22569, -4.64436, 0.00000, 0.00000, -89.93999, 600.000, 600.000 );
  16474. interijerbolnice4[6] = CreateDynamicObjectEx(19450, -2291.58936, 125.22132, -4.64436, 0.00000, 0.00000, -89.93999, 600.000, 600.000 );
  16475. interijerbolnice4[7] = CreateDynamicObjectEx(19450, -2288.96191, 125.23438, -4.64436, 0.00000, 0.00000, -89.93999, 600.000, 600.000 );
  16476. interijerbolnice4[8] = CreateDynamicObjectEx(19450, -2284.92993, 120.82417, -4.64436, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16477. interijerbolnice4[9] = CreateDynamicObjectEx(19387, -2304.26318, 106.36894, -4.64799, 0.00000, 0.00000, -90.12000, 600.000, 600.000 );
  16478. interijerbolnice4[10] = CreateDynamicObjectEx(19450, -2297.88721, 106.38058, -4.64436, 0.00000, 0.00000, -89.93999, 600.000, 600.000 );
  16479. interijerbolnice4[11] = CreateDynamicObjectEx(19387, -2286.54419, 106.38430, -4.64799, 0.00000, 0.00000, -90.12000, 600.000, 600.000 );
  16480. interijerbolnice4[12] = CreateDynamicObjectEx(19450, -2292.78320, 106.37524, -4.64436, 0.00000, 0.00000, -89.93999, 600.000, 600.000 );
  16481. interijerbolnice4[13] = CreateDynamicObjectEx(19450, -2295.32544, 101.61089, -4.64436, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16482. interijerbolnice4[14] = CreateDynamicObjectEx(19450, -2285.04834, 101.64211, -4.64436, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16483. interijerbolnice4[15] = CreateDynamicObjectEx(19450, -2305.80151, 101.47264, -4.64436, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16484. interijerbolnice4[16] = CreateDynamicObjectEx(19450, -2305.73853, 120.81903, -4.64436, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16485. interijerbolnice4[17] = CreateDynamicObjectEx(19450, -2301.13989, 96.98751, -4.64436, 0.00000, 0.00000, -89.93999, 600.000, 600.000 );
  16486. interijerbolnice4[18] = CreateDynamicObjectEx(19450, -2291.75659, 96.99726, -4.64436, 0.00000, 0.00000, -89.93999, 600.000, 600.000 );
  16487. interijerbolnice4[19] = CreateDynamicObjectEx(19450, -2289.79370, 96.99277, -4.64436, 0.00000, 0.00000, -89.93999, 600.000, 600.000 );
  16488. interijerbolnice4[20] = CreateDynamicObjectEx(19358, -2283.33960, 116.06971, -4.65555, 0.00000, 0.00000, -90.00000, 600.000, 600.000 );
  16489. interijerbolnice4[21] = CreateDynamicObjectEx(19358, -2274.27124, 116.06667, -4.65555, 0.00000, 0.00000, -90.00000, 600.000, 600.000 );
  16490. interijerbolnice4[22] = CreateDynamicObjectEx(19450, -2274.39478, 120.86584, -4.64436, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16491. interijerbolnice4[23] = CreateDynamicObjectEx(19450, -2283.08521, 125.23432, -4.64436, 0.00000, 0.00000, -89.93999, 600.000, 600.000 );
  16492. interijerbolnice4[24] = CreateDynamicObjectEx(19450, -2276.00122, 106.22888, -4.64436, 0.00000, 0.00000, -90.05999, 600.000, 600.000 );
  16493. interijerbolnice4[25] = CreateDynamicObjectEx(19450, -2280.73730, 98.91158, -4.64436, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16494. interijerbolnice4[26] = CreateDynamicObjectEx(19387, -2280.71606, 104.52986, -4.64799, 0.00000, 0.00000, -180.11998, 600.000, 600.000 );
  16495. interijerbolnice4[27] = CreateDynamicObjectEx(19387, -2280.73364, 92.62080, -4.64799, 0.00000, 0.00000, -180.11998, 600.000, 600.000 );
  16496. interijerbolnice4[28] = CreateDynamicObjectEx(19450, -2280.72778, 86.18951, -4.64436, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16497. interijerbolnice4[29] = CreateDynamicObjectEx(19450, -2271.28516, 101.45166, -4.64436, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16498. interijerbolnice4[30] = CreateDynamicObjectEx(19450, -2271.28662, 91.92558, -4.64436, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16499. interijerbolnice4[31] = CreateDynamicObjectEx(19450, -2275.88550, 96.71304, -4.64436, 0.00000, 0.00000, -90.05999, 600.000, 600.000 );
  16500. interijerbolnice4[32] = CreateDynamicObjectEx(19450, -2275.89551, 87.11980, -4.64436, 0.00000, 0.00000, -90.05999, 600.000, 600.000 );
  16501. interijerbolnice4[33] = CreateDynamicObjectEx(19387, -2292.94409, 93.02222, -4.64799, 0.00000, 0.00000, -270.12000, 600.000, 600.000 );
  16502. interijerbolnice4[34] = CreateDynamicObjectEx(19450, -2285.05981, 88.32384, -4.64436, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16503. interijerbolnice4[35] = CreateDynamicObjectEx(19358, -2286.64087, 93.01552, -4.65555, 0.00000, 0.00000, -90.00000, 600.000, 600.000 );
  16504. interijerbolnice4[36] = CreateDynamicObjectEx(19358, -2289.76245, 93.02644, -4.65555, 0.00000, 0.00000, -90.00000, 600.000, 600.000 );
  16505. interijerbolnice4[37] = CreateDynamicObjectEx(19450, -2294.46484, 92.21919, -4.64436, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16506. interijerbolnice4[38] = CreateDynamicObjectEx(19450, -2289.83716, 87.50123, -4.64436, 0.00000, 0.00000, -89.93999, 600.000, 600.000 );
  16507. interijerbolnice4[39] = CreateDynamicObjectEx(19358, -2273.76392, 115.45229, -4.65555, 0.00000, 0.00000, -179.99994, 600.000, 600.000 );
  16508. interijerbolnice4[40] = CreateDynamicObjectEx(19358, -2273.78760, 107.85809, -4.65555, 0.00000, 0.00000, -179.99994, 600.000, 600.000 );
  16509. interijerbolnice4[41] = CreateDynamicObjectEx(19358, -2317.81274, 108.00053, -4.65555, 0.00000, 0.00000, -179.99994, 600.000, 600.000 );
  16510. interijerbolnice4[42] = CreateDynamicObjectEx(19387, -2317.80811, 111.13467, -4.64799, 0.00000, 0.00000, -180.11998, 600.000, 600.000 );
  16511. interijerbolnice4[43] = CreateDynamicObjectEx(19358, -2317.80200, 114.34901, -4.65555, 0.00000, 0.00000, -179.99994, 600.000, 600.000 );
  16512. interijerbolnice4[44] = CreateDynamicObjectEx(19450, -2284.94409, 87.12706, -4.64436, 0.00000, 0.00000, -90.05999, 600.000, 600.000 );
  16513. interijerbolnice4[45] = CreateDynamicObjectEx(19358, -2282.29077, 90.95924, -4.65555, 0.00000, 0.00000, -90.00000, 600.000, 600.000 );
  16514. interijerbolnice4[46] = CreateDynamicObjectEx(19358, -2283.44238, 90.95810, -4.65555, 0.00000, 0.00000, -90.00000, 600.000, 600.000 );
  16515. interijerbolnice4[47] = CreateDynamicObjectEx(19358, -2330.67798, 111.44034, -5.46509, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16516. interijerbolnice4[48] = CreateDynamicObjectEx(19377, -2317.82080, 111.19199, 2.32694, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16517. for(new i = 0; i < sizeof(interijerbolnice4); i++)
  16518. {
  16519. SetDynamicObjectMaterial(interijerbolnice4[i], 0, 14526, "sweetsmain", "GB_Pan01");
  16520. }
  16521. new interijerbolnice5[8];
  16522. interijerbolnice5[0] = CreateDynamicObjectEx(1502, -2305.01709, 106.36456, -6.33490, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16523. interijerbolnice5[1] = CreateDynamicObjectEx(1502, -2304.99121, 115.97685, -6.33490, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16524. interijerbolnice5[2] = CreateDynamicObjectEx(1502, -2287.17383, 115.98093, -6.33490, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16525. interijerbolnice5[3] = CreateDynamicObjectEx(1502, -2287.29980, 106.38473, -6.33490, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16526. interijerbolnice5[4] = CreateDynamicObjectEx(1502, -2280.77783, 105.26968, -6.33490, 0.00000, 0.00000, -89.70000, 600.000, 600.000 );
  16527. interijerbolnice5[5] = CreateDynamicObjectEx(1502, -2280.79199, 93.38443, -6.33490, 0.00000, 0.00000, -89.70000, 600.000, 600.000 );
  16528. interijerbolnice5[6] = CreateDynamicObjectEx(1502, -2293.72559, 92.96938, -6.33490, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16529. interijerbolnice5[7] = CreateDynamicObjectEx(1502, -2317.88208, 111.88581, -6.33490, 0.00000, 0.00000, -89.70000, 600.000, 600.000 );
  16530. for(new i = 0; i < sizeof(interijerbolnice5); i++)
  16531. {
  16532. SetDynamicObjectMaterial(interijerbolnice5[i], 1, 18029, "genintintsmallrest", "GB_restaursmll09" );
  16533. }
  16534. new interijerbolnice6[17];
  16535. interijerbolnice6[0] = CreateDynamicObjectEx(2434, -2322.14966, 107.52789, -6.33429, 0.00000, 0.00000, -90.71999, 600.000, 600.000 );
  16536. interijerbolnice6[1] = CreateDynamicObjectEx(2435, -2321.09863, 115.06585, -6.33417, 0.00000, 0.00000, -179.93996, 600.000, 600.000 );
  16537. interijerbolnice6[2] = CreateDynamicObjectEx(2435, -2322.18335, 113.94312, -6.33417, 0.00000, 0.00000, -89.70001, 600.000, 600.000 );
  16538. interijerbolnice6[3] = CreateDynamicObjectEx(2435, -2322.17847, 113.02223, -6.33417, 0.00000, 0.00000, -89.70001, 600.000, 600.000 );
  16539. interijerbolnice6[4] = CreateDynamicObjectEx(2435, -2322.17578, 112.10028, -6.33417, 0.00000, 0.00000, -89.70001, 600.000, 600.000 );
  16540. interijerbolnice6[5] = CreateDynamicObjectEx(2435, -2322.17041, 111.20028, -6.33417, 0.00000, 0.00000, -89.70001, 600.000, 600.000 );
  16541. interijerbolnice6[6] = CreateDynamicObjectEx(2435, -2322.16284, 110.30032, -6.33417, 0.00000, 0.00000, -89.70001, 600.000, 600.000 );
  16542. interijerbolnice6[7] = CreateDynamicObjectEx(2435, -2322.15552, 109.38035, -6.33417, 0.00000, 0.00000, -89.70001, 600.000, 600.000 );
  16543. interijerbolnice6[8] = CreateDynamicObjectEx(2435, -2322.14453, 108.46036, -6.33417, 0.00000, 0.00000, -89.70001, 600.000, 600.000 );
  16544. interijerbolnice6[9] = CreateDynamicObjectEx(2434, -2322.02588, 115.05331, -6.33429, 0.00000, 0.00000, -179.22006, 600.000, 600.000 );
  16545. interijerbolnice6[10] = CreateDynamicObjectEx(2435, -2320.19458, 115.07468, -6.33417, 0.00000, 0.00000, -179.93996, 600.000, 600.000 );
  16546. interijerbolnice6[11] = CreateDynamicObjectEx(2435, -2319.28687, 115.08522, -6.33417, 0.00000, 0.00000, -179.93996, 600.000, 600.000 );
  16547. interijerbolnice6[12] = CreateDynamicObjectEx(2435, -2318.36621, 115.08720, -6.33417, 0.00000, 0.00000, -179.93996, 600.000, 600.000 );
  16548. interijerbolnice6[13] = CreateDynamicObjectEx(2435, -2321.04028, 107.34956, -6.33417, 0.00000, 0.00000, -359.76004, 600.000, 600.000 );
  16549. interijerbolnice6[14] = CreateDynamicObjectEx(2435, -2320.11938, 107.35111, -6.33417, 0.00000, 0.00000, -359.76004, 600.000, 600.000 );
  16550. interijerbolnice6[15] = CreateDynamicObjectEx(2435, -2319.19849, 107.35374, -6.33417, 0.00000, 0.00000, -359.76004, 600.000, 600.000 );
  16551. interijerbolnice6[16] = CreateDynamicObjectEx(2435, -2318.29688, 107.35716, -6.33417, 0.00000, 0.00000, -359.76004, 600.000, 600.000 );
  16552. for(new i = 0; i < sizeof(interijerbolnice6); i++)
  16553. {
  16554. SetDynamicObjectMaterial(interijerbolnice6[i], 2, 18029, "genintintsmallrest", "GB_restaursmll09" );
  16555. }
  16556. new interijerbolnice7[3];
  16557. interijerbolnice7[0] = CreateDynamicObjectEx(19529, -2368.32959, 112.52739, -1.77855, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16558. interijerbolnice7[1] = CreateDynamicObjectEx(19529, -2243.35278, 112.53620, -2.90423, 0.00000, 0.00000, 0.00000, 600.000, 600.000 );
  16559. for(new i = 0; i < sizeof(interijerbolnice7); i++)
  16560. {
  16561. SetDynamicObjectMaterial(interijerbolnice7[i], 0, 15053, "vghotelnice", "AH_flroortile3" );
  16562. }
  16563. // Garage objects
  16564. CreateObjectEx(10010, 1381.103027, -1397.747070, -34.265922, 0.000000, 0.000000, 0.000000);
  16565. CreateObjectEx(7891, 1343.877685, -1363.957397, -31.581329, 0.000000, 0.000000, 90.000000);
  16566. CreateObjectEx(7891, 1343.887451, -1363.957397, -27.031333, 0.000000, 0.000000, 90.000000);
  16567. CreateObjectEx(7891, 1351.108154, -1363.957397, -31.581329, 0.000000, 0.000000, 90.000000);
  16568. CreateObjectEx(7891, 1351.117431, -1363.957397, -27.031333, 0.000000, 0.000000, 90.000000);
  16569. // House objects
  16570. CreateObjectEx(14707, 911.334106, -484.425170, 847.481384, 0.000000, 0.000000, 90.000000);
  16571. CreateObjectEx(14711, 1312.136840, -175.075073, 1088.675659, 0.000000, 0.000000, 0.000000);
  16572. CreateObjectEx(1506, 1321.403198, -166.876174, 1087.131591, 0.000000, 0.000000, 270.000000);
  16573. CreateObjectEx(14700, 1437.169189, -1832.845703, 1314.057250, 0.000000, 0.000000, 270.000000);
  16574. CreateObjectEx(1506, 1433.098266, -1833.567993, 1312.596801, 0.000000, 0.000000, 90.000000);
  16575. CreateObjectEx(14748, 1365.361694, -2141.651611, 1051.588623, 0.000000, 0.000000, 270.000000);
  16576. CreateObjectEx(1506, 1364.546875, -2146.731689, 1049.618652, 0.000000, 0.000000, 180.000000);
  16577. CreateObjectEx(14718, 2005.202270, -1701.831054, 1164.692260, 0.000000, 0.000000, 90.000000);
  16578. CreateObjectEx(1506, 2010.115234, -1698.054321, 1164.701660, 0.000000, 0.000000, -90.000000);
  16579. CreateObjectEx(14754, 1284.700317, -1132.096679, 982.990844, 0.000000, 0.000000, 0.000000);
  16580. CreateObjectEx(1506, 1282.763061, -1141.286621, 979.051940, 0.000000, 0.000000, 180.000000);
  16581. CreateObjectEx(14713, 1183.433837, -422.981140, 1235.509155, 0.000000, 0.000000, 180.000000);
  16582. CreateObjectEx(1506, 1177.512084, -418.100250, 1233.734375, 0.000000, 0.000000, 0.000000);
  16583. CreateObjectEx(14750, 1752.987548, -1814.000000, 1005.840515, 0.000000, 0.000000, 0.000000);
  16584. CreateObjectEx(1506, 1750.443969, -1823.364013, 999.340454, 0.000000, 0.000000, 180.000000);
  16585. CreateObjectEx(14712, 2190.703125, -1127.359619, 1129.335815, 0.000000, 0.000000, 270.000000);
  16586. CreateObjectEx(1506, 2183.202392, -1131.089599, 1127.785400, 0.000000, 0.000000, 90.000000);
  16587. CreateObjectEx(14701, 2654.076171, -1032.999389, 930.996948, 0.000000, 0.000000, 180.000000);
  16588. CreateObjectEx(1506, 2653.683593, -1022.535644, 928.926269, 0.000000, 0.000000, 0.000000);
  16589. CreateObjectEx(14710, 836.976257, -1017.067077, 800.481994, 0.000000, 0.000000, 180.000000);
  16590. CreateObjectEx(1506, 827.483337, -1014.606506, 798.996154, 0.000000, 0.000000, 90.000000);
  16591. CreateObjectEx(14706, 1834.514404, -1290.143066, 834.363037, 0.000000, 0.000000, 180.000000);
  16592. CreateObjectEx(19359, 2262.502929, -1143.025146, 1051.293334, 0.000000, 0.000000, 90.000000);
  16593. // Prison objects
  16594. CreateDynamicObject(971, -1143.599365, 864.143859, 5.630311, 0.000000, 0.000000, 36.000000);
  16595. CreateDynamicObject(971, -1137.191284, 868.799377, 5.630311, 0.000000, 0.000000, 36.000000);
  16596. CreateDynamicObject(971, -1127.083251, 841.410888, 5.630311, 0.000000, 0.000000, -144.000000);
  16597. CreateDynamicObject(971, -1120.464721, 846.219299, 5.630311, 0.000000, 0.000000, -144.000000);
  16598. // Small garage
  16599. new objectid = CreateObjectEx(19377, 1517.224853, -1643.668823, 1123.418579, 0.000000, 90.000000, 90.000000);
  16600. SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_sub_pen_conc2", 0);
  16601. objectid = CreateObjectEx(19451, 1512.922851, -1643.237792, 1125.234863, 0.000000, 0.000000, 0.000000);
  16602. SetObjectMaterial(objectid, 0, 14798, "int_kbsgarage3", "ab_wall_flake", 0);
  16603. objectid = CreateObjectEx(19451, 1512.932983, -1652.857666, 1125.234863, 0.000000, 0.000000, 0.000000);
  16604. SetObjectMaterial(objectid, 0, 14798, "int_kbsgarage3", "ab_wall_flake", 0);
  16605. objectid = CreateObjectEx(19377, 1517.224853, -1654.129028, 1123.418579, 0.000000, 90.000000, 90.000000);
  16606. SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_sub_pen_conc2", 0);
  16607. objectid = CreateObjectEx(19377, 1517.224853, -1643.668823, 1127.009277, 0.000000, 90.000000, 90.000000);
  16608. SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_peeling_ceiling1_BIG", 0);
  16609. objectid = CreateObjectEx(19451, 1517.271484, -1638.827636, 1125.234863, 0.000000, 0.000000, 90.000000);
  16610. SetObjectMaterial(objectid, 0, 14798, "int_kbsgarage3", "ab_wall_flake", 0);
  16611. CreateObjectEx(9093, 1516.615600, -1638.889160, 1125.194335, 0.000000, 0.000000, 90.000000);
  16612. CreateObjectEx(1498, 1520.439941, -1638.885986, 1123.454101, 0.000000, 0.000000, 0.000000);
  16613. objectid = CreateObjectEx(19451, 1522.032226, -1643.237792, 1125.234863, 0.000000, 0.000000, 0.000000);
  16614. SetObjectMaterial(objectid, 0, 14798, "int_kbsgarage3", "ab_wall_flake", 0);
  16615. objectid = CreateObjectEx(19451, 1522.032958, -1652.857666, 1125.234863, 0.000000, 0.000000, 0.000000);
  16616. SetObjectMaterial(objectid, 0, 14798, "int_kbsgarage3", "ab_wall_flake", 0);
  16617. objectid = CreateObjectEx(19377, 1517.224853, -1654.149291, 1127.009277, 0.000000, 90.000000, 90.000000);
  16618. SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_peeling_ceiling1_BIG", 0);
  16619. objectid = CreateObjectEx(19451, 1517.161743, -1649.707275, 1125.234863, 0.000000, 0.000000, 90.000000);
  16620. SetObjectMaterial(objectid, 0, 14798, "int_kbsgarage3", "ab_wall_flake", 0);
  16621. CreateObjectEx(19815, 1521.958862, -1644.184448, 1125.385009, 0.000000, 0.000000, 270.000000);
  16622. CreateObjectEx(19929, 1521.474243, -1642.943847, 1123.494262, 0.000000, 0.000000, 0.000000);
  16623. CreateObjectEx(19929, 1521.474243, -1645.803222, 1123.494262, 0.000000, 0.000000, 0.000000);
  16624. CreateObjectEx(1328, 1521.372802, -1647.677978, 1123.984008, 0.000000, 0.000000, 270.000000);
  16625. CreateObjectEx(19899, 1518.888671, -1649.152709, 1123.504028, 0.000000, 0.000000, 90.000000);
  16626. CreateObjectEx(19921, 1521.317626, -1644.767700, 1124.524536, 0.000000, 0.000000, -78.023918);
  16627. CreateObjectEx(19903, 1517.034545, -1649.131347, 1123.533813, 0.000000, 0.000000, 90.000000);
  16628. CreateObjectEx(19917, 1521.330322, -1646.477294, 1124.424438, 0.000000, 0.000000, 174.000000);
  16629. CreateObjectEx(1348, 1515.315185, -1649.160888, 1124.144897, 0.000000, 0.000000, 180.000000);
  16630. CreateObjectEx(1098, 1521.330200, -1643.426879, 1124.914916, 0.000000, 0.000000, -17.151069);
  16631. CreateObjectEx(19627, 1521.519287, -1644.724609, 1124.624633, 0.000000, 0.000000, 272.669464);
  16632. CreateObjectEx(18634, 1521.386962, -1642.228393, 1124.434448, 0.000000, 90.000000, 155.093902);
  16633. CreateObjectEx(16779, 1517.025878, -1644.597290, 1127.035156, 0.000000, 0.000000, 180.631195);
  16634. CreateObjectEx(1738, 1513.752319, -1649.391357, 1124.094116, 0.000000, 0.000000, 180.000000);
  16635. CreateObjectEx(1428, 1521.027343, -1649.170898, 1125.004516, 0.000000, 0.000000, 180.000000);
  16636. CreateObjectEx(1098, 1513.130737, -1647.329101, 1125.744506, 0.000000, 0.000000, 0.000000);
  16637. CreateObjectEx(1098, 1513.130737, -1646.249023, 1125.744506, 0.000000, 0.000000, 0.000000);
  16638. CreateObjectEx(1098, 1513.130981, -1647.329101, 1124.714355, 0.000000, 0.000000, 0.000000);
  16639. CreateObjectEx(1098, 1513.130371, -1646.268554, 1124.714355, 0.000000, 0.000000, 0.000000);
  16640. CreateObjectEx(1185, 1513.152221, -1642.557250, 1125.574951, 0.000000, 0.000000, 90.000000);
  16641. CreateObjectEx(1010, 1513.028320, -1640.495727, 1124.564086, 0.000000, 90.000000, 0.000000);
  16642. CreateObjectEx(2063, 1513.311157, -1643.594726, 1124.384521, 0.000000, 0.000000, 90.000000);
  16643. CreateObjectEx(1193, 1513.027954, -1639.594482, 1125.194580, 0.000000, 0.000000, 91.062004);
  16644. // Medium garage
  16645. objectid = CreateObjectEx(19377, 1517.224853, -1643.668823, 1373.418579, 0.000000, 90.000000, 90.000000);
  16646. SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_sub_pen_conc2", 0);
  16647. objectid = CreateObjectEx(19451, 1511.712158, -1643.237792, 1375.234863, 0.000000, 0.000000, 0.000000);
  16648. SetObjectMaterial(objectid, 0, 14798, "int_kbsgarage3", "ab_wall_flake", 0);
  16649. objectid = CreateObjectEx(19451, 1511.712280, -1652.857666, 1375.234863, 0.000000, 0.000000, 0.000000);
  16650. SetObjectMaterial(objectid, 0, 14798, "int_kbsgarage3", "ab_wall_flake", 0);
  16651. objectid = CreateObjectEx(19377, 1517.224853, -1654.129028, 1373.418579, 0.000000, 90.000000, 90.000000);
  16652. SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_sub_pen_conc2", 0);
  16653. objectid = CreateObjectEx(19377, 1517.224853, -1643.668823, 1377.009277, 0.000000, 90.000000, 90.000000);
  16654. SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_peeling_ceiling1_BIG", 0);
  16655. objectid = CreateObjectEx(19451, 1517.271484, -1638.827636, 1375.234863, 0.000000, 0.000000, 90.000000);
  16656. SetObjectMaterial(objectid, 0, 14798, "int_kbsgarage3", "ab_wall_flake", 0);
  16657. CreateObjectEx(9093, 1515.464721, -1638.889160, 1375.194335, 0.000000, 0.000000, 90.000000);
  16658. CreateObjectEx(1498, 1519.789550, -1638.885986, 1373.454101, 0.000000, 0.000000, 0.000000);
  16659. objectid = CreateObjectEx(19451, 1522.032226, -1643.237792, 1375.234863, 0.000000, 0.000000, 0.000000);
  16660. SetObjectMaterial(objectid, 0, 14798, "int_kbsgarage3", "ab_wall_flake", 0);
  16661. objectid = CreateObjectEx(19451, 1522.032958, -1652.857666, 1375.234863, 0.000000, 0.000000, 0.000000);
  16662. SetObjectMaterial(objectid, 0, 14798, "int_kbsgarage3", "ab_wall_flake", 0);
  16663. objectid = CreateObjectEx(19377, 1517.224853, -1654.149291, 1377.009277, 0.000000, 90.000000, 90.000000);
  16664. SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_peeling_ceiling1_BIG", 0);
  16665. objectid = CreateObjectEx(19451, 1517.161743, -1651.258422, 1375.234863, 0.000000, 0.000000, 90.000000);
  16666. SetObjectMaterial(objectid, 0, 14798, "int_kbsgarage3", "ab_wall_flake", 0);
  16667. CreateObjectEx(19815, 1521.958862, -1644.184448, 1375.385009, 0.000000, 0.000000, 270.000000);
  16668. CreateObjectEx(19929, 1521.474243, -1642.943847, 1373.494262, 0.000000, 0.000000, 0.000000);
  16669. CreateObjectEx(19929, 1521.474243, -1645.803222, 1373.494262, 0.000000, 0.000000, 0.000000);
  16670. CreateObjectEx(1328, 1521.372802, -1647.677978, 1373.984008, 0.000000, 0.000000, 270.000000);
  16671. CreateObjectEx(19899, 1518.668579, -1650.662597, 1373.504028, 0.000000, 0.000000, 90.000000);
  16672. CreateObjectEx(19921, 1521.317626, -1644.767700, 1374.524536, 0.000000, 0.000000, -78.023918);
  16673. CreateObjectEx(19903, 1516.784301, -1650.541381, 1373.533813, 0.000000, 0.000000, 90.000000);
  16674. CreateObjectEx(19917, 1521.330322, -1646.477294, 1374.424438, 0.000000, 0.000000, 174.000000);
  16675. CreateObjectEx(1348, 1514.635620, -1650.671386, 1374.144897, 0.000000, 0.000000, 180.000000);
  16676. CreateObjectEx(1098, 1521.330200, -1643.426879, 1374.914916, 0.000000, 0.000000, -17.151069);
  16677. CreateObjectEx(19627, 1521.519287, -1644.724609, 1374.624633, 0.000000, 0.000000, 272.669464);
  16678. CreateObjectEx(18634, 1521.386962, -1642.228393, 1374.434448, 0.000000, 90.000000, 155.093902);
  16679. CreateObjectEx(16779, 1517.025878, -1644.597290, 1377.035156, 0.000000, 0.000000, 180.631195);
  16680. CreateObjectEx(1738, 1512.762207, -1651.041992, 1374.094116, 0.000000, 0.000000, 180.000000);
  16681. CreateObjectEx(1428, 1521.027343, -1650.722290, 1375.004516, 0.000000, 0.000000, 180.000000);
  16682. CreateObjectEx(1098, 1511.920654, -1648.459716, 1375.744506, 0.000000, 0.000000, 0.000000);
  16683. CreateObjectEx(1098, 1511.920654, -1647.409667, 1375.744506, 0.000000, 0.000000, 0.000000);
  16684. CreateObjectEx(1098, 1511.920654, -1648.459716, 1374.724487, 0.000000, 0.000000, 0.000000);
  16685. CreateObjectEx(1098, 1511.920654, -1647.409667, 1374.724487, 0.000000, 0.000000, 0.000000);
  16686. CreateObjectEx(1185, 1512.062988, -1643.247314, 1375.574951, 0.000000, 0.000000, 90.000000);
  16687. CreateObjectEx(1010, 1511.827880, -1640.815917, 1374.564086, 0.000000, 90.000000, 0.000000);
  16688. CreateObjectEx(2063, 1512.140991, -1644.314697, 1374.384521, 0.000000, 0.000000, 90.000000);
  16689. CreateObjectEx(1193, 1511.774658, -1639.957275, 1375.194580, 0.000000, 0.000000, 91.062004);
  16690. objectid = CreateObjectEx(19377, 1507.614990, -1643.668823, 1373.418579, 0.000000, 90.000000, 90.000000);
  16691. SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_sub_pen_conc2", 0);
  16692. objectid = CreateObjectEx(19377, 1507.614990, -1654.158447, 1373.418579, 0.000000, 90.000000, 90.000000);
  16693. SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_sub_pen_conc2", 0);
  16694. objectid = CreateObjectEx(19377, 1507.604125, -1643.668823, 1377.009277, 0.000000, 90.000000, 90.000000);
  16695. SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_peeling_ceiling1_BIG", 0);
  16696. objectid = CreateObjectEx(19377, 1507.604125, -1654.168457, 1377.009277, 0.000000, 90.000000, 90.000000);
  16697. SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_peeling_ceiling1_BIG", 0);
  16698. objectid = CreateObjectEx(19451, 1507.531738, -1651.258422, 1375.234863, 0.000000, 0.000000, 90.000000);
  16699. SetObjectMaterial(objectid, 0, 14798, "int_kbsgarage3", "ab_wall_flake", 0);
  16700. objectid = CreateObjectEx(19451, 1507.661621, -1638.827636, 1375.234863, 0.000000, 0.000000, 90.000000);
  16701. SetObjectMaterial(objectid, 0, 14798, "int_kbsgarage3", "ab_wall_flake", 0);
  16702. // Large garage
  16703. CreateObjectEx(11389, 1665.187500, -2352.026367, 1537.641723, 0.000000, 0.000000, 0.000000);
  16704. objectid = CreateObjectEx(19377, 1668.767822, -2340.866943, 1534.396972, 0.000000, 90.000000, 0.000000);
  16705. SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_sub_pen_conc2", 0);
  16706. objectid = CreateObjectEx(19377, 1658.277832, -2340.866943, 1534.396972, 0.000000, 90.000000, 0.000000);
  16707. SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_sub_pen_conc2", 0);
  16708. objectid = CreateObjectEx(19377, 1668.767822, -2350.427001, 1534.396972, 0.000000, 90.000000, 0.000000);
  16709. SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_sub_pen_conc2", 0);
  16710. objectid = CreateObjectEx(19377, 1668.767822, -2360.037597, 1534.396972, 0.000000, 90.000000, 0.000000);
  16711. SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_sub_pen_conc2", 0);
  16712. objectid = CreateObjectEx(19377, 1668.767822, -2369.637939, 1534.396972, 0.000000, 90.000000, 0.000000);
  16713. SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_sub_pen_conc2", 0);
  16714. objectid = CreateObjectEx(19377, 1658.277832, -2350.467041, 1534.396972, 0.000000, 90.000000, 0.000000);
  16715. SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_sub_pen_conc2", 0);
  16716. objectid = CreateObjectEx(19377, 1658.277832, -2360.087646, 1534.396972, 0.000000, 90.000000, 0.000000);
  16717. SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_sub_pen_conc2", 0);
  16718. objectid = CreateObjectEx(19377, 1658.277832, -2369.697265, 1534.396972, 0.000000, 90.000000, 0.000000);
  16719. SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_sub_pen_conc2", 0);
  16720. objectid = CreateObjectEx(19377, 1661.437255, -2363.377929, 1540.185913, 0.000000, 90.000000, 0.000000);
  16721. SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_peeling_ceiling1_BIG", 0);
  16722. objectid = CreateObjectEx(19377, 1671.937988, -2363.377929, 1540.185913, 0.000000, 90.000000, 0.000000);
  16723. SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_peeling_ceiling1_BIG", 0);
  16724. objectid = CreateObjectEx(19377, 1671.937988, -2353.787353, 1540.185913, 0.000000, 90.000000, 0.000000);
  16725. SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_peeling_ceiling1_BIG", 0);
  16726. objectid = CreateObjectEx(19377, 1671.937988, -2344.167480, 1540.185913, 0.000000, 90.000000, 0.000000);
  16727. SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_peeling_ceiling1_BIG", 0);
  16728. objectid = CreateObjectEx(19377, 1671.937988, -2334.539306, 1540.185913, 0.000000, 90.000000, 0.000000);
  16729. SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_peeling_ceiling1_BIG", 0);
  16730. objectid = CreateObjectEx(19377, 1661.437988, -2353.787353, 1540.185913, 0.000000, 90.000000, 0.000000);
  16731. SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_peeling_ceiling1_BIG", 0);
  16732. objectid = CreateObjectEx(19377, 1661.527465, -2344.167480, 1540.185913, 0.000000, 90.000000, 0.000000);
  16733. SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_peeling_ceiling1_BIG", 0);
  16734. objectid = CreateObjectEx(19377, 1661.509521, -2334.539306, 1540.185913, 0.000000, 90.000000, 0.000000);
  16735. SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_peeling_ceiling1_BIG", 0);
  16736. CreateObjectEx(2885, 1674.234375, -2340.028320, 1541.174072, 0.000000, 0.000000, 270.000000);
  16737. CreateObjectEx(2885, 1674.234375, -2348.668212, 1541.174072, 0.000000, 0.000000, 270.000000);
  16738. objectid = CreateObjectEx(19377, 1679.248168, -2340.866943, 1534.396972, 0.000000, 90.000000, 0.000000);
  16739. SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_sub_pen_conc2", 0);
  16740. objectid = CreateObjectEx(19377, 1679.248168, -2350.476562, 1534.396972, 0.000000, 90.000000, 0.000000);
  16741. SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_sub_pen_conc2", 0);
  16742. CreateObjectEx(2885, 1660.494262, -2368.226806, 1541.143798, 0.000000, 0.000000, 180.000000);
  16743. CreateObjectEx(11390, 1665.046875, -2351.977050, 1538.903198, 0.000000, 0.000000, 0.000000);
  16744. CreateObjectEx(11391, 1657.228515, -2360.088378, 1535.773193, 0.000000, 0.000000, 0.000000);
  16745. CreateObjectEx(11393, 1669.819946, -2357.343994, 1536.022583, 0.000000, 0.000000, 0.000000);
  16746. CreateObjectEx(19817, 1662.070068, -2340.035888, 1533.891967, 0.000000, 0.000000, 90.000000);
  16747. CreateObjectEx(19872, 1659.912719, -2348.421630, 1533.882324, 0.000000, 0.000000, 90.000000);
  16748. CreateObjectEx(19903, 1658.435546, -2345.552978, 1534.542480, 0.000000, 0.000000, -47.000000);
  16749. CreateObjectEx(19377, 1656.129028, -2362.886718, 1539.213256, 90.000000, 0.000000, 0.000000);
  16750. CreateObjectEx(19377, 1656.129028, -2352.425048, 1539.213256, 90.000000, 0.000000, 0.000000);
  16751. CreateObjectEx(19377, 1656.129028, -2341.955322, 1539.213256, 90.000000, 0.000000, 0.000000);
  16752. CreateObjectEx(19377, 1656.129028, -2331.505126, 1539.213256, 90.000000, 0.000000, 0.000000);
  16753. CreateObjectEx(19377, 1661.448364, -2335.926269, 1539.213256, 90.000000, 0.000000, 90.000000);
  16754. CreateObjectEx(19377, 1671.927612, -2335.926269, 1539.213256, 90.000000, 0.000000, 90.000000);
  16755. CreateObjectEx(19377, 1671.157470, -2368.107421, 1539.213256, 90.000000, 0.000000, 90.000000);
  16756. CreateObjectEx(19377, 1674.139404, -2363.225585, 1539.213256, 90.000000, 0.000000, 0.000000);
  16757. CreateObjectEx(19377, 1674.149414, -2359.344726, 1539.213256, 90.000000, 0.000000, 0.000000);
  16758. CreateObjectEx(19437, 1666.590942, -2361.146240, 1535.482910, 0.000000, 0.000000, 0.000000);
  16759. CreateObjectEx(19437, 1666.300659, -2361.146240, 1535.482910, 0.000000, 0.000000, 0.000000);
  16760. CreateObjectEx(19437, 1666.350463, -2363.697021, 1534.622070, 90.000000, 0.000000, 0.000000);
  16761. CreateObjectEx(19437, 1666.350463, -2367.177734, 1534.622070, 90.000000, 0.000000, 0.000000);
  16762. CreateObjectEx(19437, 1667.490478, -2367.398193, 1535.482910, 0.000000, 0.000000, 90.000000);
  16763. CreateObjectEx(19437, 1669.050048, -2367.398193, 1535.482910, 0.000000, 0.000000, 90.000000);
  16764. CreateObjectEx(19437, 1670.640380, -2367.398193, 1535.482910, 0.000000, 0.000000, 90.000000);
  16765. CreateObjectEx(19437, 1672.190063, -2367.398193, 1535.482910, 0.000000, 0.000000, 90.000000);
  16766. CreateObjectEx(19437, 1674.090454, -2367.398193, 1535.482910, 0.000000, 0.000000, 90.000000);
  16767. CreateObjectEx(19377, 1674.367797, -2348.886474, 1539.123413, 90.000000, 0.000000, 0.000000);
  16768. CreateObjectEx(19377, 1674.367797, -2338.387207, 1539.123413, 90.000000, 0.000000, 0.000000);
  16769. CreateObjectEx(19377, 1660.698242, -2368.378906, 1539.123413, 90.000000, 0.000000, 90.000000);
  16770. CreateObjectEx(19377, 1660.257812, -2368.418945, 1539.123413, 90.000000, 0.000000, 90.000000);
  16771. objectid = CreateObjectEx(19369, 1666.348266, -2366.564208, 1537.142822, 0.000000, 0.000000, 0.000000);
  16772. SetObjectMaterial(objectid, 0, 19389, "all_walls", "concretenewb256", 16711680);
  16773. objectid = CreateObjectEx(19369, 1666.348266, -2363.353759, 1537.142822, 0.000000, 0.000000, 0.000000);
  16774. SetObjectMaterial(objectid, 0, 19389, "all_walls", "concretenewb256", 16711680);
  16775. objectid = CreateObjectEx(19369, 1666.348266, -2362.022460, 1537.142822, 0.000000, 0.000000, 0.000000);
  16776. SetObjectMaterial(objectid, 0, 19389, "all_walls", "concretenewb256", 16711680);
  16777. objectid = CreateObjectEx(19369, 1667.818969, -2357.771972, 1537.142822, 0.000000, 0.000000, 90.000000);
  16778. SetObjectMaterial(objectid, 0, 19389, "all_walls", "concretenewb256", 16711680);
  16779. objectid = CreateObjectEx(19369, 1670.998901, -2357.771972, 1537.142822, 0.000000, 0.000000, 90.000000);
  16780. SetObjectMaterial(objectid, 0, 19389, "all_walls", "concretenewb256", 16711680);
  16781. objectid = CreateObjectEx(19369, 1673.869873, -2357.771972, 1537.142822, 0.000000, 0.000000, 90.000000);
  16782. SetObjectMaterial(objectid, 0, 19389, "all_walls", "concretenewb256", 16711680);
  16783. objectid = CreateObjectEx(19369, 1673.898559, -2359.502197, 1537.142822, 0.000000, 0.000000, 0.000000);
  16784. SetObjectMaterial(objectid, 0, 19389, "all_walls", "concretenewb256", 16711680);
  16785. objectid = CreateObjectEx(19369, 1673.878540, -2362.103515, 1537.142822, 0.000000, 0.000000, 0.000000);
  16786. SetObjectMaterial(objectid, 0, 19389, "all_walls", "concretenewb256", 16711680);
  16787. objectid = CreateObjectEx(19369, 1673.878540, -2365.273437, 1537.142822, 0.000000, 0.000000, 0.000000);
  16788. SetObjectMaterial(objectid, 0, 19389, "all_walls", "concretenewb256", 16711680);
  16789. objectid = CreateObjectEx(19369, 1673.878540, -2368.443115, 1537.142822, 0.000000, 0.000000, 0.000000);
  16790. SetObjectMaterial(objectid, 0, 19389, "all_walls", "concretenewb256", 16711680);
  16791. objectid = CreateObjectEx(19377, 1671.468505, -2363.267089, 1537.988037, 0.000000, 90.000000, 0.000000);
  16792. SetObjectMaterial(objectid, 0, 19389, "all_walls", "concretenewb256", 16711680);
  16793. objectid = CreateObjectEx(9131, 1666.443969, -2358.310058, 1535.482910, 0.000000, 0.000000, 270.520568);
  16794. SetObjectMaterial(objectid, 0, 19389, "all_walls", "concretenewb256", 16711680);
  16795. // Miner objects
  16796. objectid = CreateDynamicObject(5857, 1259.475952, -1246.807861, 17.118604, 0.000000, 0.000000, 0.000000);
  16797. SetDynamicObjectMaterial(objectid, 0, 900, "underwater", "rock_country128", 0);
  16798. CreateDynamicObject(18248, 1246.071655, -1271.090698, 20.019594, 0.000000, 0.000000, 84.000000);
  16799. CreateDynamicObject(3626, 1258.959472, -1267.884155, 13.859575, 0.000000, 0.000000, 180.000000);
  16800. CreateDynamicObject(5836, 1236.547607, -1248.458374, 23.218635, 0.000000, 0.000000, 90.000000);
  16801. CreateDynamicObject(1358, 1251.376831, -1268.885498, 13.671277, 0.000000, 0.000000, 180.000000);
  16802. CreateDynamicObject(1345, 1264.114379, -1268.189208, 13.154987, 0.000000, 0.000000, 90.000000);
  16803. CreateDynamicObject(3865, 1249.772094, -1260.009643, 14.072364, 0.000000, 0.000000, 86.000000);
  16804. CreateDynamicObject(3864, 1280.458374, -1233.247192, 18.021100, 0.000000, 0.000000, 67.399993);
  16805. CreateDynamicObject(3864, 1250.571289, -1242.027954, 19.531097, 0.000000, 0.000000, 156.399993);
  16806. CreateDynamicObject(1413, 1272.510620, -1270.166503, 13.533586, 0.000000, 0.000000, 180.000000);
  16807. CreateDynamicObject(1413, 1279.261596, -1270.246582, 13.533586, 0.000000, 0.000000, 0.000000);
  16808. CreateDynamicObject(944, 1267.146362, -1269.372802, 13.364293, 0.000000, 0.000000, 180.000000);
  16809. CreateDynamicObject(3864, 1281.966308, -1254.101684, 17.691064, 0.000000, 0.000000, -9.400017);
  16810. CreateDynamicObject(1684, 1280.920776, -1264.567871, 14.093436, 0.000000, 0.000000, -90.000000);
  16811. CreateDynamicObject(2984, 1282.067260, -1257.960327, 13.961514, 0.000000, 0.000000, 0.000000);
  16812. CreateDynamicObject(2984, 1281.947143, -1256.210815, 14.011515, 0.000000, 0.000000, 0.000000);
  16813. CreateDynamicObject(11289, 1282.567993, -1243.593383, 14.934340, 0.000000, 0.000000, -88.100013);
  16814. // PD exterior
  16815. CreateDynamicObject(995, 1544.594238, -1618.678466, 13.262805, 90.000000, 0.000000, 270.324615);
  16816. CreateDynamicObject(995, 1545.128662, -1633.476684, 13.292809, 90.000000, 0.000000, 270.324615);
  16817. CreateDynamicObject(19121, 1544.701660, -1623.436523, 12.962804, 0.000000, 0.000000, 270.178314);
  16818. gPDGates[0] = CreateDynamicObject(968, 1544.639892, -1631.008666, 13.252797, 0.000000, 90.000000, 90.000000);
  16819. gPDGates[1] = CreateDynamicObject(980, 1588.042602, -1638.079956, 14.602818, 0.000000, 0.000000, 0.000000);
  16820. // FBI exterior
  16821. gFBIGates[0] = CreateDynamicObject(985, 321.255279, -1488.601318, 25.281988, 0.000000, 0.000000, -35.299957);
  16822. gFBIGates[1] = CreateDynamicObject(985, 283.590423, -1542.835083, 25.281988, 0.000000, 0.000000, -34.899955);
  16823. // FMD exterior by Lance
  16824. CreateDynamicObject(3268,1571.1287800,-2174.7282700,12.5186000,0.0000000,0.0000000,90.0000000); //
  16825. CreateDynamicObject(9949,1517.5681200,-2168.8305700,24.5000000,0.0000000,0.0000000,90.0000000); //
  16826. CreateDynamicObject(10763,1474.2979700,-2156.9782700,38.0000000,0.0000000,0.0000000,45.0000000); //
  16827. CreateDynamicObject(18850,1478.9538600,-2166.8579100,22.0000000,0.0000000,0.0000000,90.0000000); //
  16828. CreateDynamicObject(18850,1540.6938500,-2166.8579100,22.0000000,0.0000000,0.0000000,90.0000000); //
  16829. CreateDynamicObject(1569,1509.3479000,-2179.6994600,31.0200000,0.0000000,0.0000000,0.0000000); //
  16830. CreateDynamicObject(19799,1452.2346200,-2164.4707000,14.1000000,0.0000000,0.0000000,74.8200300); //
  16831. CreateDynamicObject(3268,1600.9808300,-2174.7097200,12.5186000,0.0000000,0.0000000,90.0000000); //
  16832. CreateDynamicObject(4838,1587.2423100,-2049.6191400,12.5278000,0.0000000,0.0000000,-155.8799700); //
  16833. CreateDynamicObject(3578,1574.3737800,-2159.6210900,11.8025000,0.0000000,0.0000000,90.0000000); //
  16834. CreateDynamicObject(3578,1562.5632300,-2159.6289100,11.8025000,0.0000000,0.0000000,90.0000000); //
  16835. CreateDynamicObject(3578,1590.2486600,-2159.5524900,11.8025000,0.0000000,0.0000000,90.0000000); //
  16836. CreateDynamicObject(3578,1607.1795700,-2159.5551800,11.8025000,0.0000000,0.0000000,90.0000000); //
  16837. CreateDynamicObject(3578,1601.7481700,-2154.6731000,11.8025000,0.0000000,0.0000000,0.0000000); //
  16838. CreateDynamicObject(3578,1595.1035200,-2154.6853000,11.8100000,0.0000000,0.0000000,0.0000000); //
  16839. CreateDynamicObject(3578,1579.2691700,-2154.6359900,11.8100000,0.0000000,0.0000000,0.0000000); //
  16840. CreateDynamicObject(3578,1589.2910200,-2154.6516100,11.8100000,0.0000000,0.0000000,0.0000000); //
  16841. CreateDynamicObject(3578,1568.9565400,-2154.5939900,11.8100000,0.0000000,0.0000000,0.0000000); //
  16842. CreateDynamicObject(3578,1567.4160200,-2154.5903300,11.8200000,0.0000000,0.0000000,0.0000000); //
  16843. // FMD interior by Lance
  16844. CreateDynamicObject(19377,303.0083300,1734.1710200,2041.6202400,0.0000000,90.0000000,0.0000000); //
  16845. CreateDynamicObject(19377,303.0080000,1724.5380900,2041.6202400,0.0000000,90.0000000,0.0000000); //
  16846. CreateDynamicObject(19377,292.5455600,1724.5650600,2041.6202400,0.0000000,90.0000000,0.0000000); //
  16847. CreateDynamicObject(19377,313.4708300,1724.5512700,2041.6202400,0.0000000,90.0000000,0.0000000); //
  16848. CreateDynamicObject(19377,292.5817000,1715.0184300,2041.6202400,0.0000000,90.0000000,0.0000000); //
  16849. CreateDynamicObject(19377,303.0470000,1715.0092800,2041.6202400,0.0000000,90.0000000,0.0000000); //
  16850. CreateDynamicObject(19377,313.4521500,1714.9982900,2041.6202400,0.0000000,90.0000000,0.0000000); //
  16851. CreateDynamicObject(19377,297.3785100,1729.4550800,2041.6130400,0.0000000,90.0000000,43.5000000); //
  16852. CreateDynamicObject(19377,308.5267000,1728.9681400,2041.6130400,0.0000000,90.0000000,43.5000000); //
  16853. CreateDynamicObject(19377,303.4111000,1705.4381100,2041.6202400,0.0000000,90.0000000,0.0000000); //
  16854. CreateDynamicObject(19377,309.0299700,1710.0831300,2041.6130400,0.0000000,90.0000000,43.5000000); //
  16855. CreateDynamicObject(19377,298.6503300,1710.3720700,2041.6130400,0.0000000,90.0000000,43.5000000); //
  16856. CreateDynamicObject(19377,318.1890900,1718.8968500,2041.6130400,0.0000000,90.0000000,43.5000000); //
  16857. CreateDynamicObject(19450,319.7799400,1713.8325200,2043.4499500,0.0000000,0.0000000,-47.1600000); //
  16858. CreateDynamicObject(19450,316.9845300,1715.6378200,2043.4499500,0.0000000,0.0000000,0.0000000); //
  16859. CreateDynamicObject(19450,320.0360100,1724.4752200,2043.4499500,0.0000000,0.0000000,43.8000100); //
  16860. CreateDynamicObject(19450,312.7421900,1707.2959000,2043.4499500,0.0000000,0.0000000,-47.1600000); //
  16861. CreateDynamicObject(19450,303.8535200,1700.6272000,2043.4499500,0.0000000,0.0000000,-90.0000000); //
  16862. CreateDynamicObject(19450,294.3555900,1700.6307400,2043.4499500,0.0000000,0.0000000,-90.0000000); //
  16863. CreateDynamicObject(19450,308.5528300,1698.6328100,2043.4499500,0.0000000,0.0000000,0.0000000); //
  16864. CreateDynamicObject(19450,312.0556300,1706.6635700,2043.4499500,0.0000000,0.0000000,-47.1600000); //
  16865. CreateDynamicObject(19450,313.6304900,1731.1495400,2043.4499500,0.0000000,0.0000000,43.8000100); //
  16866. CreateDynamicObject(19377,305.1874400,1738.8909900,2041.6130400,0.0000000,90.0000000,43.5000000); //
  16867. CreateDynamicObject(19450,311.5968900,1733.2728300,2043.4499500,0.0000000,0.0000000,43.8000100); //
  16868. CreateDynamicObject(19450,308.2782600,1741.4941400,2043.4499500,0.0000000,0.0000000,0.0000000); //
  16869. CreateDynamicObject(19450,302.6104100,1739.0069600,2043.4499500,0.0000000,0.0000000,90.0000000); //
  16870. CreateDynamicObject(19450,298.0647900,1741.1154800,2043.4499500,0.0000000,0.0000000,0.0000000); //
  16871. CreateDynamicObject(19450,312.0326500,1739.0101300,2043.4499500,0.0000000,0.0000000,90.0000000); //
  16872. CreateDynamicObject(19450,298.0677800,1705.3768300,2043.4499500,0.0000000,0.0000000,0.0000000); //
  16873. CreateDynamicObject(19450,298.0751600,1732.9126000,2043.4499500,0.0000000,0.0000000,0.0000000); //
  16874. CreateDynamicObject(19450,298.0678100,1720.1391600,2041.1999500,0.0000000,180.0000000,0.0000000); //
  16875. CreateDynamicObject(19450,297.9874900,1720.1200000,2045.9899900,0.0000000,0.0000000,0.0000000); //
  16876. CreateDynamicObject(19388,298.0652800,1713.7240000,2043.4499500,0.0000000,0.0000000,0.0000000); //
  16877. CreateDynamicObject(19450,298.0574600,1707.6444100,2043.4499500,0.0000000,0.0000000,0.0000000); //
  16878. CreateDynamicObject(19388,298.0677200,1726.5491900,2043.4499500,0.0000000,0.0000000,0.0000000); //
  16879. CreateDynamicObject(19450,294.5946700,1733.3363000,2043.4499500,0.0000000,0.0000000,-46.5000100); //
  16880. CreateDynamicObject(19450,287.7799100,1726.8686500,2043.4499500,0.0000000,0.0000000,-46.5000100); //
  16881. CreateDynamicObject(19450,294.7457600,1706.9888900,2043.4499500,0.0000000,0.0000000,-136.3800000); //
  16882. CreateDynamicObject(19450,288.1676300,1713.8525400,2043.4499500,0.0000000,0.0000000,-136.3800000); //
  16883. CreateDynamicObject(19377,282.1066300,1721.7541500,2041.6202400,0.0000000,90.0000000,0.0000000); //
  16884. CreateDynamicObject(19377,282.0834000,1712.1453900,2041.6202400,0.0000000,90.0000000,0.0000000); //
  16885. CreateDynamicObject(19388,284.8420100,1720.6792000,2043.4499500,0.0000000,0.0000000,0.0000000); //
  16886. CreateDynamicObject(19450,284.8418300,1714.3811000,2043.4499500,0.0000000,0.0000000,0.0000000); //
  16887. CreateDynamicObject(19450,284.8419200,1726.8408200,2043.4499500,0.0000000,0.0000000,0.0000000); //
  16888. CreateDynamicObject(14407,281.7731900,1720.7354700,2042.0200200,0.0000000,0.0000000,-90.0000000); //
  16889. CreateDynamicObject(19377,279.6451400,1714.6911600,2045.1200000,0.0000000,90.0000000,0.0000000); //
  16890. CreateDynamicObject(19377,279.6397700,1726.6131600,2045.1200000,0.0000000,90.0000000,0.0000000); //
  16891. CreateDynamicObject(19450,280.0779100,1719.4262700,2043.4499500,0.0000000,0.0000000,-90.0000000); //
  16892. CreateDynamicObject(19450,280.0210600,1721.8717000,2043.4499500,0.0000000,0.0000000,-90.0000000); //
  16893. CreateDynamicObject(1523,284.8919100,1719.9190700,2041.6678500,0.0000000,0.0000000,90.0000000); //
  16894. CreateDynamicObject(19450,284.8293500,1714.7106900,2046.9499500,0.0000000,0.0000000,0.0000000); //
  16895. CreateDynamicObject(19450,284.8281600,1723.9847400,2046.9499500,0.0000000,0.0000000,0.0000000); //
  16896. CreateDynamicObject(19450,277.3952000,1721.4533700,2046.9499500,0.0000000,0.0000000,0.0000000); //
  16897. CreateDynamicObject(19450,277.3851600,1712.4227300,2046.9499500,0.0000000,0.0000000,0.0000000); //
  16898. CreateDynamicObject(19450,277.3986800,1730.7562300,2046.9499500,0.0000000,0.0000000,0.0000000); //
  16899. CreateDynamicObject(19450,284.8342900,1733.5362500,2046.9499500,0.0000000,0.0000000,0.0000000); //
  16900. CreateDynamicObject(19450,281.2565600,1731.1449000,2046.9499500,0.0000000,0.0000000,-90.0800000); //
  16901. CreateDynamicObject(19450,282.0049100,1709.9862100,2046.9499500,0.0000000,0.0000000,-90.0800000); //
  16902. CreateDynamicObject(14407,275.6328100,1720.4567900,2042.0200200,0.0000000,0.0000000,90.0000000); //
  16903. CreateDynamicObject(14782,280.9892000,1710.3958700,2046.1999500,0.0000000,0.0000000,180.0000000); //
  16904. CreateDynamicObject(7666,280.9354900,1712.4360400,2045.2199700,30.0000000,90.0000000,0.0000000); //
  16905. CreateDynamicObject(7666,280.9292900,1716.9151600,2045.2199700,30.0000000,90.0000000,0.0000000); //
  16906. CreateDynamicObject(7666,280.9714100,1724.3070100,2045.2199700,30.0000000,90.0000000,0.0000000); //
  16907. CreateDynamicObject(7666,280.9681100,1728.7729500,2045.2199700,30.0000000,90.0000000,0.0000000); //
  16908. CreateDynamicObject(11713,277.5637800,1714.7343800,2047.0437000,0.0000000,0.0000000,0.0000000); //
  16909. CreateDynamicObject(11713,277.5276200,1716.6062000,2047.0437000,0.0000000,0.0000000,0.0000000); //
  16910. CreateDynamicObject(11713,284.6994600,1714.3702400,2047.0437000,0.0000000,0.0000000,180.0000000); //
  16911. CreateDynamicObject(14657,278.1170300,1726.4295700,2046.0000000,0.0000000,0.0000000,0.0000000); //
  16912. CreateDynamicObject(2125,279.1882600,1726.5440700,2045.5206300,0.0000000,0.0000000,0.0000000); //
  16913. CreateDynamicObject(14657,272.9628000,1729.6212200,2046.0000000,0.0000000,0.0000000,0.0000000); //
  16914. CreateDynamicObject(19377,279.6451100,1714.6911600,2048.6298800,0.0000000,90.0000000,0.0000000); //
  16915. CreateDynamicObject(19377,279.6086400,1724.2756300,2048.6298800,0.0000000,90.0000000,0.0000000); //
  16916. CreateDynamicObject(19377,279.9444600,1733.7408400,2048.6298800,0.0000000,90.0000000,0.0000000); //
  16917. CreateDynamicObject(1523,298.1099900,1712.9699700,2041.6678500,0.0000000,0.0000000,90.0000000); //
  16918. CreateDynamicObject(1523,298.1211900,1725.7973600,2041.6678500,0.0000000,0.0000000,90.0000000); //
  16919. CreateDynamicObject(10009,303.2358100,1705.9794900,2041.9799800,0.0000000,0.0000000,-540.0000000); //
  16920. CreateDynamicObject(10009,303.5607000,1732.9459200,2041.9799800,0.0000000,0.0000000,360.0000000); //
  16921. CreateDynamicObject(19450,312.0556300,1706.6635700,2043.4499500,0.0000000,0.0000000,-47.1600000); //
  16922. CreateDynamicObject(19450,311.0549900,1710.1577100,2039.9599600,0.0000000,0.0000000,-90.0000000); //
  16923. CreateDynamicObject(19450,302.8494600,1710.1633300,2039.9599600,0.0000000,0.0000000,-90.0000000); //
  16924. CreateDynamicObject(19450,310.5050400,1729.3501000,2039.9599600,0.0000000,0.0000000,-90.0000000); //
  16925. CreateDynamicObject(19450,302.7391700,1729.3544900,2039.9599600,0.0000000,0.0000000,-90.0000000); //
  16926. CreateDynamicObject(19450,316.9876100,1725.2434100,2043.4499500,0.0000000,0.0000000,0.0000000); //
  16927. CreateDynamicObject(19450,303.6236900,1716.8908700,2039.9599600,0.0000000,0.0000000,-130.0000000); //
  16928. CreateDynamicObject(19450,310.9368000,1716.9149200,2039.9599600,0.0000000,0.0000000,130.0000000); //
  16929. CreateDynamicObject(19450,303.6769100,1723.0781300,2039.9599600,0.0000000,0.0000000,130.0000000); //
  16930. CreateDynamicObject(19450,310.9479100,1723.0629900,2039.9599600,0.0000000,0.0000000,-130.0000000); //
  16931. CreateDynamicObject(19450,307.3017900,1709.1022900,2039.9599600,0.0000000,0.0000000,0.0000000); //
  16932. CreateDynamicObject(19450,307.3015400,1700.4470200,2039.9599600,0.0000000,0.0000000,0.0000000); //
  16933. CreateDynamicObject(19450,307.2967200,1730.8836700,2039.9599600,0.0000000,0.0000000,0.0000000); //
  16934. CreateDynamicObject(19450,307.2979700,1740.0156300,2039.9599600,0.0000000,0.0000000,0.0000000); //
  16935. CreateDynamicObject(19353,307.7066000,1719.7481700,2039.9599600,0.0000000,180.0000000,0.0000000); //
  16936. CreateDynamicObject(19353,306.9244100,1719.7481700,2039.9599600,0.0000000,180.0000000,0.0000000); //
  16937. CreateDynamicObject(19353,307.3072500,1720.2406000,2039.9599600,0.0000000,180.0000000,90.0000000); //
  16938. CreateDynamicObject(19450,318.1711400,1723.0136700,2039.9599600,0.0000000,0.0000000,130.0000000); //
  16939. CreateDynamicObject(19450,318.1921100,1716.9775400,2039.9599600,0.0000000,0.0000000,-130.0000000); //
  16940. CreateDynamicObject(19450,296.3361500,1723.0107400,2039.9599600,0.0000000,0.0000000,-130.0000000); //
  16941. CreateDynamicObject(19450,296.2648000,1716.8167700,2039.9599600,0.0000000,0.0000000,130.0000000); //
  16942. CreateDynamicObject(19450,292.6272000,1709.0062300,2039.9599600,0.0000000,0.0000000,180.0000000); //
  16943. CreateDynamicObject(19450,292.7041300,1730.8332500,2039.9599600,0.0000000,0.0000000,180.0000000); //
  16944. CreateDynamicObject(1723,308.6773100,1730.8216600,2041.7044700,0.0000000,0.0000000,41.9999900); //
  16945. CreateDynamicObject(1723,313.7042200,1728.3630400,2041.7044700,0.0000000,0.0000000,220.7999600); //
  16946. CreateDynamicObject(2311,310.7790200,1729.1409900,2041.6988500,0.0000000,0.0000000,41.5200000); //
  16947. CreateDynamicObject(1723,313.0018900,1712.7968800,2041.7044700,0.0000000,0.0000000,309.6599700); //
  16948. CreateDynamicObject(2311,311.1241500,1710.7445100,2041.6988500,0.0000000,0.0000000,-49.3800000); //
  16949. CreateDynamicObject(1723,310.4335300,1708.0306400,2041.7044700,0.0000000,0.0000000,132.7200000); //
  16950. CreateDynamicObject(640,298.4453400,1706.9301800,2042.3800000,0.0000000,0.0000000,0.0000000); //
  16951. CreateDynamicObject(640,298.4982900,1736.0760500,2042.3800000,0.0000000,0.0000000,0.0000000); //
  16952. CreateDynamicObject(640,303.3941700,1738.7117900,2042.3800000,0.0000000,0.0000000,90.0000000); //
  16953. CreateDynamicObject(640,312.7133500,1731.4224900,2042.3800000,0.0000000,0.0000000,43.3800000); //
  16954. CreateDynamicObject(640,312.7117900,1707.9856000,2042.3800000,0.0000000,0.0000000,132.0000200); //
  16955. CreateDynamicObject(640,303.1869800,1701.0753200,2042.3800000,0.0000000,0.0000000,89.9399900); //
  16956. CreateDynamicObject(644,314.9457100,1726.9716800,2041.9847400,0.0000000,0.0000000,0.0000000); //
  16957. CreateDynamicObject(644,315.3387800,1712.7454800,2041.9847400,0.0000000,0.0000000,0.0000000); //
  16958. CreateDynamicObject(644,299.3248300,1702.6160900,2041.9847400,0.0000000,0.0000000,0.0000000); //
  16959. CreateDynamicObject(644,299.7919000,1737.4272500,2041.5446800,0.0000000,0.0000000,-5.2800000); //
  16960. CreateDynamicObject(1569,316.9355500,1718.5216100,2041.6999500,0.0000000,0.0000000,90.0000000); //
  16961. CreateDynamicObject(1569,316.9151300,1721.5231900,2041.6999500,0.0000000,0.0000000,-90.0000000); //
  16962. CreateDynamicObject(19377,303.2263500,1712.0775100,2045.1200000,0.0000000,90.0000000,0.0000000); //
  16963. CreateDynamicObject(19377,313.6807900,1708.2077600,2045.1219500,0.0000000,90.0000000,0.0000000); //
  16964. CreateDynamicObject(19377,311.0804400,1699.3798800,2045.1200000,0.0000000,90.0000000,-36.2400000); //
  16965. CreateDynamicObject(19377,308.4107100,1697.4563000,2045.1230500,0.0000000,90.0000000,-59.1000000); //
  16966. CreateDynamicObject(19377,302.8421000,1695.6449000,2045.1209700,0.0000000,90.0000000,-79.2600000); //
  16967. CreateDynamicObject(19377,297.8151900,1697.5302700,2045.1212200,0.0000000,90.0000000,-114.2400000); //
  16968. CreateDynamicObject(19377,296.8037100,1698.1572300,2045.1200000,0.0000000,90.0000000,-143.3999900); //
  16969. CreateDynamicObject(19377,292.9220900,1708.3493700,2045.1209700,0.0000000,90.0000000,0.0000000); //
  16970. CreateDynamicObject(19377,292.7083100,1698.5462600,2045.1230500,0.0000000,90.0000000,-87.4800000); //
  16971. CreateDynamicObject(19377,313.6958300,1717.8597400,2045.1200000,0.0000000,90.0000000,0.0000000); //
  16972. CreateDynamicObject(19377,313.6943700,1727.4685100,2045.1200000,0.0000000,90.0000000,0.0000000); //
  16973. CreateDynamicObject(19377,313.6927800,1737.0770300,2045.1200000,0.0000000,90.0000000,0.0000000); //
  16974. CreateDynamicObject(19377,303.2968100,1721.6835900,2045.1200000,0.0000000,90.0000000,0.0000000); //
  16975. CreateDynamicObject(19377,303.3432000,1727.2338900,2045.1209700,0.0000000,90.0000000,0.0000000); //
  16976. CreateDynamicObject(19377,302.0692100,1728.4289600,2045.1219500,0.0000000,90.0000000,28.8600000); //
  16977. CreateDynamicObject(19377,295.0835000,1737.5714100,2045.1200000,0.0000000,90.0000000,-13.7400100); //
  16978. CreateDynamicObject(19377,298.4128100,1741.1560100,2045.1221900,0.0000000,90.0000000,-50.2200000); //
  16979. CreateDynamicObject(19377,305.4567900,1743.0904500,2045.1203600,0.0000000,90.0000000,-89.7000000); //
  16980. CreateDynamicObject(19377,309.9078100,1740.4078400,2045.1219500,0.0000000,90.0000000,-129.6601000); //
  16981. CreateDynamicObject(19377,292.9037500,1717.9871800,2045.1209700,0.0000000,90.0000000,0.0000000); //
  16982. CreateDynamicObject(19377,292.8598000,1727.5999800,2045.1209700,0.0000000,90.0000000,0.0000000); //
  16983. CreateDynamicObject(19377,292.6563100,1737.2166700,2045.1209700,0.0000000,90.0000000,0.0000000); //
  16984. CreateDynamicObject(19377,289.8685900,1712.4522700,2045.1219500,0.0000000,90.0000000,0.0000000); //
  16985. CreateDynamicObject(19377,289.9446100,1722.0578600,2045.1219500,0.0000000,90.0000000,0.0000000); //
  16986. CreateDynamicObject(19450,305.4538900,1728.1084000,2046.9499500,0.0000000,0.0000000,0.0000000); //
  16987. CreateDynamicObject(19450,313.4736900,1726.3780500,2046.9499500,0.0000000,0.0000000,0.0000000); //
  16988. CreateDynamicObject(19450,313.1796300,1734.2570800,2046.9499500,0.0000000,0.0000000,90.0000000); //
  16989. CreateDynamicObject(19450,313.4704300,1721.9592300,2046.9499500,0.0000000,0.0000000,0.0000000); //
  16990. CreateDynamicObject(19450,313.4807400,1710.5251500,2046.9499500,0.0000000,0.0000000,0.0000000); //
  16991. CreateDynamicObject(19450,305.4460800,1721.4744900,2046.9499500,0.0000000,0.0000000,0.0000000); //
  16992. CreateDynamicObject(19450,308.7316000,1707.4411600,2046.9499500,0.0000000,0.0000000,90.0000000); //
  16993. CreateDynamicObject(19450,302.7797900,1707.4355500,2046.9499500,0.0000000,0.0000000,90.0000000); //
  16994. CreateDynamicObject(19450,293.8255900,1704.6713900,2046.9499500,0.0000000,0.0000000,90.0000000); //
  16995. CreateDynamicObject(19450,293.9139400,1709.3995400,2046.9499500,0.0000000,0.0000000,0.0000000); //
  16996. CreateDynamicObject(19450,300.7136200,1714.1364700,2046.9499500,0.0000000,0.0000000,90.0000000); //
  16997. CreateDynamicObject(19450,291.1931500,1714.1359900,2046.9499500,0.0000000,0.0000000,90.0000000); //
  16998. CreateDynamicObject(19450,318.2765200,1728.1485600,2046.9499500,0.0000000,0.0000000,90.0000000); //
  16999. CreateDynamicObject(19450,318.2850300,1713.7363300,2046.9499500,0.0000000,0.0000000,90.0000000); //
  17000. CreateDynamicObject(19450,318.1975100,1719.3842800,2046.9499500,0.0000000,0.0000000,90.0000000); //
  17001. CreateDynamicObject(19450,318.9658500,1716.0202600,2046.9499500,0.0000000,0.0000000,0.0000000); //
  17002. CreateDynamicObject(19450,318.9632000,1732.6717500,2046.9499500,0.0000000,0.0000000,0.0000000); //
  17003. CreateDynamicObject(19450,322.5897500,1734.2519500,2046.9499500,0.0000000,0.0000000,90.0000000); //
  17004. CreateDynamicObject(19388,305.4509900,1715.6485600,2046.9499500,0.0000000,0.0000000,0.0000000); //
  17005. CreateDynamicObject(19450,300.6244200,1723.7197300,2046.9499500,0.0000000,0.0000000,90.0000000); //
  17006. CreateDynamicObject(19450,299.9090000,1718.9587400,2046.9499500,0.0000000,0.0000000,180.0000000); //
  17007. CreateDynamicObject(19388,313.4637800,1716.2133800,2046.9499500,0.0000000,0.0000000,0.0000000); //
  17008. CreateDynamicObject(19388,313.4800100,1732.7696500,2046.9499500,0.0000000,0.0000000,0.0000000); //
  17009. CreateDynamicObject(941,318.2278100,1716.5438200,2045.5439500,0.0000000,0.0000000,90.0000000); //
  17010. CreateDynamicObject(1369,316.9319800,1718.6926300,2045.7873500,0.0000000,0.0000000,0.0000000); //
  17011. CreateDynamicObject(2792,313.4563000,1715.7637900,2048.0700700,0.0000000,0.0000000,-90.0000000); //
  17012. CreateDynamicObject(2794,313.4670100,1732.3862300,2048.0700700,0.0000000,0.0000000,-90.0000000); //
  17013. CreateDynamicObject(11709,316.3952300,1714.0858200,2045.8800000,0.0000000,0.0000000,-180.0000000); //
  17014. CreateDynamicObject(11707,314.9844100,1713.8917200,2046.0000000,0.0000000,0.0000000,-180.0000000); //
  17015. CreateDynamicObject(11738,318.2623300,1717.4075900,2046.0575000,0.0000000,0.0000000,-71.7600000); //
  17016. CreateDynamicObject(11738,318.4575500,1716.3659700,2046.0575000,0.0000000,0.0000000,-88.3800000); //
  17017. CreateDynamicObject(11738,318.1898200,1715.9495800,2046.0575000,0.0000000,0.0000000,-174.7199700); //
  17018. CreateDynamicObject(11736,318.1078500,1716.9252900,2046.0178200,0.0000000,0.0000000,-129.8399800); //
  17019. CreateDynamicObject(19339,318.3839100,1731.3282500,2046.3800000,0.0000000,0.0000000,89.2200000); //
  17020. CreateDynamicObject(941,318.3655700,1731.0390600,2045.5439500,0.0000000,0.0000000,90.0000000); //
  17021. CreateDynamicObject(941,316.1153000,1728.7944300,2045.5439500,0.0000000,0.0000000,0.0000000); //
  17022. CreateDynamicObject(303,316.7699900,1728.6137700,2046.0169700,0.0000000,0.0000000,0.0000000); //
  17023. CreateDynamicObject(2905,316.9830300,1728.8640100,2046.0177000,0.0000000,0.0000000,-30.1800000); //
  17024. CreateDynamicObject(2906,316.5119600,1729.0598100,2046.0777600,0.0000000,84.0000000,-85.0000000); //
  17025. CreateDynamicObject(2906,316.1318400,1728.6934800,2046.0777600,0.0000000,84.0000000,-48.6399900); //
  17026. CreateDynamicObject(2907,315.5983900,1728.8242200,2046.0577400,0.0000000,0.0000000,-30.1800000); //
  17027. CreateDynamicObject(2908,316.3945000,1728.5428500,2046.1176800,-76.0000000,48.0000000,-30.0000000); //
  17028. CreateDynamicObject(2905,317.2831100,1728.6457500,2046.0777600,-11.0000000,178.0000000,-46.8000000); //
  17029. CreateDynamicObject(1523,313.5266100,1732.0133100,2045.1800500,0.0000000,0.0000000,90.0000000); //
  17030. CreateDynamicObject(1523,313.4849900,1715.4639900,2045.1800500,0.0000000,0.0000000,90.0000000); //
  17031. CreateDynamicObject(1491,305.4775100,1714.9050300,2045.1800500,0.0000000,0.0000000,90.0000000); //
  17032. CreateDynamicObject(2184,301.6876200,1720.8125000,2045.1866500,0.0000000,0.0000000,0.0000000); //
  17033. CreateDynamicObject(1714,302.7992600,1722.6538100,2045.1678500,0.0000000,0.0000000,0.0000000); //
  17034. CreateDynamicObject(1736,302.8185100,1723.3610800,2048.0793500,0.0000000,0.0000000,0.0000000); //
  17035. CreateDynamicObject(2025,300.4746400,1723.1483200,2045.2092300,0.0000000,0.0000000,0.0000000); //
  17036. CreateDynamicObject(2025,303.9538300,1723.0762900,2045.2092300,0.0000000,0.0000000,0.0000000); //
  17037. CreateDynamicObject(11712,302.8305700,1723.6319600,2047.4000200,0.0000000,0.0000000,90.0000000); //
  17038. CreateDynamicObject(19893,302.2153000,1721.3055400,2045.9595900,0.0000000,0.0000000,136.9200000); //
  17039. CreateDynamicObject(19810,305.5448600,1716.7041000,2047.2331500,0.0000000,0.0000000,-90.0000000); //
  17040. CreateDynamicObject(19810,305.5567300,1714.5617700,2047.2331500,0.0000000,0.0000000,-90.0000000); //
  17041. CreateDynamicObject(19806,302.4137900,1718.9931600,2048.0346700,0.0000000,0.0000000,0.0000000); //
  17042. CreateDynamicObject(19172,300.0974100,1718.6551500,2047.3912400,0.0000000,0.0000000,90.0000000); //
  17043. CreateDynamicObject(1828,302.7713600,1718.1806600,2045.1829800,0.0000000,0.0000000,90.0000000); //
  17044. CreateDynamicObject(2131,301.5134300,1714.6702900,2045.2066700,0.0000000,0.0000000,180.0000000); //
  17045. CreateDynamicObject(2131,303.4942300,1714.6665000,2045.2066700,0.0000000,0.0000000,180.0000000); //
  17046. CreateDynamicObject(19431,307.9731400,1734.8695100,2046.9499500,0.0000000,0.0000000,34.6199700); //
  17047. CreateDynamicObject(19431,306.9825400,1736.1022900,2046.9499500,0.0000000,0.0000000,43.5599700); //
  17048. CreateDynamicObject(19431,305.7912600,1737.1112100,2046.9499500,0.0000000,0.0000000,55.6799800); //
  17049. CreateDynamicObject(19431,304.3605300,1737.7225300,2046.9499500,0.0000000,0.0000000,79.0800000); //
  17050. CreateDynamicObject(19431,303.0155300,1737.8642600,2046.9499500,0.0000000,0.0000000,90.0000200); //
  17051. CreateDynamicObject(19431,302.0553900,1737.3988000,2046.9499500,0.0000000,0.0000000,131.5800000); //
  17052. CreateDynamicObject(19431,300.8975200,1736.3724400,2046.9499500,0.0000000,0.0000000,131.5800000); //
  17053. CreateDynamicObject(19431,299.9442100,1735.1096200,2046.9499500,0.0000000,0.0000000,157.5600000); //
  17054. CreateDynamicObject(19431,299.4621300,1733.7148400,2046.9499500,0.0000000,0.0000000,163.9799300); //
  17055. CreateDynamicObject(19431,299.2149400,1732.7229000,2046.9499500,0.0000000,0.0000000,171.5999500); //
  17056. CreateDynamicObject(19450,298.9913900,1732.2845500,2046.9499500,0.0000000,0.0000000,117.5400200); //
  17057. CreateDynamicObject(19431,303.9959700,1734.3811000,2046.9499500,0.0000000,0.0000000,261.0598400); //
  17058. CreateDynamicObject(19431,305.0911300,1733.5955800,2046.9499500,0.0000000,0.0000000,207.4798700); //
  17059. CreateDynamicObject(19431,298.9092100,1703.9245600,2046.9499500,0.0000000,0.0000000,28.9800300); //
  17060. CreateDynamicObject(19431,299.7147800,1702.8237300,2046.9499500,0.0000000,0.0000000,41.9400300); //
  17061. CreateDynamicObject(19431,300.8793300,1701.8411900,2046.9499500,0.0000000,0.0000000,58.3200300); //
  17062. CreateDynamicObject(19431,302.2331800,1701.2249800,2046.9499500,0.0000000,0.0000000,73.3800300); //
  17063. CreateDynamicObject(19431,303.7749300,1701.1378200,2046.9499500,0.0000000,0.0000000,99.3600500); //
  17064. CreateDynamicObject(19431,305.2196000,1701.6594200,2046.9499500,0.0000000,0.0000000,120.8400300); //
  17065. CreateDynamicObject(19431,306.5421100,1702.4554400,2046.9499500,0.0000000,0.0000000,120.8400300); //
  17066. CreateDynamicObject(19431,307.6550300,1703.4969500,2046.9499500,0.0000000,0.0000000,145.3200700); //
  17067. CreateDynamicObject(19431,308.4859900,1704.8344700,2046.9499500,0.0000000,0.0000000,150.6601100); //
  17068. CreateDynamicObject(19431,308.4835500,1705.3800000,2046.9499500,0.0000000,0.0000000,178.1400500); //
  17069. CreateDynamicObject(19431,308.4970400,1706.6167000,2046.9499500,0.0000000,0.0000000,181.7400700); //
  17070. CreateDynamicObject(19353,307.5458100,1719.7481700,2039.9599600,0.0000000,180.0000000,0.0000000); //
  17071. CreateDynamicObject(19353,307.4046000,1719.7481700,2039.9599600,0.0000000,180.0000000,0.0000000); //
  17072. CreateDynamicObject(19353,307.2399000,1719.7481700,2039.9599600,0.0000000,180.0000000,0.0000000); //
  17073. CreateDynamicObject(19353,307.0947900,1719.7481700,2039.9599600,0.0000000,180.0000000,0.0000000); //
  17074. CreateDynamicObject(19353,307.3073100,1719.4580100,2039.9599600,0.0000000,180.0000000,90.0000000); //
  17075. CreateDynamicObject(19353,307.3073100,1719.6187700,2039.9599600,0.0000000,180.0000000,90.0000000); //
  17076. CreateDynamicObject(19353,307.3073100,1719.7796600,2039.9599600,0.0000000,180.0000000,90.0000000); //
  17077. CreateDynamicObject(19353,307.3073100,1719.9500700,2039.9599600,0.0000000,180.0000000,90.0000000); //
  17078. CreateDynamicObject(19353,307.3073100,1720.1167000,2039.9599600,0.0000000,180.0000000,90.0000000); //
  17079. CreateDynamicObject(19353,307.3073100,1719.3175000,2039.9599600,0.0000000,180.0000000,90.0000000); //
  17080. CreateDynamicObject(2008,297.5231900,1724.2286400,2041.7071500,0.0000000,0.0000000,-90.0000000); //
  17081. CreateDynamicObject(2008,297.5220300,1716.8732900,2041.7071500,0.0000000,0.0000000,-90.0000000); //
  17082. CreateDynamicObject(3397,297.4426000,1719.0638400,2041.7071500,0.0000000,0.0000000,0.0000000); //
  17083. CreateDynamicObject(1937,270.6657700,1727.5871600,2048.6298800,0.0000000,90.0000000,0.0000000); //
  17084. CreateDynamicObject(19377,303.2018100,1702.7998000,2048.6298800,0.0000000,90.0000000,0.0000000); //
  17085. CreateDynamicObject(19377,292.8327900,1709.2722200,2048.6298800,0.0000000,90.0000000,0.0000000); //
  17086. CreateDynamicObject(19377,303.3310500,1712.3391100,2048.6298800,0.0000000,90.0000000,0.0000000); //
  17087. CreateDynamicObject(19377,313.6891800,1711.8839100,2048.6298800,0.0000000,90.0000000,0.0000000); //
  17088. CreateDynamicObject(19377,313.7886700,1721.4311500,2048.6298800,0.0000000,90.0000000,0.0000000); //
  17089. CreateDynamicObject(19377,303.3681900,1721.8647500,2048.6298800,0.0000000,90.0000000,0.0000000); //
  17090. CreateDynamicObject(19377,314.2639500,1730.9770500,2048.6298800,0.0000000,90.0000000,0.0000000); //
  17091. CreateDynamicObject(19377,303.9994500,1730.9475100,2048.6298800,0.0000000,90.0000000,0.0000000); //
  17092. CreateDynamicObject(19377,303.1025400,1740.3638900,2048.6298800,0.0000000,90.0000000,0.0000000); //
  17093. // Idlewood gas station objects
  17094. CreateDynamicObject(970, 1942.256469, -1767.598266, 13.092811, 0.000000, 0.000000, 90.000000);
  17095. CreateDynamicObject(970, 1942.256469, -1771.718627, 13.092811, 0.000000, 0.000000, 90.000000);
  17096. CreateDynamicObject(970, 1942.256469, -1775.848876, 13.092811, 0.000000, 0.000000, 90.000000);
  17097. CreateDynamicObject(970, 1942.256469, -1777.948974, 13.092811, 0.000000, 0.000000, 90.000000);
  17098. CreateDynamicObject(970, 1941.095825, -1777.948974, 13.092811, 0.000000, 0.000000, 90.000000);
  17099. CreateDynamicObject(970, 1941.096191, -1775.848876, 13.092811, 0.000000, 0.000000, 90.000000);
  17100. CreateDynamicObject(970, 1941.096679, -1771.718627, 13.092811, 0.000000, 0.000000, 90.000000);
  17101. CreateDynamicObject(970, 1941.095703, -1767.598266, 13.092811, 0.000000, 0.000000, 90.000000);
  17102. CreateDynamicObject(1215, 1941.625610, -1780.841918, 13.160593, 0.000000, 0.000000, 95.991020);
  17103. CreateDynamicObject(1215, 1941.636230, -1765.047241, 13.160593, 0.000000, 0.000000, 95.991020);
  17104. CreateDynamicObject(1291, 1928.692382, -1767.511352, 13.032809, 0.000000, 0.000000, 90.000000);
  17105. CreateDynamicObject(1287, 1928.503662, -1768.784423, 13.076869, 0.000000, 0.000000, -90.000000);
  17106. CreateDynamicObject(1289, 1928.507202, -1769.368896, 13.092813, 0.000000, 0.000000, -90.228660);
  17107. CreateDynamicObject(1250, 1908.817138, -1782.609863, 13.582806, 0.000000, 0.000000, 90.000000);
  17108. // Pizza stacks objects
  17109. CreateDynamicObject(19121, 2124.371093, -1765.267456, 13.145559, 0.000000, 0.000000, 267.547332);
  17110. CreateDynamicObject(19121, 2124.381347, -1769.873168, 13.145559, 0.000000, 0.000000, 267.547332);
  17111. CreateDynamicObject(19121, 2124.396484, -1774.649047, 13.145559, 0.000000, 0.000000, 267.547332);
  17112. CreateDynamicObject(19121, 2124.419677, -1779.435668, 13.145559, 0.000000, 0.000000, 267.547332);
  17113. CreateDynamicObject(19121, 2124.382568, -1784.029174, 13.145559, 0.000000, 0.000000, 267.547332);
  17114. CreateDynamicObject(1346, 2122.608886, -1790.332153, 13.887385, 0.000000, 0.000000, 180.000000);
  17115. CreateDynamicObject(1256, 2119.659667, -1790.556152, 13.200844, 0.000000, 0.000000, -90.000000);
  17116. CreateDynamicObject(1285, 2106.148193, -1790.754638, 13.098064, 0.000000, 0.000000, 0.000000);
  17117. CreateDynamicObject(1287, 2106.840820, -1790.747070, 13.090840, 0.000000, 0.000000, 359.374725);
  17118. CreateDynamicObject(970, 2098.605224, -1784.011840, 13.037828, 0.000000, 0.000000, 80.976753);
  17119. CreateDynamicObject(970, 2099.258789, -1779.893310, 13.037828, 0.000000, 0.000000, 80.976753);
  17120. CreateDynamicObject(970, 2099.906738, -1775.825195, 13.037828, 0.000000, 0.000000, 80.976753);
  17121. CreateDynamicObject(970, 2100.548583, -1771.775146, 13.037828, 0.000000, 0.000000, 80.976753);
  17122. CreateDynamicObject(970, 2101.199462, -1767.676147, 13.037828, 0.000000, 0.000000, 80.976753);
  17123. CreateDynamicObject(970, 2100.351318, -1786.065185, 13.037828, 0.000000, 0.000000, 180.000000);
  17124. CreateDynamicObject(970, 2104.491455, -1786.065185, 13.037828, 0.000000, 0.000000, 180.000000);
  17125. CreateDynamicObject(970, 2108.612792, -1786.065185, 13.037828, 0.000000, 0.000000, 180.000000);
  17126. CreateDynamicObject(970, 2112.732666, -1786.065185, 13.037828, 0.000000, 0.000000, 180.000000);
  17127. CreateDynamicObject(970, 2116.863769, -1786.065185, 13.037828, 0.000000, 0.000000, 180.000000);
  17128. CreateDynamicObject(970, 2120.975830, -1786.065185, 13.037828, 0.000000, 0.000000, 180.000000);
  17129. // Fixed trailer
  17130. CreateDynamicObject(11015, 4.2412109375, -0.25, 1002.3616333008, 0, 90, 179.99450683594, .interiorid = 2);
  17131. CreateDynamicObject(11015, -3.7464447021484, -0.46751827001572, 1002.3616333008, 0, 90, 0, .interiorid = 2);
  17132. CreateDynamicObject(11015, -2.0341796875, -0.2255859375, 996.58734130859, 0, 0, 0, .interiorid = 2);
  17133. CreateDynamicObject(11015, -1.7412109375, -8.029296875, 1002.3616333008, 0, 90, 89.994506835938, .interiorid = 2);
  17134. CreateDynamicObject(11015, 2.349609375, 9.3095703125, 1002.3616333008, 0, 90, 270, .interiorid = 2);
  17135. CreateDynamicObject(976, -8.3762712478638, 5.4238820075989, 998.02801513672, 0, 0, 0, .interiorid = 2);
  17136. CreateDynamicObject(976, 10.326154708862, 5.4526047706604, 998.02801513672, 0, 0, 180, .interiorid = 2);
  17137. CreateDynamicObject(976, -0.78860986232758, 4.5294494628906, 998.02801513672, 0, 0, 90, .interiorid = 2);
  17138. CreateDynamicObject(976, -9.4923362731934, 2.8067343235016, 998.30328369141, 0, 0, 0, .interiorid = 2);
  17139. CreateDynamicObject(968, -0.78987210988998, 3.085230588913, 996.65313720703, 0, 0, 88.375030517578, .interiorid = 2);
  17140. CreateDynamicObject(2424, -1.1989899873734, 2.1414895057678, 998.20440673828, 0, 0, 270, .interiorid = 2);
  17141. CreateDynamicObject(2424, -1.4444495439529, 1.2195072174072, 998.20440673828, 0, 0, 269.99450683594, .interiorid = 2);
  17142. CreateDynamicObject(2424, -1.2420085668564, 0.15943863987923, 998.20440673828, 0, 0, 269.99450683594, .interiorid = 2);
  17143. CreateDynamicObject(2424, -1.2046113014221, -0.27639570832253, 998.20440673828, 0, 0, 269.99450683594, .interiorid = 2);
  17144. CreateDynamicObject(2424, -1.6594306230545, -1.5798351764679, 998.40460205078, 0, 0, 269.99450683594, .interiorid = 2);
  17145. CreateDynamicObject(2424, -1.6048280000687, -3.7030065059662, 998.50469970703, 0, 0, 269.99450683594, .interiorid = 2);
  17146. CreateDynamicObject(2424, -1.3431304693222, -4.7396554946899, 997.82904052734, 0, 0, 269.99450683594, .interiorid = 2);
  17147. CreateDynamicObject(2424, -1.3272333145142, -5.6384997367859, 997.85406494141, 0, 0, 269.99450683594, .interiorid = 2);
  17148. CreateDynamicObject(2424, -0.82665449380875, -5.819974899292, 997.82904052734, 0, 0, 0.07452392578125, .interiorid = 2);
  17149. CreateDynamicObject(2424, 0.90103495121002, -5.7934393882751, 997.82904052734, 0, 0, 0.0714111328125, .interiorid = 2);
  17150. CreateDynamicObject(2424, 1.8007507324219, -5.7772388458252, 997.82904052734, 0, 0, 0.0714111328125, .interiorid = 2);
  17151. CreateDynamicObject(2424, 2.0067005157471, -4.656822681427, 997.82904052734, 0, 0, 90, .interiorid = 2);
  17152. CreateDynamicObject(2424, 2.0016891956329, -5.5176014900208, 997.82904052734, 0, 0, 90, .interiorid = 2);
  17153. CreateDynamicObject(2424, 0.095220312476158, -5.8064684867859, 997.85406494141, 0, 0, 0.0714111328125, .interiorid = 2);
  17154. CreateDynamicObject(2424, 1.9964281320572, -1.4732304811478, 997.82904052734, 0, 0, 90, .interiorid = 2);
  17155. CreateDynamicObject(2424, 2.0242736339569, -0.59229171276093, 997.82904052734, 0, 0, 90, .interiorid = 2);
  17156. CreateDynamicObject(2424, 1.105211853981, -0.25799462199211, 997.82904052734, 0, 0, 180, .interiorid = 2);
  17157. CreateDynamicObject(2424, 0.85449481010437, -0.25893545150757, 997.82904052734, 0, 0, 179.99450683594, .interiorid = 2);
  17158. CreateDynamicObject(2424, 0.94933843612671, 0.93138349056244, 998.40460205078, 0, 0, 0, .interiorid = 2);
  17159. CreateDynamicObject(2424, 1.9278947114944, 1.8640511035919, 998.40386962891, 0, 0, 90, .interiorid = 2);
  17160. CreateDynamicObject(2424, 1.912776350975, 2.7815411090851, 998.40386962891, 0, 0, 90, .interiorid = 2);
  17161. CreateDynamicObject(2424, 1.9282813072205, 3.7311086654663, 998.40386962891, 0, 0, 90, .interiorid = 2);
  17162. CreateDynamicObject(2424, 0.94268548488617, 0.38233369588852, 998.40460205078, 0, 0, 0, .interiorid = 2);
  17163. CreateDynamicObject(2424, 1.8336682319641, 0.42996874451637, 998.40460205078, 0, 0, 0, .interiorid = 2);
  17164. CreateDynamicObject(1814, -0.070350080728531, -4.9489212036133, 998.45343017578, 0, 0, 0, .interiorid = 2);
  17165. CreateDynamicObject(2108, 0.87250107526779, -1.5103777647018, 997.35357666016, 0, 0, 0, .interiorid = 2);
  17166. CreateDynamicObject(2738, -1.3212617635727, 5.0136914253235, 998.98120117188, 0, 0, 0, .interiorid = 2);
  17167. CreateDynamicObject(2558, -0.45861941576004, 3.3949182033539, 999.67913818359, 0, 0, 90, .interiorid = 2);
  17168. CreateDynamicObject(2558, -1.1560896635056, 4.4181189537048, 999.70416259766, 0, 0, 270, .interiorid = 2);
  17169. CreateDynamicObject(1745, 2.4512000083923, 6.3230948448181, 998.07806396484, 0, 0, 90, .interiorid = 2);
  17170. // FBI Interior (Credits: CoachCarter again)
  17171. objectid = CreateDynamicObject(19377,-501.250,300.000,2000.000,0.000,90.000,0.000);
  17172. SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1);
  17173. objectid = CreateDynamicObject(19377,-511.745,299.998,2000.000,0.000,90.000,0.000);
  17174. SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1);
  17175. objectid = CreateDynamicObject(19461,-505.165,306.329,1999.339,324.000,0.000,180.000);
  17176. SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1);
  17177. objectid = CreateDynamicObject(19397,-495.646,309.271,2001.836,0.000,0.000,270.000);
  17178. SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1);
  17179. objectid = CreateDynamicObject(19377,-490.750,300.000,2000.000,0.000,90.000,0.000);
  17180. SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1);
  17181. objectid = CreateDynamicObject(19461,-489.238,309.261,2001.836,0.000,0.000,89.994);
  17182. SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1);
  17183. objectid = CreateDynamicObject(19377,-501.250,314.014,2003.411,0.000,90.000,0.000);
  17184. SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1);
  17185. objectid = CreateDynamicObject(19377,-490.750,314.013,2003.499,0.000,90.000,0.000);
  17186. SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1);
  17187. objectid = CreateDynamicObject(19377,-490.750,290.365,2000.000,0.000,90.000,0.000);
  17188. SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1);
  17189. objectid = CreateDynamicObject(19377,-501.250,290.366,2000.000,0.000,90.000,0.000);
  17190. SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1);
  17191. objectid = CreateDynamicObject(19377,-511.746,290.365,2000.000,0.000,90.000,0.000);
  17192. SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1);
  17193. objectid = CreateDynamicObject(19380,-511.746,314.016,2008.671,0.000,90.000,0.000);
  17194. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17195. objectid = CreateDynamicObject(18762,-496.893,309.690,2006.087,0.000,0.000,0.000);
  17196. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17197. objectid = CreateDynamicObject(18762,-505.575,309.691,2006.084,0.000,0.000,0.000);
  17198. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17199. objectid = CreateDynamicObject(19377,-511.745,309.628,2000.000,0.000,90.000,0.000);
  17200. SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1);
  17201. objectid = CreateDynamicObject(19461,-497.308,306.327,1999.340,323.992,0.000,179.994);
  17202. SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1);
  17203. objectid = CreateDynamicObject(19461,-505.167,314.022,2001.836,0.000,0.000,359.989);
  17204. SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1);
  17205. objectid = CreateDynamicObject(19397,-506.836,309.271,2001.836,0.000,0.000,270.000);
  17206. SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1);
  17207. objectid = CreateDynamicObject(19377,-501.250,314.011,2003.500,0.000,90.000,0.000);
  17208. SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1);
  17209. objectid = CreateDynamicObject(19377,-511.745,314.014,2003.499,0.000,90.000,0.000);
  17210. SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1);
  17211. objectid = CreateDynamicObject(19377,-490.750,309.628,2000.000,0.000,90.000,0.000);
  17212. SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1);
  17213. objectid = CreateDynamicObject(19377,-501.250,309.628,2000.000,0.000,90.000,0.000);
  17214. SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1);
  17215. objectid = CreateDynamicObject(19461,-513.241,309.271,2001.836,0.000,0.000,89.994);
  17216. SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1);
  17217. objectid = CreateDynamicObject(18762,-521.362,309.688,2006.084,0.000,0.000,0.000);
  17218. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17219. objectid = CreateDynamicObject(18762,-485.183,309.696,2006.084,0.000,0.000,0.000);
  17220. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17221. objectid = CreateDynamicObject(19461,-513.241,309.281,2010.333,0.000,179.994,89.994);
  17222. SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1);
  17223. objectid = CreateDynamicObject(19380,-501.244,314.016,2008.671,0.000,90.000,0.000);
  17224. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17225. objectid = CreateDynamicObject(19461,-503.610,309.284,2010.332,0.000,179.994,89.994);
  17226. SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1);
  17227. objectid = CreateDynamicObject(19461,-493.979,309.285,2010.332,0.000,179.994,89.994);
  17228. SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1);
  17229. objectid = CreateDynamicObject(19461,-484.352,309.285,2010.332,0.000,179.994,89.994);
  17230. SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1);
  17231. objectid = CreateDynamicObject(19380,-511.745,299.998,2012.168,0.000,90.000,0.000);
  17232. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17233. objectid = CreateDynamicObject(19380,-511.746,290.365,2012.168,0.000,90.000,0.000);
  17234. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17235. objectid = CreateDynamicObject(19380,-511.745,309.628,2012.168,0.000,90.000,0.000);
  17236. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17237. objectid = CreateDynamicObject(19380,-501.250,290.365,2012.168,0.000,90.000,0.000);
  17238. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17239. objectid = CreateDynamicObject(19380,-501.250,299.998,2012.168,0.000,90.000,0.000);
  17240. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17241. objectid = CreateDynamicObject(19380,-501.250,309.628,2012.168,0.000,90.000,0.000);
  17242. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17243. objectid = CreateDynamicObject(19380,-490.750,299.998,2012.168,0.000,90.000,0.000);
  17244. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17245. objectid = CreateDynamicObject(19380,-490.750,290.365,2012.168,0.000,90.000,0.000);
  17246. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17247. objectid = CreateDynamicObject(19380,-490.750,309.628,2012.168,0.000,90.000,0.000);
  17248. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17249. objectid = CreateDynamicObject(19379,-516.906,290.367,2015.834,0.000,0.000,0.000);
  17250. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17251. objectid = CreateDynamicObject(19379,-516.906,299.998,2015.834,0.000,0.000,0.000);
  17252. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17253. objectid = CreateDynamicObject(19379,-516.906,309.628,2015.834,0.000,0.000,0.000);
  17254. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17255. objectid = CreateDynamicObject(19379,-485.587,300.000,2015.834,0.000,0.000,0.000);
  17256. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17257. objectid = CreateDynamicObject(19379,-485.587,290.368,2015.834,0.000,0.000,0.000);
  17258. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17259. objectid = CreateDynamicObject(19379,-485.587,309.628,2015.834,0.000,0.000,0.000);
  17260. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17261. objectid = CreateDynamicObject(19379,-512.177,285.639,2005.337,0.000,0.000,90.000);
  17262. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17263. objectid = CreateDynamicObject(19379,-502.547,285.638,2005.337,0.000,0.000,90.000);
  17264. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17265. objectid = CreateDynamicObject(19379,-492.917,285.637,2005.337,0.000,0.000,90.000);
  17266. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17267. objectid = CreateDynamicObject(19379,-483.285,285.636,2005.337,0.000,0.000,90.000);
  17268. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17269. objectid = CreateDynamicObject(19379,-512.177,285.639,2015.834,0.000,0.000,90.000);
  17270. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17271. objectid = CreateDynamicObject(19379,-502.547,285.638,2015.834,0.000,0.000,90.000);
  17272. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17273. objectid = CreateDynamicObject(19379,-492.917,285.637,2015.834,0.000,0.000,90.000);
  17274. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17275. objectid = CreateDynamicObject(19379,-483.285,285.636,2015.834,0.000,0.000,90.000);
  17276. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17277. objectid = CreateDynamicObject(19465,-501.250,331.913,2006.139,0.000,0.000,90.000);
  17278. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17279. objectid = CreateDynamicObject(18762,-521.362,313.771,2006.084,0.000,0.000,0.000);
  17280. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17281. objectid = CreateDynamicObject(18762,-505.575,313.771,2006.084,0.000,0.000,0.000);
  17282. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17283. objectid = CreateDynamicObject(18762,-505.575,313.771,2006.084,0.000,0.000,0.000);
  17284. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17285. objectid = CreateDynamicObject(18762,-496.894,313.771,2006.084,0.000,0.000,0.000);
  17286. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17287. objectid = CreateDynamicObject(18762,-485.183,313.771,2006.084,0.000,0.000,0.000);
  17288. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17289. objectid = CreateDynamicObject(19464,-505.205,317.205,2006.136,0.000,0.000,180.000);
  17290. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17291. objectid = CreateDynamicObject(19464,-497.265,317.200,2006.136,0.000,0.000,179.994);
  17292. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17293. objectid = CreateDynamicObject(19464,-513.122,331.913,2006.136,0.000,0.000,90.000);
  17294. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17295. objectid = CreateDynamicObject(19464,-495.324,331.917,2006.136,0.000,0.000,90.000);
  17296. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17297. objectid = CreateDynamicObject(19464,-515.969,314.357,2006.136,0.000,0.000,90.000);
  17298. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17299. objectid = CreateDynamicObject(19377,-501.244,323.640,2003.500,0.000,90.000,0.000);
  17300. SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1);
  17301. objectid = CreateDynamicObject(19377,-511.745,323.640,2003.500,0.000,90.000,0.000);
  17302. SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1);
  17303. objectid = CreateDynamicObject(19377,-490.750,323.640,2003.500,0.000,90.000,0.000);
  17304. SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1);
  17305. objectid = CreateDynamicObject(19465,-497.265,323.135,2006.139,0.000,0.000,179.994);
  17306. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17307. objectid = CreateDynamicObject(19465,-505.205,323.138,2006.139,0.000,0.000,179.994);
  17308. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17309. objectid = CreateDynamicObject(19464,-497.265,329.071,2006.136,0.000,0.000,179.994);
  17310. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17311. objectid = CreateDynamicObject(19464,-505.204,329.062,2006.136,0.000,0.000,179.994);
  17312. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17313. objectid = CreateDynamicObject(19377,-490.750,327.220,2003.498,0.000,90.000,0.000);
  17314. SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1);
  17315. objectid = CreateDynamicObject(19377,-501.244,327.220,2003.498,0.000,90.000,0.000);
  17316. SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1);
  17317. objectid = CreateDynamicObject(19377,-511.745,327.220,2003.498,0.000,90.000,0.000);
  17318. SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1);
  17319. objectid = CreateDynamicObject(19465,-501.250,314.357,2006.139,0.000,0.000,90.000);
  17320. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17321. objectid = CreateDynamicObject(19464,-495.313,314.357,2006.136,0.000,0.000,90.000);
  17322. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17323. objectid = CreateDynamicObject(19464,-507.186,314.358,2006.136,0.000,0.000,90.000);
  17324. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17325. objectid = CreateDynamicObject(19464,-492.471,334.757,2006.136,0.000,0.000,179.994);
  17326. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17327. objectid = CreateDynamicObject(19464,-510.026,334.755,2001.041,0.000,180.000,179.994);
  17328. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17329. objectid = CreateDynamicObject(19464,-492.470,340.690,2006.136,0.000,0.000,179.994);
  17330. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17331. objectid = CreateDynamicObject(19464,-510.026,334.755,2006.136,0.000,0.000,179.994);
  17332. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17333. objectid = CreateDynamicObject(19464,-507.186,331.913,2006.136,0.000,0.000,90.000);
  17334. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17335. objectid = CreateDynamicObject(19380,-490.750,314.016,2008.668,0.000,90.000,0.000);
  17336. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17337. objectid = CreateDynamicObject(19380,-490.750,323.640,2008.668,0.000,90.000,0.000);
  17338. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17339. objectid = CreateDynamicObject(19380,-501.244,323.640,2008.671,0.000,90.000,0.000);
  17340. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17341. objectid = CreateDynamicObject(19380,-511.745,323.640,2008.671,0.000,90.000,0.000);
  17342. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17343. objectid = CreateDynamicObject(19380,-490.750,333.265,2008.668,0.000,90.000,0.000);
  17344. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17345. objectid = CreateDynamicObject(19380,-501.244,333.265,2008.671,0.000,90.000,0.000);
  17346. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17347. objectid = CreateDynamicObject(19380,-511.745,333.265,2008.671,0.000,90.000,0.000);
  17348. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17349. objectid = CreateDynamicObject(19380,-511.745,342.893,2008.671,0.000,90.000,0.000);
  17350. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17351. objectid = CreateDynamicObject(19380,-501.244,342.893,2008.671,0.000,90.000,0.000);
  17352. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17353. objectid = CreateDynamicObject(19380,-490.750,342.893,2008.668,0.000,90.000,0.000);
  17354. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17355. objectid = CreateDynamicObject(19461,-516.892,314.175,2001.836,0.000,0.000,359.994);
  17356. SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1);
  17357. objectid = CreateDynamicObject(19377,-511.745,319.259,2000.000,0.000,90.000,0.000);
  17358. SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1);
  17359. objectid = CreateDynamicObject(19377,-501.250,319.260,2000.000,0.000,90.000,0.000);
  17360. SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1);
  17361. objectid = CreateDynamicObject(19377,-490.750,319.260,2000.000,0.000,90.000,0.000);
  17362. SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1);
  17363. objectid = CreateDynamicObject(19461,-512.164,318.903,2001.836,0.000,0.000,89.994);
  17364. SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1);
  17365. objectid = CreateDynamicObject(19461,-502.536,318.903,2001.836,0.000,0.000,89.994);
  17366. SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1);
  17367. objectid = CreateDynamicObject(19461,-492.907,318.902,2001.836,0.000,0.000,89.994);
  17368. SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1);
  17369. objectid = CreateDynamicObject(19461,-483.278,318.903,2001.836,0.000,0.000,89.994);
  17370. SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1);
  17371. objectid = CreateDynamicObject(19461,-497.298,314.188,2001.836,0.000,0.000,359.989);
  17372. SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1);
  17373. objectid = CreateDynamicObject(19461,-485.596,314.180,2001.836,0.000,0.000,359.989);
  17374. SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1);
  17375. objectid = CreateDynamicObject(19380,-510.503,314.175,2003.411,0.000,90.000,0.000);
  17376. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17377. objectid = CreateDynamicObject(19380,-520.994,314.024,2003.411,0.000,90.000,0.000);
  17378. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17379. objectid = CreateDynamicObject(19380,-491.967,314.178,2003.411,0.000,90.000,0.000);
  17380. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17381. objectid = CreateDynamicObject(19380,-481.475,314.173,2003.411,0.000,90.000,0.000);
  17382. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17383. objectid = CreateDynamicObject(19464,-489.377,331.913,2006.136,0.000,0.000,90.000);
  17384. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17385. objectid = CreateDynamicObject(19464,-515.969,329.071,2006.136,0.000,0.000,0.000);
  17386. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17387. objectid = CreateDynamicObject(19464,-486.535,329.070,2006.136,0.000,0.000,0.000);
  17388. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17389. objectid = CreateDynamicObject(19464,-486.535,323.135,2006.136,0.000,0.000,0.000);
  17390. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17391. objectid = CreateDynamicObject(19464,-486.535,317.200,2006.136,0.000,0.000,0.000);
  17392. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17393. objectid = CreateDynamicObject(19464,-515.969,317.200,2006.136,0.000,0.000,0.000);
  17394. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17395. objectid = CreateDynamicObject(19464,-489.376,314.357,2006.136,0.000,0.000,90.000);
  17396. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17397. objectid = CreateDynamicObject(19464,-515.969,323.135,2006.136,0.000,0.000,0.000);
  17398. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17399. objectid = CreateDynamicObject(19464,-513.122,314.358,2006.136,0.000,0.000,90.000);
  17400. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17401. objectid = CreateDynamicObject(19446,-496.398,333.779,2003.498,0.000,90.000,270.000);
  17402. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17403. objectid = CreateDynamicObject(19446,-506.028,333.778,2003.498,0.000,90.000,270.000);
  17404. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17405. objectid = CreateDynamicObject(19446,-498.790,338.506,1999.418,325.500,0.000,0.000);
  17406. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17407. objectid = CreateDynamicObject(19446,-503.687,338.506,1999.418,325.497,0.000,0.000);
  17408. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17409. objectid = CreateDynamicObject(19446,-496.397,336.329,2002.829,0.000,90.000,270.000);
  17410. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17411. objectid = CreateDynamicObject(19446,-506.028,336.329,2002.829,0.000,90.000,270.000);
  17412. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17413. objectid = CreateDynamicObject(19446,-498.790,341.059,1998.749,325.497,0.000,0.000);
  17414. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17415. objectid = CreateDynamicObject(19446,-503.690,341.059,1998.750,325.497,0.000,0.000);
  17416. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17417. objectid = CreateDynamicObject(19446,-496.398,338.877,2002.162,0.000,90.000,270.000);
  17418. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17419. objectid = CreateDynamicObject(19446,-506.028,338.876,2002.162,0.000,90.000,270.000);
  17420. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17421. objectid = CreateDynamicObject(19446,-503.690,343.605,1998.082,325.497,0.000,0.000);
  17422. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17423. objectid = CreateDynamicObject(19446,-498.789,343.605,1998.082,325.497,0.000,0.000);
  17424. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17425. objectid = CreateDynamicObject(19446,-496.398,341.429,2001.498,0.000,90.000,270.000);
  17426. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17427. objectid = CreateDynamicObject(19446,-506.028,341.429,2001.498,0.000,90.000,270.000);
  17428. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17429. objectid = CreateDynamicObject(19446,-498.789,346.162,1997.425,325.497,0.000,0.000);
  17430. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17431. objectid = CreateDynamicObject(19446,-503.690,346.162,1997.425,325.497,0.000,0.000);
  17432. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17433. objectid = CreateDynamicObject(19446,-496.398,344.040,2000.836,0.000,90.000,270.000);
  17434. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17435. objectid = CreateDynamicObject(19446,-506.028,344.039,2000.836,0.000,90.000,270.000);
  17436. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17437. objectid = CreateDynamicObject(19446,-496.400,347.537,2000.836,0.000,90.000,270.000);
  17438. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17439. objectid = CreateDynamicObject(19446,-506.033,347.538,2000.836,0.000,90.000,270.000);
  17440. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17441. objectid = CreateDynamicObject(19446,-493.884,335.441,2001.837,0.000,0.000,270.000);
  17442. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17443. objectid = CreateDynamicObject(19446,-508.586,335.442,2001.837,0.000,0.000,270.000);
  17444. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17445. objectid = CreateDynamicObject(19446,-508.592,337.993,2001.167,0.000,0.000,270.000);
  17446. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17447. objectid = CreateDynamicObject(19446,-493.888,337.991,2001.167,0.000,0.000,270.000);
  17448. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17449. objectid = CreateDynamicObject(19446,-493.891,340.540,2000.500,0.000,0.000,270.000);
  17450. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17451. objectid = CreateDynamicObject(19446,-508.596,340.541,2000.500,0.000,0.000,270.000);
  17452. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17453. objectid = CreateDynamicObject(19446,-493.885,343.092,1999.836,0.000,0.000,270.000);
  17454. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17455. objectid = CreateDynamicObject(19446,-508.591,343.092,1999.836,0.000,0.000,270.000);
  17456. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17457. objectid = CreateDynamicObject(19446,-501.235,349.196,1999.836,0.000,0.000,270.000);
  17458. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17459. objectid = CreateDynamicObject(19446,-506.036,351.035,2000.836,0.000,90.000,270.000);
  17460. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17461. objectid = CreateDynamicObject(19446,-496.401,351.034,2000.836,0.000,90.000,270.000);
  17462. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17463. objectid = CreateDynamicObject(19446,-501.235,350.863,2001.498,0.000,90.000,270.000);
  17464. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17465. objectid = CreateDynamicObject(19446,-509.028,349.196,1997.425,325.497,0.000,90.000);
  17466. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17467. objectid = CreateDynamicObject(19446,-493.437,349.196,1997.425,325.491,0.000,270.000);
  17468. SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1);
  17469. objectid = CreateDynamicObject(19464,-510.026,340.690,2006.136,0.000,0.000,179.994);
  17470. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17471. objectid = CreateDynamicObject(19464,-492.470,340.689,2001.041,0.000,179.994,179.994);
  17472. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17473. objectid = CreateDynamicObject(19464,-510.025,340.689,2001.041,0.000,179.994,179.994);
  17474. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17475. objectid = CreateDynamicObject(19464,-492.470,334.755,2001.041,0.000,179.994,179.994);
  17476. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17477. objectid = CreateDynamicObject(19464,-492.470,346.622,2001.041,0.000,179.994,179.994);
  17478. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17479. objectid = CreateDynamicObject(19464,-510.023,346.626,2001.041,0.000,179.994,179.994);
  17480. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17481. objectid = CreateDynamicObject(19464,-510.023,352.559,2001.041,0.000,179.994,179.994);
  17482. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17483. objectid = CreateDynamicObject(19464,-492.468,352.557,2001.041,0.000,179.994,179.994);
  17484. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17485. objectid = CreateDynamicObject(19464,-492.470,346.622,2006.136,0.000,0.000,179.994);
  17486. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17487. objectid = CreateDynamicObject(19464,-492.470,352.557,2006.136,0.000,0.000,179.994);
  17488. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17489. objectid = CreateDynamicObject(19464,-510.023,352.556,2006.136,0.000,0.000,179.994);
  17490. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17491. objectid = CreateDynamicObject(19464,-510.023,346.622,2006.136,0.000,0.000,179.994);
  17492. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17493. objectid = CreateDynamicObject(19464,-495.313,352.738,2001.041,0.000,179.994,269.994);
  17494. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17495. objectid = CreateDynamicObject(19464,-501.250,352.737,2001.041,0.000,179.994,269.989);
  17496. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17497. objectid = CreateDynamicObject(19464,-507.186,352.737,2001.041,0.000,179.994,269.989);
  17498. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17499. objectid = CreateDynamicObject(19464,-507.186,352.737,2006.136,0.000,0.000,89.994);
  17500. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17501. objectid = CreateDynamicObject(19464,-501.250,352.737,2006.136,0.000,0.000,89.994);
  17502. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17503. objectid = CreateDynamicObject(19464,-495.313,352.737,2006.136,0.000,0.000,89.994);
  17504. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17505. objectid = CreateDynamicObject(19380,-490.748,352.529,2008.668,0.000,90.000,0.000);
  17506. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17507. objectid = CreateDynamicObject(19380,-501.244,352.529,2008.671,0.000,90.000,0.000);
  17508. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17509. objectid = CreateDynamicObject(19380,-511.745,352.529,2008.671,0.000,90.000,0.000);
  17510. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17511. objectid = CreateDynamicObject(18762,-510.929,299.998,2006.084,0.000,0.000,0.000);
  17512. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17513. objectid = CreateDynamicObject(18762,-510.929,299.998,2001.087,0.000,0.000,0.000);
  17514. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17515. objectid = CreateDynamicObject(18762,-510.929,299.998,2011.078,0.000,0.000,0.000);
  17516. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17517. objectid = CreateDynamicObject(18762,-510.929,290.367,2001.087,0.000,0.000,0.000);
  17518. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17519. objectid = CreateDynamicObject(18762,-510.929,290.367,2006.084,0.000,0.000,0.000);
  17520. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17521. objectid = CreateDynamicObject(18762,-510.929,290.367,2011.078,0.000,0.000,0.000);
  17522. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17523. objectid = CreateDynamicObject(18762,-491.435,299.998,2001.087,0.000,0.000,0.000);
  17524. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17525. objectid = CreateDynamicObject(18762,-491.435,299.998,2006.084,0.000,0.000,0.000);
  17526. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17527. objectid = CreateDynamicObject(18762,-491.435,299.998,2011.078,0.000,0.000,0.000);
  17528. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17529. objectid = CreateDynamicObject(18762,-491.435,290.367,2001.087,0.000,0.000,0.000);
  17530. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17531. objectid = CreateDynamicObject(18762,-491.436,290.367,2006.084,0.000,0.000,0.000);
  17532. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17533. objectid = CreateDynamicObject(18762,-491.435,290.367,2011.078,0.000,0.000,0.000);
  17534. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17535. objectid = CreateDynamicObject(19359,-488.410,285.642,2002.609,0.000,0.000,90.000);
  17536. SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1);
  17537. objectid = CreateDynamicObject(19359,-488.409,285.642,2006.104,0.000,0.000,90.000);
  17538. SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1);
  17539. objectid = CreateDynamicObject(19359,-488.408,285.643,2009.598,0.000,0.000,90.000);
  17540. SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1);
  17541. objectid = CreateDynamicObject(19359,-494.394,285.643,2009.598,0.000,0.000,90.000);
  17542. SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1);
  17543. objectid = CreateDynamicObject(19359,-494.393,285.642,2002.609,0.000,0.000,90.000);
  17544. SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1);
  17545. objectid = CreateDynamicObject(19359,-494.393,285.643,2006.104,0.000,0.000,90.000);
  17546. SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1);
  17547. objectid = CreateDynamicObject(19359,-513.984,285.643,2009.598,0.000,0.000,90.000);
  17548. SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1);
  17549. objectid = CreateDynamicObject(19359,-513.983,285.643,2002.609,0.000,0.000,90.000);
  17550. SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1);
  17551. objectid = CreateDynamicObject(19359,-513.983,285.643,2006.104,0.000,0.000,90.000);
  17552. SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1);
  17553. objectid = CreateDynamicObject(19359,-507.854,285.643,2009.598,0.000,0.000,90.000);
  17554. SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1);
  17555. objectid = CreateDynamicObject(19359,-507.853,285.643,2002.609,0.000,0.000,90.000);
  17556. SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1);
  17557. objectid = CreateDynamicObject(19359,-507.852,285.643,2006.104,0.000,0.000,90.000);
  17558. SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1);
  17559. objectid = CreateDynamicObject(19359,-501.251,285.643,2006.104,0.000,0.000,90.000);
  17560. SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1);
  17561. objectid = CreateDynamicObject(19359,-501.250,285.642,2009.598,0.000,0.000,90.000);
  17562. SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1);
  17563. objectid = CreateDynamicObject(18762,-504.367,295.658,2011.078,0.000,0.000,0.000);
  17564. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17565. objectid = CreateDynamicObject(18762,-497.747,295.658,2001.087,0.000,0.000,0.000);
  17566. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17567. objectid = CreateDynamicObject(18762,-504.366,295.658,2001.087,0.000,0.000,0.000);
  17568. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17569. objectid = CreateDynamicObject(18762,-497.747,295.658,2006.084,0.000,0.000,0.000);
  17570. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17571. objectid = CreateDynamicObject(18762,-497.747,295.658,2011.078,0.000,0.000,0.000);
  17572. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17573. objectid = CreateDynamicObject(18762,-504.366,295.658,2006.084,0.000,0.000,0.000);
  17574. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17575. objectid = CreateDynamicObject(970,-508.135,309.213,2004.136,0.000,0.000,0.000);
  17576. SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0);
  17577. objectid = CreateDynamicObject(970,-512.234,309.216,2004.136,0.000,0.000,0.000);
  17578. SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0);
  17579. objectid = CreateDynamicObject(970,-515.630,309.231,2004.136,0.000,0.000,0.000);
  17580. SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0);
  17581. objectid = CreateDynamicObject(970,-494.348,309.209,2004.136,0.000,0.000,0.000);
  17582. SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0);
  17583. objectid = CreateDynamicObject(970,-490.190,309.212,2004.136,0.000,0.000,0.000);
  17584. SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0);
  17585. objectid = CreateDynamicObject(970,-487.759,309.209,2004.136,0.000,0.000,0.000);
  17586. SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0);
  17587. objectid = CreateDynamicObject(19461,-485.595,300.000,2001.836,0.000,0.000,359.983);
  17588. SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1);
  17589. objectid = CreateDynamicObject(19461,-485.595,290.368,2001.836,0.000,0.000,359.983);
  17590. SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1);
  17591. objectid = CreateDynamicObject(19461,-485.595,309.628,2010.332,0.000,179.994,359.983);
  17592. SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1);
  17593. objectid = CreateDynamicObject(19461,-485.595,290.368,2010.332,0.000,179.994,359.983);
  17594. SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1);
  17595. objectid = CreateDynamicObject(19461,-485.595,300.000,2010.332,0.000,179.994,359.978);
  17596. SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1);
  17597. objectid = CreateDynamicObject(19461,-485.595,309.628,2001.836,0.000,0.000,359.983);
  17598. SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1);
  17599. objectid = CreateDynamicObject(19461,-516.888,309.628,2001.836,0.000,0.000,359.983);
  17600. SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1);
  17601. objectid = CreateDynamicObject(19461,-516.888,300.000,2001.836,0.000,0.000,359.989);
  17602. SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1);
  17603. objectid = CreateDynamicObject(19461,-516.888,290.368,2001.836,0.000,0.000,359.989);
  17604. SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1);
  17605. objectid = CreateDynamicObject(19461,-516.888,290.368,2010.332,0.000,179.994,359.983);
  17606. SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1);
  17607. objectid = CreateDynamicObject(19461,-516.888,300.000,2010.332,0.000,179.994,359.983);
  17608. SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1);
  17609. objectid = CreateDynamicObject(19461,-516.888,309.628,2010.332,0.000,179.994,359.983);
  17610. SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1);
  17611. objectid = CreateDynamicObject(19377,-480.429,309.628,2003.499,0.000,90.000,0.000);
  17612. SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1);
  17613. objectid = CreateDynamicObject(19377,-480.429,300.000,2003.499,0.000,90.000,0.000);
  17614. SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1);
  17615. objectid = CreateDynamicObject(19377,-480.429,290.368,2003.499,0.000,90.000,0.000);
  17616. SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1);
  17617. objectid = CreateDynamicObject(19464,-483.450,314.358,2006.136,0.000,0.000,90.000);
  17618. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17619. objectid = CreateDynamicObject(18762,-485.183,299.998,2006.084,0.000,0.000,0.000);
  17620. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17621. objectid = CreateDynamicObject(18762,-485.182,290.367,2006.084,0.000,0.000,0.000);
  17622. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17623. objectid = CreateDynamicObject(18762,-480.985,313.734,2006.084,0.000,0.000,0.000);
  17624. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17625. objectid = CreateDynamicObject(18762,-480.985,309.695,2006.084,0.000,0.000,0.000);
  17626. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17627. objectid = CreateDynamicObject(18762,-480.985,299.998,2006.084,0.000,0.000,0.000);
  17628. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17629. objectid = CreateDynamicObject(18762,-480.985,290.367,2006.084,0.000,0.000,0.000);
  17630. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17631. objectid = CreateDynamicObject(19464,-521.981,301.203,2006.136,0.000,0.000,0.000);
  17632. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17633. objectid = CreateDynamicObject(19465,-521.981,295.270,2006.136,0.000,0.000,0.000);
  17634. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17635. objectid = CreateDynamicObject(19464,-521.980,289.337,2006.136,0.000,0.000,0.000);
  17636. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17637. objectid = CreateDynamicObject(19464,-521.981,283.406,2006.136,0.000,0.000,0.000);
  17638. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17639. objectid = CreateDynamicObject(19380,-480.429,309.628,2008.667,0.000,90.000,0.000);
  17640. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17641. objectid = CreateDynamicObject(19380,-480.429,300.000,2008.668,0.000,90.000,0.000);
  17642. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17643. objectid = CreateDynamicObject(19380,-480.429,290.368,2008.668,0.000,90.000,0.000);
  17644. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17645. objectid = CreateDynamicObject(19377,-469.927,290.367,2003.499,0.000,90.000,0.000);
  17646. SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1);
  17647. objectid = CreateDynamicObject(19464,-521.981,307.136,2006.136,0.000,0.000,0.000);
  17648. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17649. objectid = CreateDynamicObject(19464,-521.981,313.062,2006.136,0.000,0.000,0.000);
  17650. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17651. objectid = CreateDynamicObject(19377,-469.927,300.000,2003.499,0.000,90.000,0.000);
  17652. SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1);
  17653. objectid = CreateDynamicObject(19464,-468.744,295.270,2006.136,0.000,0.000,179.994);
  17654. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17655. objectid = CreateDynamicObject(19464,-468.744,289.337,2006.136,0.000,0.000,179.994);
  17656. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17657. objectid = CreateDynamicObject(19464,-471.581,286.497,2006.136,0.000,0.000,90.000);
  17658. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17659. objectid = CreateDynamicObject(19464,-477.519,286.497,2006.136,0.000,0.000,90.000);
  17660. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17661. objectid = CreateDynamicObject(19380,-469.927,290.368,2008.668,0.000,90.000,0.000);
  17662. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17663. objectid = CreateDynamicObject(19380,-469.927,300.000,2008.668,0.000,90.000,0.000);
  17664. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17665. objectid = CreateDynamicObject(970,-516.818,307.128,2004.136,0.000,0.000,270.000);
  17666. SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0);
  17667. objectid = CreateDynamicObject(970,-516.818,302.960,2004.136,0.000,0.000,270.000);
  17668. SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0);
  17669. objectid = CreateDynamicObject(970,-516.818,298.783,2004.136,0.000,0.000,270.000);
  17670. SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0);
  17671. objectid = CreateDynamicObject(970,-516.818,294.606,2004.136,0.000,0.000,270.000);
  17672. SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0);
  17673. objectid = CreateDynamicObject(970,-516.818,290.430,2004.136,0.000,0.000,270.000);
  17674. SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0);
  17675. objectid = CreateDynamicObject(970,-516.818,286.253,2004.136,0.000,0.000,270.000);
  17676. SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0);
  17677. objectid = CreateDynamicObject(19359,-471.091,286.545,2006.104,0.000,0.000,90.000);
  17678. SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1);
  17679. objectid = CreateDynamicObject(19359,-478.390,286.542,2006.104,0.000,0.000,90.000);
  17680. SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1);
  17681. objectid = CreateDynamicObject(19359,-474.742,286.538,2006.104,0.000,0.000,90.000);
  17682. SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1);
  17683. objectid = CreateDynamicObject(19377,-522.054,309.628,2003.503,0.000,90.000,0.000);
  17684. SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1);
  17685. objectid = CreateDynamicObject(19377,-522.054,300.000,2003.499,0.000,90.000,0.000);
  17686. SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1);
  17687. objectid = CreateDynamicObject(19377,-522.054,290.368,2003.499,0.000,90.000,0.000);
  17688. SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1);
  17689. objectid = CreateDynamicObject(19379,-521.804,285.638,2005.337,0.000,0.000,90.000);
  17690. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17691. objectid = CreateDynamicObject(19380,-522.054,309.628,2008.667,0.000,90.000,0.000);
  17692. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17693. objectid = CreateDynamicObject(19380,-522.054,300.000,2008.668,0.000,90.000,0.000);
  17694. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17695. objectid = CreateDynamicObject(19380,-522.054,290.368,2008.668,0.000,90.000,0.000);
  17696. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17697. objectid = CreateDynamicObject(18762,-521.362,299.998,2006.084,0.000,0.000,0.000);
  17698. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17699. objectid = CreateDynamicObject(18762,-521.362,290.367,2006.084,0.000,0.000,0.000);
  17700. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17701. objectid = CreateDynamicObject(19464,-521.903,314.358,2006.136,0.000,0.000,90.000);
  17702. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17703. objectid = CreateDynamicObject(18762,-517.299,313.771,2006.084,0.000,0.000,0.000);
  17704. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17705. objectid = CreateDynamicObject(18762,-517.299,309.688,2006.084,0.000,0.000,0.000);
  17706. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17707. objectid = CreateDynamicObject(18762,-517.299,299.998,2006.084,0.000,0.000,0.000);
  17708. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17709. objectid = CreateDynamicObject(18762,-517.299,290.367,2006.084,0.000,0.000,0.000);
  17710. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17711. objectid = CreateDynamicObject(19464,-480.611,313.062,2006.136,0.000,0.000,0.000);
  17712. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17713. objectid = CreateDynamicObject(19464,-480.611,307.136,2006.136,0.000,0.000,0.000);
  17714. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17715. objectid = CreateDynamicObject(19464,-480.611,301.202,2006.136,0.000,0.000,0.000);
  17716. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17717. objectid = CreateDynamicObject(19465,-480.610,295.270,2006.136,0.000,0.000,0.000);
  17718. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17719. objectid = CreateDynamicObject(19464,-480.610,289.337,2006.136,0.000,0.000,0.000);
  17720. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17721. objectid = CreateDynamicObject(19464,-480.610,283.405,2006.136,0.000,0.000,0.000);
  17722. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17723. objectid = CreateDynamicObject(19377,-532.554,300.000,2003.499,0.000,90.000,0.000);
  17724. SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1);
  17725. objectid = CreateDynamicObject(19377,-532.554,290.368,2003.499,0.000,90.000,0.000);
  17726. SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1);
  17727. objectid = CreateDynamicObject(19464,-525.072,286.497,2006.136,0.000,0.000,90.000);
  17728. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17729. objectid = CreateDynamicObject(19464,-531.002,297.161,2006.136,0.000,0.000,90.000);
  17730. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17731. objectid = CreateDynamicObject(19464,-533.844,289.337,2006.136,0.000,0.000,179.994);
  17732. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17733. objectid = CreateDynamicObject(19464,-533.844,295.270,2006.136,0.000,0.000,179.994);
  17734. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17735. objectid = CreateDynamicObject(19464,-525.072,297.161,2006.136,0.000,0.000,90.000);
  17736. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17737. objectid = CreateDynamicObject(19464,-531.002,286.496,2006.136,0.000,0.000,90.000);
  17738. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1);
  17739. objectid = CreateDynamicObject(19380,-532.554,300.000,2008.668,0.000,90.000,0.000);
  17740. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17741. objectid = CreateDynamicObject(19380,-532.554,290.368,2008.668,0.000,90.000,0.000);
  17742. SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1);
  17743. objectid = CreateDynamicObject(19359,-524.174,286.545,2006.104,0.000,0.000,90.000);
  17744. SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1);
  17745. objectid = CreateDynamicObject(19359,-531.679,286.537,2006.104,0.000,0.000,90.000);
  17746. SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1);
  17747. objectid = CreateDynamicObject(19359,-527.971,286.536,2006.104,0.000,0.000,90.000);
  17748. SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1);
  17749. objectid = CreateDynamicObject(19395,-506.837,309.284,2001.836,0.000,0.000,270.000);
  17750. SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1);
  17751. objectid = CreateDynamicObject(19459,-513.254,309.284,2001.836,0.000,0.000,90.000);
  17752. SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1);
  17753. objectid = CreateDynamicObject(19459,-513.545,314.021,2001.836,0.000,0.000,0.000);
  17754. SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1);
  17755. objectid = CreateDynamicObject(19459,-505.176,314.189,2001.836,0.000,0.000,0.000);
  17756. SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1);
  17757. objectid = CreateDynamicObject(19459,-510.075,318.891,2001.836,0.000,0.000,90.000);
  17758. SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1);
  17759. objectid = CreateDynamicObject(970,-485.663,307.128,2004.136,0.000,0.000,270.000);
  17760. SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0);
  17761. objectid = CreateDynamicObject(970,-485.665,302.960,2004.136,0.000,0.000,270.000);
  17762. SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0);
  17763. objectid = CreateDynamicObject(970,-485.665,298.783,2004.136,0.000,0.000,270.000);
  17764. SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0);
  17765. objectid = CreateDynamicObject(970,-485.665,294.606,2004.136,0.000,0.000,270.000);
  17766. SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0);
  17767. objectid = CreateDynamicObject(970,-485.664,290.430,2004.136,0.000,0.000,270.000);
  17768. SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0);
  17769. objectid = CreateDynamicObject(970,-485.664,286.253,2004.136,0.000,0.000,270.000);
  17770. SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0);
  17771. objectid = CreateDynamicObject(1502,-521.905,294.505,2003.579,0.000,0.000,90.000);
  17772. SetDynamicObjectMaterial(objectid, 1, 3603, "bevmans01_la", "lasbevcit7", 0);
  17773. objectid = CreateDynamicObject(1502,-480.641,294.502,2003.578,0.000,0.000,90.000);
  17774. SetDynamicObjectMaterial(objectid, 1, 3603, "bevmans01_la", "lasbevcit7", 0);
  17775. objectid = CreateDynamicObject(1502,-500.484,314.325,2003.583,0.000,0.000,179.994);
  17776. SetDynamicObjectMaterial(objectid, 1, 3603, "bevmans01_la", "lasbevcit7", 0);
  17777. objectid = CreateDynamicObject(1502,-506.050,309.289,2000.079,0.000,0.000,179.994);
  17778. SetDynamicObjectMaterial(objectid, 1, 3603, "bevmans01_la", "lasbevcit7", 0);
  17779. objectid = CreateDynamicObject(1502,-494.860,309.286,2000.079,0.000,0.000,179.994);
  17780. SetDynamicObjectMaterial(objectid, 1, 3603, "bevmans01_la", "lasbevcit7", 0);
  17781. objectid = CreateDynamicObject(19172,-513.949,314.229,2005.329,0.000,0.000,0.000);
  17782. SetDynamicObjectMaterial(objectid, 0, 2266, "picture_frame", "CJ_PAINTING14", -1);
  17783. objectid = CreateDynamicObject(19172,-508.878,314.239,2005.329,0.000,0.000,0.000);
  17784. SetDynamicObjectMaterial(objectid, 0, 2266, "picture_frame", "CJ_PAINTING11", -1);
  17785. objectid = CreateDynamicObject(19172,-493.697,314.230,2005.329,0.000,0.000,0.000);
  17786. SetDynamicObjectMaterial(objectid, 0, 2266, "picture_frame", "CJ_PAINTING28", -1);
  17787. objectid = CreateDynamicObject(19172,-488.295,314.232,2005.329,0.000,0.000,0.000);
  17788. SetDynamicObjectMaterial(objectid, 0, 2266, "picture_frame", "CJ_PAINTING30", -1);
  17789. objectid = CreateDynamicObject(19459,-506.851,318.292,2001.836,0.000,0.000,0.000);
  17790. SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1);
  17791. objectid = CreateDynamicObject(1492,-506.777,313.790,2000.162,0.000,0.000,0.000);
  17792. SetDynamicObjectMaterial(objectid, 1, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17793. SetDynamicObjectMaterial(objectid, 2, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17794. SetDynamicObjectMaterial(objectid, 3, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17795. SetDynamicObjectMaterial(objectid, 4, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17796. objectid = CreateDynamicObject(1492,-508.450,313.790,2000.162,0.000,0.000,0.000);
  17797. SetDynamicObjectMaterial(objectid, 1, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17798. SetDynamicObjectMaterial(objectid, 2, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17799. SetDynamicObjectMaterial(objectid, 3, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17800. SetDynamicObjectMaterial(objectid, 4, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17801. objectid = CreateDynamicObject(19459,-508.526,318.292,2001.836,0.000,0.000,0.000);
  17802. SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1);
  17803. objectid = CreateDynamicObject(1492,-510.123,313.790,2000.162,0.000,0.000,0.000);
  17804. SetDynamicObjectMaterial(objectid, 1, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17805. SetDynamicObjectMaterial(objectid, 2, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17806. SetDynamicObjectMaterial(objectid, 3, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17807. SetDynamicObjectMaterial(objectid, 4, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17808. objectid = CreateDynamicObject(19459,-510.199,318.292,2001.836,0.000,0.000,0.000);
  17809. SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1);
  17810. objectid = CreateDynamicObject(1492,-511.795,313.790,2000.162,0.000,0.000,0.000);
  17811. SetDynamicObjectMaterial(objectid, 1, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17812. SetDynamicObjectMaterial(objectid, 2, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17813. SetDynamicObjectMaterial(objectid, 3, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17814. SetDynamicObjectMaterial(objectid, 4, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17815. objectid = CreateDynamicObject(19459,-511.869,318.292,2001.836,0.000,0.000,0.000);
  17816. SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1);
  17817. objectid = CreateDynamicObject(1492,-513.469,313.790,2000.162,0.000,0.000,0.000);
  17818. SetDynamicObjectMaterial(objectid, 1, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17819. SetDynamicObjectMaterial(objectid, 2, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17820. SetDynamicObjectMaterial(objectid, 3, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17821. SetDynamicObjectMaterial(objectid, 4, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17822. objectid = CreateDynamicObject(19452,-501.222,290.527,2000.009,0.000,90.000,0.000);
  17823. SetDynamicObjectMaterial(objectid, 0, 14534, "ab_wooziea", "ab_tileDiamond", -1);
  17824. objectid = CreateDynamicObject(19452,-501.222,300.160,2000.009,0.000,90.000,0.000);
  17825. SetDynamicObjectMaterial(objectid, 0, 14534, "ab_wooziea", "ab_tileDiamond", -1);
  17826. objectid = CreateDynamicObject(19452,-501.190,314.020,2003.505,0.000,90.000,0.000);
  17827. SetDynamicObjectMaterial(objectid, 0, 14534, "ab_wooziea", "ab_tileDiamond", -1);
  17828. objectid = CreateDynamicObject(19452,-501.190,323.650,2003.505,0.000,90.000,0.000);
  17829. SetDynamicObjectMaterial(objectid, 0, 14534, "ab_wooziea", "ab_tileDiamond", -1);
  17830. objectid = CreateDynamicObject(19452,-501.184,327.217,2003.501,0.000,90.000,0.000);
  17831. SetDynamicObjectMaterial(objectid, 0, 14534, "ab_wooziea", "ab_tileDiamond", -1);
  17832. objectid = CreateDynamicObject(1492,-495.692,313.790,2000.162,0.000,0.000,180.000);
  17833. SetDynamicObjectMaterial(objectid, 0, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17834. SetDynamicObjectMaterial(objectid, 1, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17835. SetDynamicObjectMaterial(objectid, 2, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17836. SetDynamicObjectMaterial(objectid, 3, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17837. SetDynamicObjectMaterial(objectid, 4, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17838. objectid = CreateDynamicObject(19459,-497.287,314.184,2001.836,0.000,0.000,0.000);
  17839. SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1);
  17840. objectid = CreateDynamicObject(19459,-492.385,318.899,2001.836,0.000,0.000,90.000);
  17841. SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1);
  17842. objectid = CreateDynamicObject(19459,-495.619,318.292,2001.836,0.000,0.000,180.000);
  17843. SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1);
  17844. objectid = CreateDynamicObject(1492,-494.018,313.790,2000.162,0.000,0.000,179.994);
  17845. SetDynamicObjectMaterial(objectid, 1, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17846. SetDynamicObjectMaterial(objectid, 2, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17847. SetDynamicObjectMaterial(objectid, 3, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17848. SetDynamicObjectMaterial(objectid, 4, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17849. objectid = CreateDynamicObject(19459,-493.944,318.292,2001.836,0.000,0.000,179.994);
  17850. SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1);
  17851. objectid = CreateDynamicObject(1492,-492.346,313.790,2000.162,0.000,0.000,179.994);
  17852. SetDynamicObjectMaterial(objectid, 1, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17853. SetDynamicObjectMaterial(objectid, 2, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17854. SetDynamicObjectMaterial(objectid, 3, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17855. SetDynamicObjectMaterial(objectid, 4, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17856. objectid = CreateDynamicObject(19459,-492.270,318.292,2001.836,0.000,0.000,179.994);
  17857. SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1);
  17858. objectid = CreateDynamicObject(1492,-490.671,313.790,2000.162,0.000,0.000,179.994);
  17859. SetDynamicObjectMaterial(objectid, 1, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17860. SetDynamicObjectMaterial(objectid, 2, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17861. SetDynamicObjectMaterial(objectid, 3, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17862. SetDynamicObjectMaterial(objectid, 4, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17863. objectid = CreateDynamicObject(19459,-490.596,318.292,2001.836,0.000,0.000,179.994);
  17864. SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1);
  17865. objectid = CreateDynamicObject(1492,-488.997,313.790,2000.162,0.000,0.000,179.994);
  17866. SetDynamicObjectMaterial(objectid, 1, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17867. SetDynamicObjectMaterial(objectid, 2, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17868. SetDynamicObjectMaterial(objectid, 3, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17869. SetDynamicObjectMaterial(objectid, 4, 14789, "ab_sfgymmain", "ab_panelWall1", 0);
  17870. objectid = CreateDynamicObject(19459,-488.929,314.179,2001.836,0.000,0.000,179.994);
  17871. SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1);
  17872. objectid = CreateDynamicObject(19459,-489.222,309.282,2001.836,0.000,0.000,89.994);
  17873. SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1);
  17874. objectid = CreateDynamicObject(19395,-495.645,309.282,2001.836,0.000,0.000,270.000);
  17875. SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1);
  17876. objectid = CreateDynamicObject(18762,-505.825,319.372,2006.084,0.000,0.000,0.000);
  17877. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17878. objectid = CreateDynamicObject(18762,-513.284,326.922,2006.084,0.000,0.000,0.000);
  17879. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17880. objectid = CreateDynamicObject(18762,-505.833,326.923,2006.084,0.000,0.000,0.000);
  17881. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17882. objectid = CreateDynamicObject(18762,-513.284,319.434,2006.084,0.000,0.000,0.000);
  17883. SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1);
  17884. objectid = CreateDynamicObject(1502,-505.127,322.368,2003.578,0.000,0.000,89.994);
  17885. SetDynamicObjectMaterial(objectid, 1, 3603, "bevmans01_la", "lasbevcit7", 0);
  17886. objectid = CreateDynamicObject(19353,-491.762,331.872,2006.168,90.000,0.000,90.000);
  17887. SetDynamicObjectMaterial(objectid, 0, 12853, "cunte_gas01", "starspangban1_256", -1);
  17888. objectid = CreateDynamicObject(1502,-497.295,322.369,2003.578,0.000,0.000,89.994);
  17889. SetDynamicObjectMaterial(objectid, 0, 3603, "bevmans01_la", "lasbevcit7", 0);
  17890. SetDynamicObjectMaterial(objectid, 1, 3603, "bevmans01_la", "lasbevcit7", 0);
  17891. objectid = CreateDynamicObject(1502,-500.485,331.878,2003.583,0.000,0.000,179.994);
  17892. SetDynamicObjectMaterial(objectid, 1, 3603, "bevmans01_la", "lasbevcit7", 0);
  17893. objectid = CreateDynamicObject(19445,-475.669,297.016,2002.682,0.000,0.000,90.000);
  17894. SetDynamicObjectMaterial(objectid, 0, 14788, "ab_sfgymbits01", "lockers", 0);
  17895. objectid = CreateDynamicObject(19445,-466.037,297.016,2002.682,0.000,0.000,90.000);
  17896. SetDynamicObjectMaterial(objectid, 0, 14788, "ab_sfgymbits01", "lockers", 0);
  17897. objectid = CreateDynamicObject(19445,-475.669,297.016,2009.530,0.000,180.000,90.000);
  17898. SetDynamicObjectMaterial(objectid, 0, 14581, "ab_mafiasuitea", "ab_wood01", 0);
  17899. objectid = CreateDynamicObject(19445,-466.044,297.016,2009.530,0.000,179.994,90.000);
  17900. SetDynamicObjectMaterial(objectid, 0, 14581, "ab_mafiasuitea", "ab_wood01", 0);
  17901. objectid = CreateDynamicObject(19445,-480.397,301.742,2005.334,0.000,0.000,180.000);
  17902. SetDynamicObjectMaterial(objectid, 0, 14788, "ab_sfgymbits01", "lockers", 0);
  17903. objectid = CreateDynamicObject(19445,-480.399,301.740,2006.837,0.000,180.000,179.994);
  17904. SetDynamicObjectMaterial(objectid, 0, 14581, "ab_mafiasuitea", "ab_wood01", 0);
  17905. objectid = CreateDynamicObject(19445,-468.960,301.743,2005.334,0.000,0.000,179.994);
  17906. SetDynamicObjectMaterial(objectid, 0, 14788, "ab_sfgymbits01", "lockers", 0);
  17907. objectid = CreateDynamicObject(19445,-468.957,301.743,2006.837,0.000,179.994,179.994);
  17908. SetDynamicObjectMaterial(objectid, 0, 14788, "ab_sfgymbits01", "lockers", 0);
  17909. objectid = CreateDynamicObject(19445,-475.697,301.890,2005.334,0.000,0.000,269.994);
  17910. SetDynamicObjectMaterial(objectid, 0, 3925, "weemap", "skyclouds", 0);
  17911. objectid = CreateDynamicObject(19445,-466.069,301.889,2005.334,0.000,0.000,269.989);
  17912. SetDynamicObjectMaterial(objectid, 0, 14581, "ab_mafiasuitea", "ab_wood01", 0);
  17913. objectid = CreateDynamicObject(19445,-475.490,301.894,2006.837,0.000,179.994,269.994);
  17914. SetDynamicObjectMaterial(objectid, 0, 3925, "weemap", "skyclouds", 0);
  17915. objectid = CreateDynamicObject(19445,-465.865,301.894,2006.837,0.000,179.994,269.989);
  17916. SetDynamicObjectMaterial(objectid, 0, 3925, "weemap", "skyclouds", 0);
  17917. objectid = CreateDynamicObject(19375,-475.283,301.747,2004.340,0.000,90.000,0.000);
  17918. SetDynamicObjectMaterial(objectid, 0, 14788, "ab_sfgymbits01", "lockers", 0);
  17919. objectid = CreateDynamicObject(19375,-464.786,301.917,2004.340,0.000,90.000,0.000);
  17920. SetDynamicObjectMaterial(objectid, 0, 14788, "ab_sfgymbits01", "lockers", 0);
  17921. objectid = CreateDynamicObject(19375,-464.785,301.917,2007.869,0.000,90.000,0.000);
  17922. SetDynamicObjectMaterial(objectid, 0, 14788, "ab_sfgymbits01", "lockers", 0);
  17923. objectid = CreateDynamicObject(19375,-475.283,301.746,2007.869,0.000,90.000,0.000);
  17924. SetDynamicObjectMaterial(objectid, 0, 14788, "ab_sfgymbits01", "lockers", 0);
  17925. objectid = CreateDynamicObject(953,-474.304,300.665,2005.326,8.000,0.000,0.000);
  17926. SetDynamicObjectMaterial(objectid, 0, 14788, "ab_sfgymbits01", "lockers", 0);
  17927. objectid = CreateDynamicObject(19353,-531.632,297.121,2005.936,90.000,0.000,90.000);
  17928. SetDynamicObjectMaterial(objectid, 0, 12853, "cunte_gas01", "starspangban1_256", -1);
  17929. objectid = CreateDynamicObject(19353,-524.247,297.117,2005.936,90.000,0.000,90.000);
  17930. SetDynamicObjectMaterial(objectid, 0, 12853, "cunte_gas01", "starspangban1_256", -1);
  17931. objectid = CreateDynamicObject(19360,-501.199,285.668,2001.835,0.000,0.000,-90.199);
  17932. SetDynamicObjectMaterial(objectid, 0, 9524, "blokmodb", "lombard_build5_3", -1);
  17933. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  17934. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  17935. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  17936. CreateDynamicObject(14394,-501.250,305.927,2000.889,0.000,0.000,90.000);
  17937. CreateDynamicObject(14394,-501.250,308.159,2002.509,0.000,0.000,90.000);
  17938. CreateDynamicObject(14387,-501.235,336.647,2002.593,0.000,0.000,90.000);
  17939. CreateDynamicObject(14387,-501.235,339.197,2001.926,0.000,0.000,90.000);
  17940. CreateDynamicObject(14387,-501.235,341.742,2001.256,0.000,0.000,90.000);
  17941. CreateDynamicObject(14387,-501.235,344.316,2000.593,0.000,0.000,90.000);
  17942. CreateDynamicObject(14387,-507.170,351.622,2000.587,0.000,0.000,180.000);
  17943. CreateDynamicObject(14387,-495.300,351.640,2000.587,0.000,0.000,359.994);
  17944. CreateDynamicObject(2173,-496.055,342.658,2001.583,0.000,0.000,0.000);
  17945. CreateDynamicObject(2173,-509.424,342.660,2001.583,0.000,0.000,0.000);
  17946. CreateDynamicObject(2173,-494.095,342.658,2001.583,0.000,0.000,0.000);
  17947. CreateDynamicObject(2173,-509.424,334.957,2003.583,0.000,0.000,0.000);
  17948. CreateDynamicObject(2173,-498.019,340.078,2002.249,0.000,0.000,0.000);
  17949. CreateDynamicObject(2173,-498.019,337.529,2002.916,0.000,0.000,0.000);
  17950. CreateDynamicObject(2173,-496.055,340.078,2002.249,0.000,0.000,0.000);
  17951. CreateDynamicObject(2173,-496.055,337.529,2002.916,0.000,0.000,0.000);
  17952. CreateDynamicObject(2173,-496.055,334.956,2003.583,0.000,0.000,0.000);
  17953. CreateDynamicObject(2173,-494.095,340.078,2002.249,0.000,0.000,0.000);
  17954. CreateDynamicObject(2173,-494.095,334.956,2003.583,0.000,0.000,0.000);
  17955. CreateDynamicObject(2173,-498.018,342.657,2001.583,0.000,0.000,0.000);
  17956. CreateDynamicObject(2173,-507.460,342.658,2001.583,0.000,0.000,0.000);
  17957. CreateDynamicObject(2173,-505.497,342.658,2001.583,0.000,0.000,0.000);
  17958. CreateDynamicObject(2173,-505.497,340.078,2002.249,0.000,0.000,0.000);
  17959. CreateDynamicObject(2173,-505.497,337.529,2002.916,0.000,0.000,0.000);
  17960. CreateDynamicObject(2173,-498.018,334.956,2003.583,0.000,0.000,0.000);
  17961. CreateDynamicObject(2173,-507.460,340.078,2002.249,0.000,0.000,0.000);
  17962. CreateDynamicObject(2173,-507.460,337.529,2002.916,0.000,0.000,0.000);
  17963. CreateDynamicObject(2173,-505.496,334.956,2003.583,0.000,0.000,0.000);
  17964. CreateDynamicObject(2173,-509.424,340.078,2002.249,0.000,0.000,0.000);
  17965. CreateDynamicObject(2173,-509.424,337.529,2002.916,0.000,0.000,0.000);
  17966. CreateDynamicObject(2173,-507.460,334.956,2003.583,0.000,0.000,0.000);
  17967. CreateDynamicObject(2173,-502.898,349.690,2001.583,0.000,0.000,180.000);
  17968. CreateDynamicObject(1722,-497.350,340.934,2001.583,0.000,0.000,0.000);
  17969. CreateDynamicObject(2205,-500.601,349.696,2001.583,0.000,0.000,179.994);
  17970. CreateDynamicObject(2173,-498.647,349.679,2001.583,0.000,0.000,179.994);
  17971. CreateDynamicObject(11245,-505.993,351.096,2006.917,0.000,0.000,270.000);
  17972. CreateDynamicObject(11245,-502.833,351.096,2006.917,0.000,0.000,270.000);
  17973. CreateDynamicObject(11245,-500.005,351.096,2006.917,0.000,0.000,270.000);
  17974. CreateDynamicObject(11245,-496.872,351.096,2006.917,0.000,0.000,270.000);
  17975. CreateDynamicObject(1722,-495.657,340.899,2001.583,0.000,0.000,0.000);
  17976. CreateDynamicObject(1722,-493.691,338.308,2002.249,0.000,0.000,0.000);
  17977. CreateDynamicObject(1722,-493.663,341.013,2001.583,0.000,0.000,0.000);
  17978. CreateDynamicObject(2173,-494.094,337.529,2002.916,0.000,0.000,0.000);
  17979. CreateDynamicObject(1722,-495.647,338.295,2002.249,0.000,0.000,0.000);
  17980. CreateDynamicObject(1722,-497.572,338.325,2002.249,0.000,0.000,0.000);
  17981. CreateDynamicObject(1722,-505.158,338.226,2002.249,0.000,0.000,0.000);
  17982. CreateDynamicObject(1722,-506.966,338.216,2002.249,0.000,0.000,0.000);
  17983. CreateDynamicObject(1722,-508.876,338.238,2002.249,0.000,0.000,0.000);
  17984. CreateDynamicObject(1722,-508.858,335.632,2002.916,0.000,0.000,0.000);
  17985. CreateDynamicObject(1722,-507.046,335.575,2002.916,0.000,0.000,0.000);
  17986. CreateDynamicObject(1722,-505.011,335.623,2002.916,0.000,0.000,0.000);
  17987. CreateDynamicObject(1722,-504.949,332.985,2003.583,0.000,0.000,0.000);
  17988. CreateDynamicObject(1722,-507.118,332.958,2003.583,0.000,0.000,0.000);
  17989. CreateDynamicObject(1722,-497.503,332.859,2003.583,0.000,0.000,0.000);
  17990. CreateDynamicObject(1722,-509.057,332.876,2003.583,0.000,0.000,0.000);
  17991. CreateDynamicObject(1722,-497.505,335.625,2002.916,0.000,0.000,0.000);
  17992. CreateDynamicObject(1722,-495.518,332.871,2003.583,0.000,0.000,0.000);
  17993. CreateDynamicObject(1722,-493.611,332.895,2003.583,0.000,0.000,0.000);
  17994. CreateDynamicObject(1722,-495.479,335.597,2002.916,0.000,0.000,0.000);
  17995. CreateDynamicObject(1722,-493.690,335.589,2002.916,0.000,0.000,0.000);
  17996. CreateDynamicObject(1722,-507.079,340.735,2001.583,0.000,0.000,0.000);
  17997. CreateDynamicObject(1722,-505.014,340.826,2001.583,0.000,0.000,0.000);
  17998. CreateDynamicObject(1722,-508.930,340.778,2001.583,0.000,0.000,0.000);
  17999. CreateDynamicObject(1715,-503.514,351.144,2001.583,0.000,0.000,0.000);
  18000. CreateDynamicObject(1714,-501.346,351.187,2001.583,0.000,0.000,0.000);
  18001. CreateDynamicObject(1722,-501.292,296.928,2000.094,0.000,0.000,189.997);
  18002. CreateDynamicObject(2008,-505.821,325.097,2003.587,0.000,0.000,179.994);
  18003. CreateDynamicObject(2207,-502.128,295.188,2000.086,0.000,0.000,0.000);
  18004. CreateDynamicObject(1239,-501.190,295.062,2000.477,0.000,0.000,0.000);
  18005. CreateDynamicObject(1726,-509.894,291.384,2000.086,0.000,0.000,180.000);
  18006. CreateDynamicObject(1726,-511.944,298.979,2000.086,0.000,0.000,0.000);
  18007. CreateDynamicObject(1726,-509.924,301.009,2000.086,0.000,0.000,179.994);
  18008. CreateDynamicObject(1726,-511.902,289.332,2000.086,0.000,0.000,0.000);
  18009. CreateDynamicObject(1726,-492.449,289.346,2000.086,0.000,0.000,0.000);
  18010. CreateDynamicObject(1726,-492.454,298.984,2000.086,0.000,0.000,0.000);
  18011. CreateDynamicObject(1726,-490.440,301.019,2000.086,0.000,0.000,179.994);
  18012. CreateDynamicObject(1726,-490.416,291.381,2000.086,0.000,0.000,179.994);
  18013. CreateDynamicObject(1808,-510.232,299.927,2000.086,0.000,0.000,90.000);
  18014. CreateDynamicObject(1808,-510.252,290.338,2000.086,0.000,0.000,90.000);
  18015. CreateDynamicObject(1808,-490.769,290.341,2000.086,0.000,0.000,90.000);
  18016. CreateDynamicObject(1808,-490.752,299.972,2000.086,0.000,0.000,90.000);
  18017. CreateDynamicObject(1808,-511.598,300.029,2000.086,0.000,0.000,270.000);
  18018. CreateDynamicObject(1808,-511.592,290.369,2000.086,0.000,0.000,270.000);
  18019. CreateDynamicObject(1808,-492.049,290.372,2000.086,0.000,0.000,270.000);
  18020. CreateDynamicObject(1808,-492.131,300.027,2000.086,0.000,0.000,270.000);
  18021. CreateDynamicObject(11245,-505.480,308.692,2010.516,0.000,0.000,270.000);
  18022. CreateDynamicObject(11245,-502.476,308.692,2010.516,0.000,0.000,270.000);
  18023. CreateDynamicObject(11245,-499.639,308.692,2010.516,0.000,0.000,270.000);
  18024. CreateDynamicObject(11245,-496.802,308.692,2010.516,0.000,0.000,270.000);
  18025. CreateDynamicObject(2206,-475.517,288.815,2003.584,0.000,0.000,359.989);
  18026. CreateDynamicObject(1714,-474.475,287.171,2003.584,0.000,0.000,200.000);
  18027. CreateDynamicObject(14455,-469.067,287.296,2005.256,0.000,0.000,90.000);
  18028. CreateDynamicObject(14455,-533.556,291.635,2005.256,0.000,0.000,270.000);
  18029. CreateDynamicObject(1763,-472.888,291.811,2003.584,0.000,0.000,270.000);
  18030. CreateDynamicObject(1763,-475.950,290.536,2003.584,0.000,0.000,90.000);
  18031. CreateDynamicObject(1763,-475.067,293.049,2003.584,0.000,0.000,0.000);
  18032. CreateDynamicObject(2614,-468.920,289.483,2007.767,0.000,0.000,270.000);
  18033. CreateDynamicObject(2614,-480.441,289.441,2007.767,0.000,0.000,90.000);
  18034. CreateDynamicObject(2206,-528.786,288.816,2003.584,0.000,0.000,359.989);
  18035. CreateDynamicObject(2828,-475.322,288.976,2004.519,0.000,0.000,209.998);
  18036. CreateDynamicObject(2357,-527.883,291.408,2003.979,0.000,0.000,90.000);
  18037. CreateDynamicObject(1714,-527.895,287.085,2003.584,0.000,0.000,199.995);
  18038. CreateDynamicObject(14455,-480.341,291.641,2005.256,0.000,0.000,270.000);
  18039. CreateDynamicObject(14455,-522.257,287.295,2005.256,0.000,0.000,90.000);
  18040. CreateDynamicObject(1715,-498.954,351.036,2001.583,0.000,0.000,0.000);
  18041. CreateDynamicObject(1715,-526.072,289.988,2003.584,0.000,0.000,270.000);
  18042. CreateDynamicObject(1715,-525.940,291.398,2003.584,0.000,0.000,270.000);
  18043. CreateDynamicObject(1715,-526.010,292.669,2003.584,0.000,0.000,270.000);
  18044. CreateDynamicObject(1715,-529.577,292.638,2003.584,0.000,0.000,90.000);
  18045. CreateDynamicObject(1715,-529.580,291.351,2003.584,0.000,0.000,90.000);
  18046. CreateDynamicObject(1715,-529.591,289.975,2003.584,0.000,0.000,90.000);
  18047. CreateDynamicObject(1715,-527.818,294.717,2003.584,0.000,0.000,0.000);
  18048. CreateDynamicObject(14662,-510.126,311.131,2001.984,0.000,0.000,0.000);
  18049. CreateDynamicObject(14662,-514.033,311.130,2001.985,0.000,0.000,0.000);
  18050. CreateDynamicObject(14629,-509.615,302.830,2011.079,0.000,0.000,90.000);
  18051. CreateDynamicObject(1999,-506.763,314.989,2003.584,0.000,0.000,180.000);
  18052. CreateDynamicObject(2009,-507.825,317.864,2003.584,0.000,0.000,0.000);
  18053. CreateDynamicObject(2183,-510.899,328.456,2003.587,0.000,0.000,0.000);
  18054. CreateDynamicObject(2207,-492.803,326.635,2003.587,0.000,0.000,0.000);
  18055. CreateDynamicObject(2207,-490.949,328.561,2003.587,0.000,0.000,180.000);
  18056. CreateDynamicObject(2608,-505.558,317.914,2004.296,0.000,0.000,270.000);
  18057. CreateDynamicObject(2161,-515.356,331.790,2003.587,0.000,0.000,0.000);
  18058. CreateDynamicObject(2162,-512.247,331.799,2003.587,0.000,0.000,0.000);
  18059. CreateDynamicObject(2163,-510.473,331.782,2003.587,0.000,0.000,0.000);
  18060. CreateDynamicObject(2164,-514.021,331.776,2003.587,0.000,0.000,0.000);
  18061. CreateDynamicObject(2167,-513.372,314.407,2003.584,0.000,0.000,180.000);
  18062. CreateDynamicObject(2197,-514.127,315.799,2003.584,0.000,0.000,180.000);
  18063. CreateDynamicObject(1715,-493.541,325.932,2003.587,0.000,0.000,132.000);
  18064. CreateDynamicObject(2008,-506.838,321.281,2003.587,0.000,0.000,359.994);
  18065. CreateDynamicObject(3857,-509.070,319.359,2006.499,0.000,0.000,45.000);
  18066. CreateDynamicObject(3857,-509.069,319.358,2006.499,0.000,0.000,44.994);
  18067. CreateDynamicObject(3857,-516.778,319.446,2008.837,0.000,0.000,44.989);
  18068. CreateDynamicObject(3857,-516.778,319.446,2008.837,0.000,0.000,44.989);
  18069. CreateDynamicObject(3857,-509.069,319.358,2006.499,0.000,0.000,224.994);
  18070. CreateDynamicObject(3857,-509.069,319.358,2006.499,0.000,0.000,224.989);
  18071. CreateDynamicObject(1722,-506.522,317.743,2003.584,0.000,0.000,50.000);
  18072. CreateDynamicObject(1722,-507.459,315.569,2003.586,0.000,0.000,159.998);
  18073. CreateDynamicObject(2009,-510.092,317.863,2003.584,0.000,0.000,0.000);
  18074. CreateDynamicObject(2009,-512.293,317.863,2003.584,0.000,0.000,0.000);
  18075. CreateDynamicObject(1999,-509.031,314.998,2003.584,0.000,0.000,179.994);
  18076. CreateDynamicObject(1999,-511.317,314.997,2003.584,0.000,0.000,179.994);
  18077. CreateDynamicObject(1722,-509.278,318.411,2003.584,0.000,0.000,359.998);
  18078. CreateDynamicObject(1722,-511.592,317.627,2003.584,0.000,0.000,349.994);
  18079. CreateDynamicObject(2608,-505.559,316.032,2004.296,0.000,0.000,270.000);
  18080. CreateDynamicObject(3857,-509.222,326.920,2006.499,0.000,0.000,44.994);
  18081. CreateDynamicObject(3857,-509.222,326.919,2006.499,0.000,0.000,44.994);
  18082. CreateDynamicObject(3857,-509.222,326.919,2006.499,0.000,0.000,44.994);
  18083. CreateDynamicObject(3857,-509.222,326.919,2006.499,0.000,0.000,224.994);
  18084. CreateDynamicObject(3857,-509.222,326.919,2006.499,0.000,0.000,224.989);
  18085. CreateDynamicObject(3857,-517.054,326.933,2008.837,0.000,0.000,44.994);
  18086. CreateDynamicObject(3857,-517.054,326.932,2008.837,0.000,0.000,44.989);
  18087. CreateDynamicObject(2197,-514.815,315.803,2003.584,0.000,0.000,179.994);
  18088. CreateDynamicObject(2197,-515.495,315.803,2003.584,0.000,0.000,179.994);
  18089. CreateDynamicObject(1722,-510.372,327.773,2003.584,0.000,0.000,349.991);
  18090. CreateDynamicObject(1722,-508.373,327.274,2003.584,0.000,0.000,19.991);
  18091. CreateDynamicObject(1722,-508.255,330.319,2003.584,0.000,0.000,149.989);
  18092. CreateDynamicObject(1722,-510.285,330.260,2003.584,0.000,0.000,189.985);
  18093. CreateDynamicObject(2162,-508.696,331.799,2003.587,0.000,0.000,0.000);
  18094. CreateDynamicObject(2167,-506.924,331.783,2003.584,0.000,0.000,359.994);
  18095. CreateDynamicObject(2167,-506.005,331.782,2003.584,0.000,0.000,359.989);
  18096. CreateDynamicObject(2737,-505.368,328.770,2004.922,0.000,0.000,270.000);
  18097. CreateDynamicObject(2008,-508.200,325.098,2003.587,0.000,0.000,179.994);
  18098. CreateDynamicObject(2008,-510.575,325.101,2003.587,0.000,0.000,179.994);
  18099. CreateDynamicObject(1722,-506.582,326.195,2003.584,0.000,0.000,169.989);
  18100. CreateDynamicObject(1722,-508.925,326.795,2003.584,0.000,0.000,179.985);
  18101. CreateDynamicObject(1722,-510.858,325.773,2003.584,0.000,0.000,199.983);
  18102. CreateDynamicObject(2008,-509.216,321.290,2003.587,0.000,0.000,359.989);
  18103. CreateDynamicObject(2008,-511.651,321.295,2003.587,0.000,0.000,359.989);
  18104. CreateDynamicObject(1722,-511.217,320.765,2003.584,0.000,0.000,349.978);
  18105. CreateDynamicObject(1722,-508.540,320.782,2003.584,0.000,0.000,9.974);
  18106. CreateDynamicObject(1722,-505.908,319.966,2003.584,0.000,0.000,9.970);
  18107. CreateDynamicObject(1715,-491.830,325.175,2003.587,0.000,0.000,183.997);
  18108. CreateDynamicObject(1715,-489.360,327.700,2003.587,0.000,0.000,273.990);
  18109. CreateDynamicObject(1715,-490.335,329.455,2003.587,0.000,0.000,321.988);
  18110. CreateDynamicObject(1715,-491.915,329.925,2003.587,0.000,0.000,1.987);
  18111. CreateDynamicObject(1715,-493.561,329.118,2003.587,0.000,0.000,49.983);
  18112. CreateDynamicObject(1715,-494.268,327.569,2003.587,0.000,0.000,91.982);
  18113. CreateDynamicObject(14455,-486.839,326.770,2005.256,0.000,0.000,90.000);
  18114. CreateDynamicObject(14455,-497.005,331.117,2005.256,0.000,0.000,270.000);
  18115. CreateDynamicObject(2332,-468.703,287.350,2004.047,0.000,0.000,270.000);
  18116. CreateDynamicObject(2518,-507.915,309.865,2000.086,0.000,0.000,180.000);
  18117. CreateDynamicObject(2518,-509.937,309.868,2000.086,0.000,0.000,179.994);
  18118. CreateDynamicObject(2518,-511.819,309.868,2000.086,0.000,0.000,179.994);
  18119. CreateDynamicObject(14662,-493.548,311.131,2001.985,0.000,0.000,0.000);
  18120. CreateDynamicObject(14662,-489.589,311.131,2001.985,0.000,0.000,0.000);
  18121. CreateDynamicObject(2518,-493.351,309.868,2000.086,0.000,0.000,179.994);
  18122. CreateDynamicObject(2518,-491.321,309.867,2000.086,0.000,0.000,179.994);
  18123. CreateDynamicObject(2518,-489.342,309.868,2000.086,0.000,0.000,179.994);
  18124. CreateDynamicObject(2528,-512.723,318.299,2000.086,0.000,0.000,0.000);
  18125. CreateDynamicObject(2528,-511.057,318.303,2000.086,0.000,0.000,0.000);
  18126. CreateDynamicObject(2528,-509.382,318.315,2000.086,0.000,0.000,0.000);
  18127. CreateDynamicObject(2528,-507.736,318.329,2000.086,0.000,0.000,0.000);
  18128. CreateDynamicObject(2528,-506.044,318.338,2000.086,0.000,0.000,0.000);
  18129. CreateDynamicObject(2528,-496.430,318.316,2000.086,0.000,0.000,0.000);
  18130. CreateDynamicObject(2528,-494.751,318.324,2000.086,0.000,0.000,0.000);
  18131. CreateDynamicObject(2528,-493.079,318.320,2000.086,0.000,0.000,0.000);
  18132. CreateDynamicObject(2528,-491.421,318.313,2000.086,0.000,0.000,0.000);
  18133. CreateDynamicObject(2528,-489.777,318.307,2000.086,0.000,0.000,0.000);
  18134. CreateDynamicObject(18075,-501.157,323.420,2008.584,0.000,0.000,0.000);
  18135. CreateDynamicObject(18075,-497.575,341.566,2008.584,0.000,0.000,0.000);
  18136. CreateDynamicObject(18075,-504.621,341.554,2008.584,0.000,0.000,0.000);
  18137. CreateDynamicObject(18075,-492.025,323.225,2008.584,0.000,0.000,0.000);
  18138. CreateDynamicObject(18075,-512.109,323.089,2008.584,0.000,0.000,90.000);
  18139. CreateDynamicObject(19171,-527.179,297.050,2005.137,90.000,0.000,0.000);
  18140. CreateDynamicObject(19170,-528.677,297.050,2005.136,90.000,0.000,0.000);
  18141. CreateDynamicObject(19169,-527.179,297.050,2006.635,90.000,0.000,0.000);
  18142. CreateDynamicObject(19168,-528.677,297.050,2006.635,90.000,0.000,0.000);
  18143. CreateDynamicObject(3858,-473.204,296.937,2007.251,0.000,0.000,225.000);
  18144. CreateDynamicObject(3858,-473.204,296.936,2007.251,0.000,0.000,225.000);
  18145. CreateDynamicObject(7616,-410.319,364.022,2003.693,0.000,0.000,0.000);
  18146. CreateDynamicObject(758,-477.954,300.295,2004.840,0.000,0.000,260.000);
  18147. CreateDynamicObject(746,-470.444,300.428,2004.855,346.000,0.000,210.000);
  18148. CreateDynamicObject(953,-472.639,300.774,2005.411,8.998,0.000,340.000);
  18149. CreateDynamicObject(1600,-478.188,299.345,2006.069,0.000,0.000,270.000);
  18150. CreateDynamicObject(1600,-470.191,298.837,2005.401,0.000,0.000,110.000);
  18151. CreateDynamicObject(1599,-475.460,300.450,2005.854,0.000,0.000,280.000);
  18152. CreateDynamicObject(1599,-471.358,301.214,2006.522,0.000,0.000,109.997);
  18153. CreateDynamicObject(1601,-474.458,298.011,2005.208,0.000,0.000,270.000);
  18154. CreateDynamicObject(1601,-477.457,299.380,2005.208,0.000,0.000,110.000);
  18155. CreateDynamicObject(1605,-474.368,300.782,2006.095,0.000,0.000,270.000);
  18156. CreateDynamicObject(1606,-475.851,298.334,2006.951,0.000,0.000,90.000);
  18157. CreateDynamicObject(10444,-473.067,301.691,2005.250,90.000,90.000,271.500);
  18158. CreateDynamicObject(3858,-473.204,296.936,2007.251,0.000,0.000,225.000);
  18159. CreateDynamicObject(19166,-468.877,294.637,2005.412,0.000,270.000,0.000);
  18160. CreateDynamicObject(2894,-474.508,288.769,2004.521,0.000,0.000,209.998);
  18161. CreateDynamicObject(14455,-533.559,296.354,2005.256,0.000,0.000,270.000);
  18162. CreateDynamicObject(14455,-496.961,320.560,2005.256,0.000,0.000,270.000);
  18163. CreateDynamicObject(14455,-494.109,314.687,2005.256,0.000,0.000,0.000);
  18164. CreateDynamicObject(14455,-486.799,316.217,2005.256,0.000,0.000,90.000);
  18165. CreateDynamicObject(19166,-486.665,323.611,2005.256,0.000,270.000,0.000);
  18166. CreateDynamicObject(1704,-487.421,314.985,2003.584,0.000,0.000,180.000);
  18167. CreateDynamicObject(1723,-492.858,317.161,2003.584,0.000,0.000,0.000);
  18168. CreateDynamicObject(1704,-495.410,314.950,2003.584,0.000,0.000,179.994);
  18169. CreateDynamicObject(1723,-490.826,318.122,2003.584,0.000,0.000,90.000);
  18170. CreateDynamicObject(1723,-492.871,320.134,2003.584,0.000,0.000,270.000);
  18171. CreateDynamicObject(2001,-491.850,320.303,2003.587,0.000,0.000,0.000);
  18172. CreateDynamicObject(2001,-522.320,293.429,2003.587,0.000,0.000,0.000);
  18173. CreateDynamicObject(2010,-476.157,292.867,2003.578,0.000,0.000,0.000);
  18174. CreateDynamicObject(2001,-479.968,293.325,2003.587,0.000,0.000,0.000);
  18175. CreateDynamicObject(2010,-472.820,292.955,2003.578,0.000,0.000,0.000);
  18176. CreateDynamicObject(1726,-504.550,317.268,2003.592,0.000,0.000,90.000);
  18177. CreateDynamicObject(1726,-504.566,326.921,2003.592,0.000,0.000,90.000);
  18178. CreateDynamicObject(1726,-497.916,328.834,2003.592,0.000,0.000,270.000);
  18179. CreateDynamicObject(1726,-497.910,319.334,2003.592,0.000,0.000,270.000);
  18180. // Bank interior
  18181. CreateDynamicObject(19380, 1662.48743, -971.75378, 706.51898, 0.00000, 90.00000, 0.00000);
  18182. CreateDynamicObject(19454, 1656.65344, -971.62341, 701.63678, 90.00000, 0.00000, 90.00000);
  18183. CreateDynamicObject(19454, 1658.31506, -973.28998, 701.63879, 90.00000, 0.00000, 0.00000);
  18184. CreateDynamicObject(19454, 1656.65259, -974.96600, 701.63678, 90.00000, 0.00000, 90.00000);
  18185. CreateDynamicObject(19454, 1666.42468, -973.18341, 701.63678, 90.00000, 0.00000, 0.00000);
  18186. CreateDynamicObject(19454, 1668.09167, -971.52069, 701.63879, 90.00000, 0.00000, 90.00000);
  18187. CreateDynamicObject(19454, 1668.08789, -974.84570, 701.63879, 90.00000, 0.00000, 90.00000);
  18188. CreateDynamicObject(19454, 1667.57214, -974.94922, 701.63678, 90.00000, 0.00000, 0.00000);
  18189. CreateDynamicObject(19454, 1657.16797, -974.99103, 701.63678, 90.00000, 0.00000, 0.00000);
  18190. CreateDynamicObject(1278, 1663.16296, -976.64099, 700.80029, 0.00000, 90.00000, 0.00000);
  18191. CreateDynamicObject(1278, 1663.16296, -976.64099, 703.67731, 0.00000, 90.00000, 0.00000);
  18192. CreateDynamicObject(1278, 1663.16296, -976.64099, 706.39130, 0.00000, 90.00000, 0.00000);
  18193. CreateDynamicObject(19454, 1662.84253, -976.63281, 699.00177, 0.00000, 0.00000, 90.00000);
  18194. CreateDynamicObject(19454, 1660.28625, -976.63782, 699.00378, 0.00000, 0.00000, 90.00000);
  18195. CreateDynamicObject(1278, 1664.43274, -976.71887, 706.34930, 0.00000, 0.00000, 0.00000);
  18196. CreateDynamicObject(1649, 1666.65210, -976.65454, 702.11121, 0.00000, 0.00000, 0.00000);
  18197. CreateDynamicObject(1649, 1662.18835, -976.64697, 702.11121, 0.00000, 0.00000, 0.00000);
  18198. CreateDynamicObject(1649, 1657.94739, -976.62915, 702.11121, 0.00000, 0.00000, 0.00000);
  18199. CreateDynamicObject(1278, 1660.03259, -976.68048, 706.34930, 0.00000, 0.00000, 0.00000);
  18200. CreateDynamicObject(1649, 1662.18835, -976.64697, 705.37720, 0.00000, 0.00000, 0.00000);
  18201. CreateDynamicObject(1649, 1666.59045, -976.64697, 705.37720, 0.00000, 0.00000, 0.00000);
  18202. CreateDynamicObject(1649, 1657.94824, -976.64899, 705.37720, 0.00000, 0.00000, 0.00000);
  18203. CreateDynamicObject(19454, 1667.55725, -969.82300, 701.63678, 90.00000, 0.00000, 0.00000);
  18204. CreateDynamicObject(19454, 1657.22937, -969.77875, 701.63678, 90.00000, 0.00000, 0.00000);
  18205. CreateDynamicObject(19454, 1656.33521, -968.05743, 701.63678, 90.00000, 0.00000, 90.00000);
  18206. CreateDynamicObject(19454, 1668.52039, -968.11981, 701.63678, 90.00000, 0.00000, 90.00000);
  18207. CreateDynamicObject(19454, 1665.40320, -967.14172, 701.63678, 90.00000, 0.00000, 55.00000);
  18208. CreateDynamicObject(19454, 1659.46021, -967.08081, 701.63678, 90.00000, 0.00000, -55.00000);
  18209. CreateDynamicObject(19380, 1662.42456, -962.27173, 706.51703, 0.00000, 90.00000, 0.00000);
  18210. CreateDynamicObject(19391, 1662.37244, -966.14618, 701.82550, 0.00000, 0.00000, 90.00000);
  18211. CreateDynamicObject(19454, 1662.29138, -966.14740, 707.60278, 90.00000, 0.00000, 90.00000);
  18212. CreateDynamicObject(19375, 1662.37500, -971.72113, 700.00342, 0.00000, 90.00000, 0.00000);
  18213. CreateDynamicObject(19375, 1662.43970, -963.05243, 700.00140, 0.00000, 90.00000, 0.00000);
  18214. CreateDynamicObject(19454, 1665.55212, -966.13098, 701.63678, 90.00000, 0.00000, 90.00000);
  18215. CreateDynamicObject(19454, 1667.22107, -964.33282, 701.63678, 90.00000, 0.00000, 0.00000);
  18216. CreateDynamicObject(19454, 1667.22095, -960.95282, 701.63678, 90.00000, 0.00000, 0.00000);
  18217. CreateDynamicObject(19454, 1660.89551, -964.39307, 701.63678, 90.00000, 0.00000, 0.00000);
  18218. CreateDynamicObject(19380, 1663.72046, -961.21100, 703.62903, 0.00000, 90.00000, 0.00000);
  18219. CreateDynamicObject(19454, 1659.23047, -962.72852, 701.63678, 90.00000, 0.00000, 90.00000);
  18220. CreateDynamicObject(19370, 1664.28015, -971.68073, 707.10889, 0.00000, 0.00000, 0.00000);
  18221. CreateDynamicObject(19370, 1662.76160, -973.19739, 707.10687, 0.00000, 0.00000, 90.00000);
  18222. CreateDynamicObject(19370, 1661.23926, -971.67780, 707.10889, 0.00000, 0.00000, 0.00000);
  18223. CreateDynamicObject(19370, 1662.76013, -970.15582, 707.10687, 0.00000, 0.00000, 90.00000);
  18224. CreateDynamicObject(19443, 1663.48096, -971.70142, 706.37988, 0.00000, 0.00000, 0.00000);
  18225. CreateDynamicObject(19443, 1662.75806, -972.42108, 706.38190, 0.00000, 0.00000, 90.00000);
  18226. CreateDynamicObject(19443, 1662.04016, -971.69843, 706.37988, 0.00000, 0.00000, 0.00000);
  18227. CreateDynamicObject(19443, 1662.76147, -970.98419, 706.38190, 0.00000, 0.00000, 90.00000);
  18228. CreateDynamicObject(18075, 1662.37048, -970.06836, 706.46777, 0.00000, 0.00000, 0.00000);
  18229. CreateDynamicObject(2207, 1663.03015, -971.79346, 700.09070, 0.00000, 0.00000, 180.00000);
  18230. CreateDynamicObject(1727, 1663.31348, -970.20789, 699.95898, 0.00000, 0.00000, -40.00000);
  18231. CreateDynamicObject(1727, 1659.96106, -970.93146, 699.95898, 0.00000, 0.00000, 40.00000);
  18232. CreateDynamicObject(1727, 1661.50989, -969.53607, 699.95898, 0.00000, 0.00000, 0.00000);
  18233. CreateDynamicObject(1714, 1662.10669, -973.59125, 700.05157, 0.00000, 0.00000, 180.00000);
  18234. CreateDynamicObject(2811, 1661.05359, -973.11829, 699.97162, 0.00000, 0.00000, 0.00000);
  18235. CreateDynamicObject(2811, 1663.09033, -973.12018, 699.97162, 0.00000, 0.00000, 0.00000);
  18236. CreateDynamicObject(2200, 1657.44141, -970.53723, 700.08978, 0.00000, 0.00000, 90.00000);
  18237. CreateDynamicObject(19375, 1653.66931, -972.24451, 701.72339, 0.00000, 0.00000, 90.00000);
  18238. CreateDynamicObject(19375, 1653.64197, -974.36877, 701.72339, 0.00000, 0.00000, 90.00000);
  18239. CreateDynamicObject(19375, 1653.65918, -973.32990, 701.72339, 0.00000, 0.00000, 90.00000);
  18240. CreateDynamicObject(19375, 1671.06738, -972.08447, 701.72339, 0.00000, 0.00000, 90.00000);
  18241. CreateDynamicObject(19375, 1671.04700, -973.17102, 701.72339, 0.00000, 0.00000, 90.00000);
  18242. CreateDynamicObject(19375, 1671.07214, -974.26880, 701.72339, 0.00000, 0.00000, 90.00000);
  18243. CreateDynamicObject(2230, 1661.15503, -966.06073, 705.13647, 0.00000, 0.00000, 0.00000);
  18244. CreateDynamicObject(2230, 1664.17798, -966.06073, 705.12848, 0.00000, 0.00000, 0.00000);
  18245. CreateDynamicObject(19370, 1662.27222, -964.76300, 705.05292, 0.00000, 90.00000, 90.00000);
  18246. CreateDynamicObject(19370, 1662.46216, -964.76501, 705.05090, 0.00000, 90.00000, 90.00000);
  18247. CreateDynamicObject(19370, 1662.46216, -964.76501, 706.45093, 0.00000, 90.00000, 90.00000);
  18248. CreateDynamicObject(1649, 1662.36194, -966.43878, 707.24719, 0.00000, 90.00000, 0.00000);
  18249. CreateDynamicObject(2614, 1662.38245, -966.27612, 703.86688, 0.00000, 0.00000, 0.00000);
  18250. CreateDynamicObject(2200, 1667.24573, -969.26605, 700.08978, 0.00000, 0.00000, -90.00000);
  18251. CreateDynamicObject(2811, 1663.83496, -966.64502, 699.97162, 0.00000, 0.00000, 0.00000);
  18252. CreateDynamicObject(2811, 1660.88159, -966.68427, 699.97162, 0.00000, 0.00000, 0.00000);
  18253. CreateDynamicObject(1502, 1661.58777, -966.17401, 700.06921, 0.00000, 0.00000, 0.00000);
  18254. CreateDynamicObject(1649, 1662.35779, -966.45477, 707.24719, 0.00000, 90.00000, 0.00000);
  18255. CreateDynamicObject(1649, 1662.35779, -966.48077, 707.24719, 0.00000, 90.00000, 0.00000);
  18256. CreateDynamicObject(1734, 1662.79236, -971.69281, 706.42902, 0.00000, 0.00000, 0.00000);
  18257. CreateDynamicObject(19454, 1667.21094, -957.63080, 701.63678, 90.00000, 0.00000, 0.00000);
  18258. CreateDynamicObject(19375, 1662.45776, -953.80481, 700.00342, 0.00000, 90.00000, 0.00000);
  18259. CreateDynamicObject(19391, 1658.35205, -961.25458, 701.81750, 0.00000, 0.00000, 0.00000);
  18260. CreateDynamicObject(1502, 1658.35767, -962.00018, 700.06921, 0.00000, 0.00000, 90.00000);
  18261. CreateDynamicObject(19454, 1659.23047, -959.72552, 701.63678, 90.00000, 0.00000, 90.00000);
  18262. CreateDynamicObject(19454, 1660.90051, -958.06427, 701.63678, 90.00000, 0.00000, 0.00000);
  18263. CreateDynamicObject(19454, 1662.50964, -956.62701, 701.63678, 90.00000, 0.00000, 90.00000);
  18264. CreateDynamicObject(19454, 1665.89014, -956.62653, 701.63678, 90.00000, 0.00000, 90.00000);
  18265. CreateDynamicObject(1726, 1666.37830, -962.08569, 700.08868, 0.00000, 0.00000, -90.00000);
  18266. CreateDynamicObject(1726, 1666.34082, -958.71960, 700.08868, 0.00000, 0.00000, -90.00000);
  18267. CreateDynamicObject(1727, 1664.09412, -957.83966, 700.08765, 0.00000, 0.00000, 0.00000);
  18268. CreateDynamicObject(1727, 1664.97131, -964.99353, 700.08759, 0.00000, 0.00000, 180.00000);
  18269. CreateDynamicObject(2811, 1666.50635, -965.32239, 699.97162, 0.00000, 0.00000, 0.00000);
  18270. CreateDynamicObject(2811, 1666.49377, -957.60059, 699.97162, 0.00000, 0.00000, 0.00000);
  18271. CreateDynamicObject(2126, 1665.15479, -960.55115, 700.08881, 0.00000, 0.00000, 90.00000);
  18272. CreateDynamicObject(2126, 1665.19629, -963.32709, 700.08881, 0.00000, 0.00000, 90.00000);
  18273. CreateDynamicObject(2614, 1667.07581, -961.43964, 702.49182, 0.00000, 0.00000, -90.00000);
  18274. CreateDynamicObject(19375, 1671.89587, -965.46210, 701.72339, 0.00000, 0.00000, 90.00000);
  18275. CreateDynamicObject(19375, 1671.90527, -964.59674, 701.72339, 0.00000, 0.00000, 90.00000);
  18276. CreateDynamicObject(19375, 1671.89502, -958.07025, 701.72339, 0.00000, 0.00000, 90.00000);
  18277. CreateDynamicObject(19375, 1671.90881, -957.41803, 701.72339, 0.00000, 0.00000, 90.00000);
  18278. CreateDynamicObject(19375, 1671.90002, -961.44330, 704.69342, 0.00000, 90.00000, 90.00000);
  18279. CreateDynamicObject(19375, 1671.90002, -961.44330, 705.48541, 0.00000, 90.00000, 90.00000);
  18280. CreateDynamicObject(2200, 1661.01624, -959.01569, 700.08978, 0.00000, 0.00000, 90.00000);
  18281. CreateDynamicObject(14596, 1652.60913, -957.46368, 693.38580, 0.00000, 0.00000, 180.00000);
  18282. CreateDynamicObject(19375, 1662.70935, -963.04932, 688.40442, 0.00000, 90.00000, 0.00000);
  18283. CreateDynamicObject(19454, 1658.96338, -967.07098, 690.17383, 0.00000, 0.00000, 0.00000);
  18284. CreateDynamicObject(19375, 1662.71594, -970.60370, 688.41443, 0.00000, 90.00000, 0.00000);
  18285. CreateDynamicObject(19454, 1658.95447, -955.35168, 690.21381, 0.00000, 0.00000, 0.00000);
  18286. CreateDynamicObject(19454, 1663.30591, -958.41248, 690.21381, 0.00000, 0.00000, 90.00000);
  18287. CreateDynamicObject(19454, 1665.79163, -962.90070, 690.17383, 0.00000, 0.00000, 0.00000);
  18288. CreateDynamicObject(19454, 1661.68274, -971.20868, 690.17383, 0.00000, 0.00000, 90.00000);
  18289. CreateDynamicObject(19454, 1665.79285, -967.26093, 690.17578, 0.00000, 0.00000, 0.00000);
  18290. CreateDynamicObject(2206, 1663.32397, -960.97894, 688.45349, 0.00000, 0.00000, 180.00000);
  18291. CreateDynamicObject(2206, 1661.45435, -961.97198, 688.45148, 0.00000, 0.00000, 0.00000);
  18292. CreateDynamicObject(2206, 1661.45630, -962.95599, 688.45349, 0.00000, 0.00000, 0.00000);
  18293. CreateDynamicObject(2206, 1661.45630, -963.92999, 688.45148, 0.00000, 0.00000, 0.00000);
  18294. CreateDynamicObject(2206, 1661.45630, -964.90399, 688.45349, 0.00000, 0.00000, 0.00000);
  18295. CreateDynamicObject(2206, 1661.45630, -965.87799, 688.45148, 0.00000, 0.00000, 0.00000);
  18296. CreateDynamicObject(1714, 1664.47815, -964.20013, 688.49377, 0.00000, 0.00000, -90.00000);
  18297. CreateDynamicObject(1714, 1664.46436, -962.77960, 688.49377, 0.00000, 0.00000, -90.00000);
  18298. CreateDynamicObject(1714, 1664.43201, -961.27374, 688.49377, 0.00000, 0.00000, -90.00000);
  18299. CreateDynamicObject(1714, 1664.47046, -965.76575, 688.49377, 0.00000, 0.00000, -90.00000);
  18300. CreateDynamicObject(1714, 1660.37378, -961.13538, 688.49377, 0.00000, 0.00000, 90.00000);
  18301. CreateDynamicObject(1714, 1660.36292, -962.68683, 688.49377, 0.00000, 0.00000, 90.00000);
  18302. CreateDynamicObject(1714, 1660.31726, -964.14752, 688.49377, 0.00000, 0.00000, 90.00000);
  18303. CreateDynamicObject(1714, 1660.34314, -965.74756, 688.49377, 0.00000, 0.00000, 90.00000);
  18304. CreateDynamicObject(1714, 1662.39783, -959.87054, 688.49377, 0.00000, 0.00000, 0.00000);
  18305. CreateDynamicObject(19448, 1662.91016, -956.80499, 689.27472, -0.05300, 90.00000, 90.00000);
  18306. CreateDynamicObject(19448, 1662.68140, -956.75812, 690.17572, -0.05300, 90.00000, 90.00000);
  18307. CreateDynamicObject(19448, 1667.42212, -963.23273, 690.17572, -0.05300, 90.00000, 0.00000);
  18308. CreateDynamicObject(19448, 1667.40771, -963.19348, 689.27472, -0.05300, 90.00000, 0.00000);
  18309. CreateDynamicObject(19448, 1667.42908, -971.07928, 690.17572, -0.05300, 90.00000, 0.00000);
  18310. CreateDynamicObject(19448, 1667.40833, -968.83728, 689.27472, -0.05300, 90.00000, 0.00000);
  18311. CreateDynamicObject(19448, 1661.87451, -972.81970, 689.27472, -0.05300, 90.00000, 90.00000);
  18312. CreateDynamicObject(19448, 1657.31396, -969.12482, 690.17572, -0.05300, 90.00000, 0.00000);
  18313. CreateDynamicObject(19448, 1657.32751, -969.12482, 689.27472, -0.05300, 90.00000, 0.00000);
  18314. CreateDynamicObject(2230, 1663.76355, -971.30103, 688.35822, 0.00000, 0.00000, 180.00000);
  18315. CreateDynamicObject(19448, 1659.08435, -975.93622, 690.17572, -0.05300, 90.00000, 0.00000);
  18316. CreateDynamicObject(19448, 1665.84216, -975.93213, 690.17572, -0.05300, 90.00000, 0.00000);
  18317. CreateDynamicObject(2230, 1660.47583, -971.26636, 688.35822, 0.00000, 0.00000, 180.00000);
  18318. CreateDynamicObject(2811, 1661.30225, -970.88525, 688.45660, 0.00000, 0.00000, 0.00000);
  18319. CreateDynamicObject(2811, 1663.53259, -970.78687, 688.45660, 0.00000, 0.00000, 0.00000);
  18320. CreateDynamicObject(19448, 1664.15002, -975.86359, 690.17572, -0.05300, 0.00000, 0.00000);
  18321. CreateDynamicObject(19448, 1660.68494, -975.89722, 690.17572, -0.05300, 0.00000, 0.00000);
  18322. CreateDynamicObject(1828, 1662.12476, -968.67163, 688.49323, 0.00000, 0.00000, 0.00000);
  18323. CreateDynamicObject(1734, 1662.24158, -967.92981, 691.94348, 0.00000, 0.00000, 0.00000);
  18324. CreateDynamicObject(1734, 1662.28015, -962.10773, 691.98151, 0.00000, 0.00000, 0.00000);
  18325. CreateDynamicObject(1502, 1657.56604, -961.96283, 688.48071, 0.00000, 0.00000, 90.00000);
  18326. CreateDynamicObject(19448, 1657.30774, -969.11176, 691.09570, -0.05300, 90.00000, 0.00000);
  18327. CreateDynamicObject(19448, 1659.04810, -975.93469, 691.09570, -0.05300, 90.00000, 0.00000);
  18328. CreateDynamicObject(19448, 1665.78918, -975.92078, 691.09570, -0.05300, 90.00000, 0.00000);
  18329. CreateDynamicObject(19448, 1662.42566, -975.91620, 691.89569, -0.05300, 90.00000, 0.00000);
  18330. CreateDynamicObject(19448, 1667.43506, -966.83893, 691.09570, -0.05300, 90.00000, 0.00000);
  18331. CreateDynamicObject(19448, 1667.44019, -957.22589, 691.09570, -0.05300, 90.00000, 0.00000);
  18332. CreateDynamicObject(19448, 1662.97778, -956.75787, 691.09570, -0.05300, 90.00000, 90.00000);
  18333. CreateDynamicObject(19380, 1663.13403, -961.99518, 691.84302, 0.00000, 90.00000, 0.00000);
  18334. CreateDynamicObject(19380, 1663.08032, -967.48743, 691.84497, 0.00000, 90.00000, 0.00000);
  18335. CreateDynamicObject(19174, 1659.05225, -967.67047, 690.17877, 0.00000, 0.00000, 90.00000);
  18336. CreateDynamicObject(19175, 1665.68555, -968.27643, 690.17792, 0.00000, 0.00000, -90.00000);
  18337. CreateDynamicObject(19172, 1665.68494, -961.49689, 690.19287, 0.00000, 0.00000, -90.00000);
  18338. CreateDynamicObject(2491, 1663.91870, -968.71417, 687.72620, 0.00000, 0.00000, -47.00000);
  18339. CreateDynamicObject(1952, 1663.73193, -968.88348, 689.70990, 55.00000, 91.00000, -149.00000);
  18340. CreateDynamicObject(3077, 1662.46704, -971.14868, 692.41919, 0.00000, 180.00000, 0.00000);
  18341. CreateDynamicObject(2227, 1662.71179, -966.43073, 688.49408, 0.00000, 0.00000, 0.00000);
  18342. CreateDynamicObject(3077, 1662.48022, -958.49329, 692.41919, 0.00000, 180.00000, 0.00000);
  18343. CreateDynamicObject(19448, 1660.61646, -956.79962, 694.01569, -90.05300, 0.00000, 0.00000);
  18344. CreateDynamicObject(19448, 1664.19775, -956.79871, 694.01569, -90.05300, 0.00000, 0.00000);
  18345. CreateDynamicObject(19448, 1659.23938, -965.45404, 699.93073, -90.05300, 90.00000, 0.00000);
  18346. CreateDynamicObject(19448, 1659.23938, -964.85797, 699.93073, -90.05300, 90.00000, 0.00000);
  18347. CreateDynamicObject(19448, 1659.23938, -964.26202, 699.93073, -90.05300, 90.00000, 0.00000);
  18348. CreateDynamicObject(19448, 1659.23938, -963.66602, 699.93073, -90.05300, 90.00000, 0.00000);
  18349. CreateDynamicObject(19448, 1659.23938, -963.07001, 699.93073, -90.05300, 90.00000, 0.00000);
  18350. CreateDynamicObject(19448, 1657.34546, -964.39307, 691.09570, -90.05300, 90.00000, 0.00000);
  18351. CreateDynamicObject(1536, 1658.40564, -962.00049, 694.28979, 0.00000, 0.00000, 90.00000);
  18352. CreateDynamicObject(19391, 1658.35205, -961.25458, 696.00647, 0.00000, 0.00000, 0.00000);
  18353. CreateDynamicObject(19454, 1653.07410, -963.40411, 684.22479, 0.00000, 0.00000, 0.00000);
  18354. CreateDynamicObject(19454, 1650.81616, -964.45227, 684.22479, 0.00000, 0.00000, 90.00000);
  18355. CreateDynamicObject(19454, 1656.31763, -956.78729, 684.22479, 0.00000, 0.00000, 0.00000);
  18356. CreateDynamicObject(19454, 1661.04724, -961.51617, 684.22479, 0.00000, 0.00000, 90.00000);
  18357. CreateDynamicObject(19454, 1662.65161, -961.14771, 684.22479, 0.00000, 0.00000, 0.00000);
  18358. CreateDynamicObject(19375, 1657.63232, -961.26575, 682.60437, 0.00000, 90.00000, 0.00000);
  18359. CreateDynamicObject(19454, 1655.57104, -969.17828, 684.22479, 0.00000, 0.00000, 0.00000);
  18360. CreateDynamicObject(19454, 1655.57104, -965.98853, 684.23877, 0.00000, 0.00000, 90.00000);
  18361. CreateDynamicObject(19391, 1661.24683, -965.98999, 684.43079, 0.00000, 0.00000, 90.00000);
  18362. CreateDynamicObject(19172, 1658.17444, -965.90759, 684.55719, 0.00000, 0.00000, 180.00000);
  18363. CreateDynamicObject(1726, 1660.10291, -965.30756, 682.63391, 0.00000, 0.00000, 180.00000);
  18364. CreateDynamicObject(1727, 1656.93030, -965.29083, 682.63568, 0.00000, 0.00000, 180.00000);
  18365. CreateDynamicObject(2811, 1657.45129, -965.35327, 682.69244, 0.00000, 0.00000, 0.00000);
  18366. CreateDynamicObject(2126, 1657.67688, -964.35883, 682.58270, 0.00000, 0.00000, 0.00000);
  18367. CreateDynamicObject(2614, 1653.20264, -961.37762, 684.42200, 0.00000, 0.00000, 90.00000);
  18368. CreateDynamicObject(19174, 1659.57642, -961.59302, 684.41058, 0.00000, 0.00000, 0.00000);
  18369. CreateDynamicObject(19454, 1667.40674, -965.99768, 684.43280, 0.00000, 0.00000, 90.00000);
  18370. CreateDynamicObject(19391, 1673.69470, -966.00177, 684.43481, 0.00000, 0.00000, 90.00000);
  18371. CreateDynamicObject(19379, 1660.32056, -970.69043, 682.59747, -0.00400, 90.00000, 0.00000);
  18372. CreateDynamicObject(19379, 1670.82617, -970.70868, 682.59949, -0.00400, 90.00000, 0.06000);
  18373. CreateDynamicObject(19454, 1679.53491, -966.00079, 684.31482, 0.00000, 0.00000, 90.00000);
  18374. CreateDynamicObject(19450, 1655.57483, -970.78229, 684.20892, 0.00000, 0.00000, 0.00000);
  18375. CreateDynamicObject(19450, 1662.68152, -967.01599, 681.80890, 0.00000, 180.00000, 0.00000);
  18376. CreateDynamicObject(19450, 1667.44470, -971.74622, 681.80890, 0.00000, 180.00000, 90.00000);
  18377. CreateDynamicObject(19450, 1679.07483, -970.76233, 684.20892, 0.00000, 0.00000, 0.00000);
  18378. CreateDynamicObject(19450, 1667.44470, -971.24622, 681.80890, 0.00000, 180.00000, 90.00000);
  18379. CreateDynamicObject(19450, 1667.44250, -971.36652, 681.81091, 0.00000, 180.00000, 90.00000);
  18380. CreateDynamicObject(19450, 1667.41479, -971.46899, 681.80890, 0.00000, 180.00000, 90.00000);
  18381. CreateDynamicObject(19450, 1667.44470, -971.45221, 681.80688, 0.00000, 180.00000, 90.00000);
  18382. CreateDynamicObject(19450, 1667.41272, -971.63385, 681.80688, 0.00000, 180.00000, 90.00000);
  18383. CreateDynamicObject(19450, 1662.78552, -966.65765, 681.81091, 0.00000, 180.00000, 0.00000);
  18384. CreateDynamicObject(19450, 1662.87305, -966.41022, 681.80890, 0.00000, 180.00000, 0.00000);
  18385. CreateDynamicObject(19450, 1663.04565, -966.99860, 681.81091, 0.00000, 180.00000, 0.00000);
  18386. CreateDynamicObject(19450, 1663.04565, -966.99860, 681.81091, 0.00000, 180.00000, 0.00000);
  18387. CreateDynamicObject(19450, 1663.14392, -966.97192, 681.81293, 0.00000, 180.00000, 0.00000);
  18388. CreateDynamicObject(19450, 1657.16846, -976.89392, 684.20892, 0.00000, 0.00000, 48.00000);
  18389. CreateDynamicObject(19450, 1677.52844, -976.71588, 684.20892, 0.00000, 0.00000, -48.00000);
  18390. CreateDynamicObject(19450, 1660.71936, -984.86407, 684.20892, 0.00000, 0.00000, 0.00000);
  18391. CreateDynamicObject(19450, 1673.97595, -984.69043, 684.20892, 0.00000, 0.00000, 0.00000);
  18392. CreateDynamicObject(19379, 1678.49524, -970.70831, 682.60150, -0.00400, 90.00000, 0.00000);
  18393. CreateDynamicObject(19379, 1673.69922, -978.93152, 682.59747, -0.00400, 90.00000, 0.00000);
  18394. CreateDynamicObject(19379, 1663.19775, -978.88202, 682.59747, -0.00400, 90.00000, 0.00000);
  18395. CreateDynamicObject(19379, 1659.90479, -978.85461, 682.59351, -0.00400, 90.00000, 0.00000);
  18396. CreateDynamicObject(19379, 1672.02271, -987.53003, 682.60748, -0.00400, 90.00000, 0.00000);
  18397. CreateDynamicObject(19379, 1662.30005, -987.55170, 682.60553, -0.00400, 90.00000, 0.00000);
  18398. CreateDynamicObject(14413, 1660.40491, -980.61688, 680.50598, 0.00000, 0.00000, 90.00000);
  18399. CreateDynamicObject(19450, 1655.99084, -989.59222, 684.20892, 0.00000, 0.00000, 90.00000);
  18400. CreateDynamicObject(19450, 1678.70947, -989.42102, 684.20490, 0.00000, 0.00000, 90.00000);
  18401. CreateDynamicObject(19450, 1672.42834, -996.52631, 684.20490, 0.00000, 0.00000, 90.00000);
  18402. CreateDynamicObject(19450, 1665.20630, -996.52954, 684.20490, 0.00000, 0.00000, 90.00000);
  18403. CreateDynamicObject(19450, 1679.14075, -996.31305, 684.20490, 0.00000, 0.00000, 90.00000);
  18404. CreateDynamicObject(19450, 1680.95544, -992.56982, 684.20490, 0.00000, 0.00000, 0.00000);
  18405. CreateDynamicObject(19450, 1655.19873, -996.27271, 684.20490, 0.00000, 0.00000, 90.00000);
  18406. CreateDynamicObject(19450, 1653.71216, -993.49536, 684.20490, 0.00000, 0.00000, 0.00000);
  18407. CreateDynamicObject(19379, 1655.92603, -992.17084, 682.60150, -0.00400, 90.00000, 0.00000);
  18408. CreateDynamicObject(19379, 1678.53967, -993.41864, 682.60150, -0.00400, 90.00000, 0.00000);
  18409. CreateDynamicObject(19379, 1670.27588, -991.98706, 682.59949, -0.00400, 90.00000, 0.00000);
  18410. CreateDynamicObject(19379, 1663.10400, -991.85168, 682.60352, -0.00400, 90.00000, 0.00000);
  18411. CreateDynamicObject(19358, 1672.17358, -970.22870, 681.80890, 0.00000, 180.00000, 0.00000);
  18412. CreateDynamicObject(19358, 1672.03430, -970.23053, 681.81091, 0.00000, 180.00000, 0.00000);
  18413. CreateDynamicObject(19358, 1671.94434, -970.22852, 681.80688, 0.00000, 180.00000, 0.00000);
  18414. CreateDynamicObject(19358, 1671.86829, -970.22650, 681.80890, 0.00000, 180.00000, 0.00000);
  18415. CreateDynamicObject(19358, 1671.74036, -970.23053, 681.80292, 0.00000, 180.00000, 0.00000);
  18416. CreateDynamicObject(19358, 1672.17566, -967.54669, 681.80890, 0.00000, 180.00000, 0.00000);
  18417. CreateDynamicObject(19358, 1671.92444, -967.54138, 681.80688, 0.00000, 180.00000, 0.00000);
  18418. CreateDynamicObject(19358, 1672.03430, -967.54150, 681.81091, 0.00000, 180.00000, 0.00000);
  18419. CreateDynamicObject(19358, 1671.74036, -967.58447, 681.80292, 0.00000, 180.00000, 0.00000);
  18420. CreateDynamicObject(19358, 1671.86829, -967.54248, 681.80890, 0.00000, 180.00000, 0.00000);
  18421. CreateDynamicObject(19358, 1671.57642, -970.21252, 681.80090, 0.00000, 180.00000, 0.00000);
  18422. CreateDynamicObject(19358, 1671.57642, -967.54248, 681.80090, 0.00000, 180.00000, 0.00000);
  18423. CreateDynamicObject(1536, 1670.57324, -964.19226, 682.51721, 0.00000, 0.00000, 90.00000);
  18424. CreateDynamicObject(1536, 1666.59705, -966.03491, 682.51721, 0.00000, 0.00000, 0.00000);
  18425. CreateDynamicObject(19176, 1667.35913, -996.42566, 683.93018, 0.00000, 0.00000, 0.00000);
  18426. CreateDynamicObject(19448, 1665.52271, -1001.17371, 683.64270, -0.05300, 0.00000, 0.00000);
  18427. CreateDynamicObject(19448, 1669.21240, -1001.15674, 683.65869, -0.05300, 0.00000, 0.00000);
  18428. CreateDynamicObject(19448, 1668.90662, -998.10468, 685.32269, -0.05300, 90.00000, 90.00000);
  18429. CreateDynamicObject(19448, 1665.97058, -998.10272, 685.33069, -0.05300, 90.00000, 90.00000);
  18430. CreateDynamicObject(19448, 1673.25439, -998.16711, 682.72272, 33.00000, 90.00000, 90.00000);
  18431. CreateDynamicObject(19448, 1661.49133, -998.13934, 682.72272, -33.00000, 90.00000, 90.00000);
  18432. CreateDynamicObject(19448, 1669.65576, -1001.24042, 683.33868, -0.05300, 0.00000, 0.00000);
  18433. CreateDynamicObject(19448, 1670.11609, -1001.24353, 683.02368, -0.05300, 0.00000, 0.00000);
  18434. CreateDynamicObject(19448, 1670.57666, -1001.25226, 682.69373, -0.05300, 0.00000, 0.00000);
  18435. CreateDynamicObject(19448, 1671.03662, -1001.24109, 682.36371, -0.05300, 0.00000, 0.00000);
  18436. CreateDynamicObject(19448, 1671.45862, -1001.24512, 682.18372, -0.05300, 0.00000, 0.00000);
  18437. CreateDynamicObject(19448, 1671.90051, -1001.25153, 681.89868, -0.05300, 0.00000, 0.00000);
  18438. CreateDynamicObject(19448, 1672.30273, -1001.25348, 681.62872, -0.05300, 0.00000, 0.00000);
  18439. CreateDynamicObject(19448, 1672.72717, -1001.24298, 681.35870, -0.05300, 0.00000, 0.00000);
  18440. CreateDynamicObject(19448, 1665.09607, -1001.22498, 683.33868, -0.05300, 0.00000, 0.00000);
  18441. CreateDynamicObject(19448, 1664.65222, -1001.23010, 683.06873, -0.05300, 0.00000, 0.00000);
  18442. CreateDynamicObject(19448, 1664.20837, -1001.23523, 682.76868, -0.05300, 0.00000, 0.00000);
  18443. CreateDynamicObject(19448, 1663.80115, -1001.22870, 682.51367, -0.05300, 0.00000, 0.00000);
  18444. CreateDynamicObject(19448, 1663.37744, -1001.22302, 682.24969, -0.05300, 0.00000, 0.00000);
  18445. CreateDynamicObject(19448, 1662.99268, -1001.23077, 681.99768, -0.05300, 0.00000, 0.00000);
  18446. CreateDynamicObject(19448, 1662.61279, -1001.22302, 681.75171, -0.05300, 0.00000, 0.00000);
  18447. CreateDynamicObject(19448, 1662.18933, -1001.24329, 681.47968, -0.05300, 0.00000, 0.00000);
  18448. CreateDynamicObject(19435, 1670.59705, -975.74170, 684.39459, 0.00000, 0.00000, 0.00000);
  18449. CreateDynamicObject(19435, 1670.84668, -976.46210, 684.39661, 0.00000, 0.00000, 90.00000);
  18450. CreateDynamicObject(19435, 1670.84668, -975.02710, 684.39661, 0.00000, 0.00000, 90.00000);
  18451. CreateDynamicObject(19435, 1671.22705, -975.74170, 684.39459, 0.00000, 0.00000, 0.00000);
  18452. CreateDynamicObject(19435, 1663.99280, -976.46210, 684.39661, 0.00000, 0.00000, 90.00000);
  18453. CreateDynamicObject(19435, 1664.24304, -975.74170, 684.39459, 0.00000, 0.00000, 0.00000);
  18454. CreateDynamicObject(19435, 1663.64502, -975.74170, 684.39459, 0.00000, 0.00000, 0.00000);
  18455. CreateDynamicObject(19435, 1663.99268, -975.02710, 684.39661, 0.00000, 0.00000, 90.00000);
  18456. CreateDynamicObject(1216, 1664.60999, -975.73181, 683.34930, 0.00000, 0.00000, 90.00000);
  18457. CreateDynamicObject(1216, 1670.24316, -975.72345, 683.34930, 0.00000, 0.00000, -90.00000);
  18458. CreateDynamicObject(19435, 1663.99280, -990.46210, 684.39661, 0.00000, 0.00000, 90.00000);
  18459. CreateDynamicObject(19435, 1663.99268, -989.02710, 684.39661, 0.00000, 0.00000, 90.00000);
  18460. CreateDynamicObject(19435, 1664.24304, -989.74170, 684.39459, 0.00000, 0.00000, 0.00000);
  18461. CreateDynamicObject(19435, 1663.64502, -989.74170, 684.39459, 0.00000, 0.00000, 0.00000);
  18462. CreateDynamicObject(19435, 1670.84668, -990.46210, 684.39661, 0.00000, 0.00000, 90.00000);
  18463. CreateDynamicObject(19435, 1670.84668, -989.02710, 684.39661, 0.00000, 0.00000, 90.00000);
  18464. CreateDynamicObject(19435, 1670.59705, -989.74170, 684.39459, 0.00000, 0.00000, 0.00000);
  18465. CreateDynamicObject(19435, 1671.22705, -989.74170, 684.39459, 0.00000, 0.00000, 0.00000);
  18466. CreateDynamicObject(9131, 1662.80054, -971.60742, 683.55664, 0.00000, 0.00000, 0.00000);
  18467. CreateDynamicObject(9131, 1662.80249, -971.60938, 685.22662, 0.00000, 0.00000, 0.00000);
  18468. CreateDynamicObject(9131, 1671.95862, -971.66241, 683.55664, 0.00000, 0.00000, 0.00000);
  18469. CreateDynamicObject(9131, 1671.96082, -971.66351, 685.22662, 0.00000, 0.00000, 0.00000);
  18470. CreateDynamicObject(9131, 1668.88403, -971.64197, 683.55664, 0.00000, 0.00000, 0.00000);
  18471. CreateDynamicObject(9131, 1665.77905, -971.68475, 683.55664, 0.00000, 0.00000, 0.00000);
  18472. CreateDynamicObject(9131, 1668.88599, -971.64398, 685.42963, 0.00000, 0.00000, 0.00000);
  18473. CreateDynamicObject(9131, 1665.78113, -971.68683, 685.40161, 0.00000, 0.00000, 0.00000);
  18474. CreateDynamicObject(9131, 1671.99792, -966.36957, 683.55664, 0.00000, 0.00000, 0.00000);
  18475. CreateDynamicObject(9131, 1671.99988, -966.36761, 685.56262, 0.00000, 0.00000, 0.00000);
  18476. CreateDynamicObject(9131, 1662.74365, -966.35168, 683.55664, 0.00000, 0.00000, 0.00000);
  18477. CreateDynamicObject(9131, 1662.74573, -966.34967, 685.32458, 0.00000, 0.00000, 0.00000);
  18478. CreateDynamicObject(19381, 1667.31580, -982.70880, 682.61493, 0.00000, 90.00000, 0.00000);
  18479. CreateDynamicObject(19373, 1677.32422, -992.69708, 682.60938, 0.00000, 90.00000, 0.00000);
  18480. CreateDynamicObject(19373, 1673.82422, -992.69708, 682.60938, 0.00000, 90.00000, 0.00000);
  18481. CreateDynamicObject(19373, 1670.32422, -992.69708, 682.60938, 0.00000, 90.00000, 0.00000);
  18482. CreateDynamicObject(19373, 1666.82422, -992.69708, 682.60938, 0.00000, 90.00000, 0.00000);
  18483. CreateDynamicObject(19373, 1663.32422, -992.69708, 682.60742, 0.00000, 90.00000, 0.00000);
  18484. CreateDynamicObject(19373, 1659.82422, -992.69708, 682.60742, 0.00000, 90.00000, 0.00000);
  18485. CreateDynamicObject(19373, 1657.32422, -992.69708, 682.60938, 0.00000, 90.00000, 0.00000);
  18486. CreateDynamicObject(19373, 1667.32007, -989.64728, 682.61139, 0.00000, 90.00000, 0.00000);
  18487. CreateDynamicObject(19373, 1667.31274, -987.56097, 682.61340, 0.00000, 90.00000, 0.00000);
  18488. CreateDynamicObject(19373, 1667.44006, -976.51031, 682.59943, 0.00000, 90.00000, 0.00000);
  18489. CreateDynamicObject(19373, 1667.43689, -974.11902, 682.60138, 0.00000, 90.00000, 0.00000);
  18490. CreateDynamicObject(19373, 1675.15894, -968.47070, 682.60541, 0.00000, 90.00000, 0.00000);
  18491. CreateDynamicObject(19373, 1675.15552, -971.62988, 682.60339, 0.00000, 90.00000, 0.00000);
  18492. CreateDynamicObject(19373, 1675.14941, -974.82123, 682.60541, 0.00000, 90.00000, 0.00000);
  18493. CreateDynamicObject(19373, 1659.02771, -968.61041, 682.59943, 0.00000, 90.00000, 0.00000);
  18494. CreateDynamicObject(19373, 1659.02771, -971.61041, 682.60138, 0.00000, 90.00000, 0.00000);
  18495. CreateDynamicObject(19373, 1659.02771, -974.61041, 682.59943, 0.00000, 90.00000, 0.00000);
  18496. CreateDynamicObject(19373, 1667.31506, -994.88812, 682.60541, 0.00000, 90.00000, 0.00000);
  18497. CreateDynamicObject(1216, 1664.62183, -989.77948, 683.34930, 0.00000, 0.00000, 90.00000);
  18498. CreateDynamicObject(1216, 1670.23364, -989.68671, 683.34930, 0.00000, 0.00000, -90.00000);
  18499. CreateDynamicObject(19372, 1665.55750, -984.24152, 682.61731, 0.00000, 90.00000, 0.00000);
  18500. CreateDynamicObject(19372, 1669.06519, -981.03992, 682.61731, 0.00000, 90.00000, 0.00000);
  18501. CreateDynamicObject(1502, 1672.91052, -965.99878, 682.66650, 0.00000, 0.00000, 0.00000);
  18502. CreateDynamicObject(1502, 1660.46240, -966.02490, 682.66650, 0.00000, 0.00000, 0.00000);
  18503. CreateDynamicObject(19373, 1660.72278, -973.38147, 700.00690, 0.00000, 90.00000, 0.00000);
  18504. CreateDynamicObject(19373, 1664.19324, -970.30255, 700.00690, 0.00000, 90.00000, 0.00000);
  18505. CreateDynamicObject(19372, 1660.73840, -970.30151, 700.00629, 0.00000, 90.00000, 0.00000);
  18506. CreateDynamicObject(19372, 1664.19141, -973.38068, 700.00629, 0.00000, 90.00000, 0.00000);
  18507. CreateDynamicObject(1726, 1654.57568, -993.88953, 682.60760, 0.00000, 0.00000, 90.00000);
  18508. CreateDynamicObject(1726, 1656.18237, -990.42102, 682.60760, 0.00000, 0.00000, 0.00000);
  18509. CreateDynamicObject(1726, 1658.12073, -995.30109, 682.60760, 0.00000, 0.00000, -180.00000);
  18510. CreateDynamicObject(2126, 1656.79932, -993.20648, 682.59167, 0.00000, 0.00000, 0.00000);
  18511. CreateDynamicObject(2811, 1654.74890, -990.55658, 682.68890, 0.00000, 0.00000, 0.00000);
  18512. CreateDynamicObject(2811, 1654.64624, -995.29932, 682.68890, 0.00000, 0.00000, 0.00000);
  18513. CreateDynamicObject(2811, 1660.18701, -991.68616, 682.68890, 0.00000, 0.00000, 0.00000);
  18514. CreateDynamicObject(2811, 1660.21997, -993.80585, 682.68890, 0.00000, 0.00000, 0.00000);
  18515. CreateDynamicObject(19174, 1653.83386, -992.88977, 684.66608, 0.00000, 0.00000, 90.00000);
  18516. CreateDynamicObject(2126, 1676.75720, -993.20923, 682.59167, 0.00000, 0.00000, 0.00000);
  18517. CreateDynamicObject(1726, 1678.39221, -995.32458, 682.60760, 0.00000, 0.00000, -180.00000);
  18518. CreateDynamicObject(1726, 1676.31909, -990.28052, 682.60760, 0.00000, 0.00000, 0.00000);
  18519. CreateDynamicObject(1726, 1680.03442, -991.83075, 682.60760, 0.00000, 0.00000, -90.00000);
  18520. CreateDynamicObject(2811, 1679.71533, -995.15234, 682.68890, 0.00000, 0.00000, 0.00000);
  18521. CreateDynamicObject(2811, 1679.85291, -990.56287, 682.68890, 0.00000, 0.00000, 0.00000);
  18522. CreateDynamicObject(2811, 1674.32520, -991.69720, 682.68890, 0.00000, 0.00000, 0.00000);
  18523. CreateDynamicObject(2811, 1674.31262, -993.74756, 682.68890, 0.00000, 0.00000, 0.00000);
  18524. CreateDynamicObject(19175, 1680.88062, -992.88879, 684.73419, 0.00000, 0.00000, -90.00000);
  18525. CreateDynamicObject(1727, 1659.82190, -992.22430, 682.69482, 0.00000, 0.00000, -90.00000);
  18526. CreateDynamicObject(1727, 1674.90588, -993.20551, 682.69482, 0.00000, 0.00000, 90.00000);
  18527. CreateDynamicObject(2811, 1669.43213, -990.82062, 682.68890, 0.00000, 0.00000, 0.00000);
  18528. CreateDynamicObject(2811, 1665.22046, -990.83411, 682.68890, 0.00000, 0.00000, 0.00000);
  18529. CreateDynamicObject(2811, 1669.40662, -994.72894, 682.68890, 0.00000, 0.00000, 0.00000);
  18530. CreateDynamicObject(2811, 1665.17786, -994.67572, 682.68890, 0.00000, 0.00000, 0.00000);
  18531. CreateDynamicObject(1649, 1664.38135, -971.64264, 686.28632, 0.00000, 90.00000, 0.00000);
  18532. CreateDynamicObject(1649, 1667.46509, -971.67499, 686.28632, 0.00000, 90.00000, 0.00000);
  18533. CreateDynamicObject(1649, 1670.43530, -971.72980, 686.28632, 0.00000, 90.00000, 0.00000);
  18534. CreateDynamicObject(9131, 1671.99182, -968.97778, 683.55664, 0.00000, 0.00000, 0.00000);
  18535. CreateDynamicObject(9131, 1671.99268, -968.98340, 685.22662, 0.00000, 0.00000, 0.00000);
  18536. CreateDynamicObject(1649, 1672.07544, -970.30029, 686.36530, 0.00000, 90.00000, 90.00000);
  18537. CreateDynamicObject(9131, 1671.99268, -968.98340, 685.22662, 0.00000, 0.00000, 0.00000);
  18538. CreateDynamicObject(1649, 1672.16272, -967.69873, 686.36530, 0.00000, 90.00000, 90.00000);
  18539. CreateDynamicObject(1649, 1662.68506, -970.26831, 686.28632, 0.00000, 90.00000, -90.00000);
  18540. CreateDynamicObject(9131, 1662.74438, -968.89624, 683.55664, 0.00000, 0.00000, 0.00000);
  18541. CreateDynamicObject(9131, 1662.74194, -968.89771, 685.22662, 0.00000, 0.00000, 0.00000);
  18542. CreateDynamicObject(1649, 1662.74121, -967.32971, 686.28632, 0.00000, 90.00000, -90.00000);
  18543. CreateDynamicObject(2200, 1669.07825, -966.22864, 682.68683, 0.00000, 0.00000, 0.00000);
  18544. CreateDynamicObject(2200, 1664.39514, -966.23621, 682.68683, 0.00000, 0.00000, 0.00000);
  18545. CreateDynamicObject(1828, 1667.77917, -968.79425, 682.66248, 0.00000, 0.00000, 0.00000);
  18546. CreateDynamicObject(1714, 1670.26538, -970.00128, 682.68542, 0.00000, 0.00000, 62.00000);
  18547. CreateDynamicObject(1714, 1664.33838, -970.21857, 682.68542, 0.00000, 0.00000, -62.00000);
  18548. CreateDynamicObject(1714, 1667.39148, -970.04071, 682.68542, 0.00000, 0.00000, 0.00000);
  18549. CreateDynamicObject(1714, 1670.32922, -967.69934, 682.68542, 0.00000, 0.00000, 90.00000);
  18550. CreateDynamicObject(1714, 1664.26782, -967.65887, 682.68542, 0.00000, 0.00000, -90.00000);
  18551. CreateDynamicObject(2811, 1669.55005, -977.65448, 682.68890, 0.00000, 0.00000, 0.00000);
  18552. CreateDynamicObject(2811, 1665.26160, -977.63495, 682.68890, 0.00000, 0.00000, 0.00000);
  18553. CreateDynamicObject(1808, 1670.90918, -988.73779, 682.69318, 0.00000, 0.00000, 180.00000);
  18554. CreateDynamicObject(2606, 1669.72595, -966.20422, 685.30310, 0.00000, 0.00000, 0.00000);
  18555. CreateDynamicObject(2606, 1669.72595, -966.20422, 684.84308, 0.00000, 0.00000, 0.00000);
  18556. CreateDynamicObject(19380, 1677.75940, -993.34680, 685.94501, 0.00000, 90.00000, 0.00000);
  18557. CreateDynamicObject(19380, 1667.43481, -993.30182, 685.96503, 0.00000, 90.00000, 0.00000);
  18558. CreateDynamicObject(19380, 1657.26416, -993.34833, 685.94501, 0.00000, 90.00000, 0.00000);
  18559. CreateDynamicObject(19380, 1664.09070, -983.83752, 685.97498, 0.00000, 90.00000, 0.00000);
  18560. CreateDynamicObject(19380, 1672.86572, -983.84723, 685.97900, 0.00000, 90.00000, 0.00000);
  18561. CreateDynamicObject(19380, 1674.54370, -974.38708, 685.94501, 0.00000, 90.00000, 0.00000);
  18562. CreateDynamicObject(19380, 1674.64111, -970.71228, 685.96503, 0.00000, 90.00000, 0.00000);
  18563. CreateDynamicObject(19380, 1664.31567, -974.47052, 685.98499, 0.00000, 90.00000, 0.00000);
  18564. CreateDynamicObject(19380, 1657.26782, -974.66217, 685.96503, 0.00000, 90.00000, 0.00000);
  18565. CreateDynamicObject(19380, 1657.41858, -965.23651, 686.00500, 0.00000, 90.00000, 0.00000);
  18566. CreateDynamicObject(19380, 1665.27612, -968.87659, 686.02502, 0.00000, 90.00000, 0.00000);
  18567. CreateDynamicObject(19380, 1654.17944, -961.91632, 685.98499, 0.00000, 90.00000, 0.00000);
  18568. CreateDynamicObject(19443, 1654.88867, -958.56860, 686.58557, 90.00000, 0.00000, 90.00000);
  18569. CreateDynamicObject(4595, 1812.95972, -1071.76428, 686.49622, 0.00000, 0.00000, 0.00000);
  18570. CreateDynamicObject(4702, 1825.28564, -990.24133, 686.35730, 0.00000, 0.00000, 0.00000);
  18571. CreateDynamicObject(4650, 1662.22815, -976.74054, 710.07861, 0.00000, -90.00000, 90.00000);
  18572. CreateDynamicObject(14576, 1677.25659, -980.76630, 678.18488, 0.00000, 0.00000, 180.00000);
  18573. //CreateDynamicObject(2634, 1677.76440, -987.50836, 671.68329, 0.00000, 0.00000, -55.00000);
  18574. CreateDynamicObject(1726, 1668.31262, -981.95514, 682.60760, 0.00000, 0.00000, -180.00000);
  18575. CreateDynamicObject(1726, 1666.28406, -983.28662, 682.60760, 0.00000, 0.00000, 0.00000);
  18576. CreateDynamicObject(2811, 1665.64502, -982.69666, 682.68890, 0.00000, 0.00000, 0.00000);
  18577. CreateDynamicObject(2811, 1668.86804, -982.63745, 682.68890, 0.00000, 0.00000, 0.00000);
  18578. CreateDynamicObject(19443, 1665.71082, -987.56238, 686.06207, 90.00000, 90.00000, 90.00000);
  18579. CreateDynamicObject(19443, 1665.71082, -981.06238, 686.06207, 90.00000, 90.00000, 90.00000);
  18580. CreateDynamicObject(19443, 1665.71277, -984.27441, 686.06012, 90.00000, 90.00000, 90.00000);
  18581. CreateDynamicObject(19443, 1667.36914, -989.22498, 686.06012, 90.00000, 90.00000, 0.00000);
  18582. CreateDynamicObject(19443, 1665.71277, -977.56238, 686.06409, 90.00000, 90.00000, 90.00000);
  18583. CreateDynamicObject(19443, 1669.03259, -987.56348, 686.06207, 90.00000, 90.00000, 90.00000);
  18584. CreateDynamicObject(19443, 1669.03223, -984.16211, 686.06012, 90.00000, 90.00000, 90.00000);
  18585. CreateDynamicObject(19443, 1669.03125, -980.87512, 686.05811, 90.00000, 90.00000, 90.00000);
  18586. CreateDynamicObject(19443, 1669.03784, -977.56500, 686.05609, 90.00000, 90.00000, 90.00000);
  18587. CreateDynamicObject(19443, 1667.37561, -975.89868, 686.06012, 90.00000, 90.00000, 0.00000);
  18588. CreateDynamicObject(2434, 1677.79968, -999.17450, 669.99207, 0.00000, 0.00000, 0.00000);
  18589. CreateDynamicObject(2434, 1676.67566, -999.00781, 669.99408, 0.00000, 0.00000, -90.00000);
  18590. CreateDynamicObject(2435, 1677.96814, -998.04462, 669.99261, 0.00000, 0.00000, 90.00000);
  18591. CreateDynamicObject(2435, 1676.67773, -998.07520, 669.99261, 0.00000, 0.00000, -90.00000);
  18592. CreateDynamicObject(2434, 1677.97009, -997.13013, 669.99408, 0.00000, 0.00000, 90.00000);
  18593. CreateDynamicObject(2434, 1676.84619, -996.95288, 669.99213, 0.00000, 0.00000, 180.00000);
  18594. CreateDynamicObject(2000, 1674.19604, -989.16309, 669.99103, 0.00000, 0.00000, 0.00000);
  18595. CreateDynamicObject(2000, 1674.69397, -989.16107, 669.99103, 0.00000, 0.00000, 0.00000);
  18596. CreateDynamicObject(2000, 1675.19397, -989.16107, 669.99103, 0.00000, 0.00000, 0.00000);
  18597. CreateDynamicObject(2000, 1675.69397, -989.16107, 669.99103, 0.00000, 0.00000, 0.00000);
  18598. CreateDynamicObject(2000, 1678.69397, -989.16107, 669.99103, 0.00000, 0.00000, 0.00000);
  18599. CreateDynamicObject(2000, 1679.19397, -989.16107, 669.99103, 0.00000, 0.00000, 0.00000);
  18600. CreateDynamicObject(2000, 1679.69397, -989.16107, 669.99103, 0.00000, 0.00000, 0.00000);
  18601. CreateDynamicObject(2000, 1680.19397, -989.16107, 669.99103, 0.00000, 0.00000, 0.00000);
  18602. CreateDynamicObject(2000, 1680.32227, -1003.89697, 669.99237, 0.00000, 0.00000, 180.00000);
  18603. CreateDynamicObject(2000, 1679.82227, -1003.89697, 669.99237, 0.00000, 0.00000, 180.00000);
  18604. CreateDynamicObject(2000, 1679.32227, -1003.89697, 669.99237, 0.00000, 0.00000, 180.00000);
  18605. CreateDynamicObject(2000, 1678.82227, -1003.89697, 669.99237, 0.00000, 0.00000, 180.00000);
  18606. CreateDynamicObject(2000, 1678.32227, -1003.89697, 669.99237, 0.00000, 0.00000, 180.00000);
  18607. CreateDynamicObject(2000, 1677.82227, -1003.89697, 669.99237, 0.00000, 0.00000, 180.00000);
  18608. CreateDynamicObject(2000, 1677.32227, -1003.89697, 669.99237, 0.00000, 0.00000, 180.00000);
  18609. CreateDynamicObject(2000, 1676.82227, -1003.89697, 669.99237, 0.00000, 0.00000, 180.00000);
  18610. CreateDynamicObject(2000, 1676.32227, -1003.89697, 669.99237, 0.00000, 0.00000, 180.00000);
  18611. CreateDynamicObject(2000, 1675.82227, -1003.89697, 669.99237, 0.00000, 0.00000, 180.00000);
  18612. CreateDynamicObject(2000, 1675.32227, -1003.89697, 669.99237, 0.00000, 0.00000, 180.00000);
  18613. CreateDynamicObject(2000, 1674.82227, -1003.89697, 669.99237, 0.00000, 0.00000, 180.00000);
  18614. CreateDynamicObject(2000, 1674.32227, -1003.89697, 669.99237, 0.00000, 0.00000, 180.00000);
  18615. CreateDynamicObject(1550, 1674.38489, -1003.73480, 670.24860, 0.00000, 0.00000, 0.00000);
  18616. CreateDynamicObject(1550, 1674.75854, -1003.40149, 670.24860, 0.00000, 0.00000, 33.00000);
  18617. CreateDynamicObject(1550, 1674.24988, -1003.33649, 670.24860, 0.00000, 0.00000, 33.00000);
  18618. CreateDynamicObject(1550, 1674.41284, -1002.94733, 670.12360, 69.00000, 0.00000, 33.00000);
  18619. CreateDynamicObject(1550, 1674.23401, -1002.45795, 670.24860, 0.00000, 0.00000, 33.00000);
  18620. CreateDynamicObject(1550, 1675.05933, -1002.70532, 670.24860, 0.00000, 0.00000, 33.00000);
  18621. CreateDynamicObject(1550, 1678.09033, -999.48700, 670.24860, 0.00000, 0.00000, 33.00000);
  18622. CreateDynamicObject(1550, 1678.35583, -999.07501, 670.24860, 0.00000, 0.00000, 33.00000);
  18623. CreateDynamicObject(1550, 1678.58569, -999.58228, 670.24860, 0.00000, 0.00000, 33.00000);
  18624. CreateDynamicObject(1550, 1674.20776, -989.49445, 670.24860, 0.00000, 0.00000, 33.00000);
  18625. CreateDynamicObject(1550, 1674.75024, -989.43054, 670.24860, 0.00000, 0.00000, 33.00000);
  18626. CreateDynamicObject(1550, 1674.48401, -989.88702, 670.24860, 0.00000, 0.00000, 33.00000);
  18627. CreateDynamicObject(1550, 1674.98157, -989.83002, 670.24860, 0.00000, 0.00000, 33.00000);
  18628. CreateDynamicObject(1550, 1674.27588, -990.34778, 670.05060, -105.00000, 0.00000, 287.00000);
  18629. CreateDynamicObject(1550, 1675.00476, -1001.74683, 670.24860, 0.00000, 0.00000, 33.00000);
  18630. CreateDynamicObject(1550, 1676.12549, -998.38446, 670.24860, 0.00000, 0.00000, 33.00000);
  18631. CreateDynamicObject(1550, 1675.97021, -997.99341, 670.24860, 0.00000, 0.00000, 33.00000);
  18632. CreateDynamicObject(1550, 1675.61206, -998.46313, 670.24860, 0.00000, 0.00000, 33.00000);
  18633. CreateDynamicObject(1550, 1678.05933, -996.55249, 670.24860, 0.00000, 0.00000, 33.00000);
  18634. CreateDynamicObject(1550, 1677.51147, -996.45801, 670.24860, 0.00000, 0.00000, 33.00000);
  18635. CreateDynamicObject(1550, 1677.94556, -996.01849, 670.24860, 0.00000, 0.00000, 33.00000);
  18636. CreateDynamicObject(1550, 1677.39294, -995.96844, 670.24860, 0.00000, 0.00000, 33.00000);
  18637. CreateDynamicObject(1550, 1676.98633, -996.65375, 670.24860, 0.00000, 0.00000, 33.00000);
  18638. CreateDynamicObject(1550, 1680.32813, -992.60712, 670.24860, 0.00000, 0.00000, 33.00000);
  18639. CreateDynamicObject(1550, 1680.28064, -993.05798, 670.24860, 0.00000, 0.00000, 33.00000);
  18640. CreateDynamicObject(1550, 1679.88989, -992.82013, 670.24860, 0.00000, 0.00000, 33.00000);
  18641. CreateDynamicObject(1550, 1679.92578, -993.28516, 670.24860, 0.00000, 0.00000, 33.00000);
  18642. CreateDynamicObject(1550, 1680.38379, -993.54877, 670.24860, 0.00000, 0.00000, 33.00000);
  18643. CreateDynamicObject(19358, 1671.52832, -964.88507, 680.12793, 0.00000, 180.00000, -0.10000);
  18644. CreateDynamicObject(19358, 1672.83105, -966.02869, 680.12793, 0.00000, 180.00000, -90.10000);
  18645. CreateDynamicObject(18757, 1662.66113, -986.51813, 684.55219, 0.00000, 0.00000, 0.00000);
  18646. CreateDynamicObject(18757, 1662.66309, -984.56311, 684.55219, 0.00000, 0.00000, 0.00000);
  18647. CreateDynamicObject(2811, 1661.19666, -982.16919, 682.68890, 0.00000, 0.00000, 0.00000);
  18648. CreateDynamicObject(2811, 1661.23230, -987.33252, 682.68890, 0.00000, 0.00000, 0.00000);
  18649. CreateDynamicObject(18757, 1675.89514, -984.62836, 684.55219, 0.00000, 0.00000, 0.00000);
  18650. CreateDynamicObject(18757, 1675.89709, -986.50043, 684.55219, 0.00000, 0.00000, 0.00000);
  18651. CreateDynamicObject(2811, 1673.35864, -981.99762, 682.68890, 0.00000, 0.00000, 0.00000);
  18652. CreateDynamicObject(2811, 1673.48254, -987.14429, 682.68890, 0.00000, 0.00000, 0.00000);
  18653. CreateDynamicObject(1557, 1655.64185, -972.38470, 682.58893, 0.00000, 0.00000, 90.00000);
  18654. CreateDynamicObject(1557, 1679.05115, -972.45654, 682.58893, 0.00000, 0.00000, 90.00000);
  18655. CreateDynamicObject(19464, 1685.72986, -987.53156, 672.48907, 0.00000, 0.00000, 0.00000);
  18656. CreateDynamicObject(19464, 1685.71204, -981.58417, 672.48907, 0.00000, 0.00000, 0.00000);
  18657. CreateDynamicObject(19464, 1685.73914, -976.21100, 672.48907, 0.00000, 0.00000, 0.00000);
  18658. CreateDynamicObject(19464, 1685.75281, -970.91187, 672.48907, 0.00000, 0.00000, 0.00000);
  18659. CreateDynamicObject(19464, 1670.69458, -971.08954, 672.48907, 0.00000, 0.00000, 0.00000);
  18660. CreateDynamicObject(19464, 1670.62061, -976.40570, 672.48907, 0.00000, 0.00000, 0.00000);
  18661. CreateDynamicObject(19464, 1670.48389, -981.24969, 672.48907, 0.00000, 0.00000, 0.00000);
  18662. CreateDynamicObject(19464, 1670.47412, -986.92102, 672.48907, 0.00000, 0.00000, 0.00000);
  18663. CreateDynamicObject(1734, 1684.81921, -973.82593, 675.49249, 0.00000, 30.00000, 30.00000);
  18664. CreateDynamicObject(1734, 1684.89453, -978.63745, 675.49249, 0.00000, 30.00000, 30.00000);
  18665. CreateDynamicObject(1734, 1684.82043, -983.63324, 675.49249, 0.00000, 30.00000, 30.00000);
  18666. CreateDynamicObject(1734, 1671.46765, -974.24066, 675.49249, 0.00000, -30.00000, 30.00000);
  18667. CreateDynamicObject(1734, 1671.31140, -978.95215, 675.49249, 0.00000, -30.00000, 30.00000);
  18668. CreateDynamicObject(1734, 1671.28943, -984.09473, 675.49249, 0.00000, -30.00000, 30.00000);
  18669. CreateDynamicObject(1808, 1663.93970, -988.78314, 682.69318, 0.00000, 0.00000, 180.00000);
  18670. CreateDynamicObject(1734, 1667.30676, -977.16321, 686.48077, 0.00000, 0.00000, 0.00000);
  18671. CreateDynamicObject(1734, 1667.30676, -980.16321, 686.48077, 0.00000, 0.00000, 0.00000);
  18672. CreateDynamicObject(1734, 1667.30676, -982.66321, 686.48077, 0.00000, 0.00000, 0.00000);
  18673. CreateDynamicObject(1734, 1667.30676, -984.66321, 686.48077, 0.00000, 0.00000, 0.00000);
  18674. CreateDynamicObject(1734, 1667.30676, -987.16321, 686.48077, 0.00000, 0.00000, 0.00000);
  18675. CreateDynamicObject(2108, 1670.81714, -976.99768, 682.66882, 0.00000, 0.00000, 0.00000);
  18676. CreateDynamicObject(2108, 1663.92041, -976.95392, 682.66882, 0.00000, 0.00000, 0.00000);
  18677. CreateDynamicObject(18075, 1667.43665, -982.60559, 685.90179, 0.00000, 0.00000, 0.00000);
  18678. CreateDynamicObject(2773, 1664.73279, -976.47131, 683.17090, 0.00000, 0.00000, 90.00000);
  18679. CreateDynamicObject(2773, 1664.72839, -975.08966, 683.17090, 0.00000, 0.00000, 90.00000);
  18680. CreateDynamicObject(2773, 1670.14978, -975.04382, 683.17090, 0.00000, 0.00000, 90.00000);
  18681. CreateDynamicObject(2773, 1670.14978, -976.44196, 683.17090, 0.00000, 0.00000, 90.00000);
  18682. CreateDynamicObject(2773, 1670.02148, -989.06970, 683.17090, 0.00000, 0.00000, 90.00000);
  18683. CreateDynamicObject(2773, 1670.00928, -990.43817, 683.17090, 0.00000, 0.00000, 90.00000);
  18684. CreateDynamicObject(2773, 1664.61499, -990.44031, 683.17090, 0.00000, 0.00000, 90.00000);
  18685. CreateDynamicObject(2773, 1664.63940, -989.05945, 683.17090, 0.00000, 0.00000, 90.00000);
  18686. CreateDynamicObject(2773, 1660.72534, -992.72321, 683.17090, 0.00000, 0.00000, 0.00000);
  18687. CreateDynamicObject(2773, 1673.82996, -992.72601, 683.17090, 0.00000, 0.00000, 0.00000);
  18688. CreateDynamicObject(1734, 1677.05408, -992.97064, 686.48077, 0.00000, 0.00000, 0.00000);
  18689. CreateDynamicObject(1734, 1656.62134, -992.63593, 686.48077, 0.00000, 0.00000, 0.00000);
  18690. CreateDynamicObject(19458, 1676.31287, -958.97858, 680.32001, 0.00000, 90.00000, 90.00000);
  18691. CreateDynamicObject(19458, 1676.38159, -964.48083, 682.59680, 0.00000, 90.00000, 90.00000);
  18692. CreateDynamicObject(19458, 1676.21570, -964.50897, 678.32642, 0.00000, 90.00000, 90.00000);
  18693. CreateDynamicObject(19458, 1674.84692, -958.82312, 676.11920, 0.00000, 90.00000, 90.00000);
  18694. CreateDynamicObject(19458, 1676.46021, -964.52179, 674.11139, 0.00000, 90.00000, 90.00000);
  18695. CreateDynamicObject(19458, 1675.06433, -958.81409, 671.91522, 0.00000, 90.00000, 90.00000);
  18696. CreateDynamicObject(1886, 1662.88867, -972.32507, 685.98969, 0.00000, 0.00000, 40.00000);
  18697. CreateDynamicObject(1886, 1671.76123, -972.41028, 685.98969, 0.00000, 0.00000, -33.00000);
  18698. // SAN interior
  18699. CreateDynamicObject(19376, 247.74, 1783.13, 700.00, 0.00, 90.00, 0.00);
  18700. CreateDynamicObject(19376, 258.24, 1783.14, 700.00, 0.00, 90.00, 0.00);
  18701. CreateDynamicObject(19376, 247.74, 1773.55, 700.00, 0.00, 90.00, 0.00);
  18702. CreateDynamicObject(19376, 258.23, 1773.55, 700.00, 0.00, 90.00, 0.00);
  18703. CreateDynamicObject(19450, 250.44, 1784.44, 701.65, 0.00, 0.00, 90.00);
  18704. CreateDynamicObject(19450, 245.63, 1779.94, 701.65, 0.00, 0.00, 0.00);
  18705. CreateDynamicObject(19450, 253.91, 1780.12, 701.65, 0.00, 0.00, 0.00);
  18706. CreateDynamicObject(19450, 253.03, 1775.84, 701.65, 0.00, 0.00, 90.00);
  18707. CreateDynamicObject(19404, 252.33, 1778.41, 701.65, 0.00, 0.00, 90.00);
  18708. CreateDynamicObject(19388, 249.65, 1777.30, 701.65, 0.00, 0.00, -45.00);
  18709. CreateDynamicObject(19388, 246.66, 1775.84, 701.65, 0.00, 0.00, 90.00);
  18710. CreateDynamicObject(19466, 252.38, 1778.39, 702.43, 0.00, 0.00, 90.00);
  18711. CreateDynamicObject(1502, 249.13, 1776.76, 699.95, 0.00, 0.00, 45.00);
  18712. CreateDynamicObject(2165, 251.81, 1777.85, 700.09, 0.00, 0.00, 0.00);
  18713. CreateDynamicObject(19358, 248.54, 1774.62, 701.65, 0.00, 0.00, 0.00);
  18714. CreateDynamicObject(1714, 252.63, 1777.00, 700.09, 0.00, 0.00, 230.00);
  18715. CreateDynamicObject(2007, 253.70, 1776.70, 700.01, 0.00, 0.00, -90.00);
  18716. CreateDynamicObject(1961, 250.82, 1775.97, 701.86, 0.00, 0.00, 0.00);
  18717. CreateDynamicObject(1962, 251.55, 1775.97, 701.86, 0.00, 0.00, 0.00);
  18718. CreateDynamicObject(1960, 252.27, 1775.97, 701.86, 0.00, 0.00, 0.00);
  18719. CreateDynamicObject(1569, 247.05, 1784.39, 700.02, 0.00, 0.00, 0.00);
  18720. CreateDynamicObject(1569, 250.03, 1784.39, 700.02, 0.00, 0.00, 180.00);
  18721. CreateDynamicObject(1703, 251.10, 1783.84, 700.09, 0.00, 0.00, 0.00);
  18722. CreateDynamicObject(1703, 246.23, 1779.16, 700.09, 0.00, 0.00, 90.00);
  18723. CreateDynamicObject(2315, 247.52, 1779.46, 700.09, 0.00, 0.00, 90.00);
  18724. CreateDynamicObject(2315, 251.39, 1782.50, 700.09, 0.00, 0.00, 0.00);
  18725. CreateDynamicObject(2250, 251.42, 1782.51, 701.03, 0.00, 0.00, 0.00);
  18726. CreateDynamicObject(2250, 247.52, 1780.31, 701.03, 0.00, 0.00, 90.00);
  18727. CreateDynamicObject(2852, 252.61, 1782.49, 700.58, 0.00, 0.00, 90.00);
  18728. CreateDynamicObject(2894, 247.42, 1779.67, 700.58, 0.00, 0.00, 39.00);
  18729. CreateDynamicObject(2011, 246.21, 1783.97, 700.09, 0.00, 0.00, 0.00);
  18730. CreateDynamicObject(2011, 253.24, 1779.07, 700.09, 0.00, 0.00, 0.00);
  18731. CreateDynamicObject(1502, 245.88, 1775.81, 699.95, 0.00, 0.00, 0.00);
  18732. CreateDynamicObject(19450, 245.63, 1770.30, 701.65, 0.00, 0.00, 0.00);
  18733. CreateDynamicObject(19358, 250.13, 1773.12, 701.65, 0.00, 0.00, 90.40);
  18734. CreateDynamicObject(19388, 252.80, 1774.23, 701.65, 0.00, 0.00, -45.00);
  18735. CreateDynamicObject(1502, 252.29, 1773.69, 699.95, 0.00, 0.00, 45.00);
  18736. CreateDynamicObject(1265, 250.63, 1775.49, 700.16, 0.00, 0.00, 0.00);
  18737. CreateDynamicObject(1265, 250.35, 1774.87, 700.16, 0.00, 0.00, 0.00);
  18738. CreateDynamicObject(1778, 253.53, 1775.81, 700.09, 0.00, 0.00, 0.00);
  18739. CreateDynamicObject(2712, 253.57, 1775.32, 700.68, 0.00, 0.00, 0.00);
  18740. CreateDynamicObject(1221, 249.31, 1773.68, 700.09, 0.00, 0.00, 0.00);
  18741. CreateDynamicObject(1221, 250.27, 1773.94, 700.38, 0.00, 0.00, 0.00);
  18742. CreateDynamicObject(1221, 249.56, 1775.12, 700.38, 0.00, 0.00, 0.00);
  18743. CreateDynamicObject(1265, 249.18, 1774.36, 700.16, 0.00, 0.00, 0.00);
  18744. CreateDynamicObject(19450, 249.18, 1768.98, 701.65, 0.00, 0.00, 90.00);
  18745. CreateDynamicObject(1705, 246.30, 1770.17, 700.09, 0.00, 0.00, 90.00);
  18746. CreateDynamicObject(1705, 247.85, 1769.63, 700.09, 0.00, 0.00, 180.00);
  18747. CreateDynamicObject(1705, 251.83, 1769.63, 700.09, 0.00, 0.00, 180.00);
  18748. CreateDynamicObject(2315, 248.60, 1769.55, 700.09, 0.00, 0.00, 0.00);
  18749. CreateDynamicObject(2855, 248.78, 1769.55, 700.58, 0.00, 0.00, 0.00);
  18750. CreateDynamicObject(2251, 249.67, 1769.36, 701.41, 0.00, 0.00, 0.00);
  18751. CreateDynamicObject(1667, 249.91, 1769.75, 700.69, 0.00, 0.00, 0.00);
  18752. CreateDynamicObject(1667, 250.08, 1769.65, 700.69, 0.00, 0.00, 0.00);
  18753. CreateDynamicObject(2817, 248.02, 1783.18, 700.08, 0.00, 0.00, 0.00);
  18754. CreateDynamicObject(19450, 254.81, 1780.65, 701.65, 0.00, 0.00, 0.00);
  18755. CreateDynamicObject(14393, 255.23, 1759.95, 702.32, 0.00, 0.00, 90.00);
  18756. CreateDynamicObject(19450, 261.73, 1768.98, 701.65, 0.00, 0.00, 90.00);
  18757. CreateDynamicObject(19450, 249.19, 1768.83, 701.65, 0.00, 0.00, 90.00);
  18758. CreateDynamicObject(19388, 255.31, 1768.98, 701.65, 0.00, 0.00, 90.00);
  18759. CreateDynamicObject(19388, 255.31, 1768.83, 701.65, 0.00, 0.00, 90.00);
  18760. CreateDynamicObject(19450, 261.73, 1768.83, 701.65, 0.00, 0.00, 90.00);
  18761. CreateDynamicObject(14391, 256.13, 1760.86, 701.05, 0.00, 0.00, 90.00);
  18762. CreateDynamicObject(1705, 257.11, 1767.64, 700.09, 0.00, 0.00, 0.00);
  18763. CreateDynamicObject(1705, 258.68, 1767.02, 700.09, 0.00, 0.00, -90.00);
  18764. CreateDynamicObject(2332, 259.63, 1764.36, 700.38, 0.00, 0.00, -90.00);
  18765. CreateDynamicObject(638, 254.72, 1765.20, 701.43, 0.00, 0.00, 90.00);
  18766. CreateDynamicObject(638, 258.07, 1765.20, 701.43, 0.00, 0.00, 90.00);
  18767. CreateDynamicObject(2894, 256.40, 1765.18, 701.10, 0.00, 0.00, 80.00);
  18768. CreateDynamicObject(1714, 257.11, 1762.81, 700.10, 0.00, 0.00, -45.00);
  18769. CreateDynamicObject(1714, 254.18, 1762.77, 700.10, 0.00, 0.00, 0.00);
  18770. CreateDynamicObject(1502, 251.40, 1759.68, 699.95, 0.00, 0.00, 0.00);
  18771. CreateDynamicObject(2395, 250.95, 1759.82, 700.10, 0.00, 0.00, 180.00);
  18772. CreateDynamicObject(2395, 252.48, 1759.82, 702.46, 0.00, 0.00, 180.00);
  18773. CreateDynamicObject(2395, 249.79, 1759.59, 702.46, 0.00, 0.00, 0.00);
  18774. CreateDynamicObject(2395, 248.19, 1759.58, 700.10, 0.00, 0.00, 0.00);
  18775. CreateDynamicObject(1704, 254.31, 1753.90, 700.09, 0.00, 0.00, 135.00);
  18776. CreateDynamicObject(1704, 256.22, 1754.49, 700.09, 0.00, 0.00, -135.00);
  18777. CreateDynamicObject(1815, 254.42, 1754.73, 700.09, 0.00, 0.00, 0.00);
  18778. CreateDynamicObject(2247, 254.89, 1755.32, 700.99, 0.00, 0.00, 0.00);
  18779. CreateDynamicObject(2010, 253.33, 1754.95, 700.10, 0.00, 0.00, 0.00);
  18780. CreateDynamicObject(2010, 256.59, 1754.91, 700.10, 0.00, 0.00, 0.00);
  18781. CreateDynamicObject(19466, 253.95, 1759.95, 701.92, 0.00, 0.00, 90.00);
  18782. CreateDynamicObject(19466, 256.17, 1759.95, 701.92, 0.00, 0.00, 90.00);
  18783. CreateDynamicObject(19466, 258.40, 1759.95, 701.92, 0.00, 0.00, 90.00);
  18784. CreateDynamicObject(19376, 259.00, 1763.90, 699.99, 0.00, 90.00, 0.00);
  18785. CreateDynamicObject(1502, 254.53, 1768.96, 699.95, 0.00, 0.00, 0.00);
  18786. CreateDynamicObject(19450, 262.61, 1772.18, 701.65, 0.00, 0.00, -45.00);
  18787. CreateDynamicObject(19450, 263.67, 1770.76, 701.65, 0.00, 0.00, 0.00);
  18788. CreateDynamicObject(19450, 257.75, 1783.82, 701.65, 0.00, 0.00, 0.00);
  18789. CreateDynamicObject(19388, 257.75, 1777.43, 701.65, 0.00, 0.00, 0.00);
  18790. CreateDynamicObject(19388, 259.37, 1782.08, 701.65, 0.00, 0.00, 90.00);
  18791. CreateDynamicObject(19388, 265.76, 1782.08, 701.65, 0.00, 0.00, 90.00);
  18792. CreateDynamicObject(19450, 268.40, 1775.63, 701.65, 0.00, 0.00, 90.00);
  18793. CreateDynamicObject(19358, 256.17, 1781.31, 701.65, 0.00, 0.00, 90.00);
  18794. CreateDynamicObject(2606, 256.21, 1781.15, 702.56, 13.50, 0.00, 0.00);
  18795. CreateDynamicObject(2165, 255.78, 1780.60, 700.09, 0.00, 0.00, 0.00);
  18796. CreateDynamicObject(1806, 256.45, 1779.59, 700.09, 0.00, 0.00, 0.00);
  18797. CreateDynamicObject(2078, 255.16, 1777.82, 700.11, 0.00, 0.00, 90.00);
  18798. CreateDynamicObject(2462, 257.00, 1776.04, 700.26, 0.00, 0.00, 180.00);
  18799. CreateDynamicObject(19418, 257.25, 1776.20, 701.06, 90.00, 90.00, 90.00);
  18800. CreateDynamicObject(19418, 256.93, 1776.10, 701.06, 90.00, 90.00, 324233.00);
  18801. CreateDynamicObject(19418, 257.04, 1776.30, 701.06, 90.00, 90.00, 342.00);
  18802. CreateDynamicObject(334, 257.00, 1776.08, 701.41, 90.00, 0.00, 90.00);
  18803. CreateDynamicObject(2037, 257.28, 1776.14, 701.81, 0.00, 0.00, 180.00);
  18804. CreateDynamicObject(348, 256.86, 1776.16, 701.77, 90.00, 0.00, 45.00);
  18805. CreateDynamicObject(19376, 268.68, 1783.12, 700.00, 0.00, 90.00, 0.00);
  18806. CreateDynamicObject(19376, 268.71, 1773.53, 700.00, 0.00, 90.00, 0.00);
  18807. CreateDynamicObject(19450, 262.09, 1787.45, 701.65, 0.00, 0.00, 90.00);
  18808. CreateDynamicObject(19450, 269.72, 1784.41, 701.65, 0.00, 0.00, 45.00);
  18809. CreateDynamicObject(19450, 269.61, 1780.36, 701.65, 0.00, 0.00, 0.00);
  18810. CreateDynamicObject(19450, 272.15, 1782.08, 701.65, 0.00, 0.00, 90.00);
  18811. CreateDynamicObject(19358, 262.57, 1782.08, 701.65, 0.00, 0.00, 90.00);
  18812. CreateDynamicObject(19450, 262.68, 1786.88, 701.65, 0.00, 0.00, 0.00);
  18813. CreateDynamicObject(1702, 261.93, 1772.37, 700.08, 0.00, 0.00, 225.00);
  18814. CreateDynamicObject(2315, 259.75, 1772.14, 700.09, 0.00, 0.00, 45.00);
  18815. CreateDynamicObject(2315, 266.10, 1777.95, 700.09, 0.00, 0.00, 45.00);
  18816. CreateDynamicObject(1702, 268.89, 1779.58, 700.08, 0.00, 0.00, 270.00);
  18817. CreateDynamicObject(1702, 267.63, 1776.33, 700.08, 0.00, 0.00, 180.00);
  18818. CreateDynamicObject(2251, 260.10, 1772.71, 701.41, 0.00, 0.00, 0.00);
  18819. CreateDynamicObject(2251, 266.94, 1779.01, 701.41, 0.00, 0.00, 0.00);
  18820. CreateDynamicObject(1667, 260.76, 1772.73, 700.69, 0.00, 0.00, 0.00);
  18821. CreateDynamicObject(1667, 266.26, 1777.77, 700.69, 0.00, 0.00, 0.00);
  18822. CreateDynamicObject(1667, 266.34, 1777.86, 700.69, 0.00, 0.00, 0.00);
  18823. CreateDynamicObject(1667, 266.20, 1777.88, 700.69, 0.00, 0.00, 0.00);
  18824. CreateDynamicObject(1502, 258.59, 1782.06, 699.95, 0.00, 0.00, 0.00);
  18825. CreateDynamicObject(1502, 264.98, 1782.06, 699.95, 0.00, 0.00, 0.00);
  18826. CreateDynamicObject(2207, 265.49, 1785.14, 700.09, 0.00, 0.00, -45.00);
  18827. CreateDynamicObject(1714, 267.29, 1785.67, 700.10, 0.00, 0.00, -45.00);
  18828. CreateDynamicObject(330, 266.98, 1784.24, 700.86, 90.00, 0.00, 90.00);
  18829. CreateDynamicObject(2894, 265.87, 1785.33, 700.86, 0.00, 0.00, 0.00);
  18830. CreateDynamicObject(2608, 263.00, 1785.07, 701.21, 0.00, 0.00, 90.00);
  18831. CreateDynamicObject(1962, 267.85, 1786.13, 701.86, 0.00, 0.00, -45.00);
  18832. CreateDynamicObject(2185, 258.67, 1785.35, 700.09, 0.00, 0.00, 0.00);
  18833. CreateDynamicObject(1714, 260.03, 1786.60, 700.10, 0.00, 0.00, -45.00);
  18834. CreateDynamicObject(1704, 260.02, 1783.92, 700.09, 0.00, 0.00, 180.00);
  18835. CreateDynamicObject(2078, 262.38, 1784.88, 700.11, 0.00, 0.00, -90.00);
  18836. CreateDynamicObject(2007, 257.95, 1786.74, 700.01, 0.00, 0.00, 90.00);
  18837. CreateDynamicObject(1569, 257.81, 1776.73, 700.02, 0.00, 0.00, 45.00);
  18838. CreateDynamicObject(2886, 257.82, 1778.48, 701.44, 0.00, 0.00, 90.00);
  18839. CreateDynamicObject(2886, 257.82, 1778.51, 701.44, 0.00, 0.00, -90.00);
  18840. CreateDynamicObject(2886, 257.71, 1778.48, 701.44, 0.00, 0.00, -90.00);
  18841. CreateDynamicObject(19378, 247.74, 1783.13, 703.43, 0.00, 90.00, 0.00);
  18842. CreateDynamicObject(19378, 247.74, 1773.55, 703.43, 0.00, 90.00, 0.00);
  18843. CreateDynamicObject(19378, 258.23, 1773.55, 703.43, 0.00, 90.00, 0.00);
  18844. CreateDynamicObject(19378, 268.68, 1783.12, 703.43, 0.00, 90.00, 0.00);
  18845. CreateDynamicObject(19378, 268.71, 1773.53, 703.43, 0.00, 90.00, 0.00);
  18846. CreateDynamicObject(19378, 258.24, 1783.14, 703.43, 0.00, 90.00, 0.00);
  18847. // Church interior (Credits: Lance Lanvins)
  18848. CreateDynamicObject(4585, 2240.62451, -1363.48401, 1400.06104, 0.00000, 0.00000, 22.85999);
  18849. CreateDynamicObject(19460, 2253.52002, -1367.50244, 1499.90222, 0.00000, 0.00000, 0.00000);
  18850. CreateDynamicObject(19460, 2242.11890, -1381.53967, 1499.90222, 0.00000, 0.00000, 45.00000);
  18851. CreateDynamicObject(19460, 2235.60010, -1375.02026, 1499.90222, 0.00000, 0.00000, 45.00000);
  18852. CreateDynamicObject(19460, 2249.11133, -1383.25745, 1499.90222, 0.00000, 0.00000, 112.50000);
  18853. CreateDynamicObject(19460, 2253.52002, -1377.12195, 1499.90222, 0.00000, 0.00000, 0.00000);
  18854. CreateDynamicObject(3935, 2236.75195, -1361.27576, 1499.90222, 0.00000, 0.00000, -178.07994);
  18855. CreateDynamicObject(1569, 2248.18481, -1383.60034, 1499.85596, 0.00000, 0.00000, 22.50000);
  18856. CreateDynamicObject(1569, 2250.90259, -1382.47168, 1499.85596, 0.00000, 0.00000, 202.50000);
  18857. CreateDynamicObject(5426, 2242.53516, -1363.76294, 1480.00000, 0.00000, -38.00000, 0.28000);
  18858. CreateDynamicObject(2808, 2235.74292, -1372.80530, 1500.51379, 0.00000, 0.00000, 22.50000);
  18859. CreateDynamicObject(948, 2251.08618, -1382.05518, 1499.90491, 0.00000, 0.00000, 22.50000);
  18860. CreateDynamicObject(948, 2247.75195, -1383.41882, 1499.90491, 0.00000, 0.00000, 22.50000);
  18861. CreateDynamicObject(5426, 2244.95605, -1373.11267, 1480.00000, 0.00000, -38.00000, -67.52000);
  18862. CreateDynamicObject(5426, 2245.03931, -1369.02258, 1480.00000, 0.00000, -38.00000, -135.25996);
  18863. CreateDynamicObject(19460, 2228.87573, -1368.22131, 1499.90222, 0.00000, 0.00000, 44.39999);
  18864. CreateDynamicObject(19460, 2222.13696, -1361.43860, 1499.90222, 0.00000, 0.00000, 45.42000);
  18865. CreateDynamicObject(19460, 2253.47510, -1358.03223, 1499.90222, 0.00000, 0.00000, 0.54000);
  18866. CreateDynamicObject(19460, 2253.43726, -1348.77722, 1499.90222, 0.00000, 0.00000, 0.42000);
  18867. CreateDynamicObject(5426, 2237.21387, -1367.78601, 1480.00000, 0.00000, -38.00000, -247.15994);
  18868. CreateDynamicObject(19452, 2227.26855, -1361.54492, 1501.56897, 0.00000, 90.00000, -67.32000);
  18869. CreateDynamicObject(19452, 2236.11206, -1357.86218, 1501.56897, 0.00000, 90.00000, -67.32000);
  18870. CreateDynamicObject(19452, 2244.96045, -1354.17004, 1501.56897, 0.00000, 90.00000, -67.32000);
  18871. CreateDynamicObject(19452, 2253.79395, -1350.46899, 1501.56897, 0.00000, 90.00000, -67.32000);
  18872. CreateDynamicObject(19452, 2228.11426, -1362.99976, 1499.90002, 0.00000, 0.00000, -67.32000);
  18873. CreateDynamicObject(19452, 2236.75806, -1359.40930, 1499.90002, 0.00000, 0.00000, -67.32000);
  18874. CreateDynamicObject(19452, 2245.59302, -1355.73303, 1499.90002, 0.00000, 0.00000, -67.32000);
  18875. CreateDynamicObject(19452, 2254.45288, -1352.02722, 1499.90002, 0.00000, 0.00000, -67.32000);
  18876. CreateDynamicObject(9351, 2242.21802, -1353.90649, 1500.94861, 0.00000, 90.00000, -66.78003);
  18877. CreateDynamicObject(9351, 2236.64771, -1356.29761, 1500.94861, 180.00000, 90.00000, -66.78000);
  18878. CreateDynamicObject(11472, 2245.89063, -1354.67908, 1498.64001, 0.00000, 0.00000, 112.32000);
  18879. CreateDynamicObject(19452, 2250.13403, -1351.80078, 1499.90002, 0.00000, 0.00000, 21.96000);
  18880. CreateDynamicObject(19452, 2251.59302, -1351.17688, 1499.90002, 0.00000, 0.00000, 21.96000);
  18881. CreateDynamicObject(19452, 2257.34033, -1352.73401, 1501.56897, 0.00000, 90.00000, -67.32000);
  18882. CreateDynamicObject(11472, 2221.39795, -1364.98010, 1498.64001, 0.00000, 0.00000, 112.32000);
  18883. CreateDynamicObject(19452, 2227.06665, -1361.50549, 1499.90002, 0.00000, 0.00000, 21.96000);
  18884. CreateDynamicObject(19452, 2225.61060, -1362.09961, 1499.90002, 0.00000, 0.00000, 21.96000);
  18885. CreateDynamicObject(19452, 2222.57227, -1367.25330, 1501.56897, 0.00000, 90.00000, -68.09998);
  18886. CreateDynamicObject(8131, 2237.31934, -1355.89258, 1492.68005, 0.00000, 0.00000, 22.08001);
  18887. CreateDynamicObject(8131, 2241.51440, -1354.10242, 1492.68005, 0.00000, 0.00000, 22.08001);
  18888. CreateDynamicObject(8131, 2249.90723, -1353.56299, 1492.68005, 0.00000, 0.00000, 22.08001);
  18889. CreateDynamicObject(8131, 2229.26147, -1362.20703, 1492.68005, 0.00000, 0.00000, 22.08001);
  18890. CreateDynamicObject(970, 2229.82983, -1362.39954, 1502.20996, 0.00000, 0.00000, 23.16000);
  18891. CreateDynamicObject(970, 2233.68555, -1360.80554, 1502.20996, 0.00000, 0.00000, 23.16000);
  18892. CreateDynamicObject(970, 2248.96045, -1354.37988, 1502.20996, 0.00000, 0.00000, 23.16000);
  18893. CreateDynamicObject(970, 2245.16064, -1356.00208, 1502.20996, 0.00000, 0.00000, 23.16000);
  18894. CreateDynamicObject(970, 2241.36377, -1357.60522, 1502.20996, 0.00000, 0.00000, 22.74000);
  18895. CreateDynamicObject(970, 2237.52588, -1359.20679, 1502.20996, 0.00000, 0.00000, 22.74000);
  18896. CreateDynamicObject(3935, 2245.68799, -1357.58484, 1499.90222, 0.00000, 0.00000, -128.16000);
  18897. CreateDynamicObject(2842, 2248.95898, -1381.66467, 1499.88232, 0.00000, 0.00000, -67.92000);
  18898. CreateDynamicObject(2842, 2248.12402, -1382.00439, 1499.88232, 0.00000, 0.00000, -67.92000);
  18899. CreateDynamicObject(2842, 2247.43896, -1380.31458, 1499.88232, 0.00000, 0.00000, -67.92000);
  18900. CreateDynamicObject(2842, 2248.28223, -1379.97864, 1499.88232, 0.00000, 0.00000, -67.92000);
  18901. CreateDynamicObject(2842, 2247.60449, -1378.30359, 1499.88232, 0.00000, 0.00000, -67.92000);
  18902. CreateDynamicObject(2842, 2246.75293, -1378.62317, 1499.88232, 0.00000, 0.00000, -67.92000);
  18903. CreateDynamicObject(2842, 2246.92163, -1376.61414, 1499.88232, 0.00000, 0.00000, -67.92000);
  18904. CreateDynamicObject(2842, 2246.05811, -1376.92920, 1499.88232, 0.00000, 0.00000, -67.92000);
  18905. CreateDynamicObject(2842, 2246.23999, -1374.94177, 1499.88232, 0.00000, 0.00000, -67.92000);
  18906. CreateDynamicObject(2842, 2245.37524, -1375.24854, 1499.88232, 0.00000, 0.00000, -67.92000);
  18907. CreateDynamicObject(2842, 2245.57520, -1373.29968, 1499.88232, 0.00000, 0.00000, -67.92000);
  18908. CreateDynamicObject(2842, 2244.72363, -1373.63428, 1499.88232, 0.00000, 0.00000, -67.92000);
  18909. CreateDynamicObject(2842, 2244.88794, -1371.60791, 1499.88232, 0.00000, 0.00000, -67.92000);
  18910. CreateDynamicObject(2842, 2244.04004, -1371.96033, 1499.88232, 0.00000, 0.00000, -67.92000);
  18911. CreateDynamicObject(2842, 2243.36011, -1370.28503, 1499.88232, 0.00000, 0.00000, -67.92000);
  18912. CreateDynamicObject(2842, 2244.21143, -1369.93677, 1499.88232, 0.00000, 0.00000, -67.92000);
  18913. CreateDynamicObject(2808, 2237.56909, -1372.04126, 1500.51379, 0.00000, 0.00000, 22.50000);
  18914. CreateDynamicObject(2808, 2239.45557, -1371.26233, 1500.51379, 0.00000, 0.00000, 22.50000);
  18915. CreateDynamicObject(2808, 2241.80200, -1370.28113, 1500.51379, 0.00000, 0.00000, 22.50000);
  18916. CreateDynamicObject(2808, 2252.06860, -1366.06030, 1500.51379, 0.00000, 0.00000, 22.50000);
  18917. CreateDynamicObject(2808, 2250.12207, -1366.85339, 1500.51379, 0.00000, 0.00000, 22.50000);
  18918. CreateDynamicObject(2808, 2248.19629, -1367.63843, 1500.51379, 0.00000, 0.00000, 22.50000);
  18919. CreateDynamicObject(2808, 2246.37036, -1368.40479, 1500.51379, 0.00000, 0.00000, 22.50000);
  18920. CreateDynamicObject(2808, 2252.16455, -1369.29358, 1500.51379, 0.00000, 0.00000, 22.50000);
  18921. CreateDynamicObject(2808, 2249.59790, -1370.36292, 1500.51379, 0.00000, 0.00000, 22.50000);
  18922. CreateDynamicObject(2808, 2247.66528, -1371.16992, 1500.51379, 0.00000, 0.00000, 22.50000);
  18923. CreateDynamicObject(2808, 2251.00879, -1369.77905, 1500.51379, 0.00000, 0.00000, 22.50000);
  18924. CreateDynamicObject(2808, 2242.85938, -1373.10352, 1500.51379, 0.00000, 0.00000, 22.50000);
  18925. CreateDynamicObject(2808, 2240.43188, -1370.85461, 1500.51379, 0.00000, 0.00000, 22.50000);
  18926. CreateDynamicObject(2808, 2240.95459, -1373.89478, 1500.51379, 0.00000, 0.00000, 22.50000);
  18927. CreateDynamicObject(2808, 2239.03369, -1374.68872, 1500.51379, 0.00000, 0.00000, 22.50000);
  18928. CreateDynamicObject(2808, 2237.58594, -1375.27600, 1500.51379, 0.00000, 0.00000, 22.50000);
  18929. CreateDynamicObject(2808, 2241.97974, -1376.69189, 1500.51379, 0.00000, 0.00000, 22.50000);
  18930. CreateDynamicObject(2808, 2243.94189, -1375.89001, 1500.51379, 0.00000, 0.00000, 22.50000);
  18931. CreateDynamicObject(2808, 2248.75513, -1373.90222, 1500.51379, 0.00000, 0.00000, 22.50000);
  18932. CreateDynamicObject(2808, 2250.44604, -1373.19568, 1500.51379, 0.00000, 0.00000, 22.50000);
  18933. CreateDynamicObject(19452, 2234.89453, -1373.62744, 1504.40002, 0.00000, 90.00000, -135.00000);
  18934. CreateDynamicObject(3399, 2241.83862, -1379.98010, 1502.21997, 0.00000, 0.00000, -225.60004);
  18935. CreateDynamicObject(19452, 2242.55542, -1378.90796, 1499.90002, 0.00000, 0.00000, 44.21997);
  18936. CreateDynamicObject(19452, 2242.55542, -1378.89465, 1502.73999, 0.00000, 0.00000, 44.22000);
  18937. CreateDynamicObject(19452, 2237.99463, -1376.76721, 1499.66003, 90.00000, 90.00000, -135.00000);
  18938. CreateDynamicObject(19452, 2253.24731, -1365.51624, 1504.40002, 0.00000, 90.00000, 181.37996);
  18939. CreateDynamicObject(3399, 2252.66992, -1375.15027, 1502.21997, 0.00000, 0.00000, -268.49979);
  18940. CreateDynamicObject(19452, 2251.78418, -1375.13330, 1501.50000, 0.00000, 0.00000, 181.38000);
  18941. CreateDynamicObject(19452, 2251.78320, -1375.13330, 1502.77002, 0.00000, 0.00000, 181.38000);
  18942. CreateDynamicObject(19452, 2253.34131, -1370.35596, 1499.66003, 90.00000, 90.00000, 181.38000);
  18943. CreateDynamicObject(970, 2253.48120, -1360.72473, 1505.00000, 0.00000, 0.00000, 1.08000);
  18944. CreateDynamicObject(970, 2251.44385, -1362.86182, 1505.00000, 0.00000, 0.00000, -88.80000);
  18945. CreateDynamicObject(970, 2251.52954, -1367.00073, 1505.00000, 0.00000, 0.00000, -88.80000);
  18946. CreateDynamicObject(970, 2251.61084, -1371.12036, 1505.00000, 0.00000, 0.00000, -88.80000);
  18947. CreateDynamicObject(970, 2231.25781, -1370.47766, 1505.00000, 0.00000, 0.00000, -135.06001);
  18948. CreateDynamicObject(970, 2234.19800, -1370.48486, 1505.00000, 0.00000, 0.00000, -44.94001);
  18949. CreateDynamicObject(970, 2237.08936, -1373.38696, 1505.00000, 0.00000, 0.00000, -44.94001);
  18950. CreateDynamicObject(970, 2240.00391, -1376.29932, 1505.00000, 0.00000, 0.00000, -44.94001);
  18951. CreateDynamicObject(11489, 2239.12427, -1354.35425, 1499.89697, 0.00000, 0.00000, 23.27999);
  18952. CreateDynamicObject(19943, 2252.55371, -1362.74561, 1497.30005, 0.00000, 0.00000, 0.00000);
  18953. CreateDynamicObject(19943, 2233.29980, -1371.56006, 1497.30005, 0.00000, 0.00000, 0.00000);
  18954. CreateDynamicObject(950, 2245.36230, -1381.10144, 1500.42590, 0.00000, 0.00000, -42.84000);
  18955. CreateDynamicObject(950, 2243.95264, -1379.80945, 1500.42590, 0.00000, 0.00000, -42.84000);
  18956. CreateDynamicObject(950, 2242.73999, -1378.60559, 1500.42590, 0.00000, 0.00000, -42.84000);
  18957. CreateDynamicObject(950, 2251.32275, -1374.83643, 1500.42590, 0.00000, 0.00000, -89.88000);
  18958. CreateDynamicObject(950, 2251.29028, -1376.61890, 1500.42590, 0.00000, 0.00000, -89.88000);
  18959. CreateDynamicObject(950, 2251.34570, -1378.65515, 1500.42590, 0.00000, 0.00000, -89.88000);
  18960. CreateDynamicObject(4585, 2241.85571, -1367.30566, 1607.52002, 180.00000, 0.00000, 22.86000);
  18961. // Crack lab fixes
  18962. CreateDynamicObject(7191,2338.39135742,-1182.56323242,1032.95129395,90.00000000,0.00000000,90.00000000, -1, 5); //object(vegasnnewfence2b)(1)
  18963. CreateDynamicObject(13656,2292.93872070,-1132.04724121,1017.29772949,0.00000000,0.00000000,0.00000000, -1, 5); //object(fuckknows)(1)
  18964. CreateDynamicObject(7191,2337.95458984,-1182.54309082,1032.95129395,90.00000000,0.00000000,90.00000000, -1, 5); //object(vegasnnewfence2b)(2)
  18965. CreateDynamicObject(7191,2338.43408203,-1182.39440918,1032.95129395,90.00000000,180.00000000,90.24850464, -1, 5); //object(vegasnnewfence2b)(3)
  18966. CreateDynamicObject(7191,2337.97314453,-1182.39111328,1032.95129395,90.00000000,179.99450684,90.24719238, -1, 5); //object(vegasnnewfence2b)(4)
  18967. CreateDynamicObject(7191,2328.80346680,-1180.43066406,1034.70544434,0.00000000,270.00000000,88.50006104, -1, 5); //object(vegasnnewfence2b)(5)
  18968. CreateDynamicObject(3055,2319.78198242,-1184.82641602,1032.36450195,63.75003052,269.99996948,178.5001220, -1, 5); //object(kmb_shutter)(1)
  18969. CreateDynamicObject(7191,2328.83715820,-1186.81262207,1030.70446777,0.00000000,90.74990845,359.99481201, -1, 5); //object(vegasnnewfence2b)(6)
  18970. CreateDynamicObject(7191,2326.84863281,-1187.03125000,1030.70446777,0.00000000,90.74707031,359.99450684, -1, 5); //object(vegasnnewfence2b)(8)
  18971. CreateDynamicObject(7191,2337.31689453,-1186.55639648,1030.70446777,0.00000000,90.74707031,359.99450684, -1, 5); //object(vegasnnewfence2b)(9)
  18972. CreateDynamicObject(7191,2339.06689453,-1186.13159180,1030.70446777,0.00000000,91.24694824,359.99453735, -1, 5); //object(vegasnnewfence2b)(10)
  18973. CreateDynamicObject(7191,2338.39062500,-1182.56250000,1032.95129395,90.00000000,0.00000000,90.00000000, -1, 5); //object(vegasnnewfence2b)(11)
  18974. CreateDynamicObject(7191,2337.95947266,-1179.38879395,1032.95129395,90.00000000,180.00000000,270.00000000, -1, 5); //object(vegasnnewfence2b)(12)
  18975. CreateDynamicObject(7191,2338.38476562,-1179.43066406,1032.95129395,90.00000000,0.00000000,90.00000000, -1, 5); //object(vegasnnewfence2b)(13)
  18976. CreateDynamicObject(7191,2337.96630859,-1179.23559570,1032.95129395,90.00000000,179.99450684,90.24719238, -1, 5); //object(vegasnnewfence2b)(14)
  18977. // Lance's PD precinct
  18978. CreateDynamicObject(19375, 1176.07593, 2967.45361, 1005.00000, 0.00000, 90.00000, 0.00000);
  18979. CreateDynamicObject(19375, 1176.10046, 2977.08643, 1005.00000, 0.00000, 90.00000, 0.00000);
  18980. CreateDynamicObject(19375, 1165.60327, 2977.08789, 1005.00000, 0.00000, 90.00000, 0.00000);
  18981. CreateDynamicObject(19375, 1165.65308, 2967.45776, 1005.00000, 0.00000, 90.00000, 0.00000);
  18982. CreateDynamicObject(19459, 1181.26221, 2977.08496, 1006.84003, 0.00000, 0.00000, 0.00000);
  18983. CreateDynamicObject(19459, 1181.26465, 2967.54541, 1006.84003, 0.00000, 0.00000, 0.00000);
  18984. CreateDynamicObject(19459, 1177.46033, 2962.68115, 1006.84003, 0.00000, 0.00000, 90.00000);
  18985. CreateDynamicObject(19459, 1163.31531, 2962.71460, 1006.84003, 0.00000, 0.00000, 90.00000);
  18986. CreateDynamicObject(19459, 1160.42664, 2967.42578, 1006.84003, 0.00000, 0.00000, 0.00000);
  18987. CreateDynamicObject(19459, 1160.41748, 2976.96411, 1006.84003, 0.00000, 0.00000, 0.00000);
  18988. CreateDynamicObject(19459, 1165.15625, 2981.73145, 1006.84003, 0.00000, 0.00000, 90.00000);
  18989. CreateDynamicObject(19459, 1174.67639, 2981.72485, 1006.84003, 0.00000, 0.00000, 90.00000);
  18990. CreateDynamicObject(19459, 1184.17712, 2981.71606, 1006.84003, 0.00000, 0.00000, 90.00000);
  18991. CreateDynamicObject(19375, 1170.48901, 2957.86401, 1005.00000, 0.00000, 90.00000, 0.00000);
  18992. CreateDynamicObject(19459, 1172.72400, 2957.93140, 1006.84003, 0.00000, 0.00000, 0.00000);
  18993. CreateDynamicObject(19459, 1168.03784, 2957.91675, 1006.84003, 0.00000, 0.00000, 0.00000);
  18994. CreateDynamicObject(19459, 1170.08887, 2953.24390, 1006.84003, 0.00000, 0.00000, 90.00000);
  18995. CreateDynamicObject(1569, 1169.56274, 2953.29077, 1005.08002, 0.00000, 0.00000, 0.00000);
  18996. CreateDynamicObject(19459, 1165.23718, 2970.07520, 1004.70001, 0.00000, 0.00000, 90.00000);
  18997. CreateDynamicObject(19459, 1165.23718, 2970.07520, 1009.70001, 180.00000, 0.00000, 90.00000);
  18998. CreateDynamicObject(19367, 1171.64258, 2970.08008, 1006.84003, 0.00000, 0.00000, 90.00000);
  18999. CreateDynamicObject(19395, 1174.82263, 2970.07056, 1006.84003, 0.00000, 0.00000, 90.00000);
  19000. CreateDynamicObject(19459, 1181.13208, 2970.08228, 1006.84003, 0.00000, 0.00000, 90.00000);
  19001. CreateDynamicObject(19466, 1161.35913, 2970.04126, 1007.34003, 0.00000, 0.00000, -90.00000);
  19002. CreateDynamicObject(19466, 1163.59998, 2970.04126, 1007.34003, 0.00000, 0.00000, -90.00000);
  19003. CreateDynamicObject(19466, 1165.83850, 2970.04126, 1007.34003, 0.00000, 0.00000, -90.00000);
  19004. CreateDynamicObject(19466, 1168.07800, 2970.04126, 1007.34003, 0.00000, 0.00000, -90.00000);
  19005. CreateDynamicObject(19466, 1170.31750, 2970.04126, 1007.34003, 0.00000, 0.00000, -90.00000);
  19006. CreateDynamicObject(14782, 1180.85974, 2978.05103, 1006.09998, 0.00000, 0.00000, -90.00000);
  19007. CreateDynamicObject(19459, 1171.98706, 2981.23315, 1006.84003, 0.00000, 0.00000, 0.00000);
  19008. CreateDynamicObject(19395, 1171.98779, 2974.85229, 1006.84003, 0.00000, 0.00000, 0.00000);
  19009. CreateDynamicObject(19367, 1171.98804, 2971.72559, 1006.84003, 0.00000, 0.00000, 0.00000);
  19010. CreateDynamicObject(1491, 1172.02026, 2974.10376, 1005.08759, 0.00000, 0.00000, 90.00000);
  19011. CreateDynamicObject(2308, 1171.50635, 2971.66748, 1005.05219, 0.00000, 0.00000, -180.00000);
  19012. CreateDynamicObject(2165, 1169.56494, 2970.62231, 1005.05219, 0.00000, 0.00000, -180.00000);
  19013. CreateDynamicObject(2173, 1167.65430, 2970.61377, 1005.05219, 0.00000, 0.00000, -180.00000);
  19014. CreateDynamicObject(2165, 1165.70471, 2970.62915, 1005.05219, 0.00000, 0.00000, -180.00000);
  19015. CreateDynamicObject(2605, 1163.28162, 2970.60107, 1005.45221, 0.00000, 0.00000, -180.00000);
  19016. CreateDynamicObject(2605, 1161.33521, 2970.59888, 1005.45221, 0.00000, 0.00000, -180.00000);
  19017. CreateDynamicObject(19459, 1160.87830, 2977.27051, 1006.84003, 0.00000, 0.00000, 90.00000);
  19018. CreateDynamicObject(19367, 1170.47473, 2977.27441, 1006.84003, 0.00000, 0.00000, 90.00000);
  19019. CreateDynamicObject(19395, 1167.28467, 2977.26294, 1006.84003, 0.00000, 0.00000, 90.00000);
  19020. CreateDynamicObject(1491, 1166.49780, 2977.22241, 1005.08759, 0.00000, 0.00000, 0.00000);
  19021. CreateDynamicObject(19927, 1160.92114, 2978.28662, 1005.06909, 0.00000, 0.00000, 0.00000);
  19022. CreateDynamicObject(19929, 1160.91284, 2980.65259, 1005.06909, 0.00000, 0.00000, 0.00000);
  19023. CreateDynamicObject(2047, 1174.76099, 2969.98535, 1008.12482, 0.00000, 0.00000, 0.00000);
  19024. CreateDynamicObject(1721, 1178.59448, 2963.02026, 1005.08643, 0.00000, 0.00000, 0.00000);
  19025. CreateDynamicObject(1721, 1177.79883, 2962.97876, 1005.08643, 0.00000, 0.00000, 0.00000);
  19026. CreateDynamicObject(1721, 1176.90430, 2962.95288, 1005.08643, 0.00000, 0.00000, 0.00000);
  19027. CreateDynamicObject(1721, 1175.99622, 2962.96875, 1005.08643, 0.00000, 0.00000, 0.00000);
  19028. CreateDynamicObject(15038, 1168.38647, 2962.97925, 1005.72479, 0.00000, 0.00000, 0.00000);
  19029. CreateDynamicObject(15038, 1172.41187, 2962.98267, 1005.72479, 0.00000, 0.00000, 0.00000);
  19030. CreateDynamicObject(15038, 1171.82385, 2953.85596, 1005.72479, 0.00000, 0.00000, 0.00000);
  19031. CreateDynamicObject(15038, 1168.83313, 2953.89648, 1005.72479, 0.00000, 0.00000, 0.00000);
  19032. CreateDynamicObject(949, 1180.60376, 2969.46118, 1005.70477, 0.00000, 0.00000, 0.00000);
  19033. CreateDynamicObject(949, 1180.57983, 2963.21875, 1005.70477, 0.00000, 0.00000, 0.00000);
  19034. CreateDynamicObject(949, 1174.97852, 2963.19727, 1005.70477, 0.00000, 0.00000, 0.00000);
  19035. CreateDynamicObject(1368, 1166.18311, 2963.29126, 1005.72583, 0.00000, 0.00000, 180.00000);
  19036. CreateDynamicObject(1368, 1163.67834, 2963.29004, 1005.72583, 0.00000, 0.00000, 180.00000);
  19037. CreateDynamicObject(1368, 1161.15735, 2963.29614, 1005.72583, 0.00000, 0.00000, 180.00000);
  19038. CreateDynamicObject(19375, 1170.48901, 2957.86401, 1008.56000, 0.00000, 90.00000, 0.00000);
  19039. CreateDynamicObject(19375, 1164.67249, 2967.45386, 1008.56000, 0.00000, 90.00000, 0.00000);
  19040. CreateDynamicObject(19375, 1175.16931, 2967.48071, 1008.56000, 0.00000, 90.00000, 0.00000);
  19041. CreateDynamicObject(19375, 1185.52429, 2967.10181, 1008.56000, 0.00000, 90.00000, 0.00000);
  19042. CreateDynamicObject(19375, 1177.09534, 2976.88574, 1008.56097, 0.00000, 90.00000, 0.00000);
  19043. CreateDynamicObject(19375, 1183.30237, 2967.30371, 1008.56097, 0.00000, 90.00000, 0.00000);
  19044. CreateDynamicObject(19375, 1167.99890, 2977.00098, 1008.56000, 0.00000, 90.00000, 0.00000);
  19045. CreateDynamicObject(19375, 1160.65125, 2976.96875, 1008.56097, 0.00000, 90.00000, 0.00000);
  19046. CreateDynamicObject(3383, 1171.03064, 2979.52710, 1005.00751, 0.00000, 0.00000, 90.00000);
  19047. CreateDynamicObject(2111, 1164.27051, 2980.22656, 1005.42810, 0.00000, 0.00000, 0.00000);
  19048. CreateDynamicObject(2310, 1163.45593, 2981.12622, 1005.52777, 0.00000, 0.00000, 95.28001);
  19049. CreateDynamicObject(2310, 1165.69580, 2981.12256, 1005.52777, 0.00000, 0.00000, 33.60000);
  19050. CreateDynamicObject(2310, 1165.66040, 2979.60254, 1005.52777, 0.00000, 0.00000, -30.60000);
  19051. CreateDynamicObject(2310, 1162.94324, 2979.87158, 1005.52777, 0.00000, 0.00000, -169.73999);
  19052. CreateDynamicObject(2858, 1164.16418, 2980.44897, 1005.84161, 0.00000, 0.00000, 0.00000);
  19053. CreateDynamicObject(11722, 1164.06812, 2979.98315, 1005.96167, 0.00000, 0.00000, 0.00000);
  19054. CreateDynamicObject(2684, 1170.73547, 2980.51831, 1006.06183, 90.00000, 90.00000, 25.62000);
  19055. CreateDynamicObject(2684, 1171.07263, 2979.43823, 1006.06183, 90.00000, 90.00000, 3.24000);
  19056. CreateDynamicObject(2684, 1170.87488, 2978.35693, 1006.06183, 90.00000, 90.00000, -49.44001);
  19057. CreateDynamicObject(2612, 1176.34570, 2981.56006, 1006.88849, 0.00000, 0.00000, 0.00000);
  19058. CreateDynamicObject(2611, 1174.42090, 2981.58496, 1006.88849, 0.00000, 0.00000, 0.00000);
  19059. CreateDynamicObject(2615, 1178.58582, 2981.57178, 1006.88849, 0.00000, 0.00000, 0.00000);
  19060. CreateDynamicObject(19273, 1173.49268, 2970.00049, 1006.60028, 0.00000, 0.00000, 0.00000);
  19061. CreateDynamicObject(19273, 1176.24414, 2970.13599, 1006.60028, 0.00000, 0.00000, -180.00000);
  19062. // Boat and plane fuel stations
  19063. CreateDynamicObject(3406, 144.091186, -1806.778930, 0.094870, 0.000000, 0.000000, -2.128264);
  19064. CreateDynamicObject(3406, 135.297317, -1806.451782, 0.094870, 0.000000, 0.000000, -2.128264);
  19065. CreateDynamicObject(3406, 143.764129, -1815.584838, 0.094870, 0.000000, 0.000000, -2.128264);
  19066. CreateDynamicObject(3406, 134.970138, -1815.256103, 0.094870, 0.000000, 0.000000, -2.128264);
  19067. CreateDynamicObject(3406, 134.636474, -1824.240844, 0.094870, 0.000000, 0.000000, -2.128264);
  19068. CreateDynamicObject(3406, 143.430358, -1824.567993, 0.094870, 0.000000, 0.000000, -2.128264);
  19069. CreateDynamicObject(3465, 133.461380, -1815.096557, 3.389328, 0.000000, 0.000000, 88.062782);
  19070. CreateDynamicObject(3465, 138.547210, -1815.308593, 3.389328, 0.000000, 0.000000, 88.062782);
  19071. CreateDynamicObject(3465, 144.042800, -1815.534912, 3.389328, 0.000000, 0.000000, 88.062782);
  19072. CreateDynamicObject(8240, 1439.162475, -2440.094482, 25.861806, 0.000000, 0.000000, 180.000000);
  19073. CreateDynamicObject(13489, 1412.151367, -2412.396728, 18.037963, 0.000000, 0.000000, 90.000000);
  19074. }
  19075. LoadPickupsAndText()
  19076. {
  19077. for (new i = 0; i < sizeof(g_aGraffitiData); i++)
  19078. { //18666
  19079. GraffitiData[i][graffitiObject] = CreateDynamicObject(18666, g_aGraffitiData[i][graffitiPosX], g_aGraffitiData[i][graffitiPosY], g_aGraffitiData[i][graffitiPosZ], g_aGraffitiData[i][graffitiRotX], g_aGraffitiData[i][graffitiRotY], g_aGraffitiData[i][graffitiRotZ], -1, 0, -1, 5000.0);
  19080. }
  19081. for(new i = 0; i < sizeof(g_RepairShops); i ++)
  19082. {
  19083. CreateDynamicPickup(1239, 1, g_RepairShops[i][0], g_RepairShops[i][1], g_RepairShops[i][2]);
  19084. CreateDynamic3DTextLabel("{ffff00}Repair Shop\n{ffffff}Cost: $500\n/enter to repair your vehicle.", COLOR_GREY, g_RepairShops[i][0], g_RepairShops[i][1], g_RepairShops[i][2], 20.0);
  19085. }
  19086. CreateDynamic3DTextLabel("Press Y to use weights", COLOR_GREY, 772.4859, 5.3462, 999.9802, 10.0);
  19087. CreateDynamic3DTextLabel("Press Y to use treadmill", COLOR_GREY, 773.5106, -2.8392, 1000.1479, 10.0);
  19088. // Materials pickup 1
  19089. CreateDynamic3DTextLabel("Materials pickup 1\nCost: $150\n/getmats to begin.", COLOR_YELLOW, 1421.6913, -1318.4719, 13.5547, 20.0);
  19090. CreateDynamic3DTextLabel("[VIP Locker]\n{FFFFFF}Type /viplocker to open the locker.\nType /clothes to change your clothes.\nType /getboombox to get free boombox.", COLOR_YELLOW, 3088.6802,221.4168,1053.4829, 10.0);
  19091. CreateDynamicPickup(1239, 1, 3088.6802,221.4168,1053.4829);
  19092. CreateDynamic3DTextLabel("Materials pickup 2\nCost: $150\n/getmats to begin.", COLOR_YELLOW, 2393.4885, -2008.5726, 13.3467, 20.0);
  19093. // boat run
  19094. CreateDynamic3DTextLabel("Marina Materiasl Depot\nCost: $150\n/getmats to begin.", COLOR_YELLOW, 714.5344, -1565.1694, 1.76807, 40.0);
  19095. CreateDynamicPickup(1318, 1, 714.5344, -1565.1694, 1.7680);
  19096. // plane run
  19097. CreateDynamic3DTextLabel("LSI Materials Depot\nCost: $150\n/getmats to begin.", COLOR_YELLOW, 2112.3240,-2432.8130,13.5469, 40.0);
  19098. CreateDynamicPickup(1318, 1, 2112.3240, -2432.8130, 13.5469);
  19099. // Hospital exit
  19100. CreateDynamic3DTextLabel("(( /exit ))", COLOR_GREY2, -2330.0376,111.4688,-5.3942, 20.0);
  19101. CreateDynamic3DTextLabel("(( /exit ))", COLOR_GREY2, 1595.2653,-1688.3323,5.8906, 20.0, .worldid = 32);
  19102. CreateDynamic3DTextLabel("County General\nCost: $2000\n/buyinsurance to spawn here.", COLOR_DOCTOR, -2323.3250,110.9966,-5.3942, 10.0, .worldid = HOSPITAL_COUNTY);
  19103. CreateDynamicPickup(1240, 1, -2323.3250,110.9966,-5.3942, .worldid = HOSPITAL_COUNTY);
  19104. CreateDynamic3DTextLabel("All Saints Hospital\nCost: $2000\n/buyinsurance to spawn here.", COLOR_DOCTOR, -2323.3250,110.9966,-5.3942, 10.0, .worldid = HOSPITAL_ALLSAINTS);
  19105. CreateDynamicPickup(1240, 1, -2323.3250,110.9966,-5.3942, .worldid = HOSPITAL_ALLSAINTS);
  19106. CreateDynamic3DTextLabel("Loading dock\n/load and pick a load\nto begin delivery.", COLOR_YELLOW, 1766.9261,-2048.9807,13.8355, 10.0);
  19107. CreateDynamicPickup(1239, 1, 1766.9261,-2048.9807,13.8355);
  19108. CreateDynamic3DTextLabel("Garbage Pickup\n/garbage\nto begin delivery.", COLOR_YELLOW, 2449.1167,-2090.1445,13.5469, 10.0);
  19109. CreateDynamicPickup(1239, 1, 2449.1167,-2090.1445,13.5469);
  19110. CreateDynamic3DTextLabel("Mechanic components\n/buycomps to purchase.", COLOR_YELLOW, 1952.1062,-1558.4139,13.7161, 10.0);
  19111. CreateDynamicPickup(1239, 1, 1952.1062,-1558.4139,13.7161);
  19112. CreateDynamic3DTextLabel("Drivers test\nCost: $500\n/taketest to begin.", COLOR_YELLOW, -2033.2953, -117.4508, 1035.1719, 10.0);
  19113. CreateDynamicPickup(1239, 1, -2033.2953, -117.4508, 1035.1719);
  19114. // CreateDynamic3DTextLabel("DMV\n menu.", COLOR_YELLOW, -2026.7594,-114.4708,1035.1719, 10.0);
  19115. // CreateDynamicPickup(1239, 1, -2026.7594,-114.4708,1035.1719);
  19116. CreateDynamic3DTextLabel("Paintball arena\n/enter to play paintball!", COLOR_YELLOW, 1286.2870,-1349.8572,13.5689, 10.0);
  19117. CreateDynamicPickup(1254, 1, 1286.2870,-1349.8572,13.5689);
  19118. CreateDynamic3DTextLabel("Name changes\nCost: $7500/level\n/changename to request one.", COLOR_YELLOW, 636.2432,-108.6183,-78.9141, 10.0);
  19119. CreateDynamicPickup(1239, 1, 636.2432,-108.6183,-78.9141);
  19120. CreateDynamic3DTextLabel("Ticket Pay\n/paytickets to pay your vehicle tickets.", COLOR_YELLOW, 1186.8889,-1795.3860,13.5703, 10.0);
  19121. CreateDynamicPickup(1239, 1, 1186.8889,-1795.3860,13.5703);
  19122. CreateDynamic3DTextLabel("Drug smuggling\nCost: $500\n/smuggledrugs to begin smuggling.", COLOR_YELLOW, 52.0937, -292.2513, 1.7001, 10.0);
  19123. CreateDynamicPickup(1279, 1, 52.0937, -292.2513, 1.7001);
  19124. CreateDynamic3DTextLabel("Meth cookoff\nRequires ephedrine\n/cookmeth to begin cooking.", COLOR_YELLOW, 1.2179, 2.8095, 999.4284, 10.0, .interiorid = 2, .worldid = 10);
  19125. CreateDynamicPickup(1577, 1, 1.2179, 2.8095, 999.4284, .interiorid = 2, .worldid = 10);
  19126. //CreateDynamic3DTextLabel("Banking commands\n/bankhelp for more help.", COLOR_YELLOW, 1667.4260, -972.6691, 683.6873, 10.0);
  19127. //CreateDynamicPickup(1239, 1, 1667.4260, -972.6691, 683.6873);
  19128. CreateDynamic3DTextLabel("Banking help\nStand here to collect your pay.\n/bankhelp for a list of commands.", COLOR_YELLOW, 1667.4180, -972.4201, 683.6855, 10.0);
  19129. gPaycheck = CreateDynamicPickup(1274, 1, 1667.4180, -972.4201, 683.6855);
  19130. gEphedrineStockText = CreateDynamic3DTextLabel("Raw ephedrine\nStock: 100\n/buydrug ephedrine [amount]", COLOR_YELLOW, 323.7289, 1117.4187, 1083.8828, 10.0);
  19131. CreateDynamicPickup(1577, 1, 323.7289, 1117.1797, 1083.8828);
  19132. gSeedsStockText = CreateDynamic3DTextLabel("Marijuana seeds\nStock: 100\n/buydrug seeds [amount]", COLOR_YELLOW, 321.8347, 1117.1797, 1083.8828, 10.0);
  19133. CreateDynamicPickup(1578, 1, 321.8347, 1117.1797, 1083.8828);
  19134. gCocaineText = CreateDynamic3DTextLabel("Cocaine\nStock: 100\n/buydrug cocaine [amount]", COLOR_YELLOW, 2342.7766, -1187.0839, 1027.9766, 10.0);
  19135. CreateDynamicPickup(1575, 1, 2342.7766, -1187.0839, 1027.9766);
  19136. gVIPHealth = CreateDynamicPickup(1240, 1, 3093.7893,221.5896,1053.4829, .worldid = 7, .interiorid = 3);
  19137. gVIPArmor = CreateDynamicPickup(1242, 1, 3091.4177,221.5948,1053.4829, .worldid = 7, .interiorid = 3);
  19138. // CreateDynamic3DTextLabel("/clothes\nto change your skin.", COLOR_YELLOW, 1826.3379, -1308.8324, 1131.7552, 15.0);
  19139. gParachutes[0] = CreateDynamicPickup(371, 1, 1542.9038, -1353.0352, 329.4744); // Star tower
  19140. gParachutes[1] = CreateDynamicPickup(371, 1, 315.9415, 1010.6052, 1953.0031); // Andromada interior
  19141. // Hospital garage doors
  19142. CreateDynamicObject(10149, 1150.004394, -1345.316284, 14.201147, 0.000000, 0.000000, 270.000000);
  19143. CreateDynamicObject(10149, 2007.520874, -1408.116088, 16.992187, 0.000000, 0.000000, 0.000000);
  19144. CreateDynamic3DTextLabel("/deliverpatient\nto drop off a patient.", COLOR_DOCTOR, 1147.3577, -1345.3729, 13.6328, 10.0);
  19145. CreateDynamicPickup(1240, 1, 1147.3577, -1345.3729, 13.6328);
  19146. CreateDynamic3DTextLabel("/deliverpatient\nto drop off a patient.", COLOR_DOCTOR, 2007.6256, -1410.2455, 16.9922, 10.0);
  19147. CreateDynamicPickup(1240, 1, 2007.6256, -1410.2455, 16.9922);
  19148. CreateDynamicPickup(1240, 1, 1161.1458,-1364.4767,26.6485); // allsaints roof
  19149. CreateDynamic3DTextLabel("/deliverpatient\nto drop off a patient.", COLOR_DOCTOR, 1161.1458,-1364.4767,26.6485, 10.0);
  19150. CreateDynamicPickup(1240, 1, 2070.4307,-1422.8580,48.3315); // county roof
  19151. CreateDynamic3DTextLabel("/deliverpatient\nto drop off a patient.", COLOR_DOCTOR, 2070.4307,-1422.8580,48.331, 10.0);
  19152. CreateDynamicPickup(1240, 1, 1510.7773,-2151.7322,13.7483); // fmd hq
  19153. CreateDynamic3DTextLabel("/deliverpatient\nto drop off a patient.", COLOR_DOCTOR, 1510.7773,-2151.7322,13.7483, 10.0);
  19154. CreateDynamicPickup(1240, 1, 1480.4819,-2166.9712,35.2578); // hq roof
  19155. CreateDynamic3DTextLabel("/deliverpatient\nto drop off a patient.", COLOR_DOCTOR, 1480.4819,-2166.9712,35.2578, 10.0);
  19156. CreateDynamicPickup(1240, 1, 1539.1060,-2167.2058,35.2578); // hq roof 2
  19157. CreateDynamic3DTextLabel("/deliverpatient\nto drop off a patient.", COLOR_DOCTOR, 1539.1060,-2167.2058,35.2578, 10.0);
  19158. // Boat and plane fuel stations
  19159. CreateDynamicPickup(1318, 1, 1439.7886, -2445.6777, 13.8547);
  19160. CreateDynamic3DTextLabel("/refuel\nto refuel your aircraft.", COLOR_YELLOW, 1439.7886, -2445.6777, 13.8547, 50.0);
  19161. CreateDynamic3DTextLabel("/refuel\nto refuel your boat.", COLOR_YELLOW, 133.461380, -1815.096557, 3.389328, 15.0);
  19162. CreateDynamic3DTextLabel("/refuel\nto refuel your boat.", COLOR_YELLOW, 138.547210, -1815.308593, 3.389328, 15.0);
  19163. CreateDynamic3DTextLabel("/refuel\nto refuel your boat.", COLOR_YELLOW, 144.042800, -1815.534912, 3.389328, 15.0);
  19164. CreateDynamic3DTextLabel("/refuel\nto refuel your vehicle.", COLOR_YELLOW, 1944.9109,-1583.2743,13.7161, 15.0);
  19165. CreateDynamic3DTextLabel("/refuel\nto refuel your vehicle.", COLOR_YELLOW, 1943.8992,-1588.6217,13.7161, 15.0);
  19166. new string[430];
  19167. for(new i = 0; i < sizeof(staticEntrances); i ++)
  19168. {
  19169. format(string, sizeof(string), "{afafaf}[{33CCFF}%s{afafaf}]\nPress '{ff0000}y{afafaf}' to enter.", staticEntrances[i][eName]);
  19170. CreateDynamicPickup(19198, 1, staticEntrances[i][ePosX], staticEntrances[i][ePosY], staticEntrances[i][ePosZ]);
  19171. CreateDynamic3DTextLabel(string, COLOR_GREY1, staticEntrances[i][ePosX], staticEntrances[i][ePosY], staticEntrances[i][ePosZ], 10.0);
  19172. if(staticEntrances[i][eMapIcon])
  19173. {
  19174. CreateDynamicMapIcon(staticEntrances[i][ePosX], staticEntrances[i][ePosY], staticEntrances[i][ePosZ], staticEntrances[i][eMapIcon], 0);
  19175. }
  19176. }
  19177. for (new i = 0; i < sizeof(arrBoothPositions); i ++) {
  19178. CreateDynamic3DTextLabel("[Shooting Range]\n{FFFFFF}Press 'F' to use this booth.", COLOR_AQUA, arrBoothPositions[i][0], arrBoothPositions[i][1], arrBoothPositions[i][2], 15.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, 7);
  19179. }
  19180. for(new i = 0; i < sizeof(atmMachines); i ++)
  19181. {
  19182. CreateDynamicObject(19324, atmMachines[i][atmX], atmMachines[i][atmY], atmMachines[i][atmZ], 0.0, 0.0, atmMachines[i][atmA]);
  19183. CreateDynamic3DTextLabel("ATM machine\n/atm to operate.", COLOR_YELLOW, atmMachines[i][atmX], atmMachines[i][atmY], atmMachines[i][atmZ] + 0.4, 10.0);
  19184. }
  19185. for(new i = 0; i < sizeof(arrestPoints); i ++)
  19186. {
  19187. CreateDynamic3DTextLabel("/arrest\nto arrest a suspect.", COLOR_YELLOW, arrestPoints[i][0], arrestPoints[i][1], arrestPoints[i][2], 7.0);
  19188. CreateDynamicPickup(1247, 1, arrestPoints[i][0], arrestPoints[i][1], arrestPoints[i][2]);
  19189. }
  19190. for(new i = 0; i < sizeof(minerPositions); i ++)
  19191. {
  19192. CreateDynamic3DTextLabel("/mine\nto begin mining.", COLOR_GREEN, minerPositions[i][0], minerPositions[i][1], minerPositions[i][2], 25.0);
  19193. }
  19194. }
  19195. LoadJobs()
  19196. {
  19197. for(new i=0; i<MAX_TRUCKDEPOTS; i++)
  19198. {
  19199. new string2[300];
  19200. format(string2,sizeof(string2),"%s\nTrucker Level: %d\nType /viewjobs to view our available jobs\n(Trailer must be attached)", TruckDepotInfo[i][pTDName], TruckDepotInfo[i][pTDLevel]);
  19201. CreateDynamic3DTextLabel(string2, COLOR_YELLOW, TruckDepotInfo[i][pTDPosX], TruckDepotInfo[i][pTDPosY], TruckDepotInfo[i][pTDPosZ], 20.0);
  19202. CreateDynamicPickup(1239, 1, TruckDepotInfo[i][pTDPosX], TruckDepotInfo[i][pTDPosY], TruckDepotInfo[i][pTDPosZ], -1, -1, -1, 50.0);
  19203. CreateDynamicMapIcon(TruckDepotInfo[i][pTDPosX], TruckDepotInfo[i][pTDPosY], TruckDepotInfo[i][pTDPosZ], 51, 1, -1, -1, -1, 100.0);
  19204. }
  19205. AddStaticVehicleEx(435,319.5821,-250.9220,2.2294,357.2850,1,1, 900); // Avery Construction Blueberry trailer 1
  19206. AddStaticVehicleEx(591,314.5987,-250.5513,2.1733,356.2518,1,1, 900); // Avery Construction Blueberry trailer 2
  19207. AddStaticVehicleEx(435,310.0218,-249.6448,2.1808,356.6158,1,1, 900); // Avery Construction Blueberry trailer 3
  19208. AddStaticVehicleEx(584,-979.1545,-661.4039,33.1817,87.9626,1,1, 900); // Easter Bay Chemicals trailer 1
  19209. AddStaticVehicleEx(584,-979.8892,-665.6310,33.1991,90.5658,1,1, 900); // Easter Bay Chemicals trailer 2
  19210. AddStaticVehicleEx(584,-980.3480,-671.5728,33.2068,87.8949,1,1, 900); // Easter Bay Chemicals trailer 3
  19211. AddStaticVehicleEx(584,-979.9216,-676.9645,33.1276,89.8774,1,1, 900); // Easter Bay Chemicals trailer 4
  19212. AddStaticVehicleEx(584,-979.6974,-682.1031,33.0932,85.8944,1,1, 900); // Easter Bay Chemicals trailer 5
  19213. AddStaticVehicleEx(584,33.3540,-2639.0078,41.6346,94.8614,1,1, 900); // 655 I27 Gas trailer 1
  19214. AddStaticVehicleEx(584,32.6416,-2633.2031,41.6057,92.4579,1,1, 900); // 655 I27 Gas trailer 2
  19215. AddStaticVehicleEx(591,-49.3037,-1146.4683,1.6992,70.1766,1,1, 900); // RS Haul Depot trailer 1
  19216. AddStaticVehicleEx(435,-47.5986,-1141.5105,1.6990,70.2905,1,1, 900); // RS Haul Depot trailer 2
  19217. AddStaticVehicleEx(435,-45.7761,-1136.0397,1.7377,73.3871,1,1, 900); // RS Haul Depot trailer 3
  19218. AddStaticVehicleEx(591,1068.7600,-306.3128,74.5613,183.1051,1,1, 900); // Flint County Supplies trailer 1
  19219. AddStaticVehicleEx(435,1063.5708,-306.5692,74.6479,184.7230,1,1, 900); // Flint County Supplies trailer 2
  19220. AddStaticVehicleEx(435,1057.7675,-306.9809,74.6523,181.0287,1,1, 900); // Flint County Supplies trailer 3
  19221. AddStaticVehicleEx(584,603.8568,1650.6251,8.1136,65.6812,1,1, 900); // XOOMER Gas LV trailer 1
  19222. AddStaticVehicleEx(584,606.6456,1654.4178,8.2037,65.7580,1,1, 900); // XOOMER Gas LV trailer 2
  19223. AddStaticVehicleEx(584,610.1509,1658.4144,8.1876,67.1304,1,1, 900); // XOOMER Gas LV trailer 3
  19224. AddStaticVehicleEx(584,612.9406,1662.4725,8.0551,64.2496,1,1, 900); // XOOMER Gas LV trailer 4
  19225. AddStaticVehicleEx(591,987.9532,2169.2319,11.4228,179.3533,1,1, 900); // Whitewood Storage LV trailer 1
  19226. AddStaticVehicleEx(591,982.6127,2169.1516,11.5128,180.8438,1,1, 900); // Whitewood Storage LV trailer 2
  19227. AddStaticVehicleEx(435,977.3423,2169.2952,11.4125,177.4042,1,1, 900); // Whitewood Storage LV trailer 3
  19228. AddStaticVehicleEx(435,972.3075,2169.8831,11.5207,179.4609,1,1, 900); // Whitewood Storage LV trailer 4
  19229. AddStaticVehicleEx(591,1043.3939,2069.3625,11.4604,358.2221,1,1, 900); // Whitewood Supplies LV trailer 1
  19230. AddStaticVehicleEx(435,1049.7914,2069.2366,11.5107,358.0408,1,1, 900); // Whitewood Supplies LV trailer 2
  19231. AddStaticVehicleEx(591,1118.0592,1850.4882,11.4802,359.8158,1,1, 900); // Blackfield Storage LV trailer 1
  19232. AddStaticVehicleEx(591,1111.7456,1849.8954,11.4535,0.7010,1,1, 900); // Blackfield Storage LV trailer 2
  19233. AddStaticVehicleEx(435,1106.3131,1850.1196,11.4203,1.9944,1,1, 900); // Blackfield Storage LV trailer 3
  19234. AddStaticVehicleEx(435,1100.8234,1849.7410,11.4475,2.4704,1,1, 900); // Blackfield Storage LV trailer 4
  19235. AddStaticVehicleEx(591,2818.0356,895.8503,10.6889,0.9139,1,1, 900); // Rockshore East Storage LV trailer 1
  19236. AddStaticVehicleEx(435,2827.1558,895.7236,10.6762,358.9190,1,1, 900); // Rockshore East Storage LV trailer 2
  19237. AddStaticVehicleEx(435,2855.0305,895.0613,10.7268,0.7555,1,1, 900); // Rockshore East Storage LV trailer 3
  19238. AddStaticVehicleEx(591,1627.5481,698.2057,11.3795,359.0922,1,1, 900); // Reagan Bridge Supplies LV trailer 1
  19239. AddStaticVehicleEx(591,1633.6772,698.4901,11.5368,0.3506,1,1, 900); // Reagan Bridge Supplies LV trailer 2
  19240. AddStaticVehicleEx(435,1638.8907,698.6553,11.5471,357.0590,1,1, 900); // Reagan Bridge Supplies LV trailer 3
  19241. AddStaticVehicleEx(435,1645.1907,698.6447,11.4338,359.3551,1,1, 900); // Reagan Bridge Supplies LV trailer 4
  19242. AddStaticVehicleEx(591,1424.6705,972.9348,10.7373,358.4207,1,1, 900); // Pilson Storage LV trailer 1
  19243. AddStaticVehicleEx(435,1452.7369,974.5452,10.9380,4.0059,1,1, 900); // Pilson Storage LV trailer 2
  19244. AddStaticVehicleEx(435,1461.6356,974.7834,10.9479,0.6887,1,1, 900); // Pilson Storage LV trailer 3
  19245. AddStaticVehicleEx(435,2681.3940,-2391.8535,14.2959,180.7496,1,1, 900); // LA Mast Storage trailer 1
  19246. AddStaticVehicleEx(435,2687.3984,-2391.5864,14.2931,181.2188,1,1, 900); // LA Mast Storage trailer 2
  19247. AddStaticVehicleEx(435,2456.3594,-2530.3059,14.2556,180.5988,1,1, 900); // LA Docks Storage trailer 1
  19248. AddStaticVehicleEx(591,2462.9133,-2529.8430,14.2298,182.9115,1,1, 900); // LA Docks Storage trailer 2
  19249. AddStaticVehicleEx(591,2194.4583,-2524.9080,14.2074,274.6493,1,1, 900); // LA Docks Supplies trailer 1
  19250. AddStaticVehicleEx(435,2194.5979,-2519.5278,14.2046,272.4589,1,1, 900); // LA Docks Supplies trailer 2
  19251. AddStaticVehicleEx(435,2194.8691,-2513.9407,14.1742,269.1824,1,1, 900); // LA Docks Supplies trailer 3
  19252. AddStaticVehicleEx(435,90.9732,-154.1035,3.2141,269.2296,1,1, 900); // BBStorageTrailer1
  19253. AddStaticVehicleEx(591,93.6355,-172.1506,3.2139,269.0442,1,1, 900); // BBStorageTrailer2
  19254. AddStaticVehicleEx(435,166.5291,-44.4539,2.1764,270.6968,3,3, 900); // BBSuppliesTrailer1
  19255. AddStaticVehicleEx(591,165.5262,-22.0428,2.2316,270.3246,1,1, 900); // BBSuppliesTrailer2
  19256. AddStaticVehicleEx(435,167.4212,-14.2593,2.2437,270.4714,1,1, 900); // BBSuppliesTrailer3
  19257. AddStaticVehicleEx(435,-42.0974,61.1927,3.7552,339.5275,1,1, 900); // BBFarmSuppliesTrailer1
  19258. AddStaticVehicleEx(591,-33.6662,57.5084,3.6994,341.2177,1,1, 900); // BBFarmSuppliesTrailer2
  19259. AddStaticVehicleEx(435,-465.3719,-81.2704,60.6783,263.7261,1,1, 900); // BBLumberTrailer1
  19260. AddStaticVehicleEx(591,-464.9078,-75.3178,60.7492,261.5413,1,1, 900); // BBLumberTrailer2
  19261. AddStaticVehicleEx(435,-557.6436,-501.5607,25.5801,1.4391,1,1, 900); // WestBasinTrailer1
  19262. AddStaticVehicleEx(435,-529.6783,-502.6468,25.4099,0.1614,1,1, 900); // WestBasinTrailer2
  19263. AddStaticVehicleEx(591,-520.4857,-501.9078,25.4411,0.4591,1,1, 900); // WestBasinTrailer3
  19264. AddStaticVehicleEx(450,-1990.3916,-2425.5461,31.2098,136.7360,1,1, 900); // APStorageTrailer1
  19265. AddStaticVehicleEx(450,-1995.0924,-2421.6448,31.2925,139.3503,1,1, 900); // APStorageTrailer2
  19266. AddStaticVehicleEx(435,-1999.4061,-2418.6177,31.2859,138.2934,1,1, 900); // APStorageTrailer3
  19267. AddStaticVehicleEx(591,-2007.1364,-2409.9373,31.2855,138.6345,1,1, 900); // APStorageTrailer4
  19268. AddStaticVehicleEx(435,-1544.2321,-2742.5864,49.1988,170.4327,1,1, 900); // APSuppliesTraler1
  19269. AddStaticVehicleEx(591,-1539.4315,-2743.2131,49.1947,172.8186,1,1, 900); // APSuppliesTrailer2
  19270. AddStaticVehicleEx(435,-1544.2316,-2742.5872,49.1966,170.4324,1,1, 900); // APSuppliesTrailer3
  19271. AddStaticVehicleEx(450,350.6689,850.2215,20.7841,31.4371,1,1, 900); // BCQuarryTrailer1
  19272. AddStaticVehicleEx(450,346.4535,847.3931,20.7208,32.3695,1,1, 900); // BCQuarryTrailer2
  19273. AddStaticVehicleEx(450,322.8606,856.0114,21.0697,296.7265,1,1, 900); // BCQuarryTrailer3
  19274. AddStaticVehicleEx(450,317.3420,866.2861,20.9891,298.7624,1,1, 900); // BCQuarryTrailer4
  19275. AddStaticVehicleEx(584,270.7217,1478.2170,11.7794,185.5293,1,1, 900); // BCOilTrailer1
  19276. AddStaticVehicleEx(584,277.3219,1479.0850,11.7800,183.1001,1,1, 900); // BCOilTrailer2
  19277. AddStaticVehicleEx(584,283.1945,1477.4412,11.8043,179.6807,1,1, 900); // BCOilTrailer3
  19278. AddStaticVehicleEx(435,1461.5372,2328.6953,11.4165,89.0570,1,1, 900); // PilsonSuppliesTrailer1
  19279. AddStaticVehicleEx(435,1461.6980,2333.6047,11.4616,89.4065,1,1, 900); // PilsonSuppliesTrailer2
  19280. AddStaticVehicleEx(591,1462.7512,2339.3059,11.5106,89.8462,1,1, 900); // PilsonSuppliesTrailer3
  19281. AddStaticVehicleEx(591,1463.3148,2344.8459,11.4258,89.3545,1,1, 900); // PilsonSuppliesTrailer4
  19282. AddStaticVehicleEx(591,1639.5519,2340.2749,10.8013,89.3532,1,1, 900); // RedsandsTrailer1
  19283. AddStaticVehicleEx(435,1638.8723,2312.3152,10.8606,91.9411,1,1, 900); // RedsandsTrailer2
  19284. AddStaticVehicleEx(591,1639.0044,2302.9875,10.8445,89.3651,1,1, 900); // RedsandsTrailer3
  19285. AddStaticVehicleEx(591,2566.3142,2790.9033,11.4746,180.2304,1,1, 900); // KACCTrailer1
  19286. AddStaticVehicleEx(435,2557.8557,2790.4246,11.4802,179.1809,1,1, 900); // KACCTrailer2
  19287. AddStaticVehicleEx(435,2549.8347,2789.7908,11.4267,179.5141,1,1, 900); // KACCTrailer3
  19288. AddStaticVehicleEx(591,2541.3291,2791.1411,11.4830,180.7104,1,1, 900); // KACCTrailer4
  19289. AddStaticVehicleEx(591,1362.9547,1157.1427,11.4807,0.4241,1,1, 900); // LVAFTrailer1
  19290. AddStaticVehicleEx(435,1380.1807,1156.9369,11.4343,1.6050,1,1, 900); // LVAFTrailer2
  19291. AddStaticVehicleEx(435,1092.2933,1278.5941,11.4802,90.5015,1,1, 900); // BlackfieldSTrailer1
  19292. AddStaticVehicleEx(435,1092.6785,1272.4990,11.4791,92.3561,1,1, 900); // BlackfieldSTrailer2
  19293. AddStaticVehicleEx(435,1092.4906,1266.0619,11.4799,92.3815,1,1, 900); // BlackfieldSTrailer3
  19294. AddStaticVehicleEx(591,1093.4928,1259.1262,11.4872,90.5516,1,1, 900); // BlackfieldSTrailer4
  19295. AddStaticVehicleEx(591,1092.8287,1254.6204,11.4678,90.7795,1,1, 900); // BlackfieldSTrailer5
  19296. AddStaticVehicleEx(591,1092.5542,1248.2151,11.4794,90.7725,1,1, 900); // BlackfieldSTrailer6
  19297. AddStaticVehicleEx(591,2524.0969,-2116.7256,14.2474,359.3434,1,1, 900); // TruckerCoonTrailer1
  19298. AddStaticVehicleEx(435,2535.1987,-2132.6321,14.2063,0.1808,1,1, 900); // TruckerCoonTrailer2
  19299. AddStaticVehicleEx(584,2618.7053,-2190.2366,14.7029,179.4331,1,1, 900); // LADockFuelTrailer1
  19300. AddStaticVehicleEx(584,2613.2178,-2190.3564,14.7022,178.0155,1,1, 900); // LADockFuelTrailer2
  19301. AddStaticVehicleEx(584,2607.7852,-2190.4541,14.6854,182.4359,1,1, 900); // LADockFuelTrailer3
  19302. AddStaticVehicleEx(584,2602.1062,-2190.6284,14.7461,180.6021,1,1, 900); // LADockFuelTrailer4
  19303. AddStaticVehicleEx(584,993.3430,-912.2853,43.3470,97.4511,1,1, 900); // BroadwayTrailer1
  19304. AddStaticVehicleEx(584,995.4743,-927.3059,43.3791,96.3870,1,1, 900); // BroadwayTrailer2
  19305. AddStaticVehicleEx(584,1918.1345,-1790.0989,14.5632,270.3278,1,1, 900); // IdlewoodTrailer1
  19306. new string[320];
  19307. for(new i = 0; i < sizeof(jobLocations); i ++)
  19308. {
  19309. // format(string, sizeof(string), "/join\nto become a %s.", jobLocations[i][jobName]);
  19310. format(string, sizeof string, "{33CCFF}Job Point ({FFFFFF}ID: %i{33CCFF})\n\nName: {FFFFFF}%s\n{33CCFF}Type {FFFFFF}/join {33CCFF}to obtain the job.", i, jobLocations[i][jobName]);
  19311. //CreateDynamicPickup(1239, 1, jobLocations[i][jobX], jobLocations[i][jobY], jobLocations[i][jobZ]);
  19312. CreateDynamic3DTextLabel(string, COLOR_YELLOW, jobLocations[i][jobX], jobLocations[i][jobY], jobLocations[i][jobZ], 10.0, .testlos = 1, .streamdistance = 10.0);
  19313. CreateDynamicMapIcon(jobLocations[i][jobX], jobLocations[i][jobY], jobLocations[i][jobZ], 56, 0, .style = MAPICON_GLOBAL);
  19314. CreateActor(jobLocations[i][jobActor], jobLocations[i][jobX], jobLocations[i][jobY], jobLocations[i][jobZ], jobLocations[i][actorangle]);
  19315. }
  19316. // Job vehicles
  19317. pizzaVehicles[0] = AddStaticVehicleEx(448, 2097.8396, -1792.2556, 12.9978, 90.0000, 3, 6, 300); // bike 1
  19318. pizzaVehicles[1] = AddStaticVehicleEx(448, 2097.8396, -1794.0065, 12.9978, 90.0000, 3, 6, 300); // bike 2
  19319. pizzaVehicles[2] = AddStaticVehicleEx(448, 2097.8396, -1795.7574, 12.9978, 90.0000, 3, 6, 300); // bike 3
  19320. pizzaVehicles[3] = AddStaticVehicleEx(448, 2097.8396, -1797.5083, 12.9978, 90.0000, 3, 6, 300); // bike 4
  19321. pizzaVehicles[4] = AddStaticVehicleEx(448, 2097.8396, -1799.2592, 12.9978, 90.0000, 3, 6, 300); // bike 5
  19322. pizzaVehicles[5] = AddStaticVehicleEx(448, 2097.8396, -1801.0101, 12.9978, 90.0000, 3, 6, 300); // bike 6
  19323. courierVehicles[0] = AddStaticVehicleEx(414, 1787.5144, -2024.0779, 13.4865, -178.8600, 11, 11, 300); // mule
  19324. courierVehicles[1] = AddStaticVehicleEx(414, 1792.6925, -2024.2432, 13.4865, -178.8600, 11, 11, 300); // mule
  19325. courierVehicles[2] = AddStaticVehicleEx(414, 1797.8663, -2024.1129, 13.4865, -178.8600, 11, 11, 300); // mule
  19326. courierVehicles[3] = AddStaticVehicleEx(498, 1807.7712, -2033.3390, 13.5128, 89.3400, 11, 11, 300); // boxville
  19327. courierVehicles[4] = AddStaticVehicleEx(498, 1807.5942, -2038.8160, 13.5128, 89.3400, 11, 11, 300); // boxville
  19328. courierVehicles[5] = AddStaticVehicleEx(498, 1807.5728, -2044.4001, 13.5128, 89.3400, 11, 11, 300); // boxville
  19329. courierVehicles[6] = AddStaticVehicleEx(498, 1807.5408, -2049.9885, 13.5128, 89.3400, 11, 11, 300); // boxville
  19330. sweeperVehicles[0] = AddStaticVehicleEx(574, 2187.6636, -1975.8738, 13.3012, 180.0000, 26, 26, 300); // sweeper 1
  19331. sweeperVehicles[1] = AddStaticVehicleEx(574, 2184.9255, -1975.8738, 13.3029, 180.0000, 26, 26, 300); // sweeper 2
  19332. sweeperVehicles[2] = AddStaticVehicleEx(574, 2181.8672, -1975.8738, 13.3005, 180.0000, 26, 26, 300); // sweeper 3
  19333. sweeperVehicles[3] = AddStaticVehicleEx(574, 2179.0005, -1975.8738, 13.2679, 180.0000, 26, 26, 300); // sweeper 4
  19334. taxiVehicles[0] = AddStaticVehicleEx(420, 1775.6141, -1860.0100, 13.2745, 269.2006, 6, 1, 300); // taxi 1
  19335. taxiVehicles[1] = AddStaticVehicleEx(420, 1763.0121, -1860.0037, 13.2723, 271.2998, 6, 1, 300); // taxi 2
  19336. taxiVehicles[2] = AddStaticVehicleEx(420, 1748.9358, -1859.9502, 13.2721, 270.3943, 6, 1, 300); // taxi 3
  19337. taxiVehicles[3] = AddStaticVehicleEx(420, 1734.6754, -1859.9305, 13.2740, 270.5646, 6, 1, 300); // taxi 4
  19338. garbageVehicles[0] = AddStaticVehicleEx(408,2450.0818,-2117.0393,14.0948,359.3405,-1,-1,300); // Garbage 1
  19339. garbageVehicles[1] = AddStaticVehicleEx(408,2456.0059,-2117.0317,14.0978,359.8398,-1,-1,300); // Garbage 2
  19340. garbageVehicles[2] = AddStaticVehicleEx(408,2461.9404,-2116.9187,14.1033,1.3363,-1,-1,300); // Garbage 3
  19341. garbageVehicles[3] = AddStaticVehicleEx(408,2467.7634,-2116.7227,14.1018,0.6403,-1,-1,300); // Garbage 4
  19342. garbageVehicles[4] = AddStaticVehicleEx(408,2474.4385,-2116.6218,14.0943,2.2394,-1,-1,300); // Garbage 5
  19343. garbageVehicles[5] = AddStaticVehicleEx(408,2480.3513,-2116.6707,14.0944,359.6030,-1,-1,300); // Garbage 6
  19344. // Driving test vehicles
  19345. testVehicles[0] = AddStaticVehicleEx(445, 1280.5974, -1795.9840, 13.2733, 180.0000, 1, 1, 10); // test car 1
  19346. testVehicles[1] = AddStaticVehicleEx(445, 1276.2882, -1796.0579, 13.2776,181.8796, 1, 1, 10); // test car 2
  19347. testVehicles[2] = AddStaticVehicleEx(445, 1271.8486, -1796.2174, 13.2694,182.5803, 1, 1, 10); // test car 3
  19348. testVehicles[3] = AddStaticVehicleEx(445, 1267.1357, -1796.2031, 13.2980,181.5889, 1, 1, 10); // test car 4
  19349. testVehicles[4] = AddStaticVehicleEx(445, 1262.5736, -1796.3016, 13.3016,180.8420, 1, 1, 10); // test car 5
  19350. // Farmer
  19351. FarmerVehicles[0] = AddStaticVehicle(532,-322.2967,-1350.3434,10.5241,270.7830,0,0); // pos 1
  19352. FarmerVehicles[1] = AddStaticVehicle(532,-322.6843,-1340.8116,10.3685,272.3377,0,0); // pos 2
  19353. FarmerVehicles[2] = AddStaticVehicle(532,-323.0977,-1331.4840,10.4024,271.4319,0,0); // pos 3
  19354. FarmerVehicles[3] = AddStaticVehicle(532,-323.1684,-1322.5546,10.4159,270.6801,0,0); // pos 4
  19355. FarmerVehicles[4] = AddStaticVehicle(532,-322.1127,-1358.8835,10.8958,269.5284,0,0); // pos 5
  19356. FarmerVehicles[5] = AddStaticVehicle(478,-368.9034,-1360.9902,21.7564,93.9769,1,1); // car1
  19357. FarmerVehicles[6] = AddStaticVehicle(478,-369.6640,-1364.9237,21.9200,82.5297,1,1); // car2
  19358. FarmerVehicles[7] = AddStaticVehicle(478,-370.0378,-1368.0313,22.0123,79.5341,1,1); // car3
  19359. FarmerVehicles[8] = AddStaticVehicle(478,-370.0262,-1371.3488,22.0194,84.8406,1,1); // 4
  19360. FarmerVehicles[9] = AddStaticVehicle(478,-368.7458,-1359.5483,21.7232,86.1116,1,1); // car5
  19361. }
  19362. LoadServerInfo()
  19363. {
  19364. new File:file = fopen("server_info.ini", io_read);
  19365. if(file)
  19366. {
  19367. new string[255];
  19368. fread(file, string);
  19369. sscanf(string, "p<|>iiis[24]s[128]iiiiiiiis[128]s[128]iiii", gTax, gVault, gPlayerRecord, gRecordDate, gServerMOTD, gConnections, gTotalRegistered, gTotalKills, gTotalDeaths, gTotalHours, gAnticheatBans, gDoubleXP, RobberyInfo[rTime], adminMOTD, helperMOTD, MaxCapCount[0], MaxCapCount[1], gacooldown, gNewsVault);
  19370. fclose(file);
  19371. }
  19372. if(gTax == 0)
  19373. {
  19374. gTax = 10;
  19375. }
  19376. SetDoubleXP(gDoubleXP);
  19377. }
  19378. RefreshTime()
  19379. {
  19380. new hour, minute, string[12];
  19381. gettime(hour, minute);
  19382. format(string, sizeof(string), "%02d:%02d", hour, minute);
  19383. TextDrawSetString(TimeTD, string);
  19384. }
  19385. GetBankRobbers()
  19386. {
  19387. new count;
  19388. for(new i = 0; i < MAX_BANK_ROBBERS; i ++)
  19389. {
  19390. if(RobberyInfo[rRobbers][i] != INVALID_PLAYER_ID)
  19391. {
  19392. count++;
  19393. }
  19394. }
  19395. return count;
  19396. }
  19397. AddToBankRobbery(playerid)
  19398. {
  19399. for(new i = 0; i < MAX_BANK_ROBBERS; i ++)
  19400. {
  19401. if(RobberyInfo[rRobbers][i] == INVALID_PLAYER_ID)
  19402. {
  19403. RobberyInfo[rRobbers][i] = playerid;
  19404. PlayerData[playerid][pRobCash] = 0;
  19405. break;
  19406. }
  19407. }
  19408. }
  19409. RemoveFromBankRobbery(playerid)
  19410. {
  19411. for(new i = 0; i < MAX_BANK_ROBBERS; i ++)
  19412. {
  19413. if(RobberyInfo[rRobbers][i] == playerid)
  19414. {
  19415. RobberyInfo[rRobbers][i] = INVALID_PLAYER_ID;
  19416. }
  19417. }
  19418. if(!GetBankRobbers())
  19419. {
  19420. ResetRobbery();
  19421. }
  19422. else if(RobberyInfo[rPlanning] && RobberyInfo[rRobbers][0] == INVALID_PLAYER_ID)
  19423. {
  19424. for(new i = 1; i < MAX_BANK_ROBBERS; i ++)
  19425. {
  19426. if(RobberyInfo[rRobbers][i] != INVALID_PLAYER_ID)
  19427. {
  19428. RobberyInfo[rRobbers][0] = RobberyInfo[rRobbers][i];
  19429. RobberyInfo[rRobbers][i] = INVALID_PLAYER_ID;
  19430. SendClientMessageEx(RobberyInfo[rRobbers][0], COLOR_AQUA, "You are now the leader of this bank heist!");
  19431. break;
  19432. }
  19433. }
  19434. }
  19435. PlayerData[playerid][pRobCash] = 0;
  19436. PlayerData[playerid][pCP] = CHECKPOINT_NONE;
  19437. RemovePlayerAttachedObject(playerid, 8);
  19438. RemovePlayerAttachedObject(playerid, 9);
  19439. PlayerPlaySound(playerid, 3402, 0.0, 0.0, 0.0);
  19440. DisablePlayerCheckpoint(playerid);
  19441. return 0;
  19442. }
  19443. IsPlayerInBankRobbery(playerid)
  19444. {
  19445. if(RobberyInfo[rPlanning] || RobberyInfo[rStarted])
  19446. {
  19447. for(new i = 0; i < MAX_BANK_ROBBERS; i ++)
  19448. {
  19449. if(RobberyInfo[rRobbers][i] == playerid)
  19450. {
  19451. return 1;
  19452. }
  19453. }
  19454. }
  19455. return 0;
  19456. }
  19457. ResetRobbery()
  19458. {
  19459. if(RobberyInfo[rStarted])
  19460. {
  19461. SendClientMessageToAllEx(COLOR_AQUA, "Breaking News: The bank robbery is now finished. %s was stolen from the bank.", FormatNumber(RobberyInfo[rStolen]));
  19462. }
  19463. if(IsValidDynamicObject(RobberyInfo[rObjects][0]))
  19464. {
  19465. DestroyDynamicObject(RobberyInfo[rObjects][0]);
  19466. }
  19467. if(IsValidDynamicObject(RobberyInfo[rObjects][1]))
  19468. {
  19469. DestroyDynamicObject(RobberyInfo[rObjects][1]);
  19470. }
  19471. for(new i = 0; i < 5; i ++)
  19472. {
  19473. DestroyDynamic3DTextLabel(RobberyInfo[rText][i]);
  19474. RobberyInfo[rText][i] = Text3D:INVALID_3DTEXT_ID;
  19475. }
  19476. for(new i = 0; i < MAX_BANK_ROBBERS; i ++)
  19477. {
  19478. RobberyInfo[rRobbers][i] = INVALID_PLAYER_ID;
  19479. }
  19480. RobberyInfo[rTime] = 8;
  19481. RobberyInfo[rPlanning] = 0;
  19482. RobberyInfo[rStarted] = 0;
  19483. RobberyInfo[rStolen] = 0;
  19484. RobberyInfo[rObjects][0] = CreateDynamicObject(19799, 1678.248901, -988.194702, 671.695007, 0.000000, 0.000000, 0.000000);
  19485. RobberyInfo[rObjects][1] = INVALID_OBJECT_ID;
  19486. }
  19487. PreloadPlayerAnims(playerid)
  19488. {
  19489. static const animLibraries[][] =
  19490. {
  19491. !"AIRPORT", !"ATTRACTORS", !"BAR", !"BASEBALL",
  19492. !"BD_FIRE", !"BEACH", !"BENCHPRESS", !"BF_INJECTION",
  19493. !"BIKED", !"BIKEH", !"BIKELEAP", !"BIKES",
  19494. !"BIKEV", !"BIKE_DBZ", !"BMX", !"BOMBER",
  19495. !"BOX", !"BSKTBALL", !"BUDDY", !"BUS",
  19496. !"CAMERA", !"CAR", !"CARRY", !"CAR_CHAT",
  19497. !"CASINO", !"CHAINSAW", !"CHOPPA", !"CLOTHES",
  19498. !"COACH", !"COLT45", !"COP_AMBIENT", !"COP_DVBYZ",
  19499. !"CRACK", !"CRIB", !"DAM_JUMP", !"DANCING",
  19500. !"DEALER", !"DILDO", !"DODGE", !"DOZER",
  19501. !"DRIVEBYS", !"FAT", !"FIGHT_B", !"FIGHT_C",
  19502. !"FIGHT_D", !"FIGHT_E", !"FINALE", !"FINALE2",
  19503. !"FLAME", !"FLOWERS", !"FOOD", !"FREEWEIGHTS",
  19504. !"GANGS", !"GHANDS", !"GHETTO_DB", !"GOGGLES",
  19505. !"GRAFFITI", !"GRAVEYARD", !"GRENADE", !"GYMNASIUM",
  19506. !"HAIRCUTS", !"HEIST9", !"INT_HOUSE", !"INT_OFFICE",
  19507. !"INT_SHOP", !"JST_BUISNESS", !"KART", !"KISSING",
  19508. !"KNIFE", !"LAPDAN1", !"LAPDAN2", !"LAPDAN3",
  19509. !"LOWRIDER", !"MD_CHASE", !"MD_END", !"MEDIC",
  19510. !"MISC", !"MTB", !"MUSCULAR", !"NEVADA",
  19511. !"ON_LOOKERS", !"OTB", !"PARACHUTE", !"PARK",
  19512. !"PAULNMAC", !"PED", !"PLAYER_DVBYS", !"PLAYIDLES",
  19513. !"POLICE", !"POOL", !"POOR", !"PYTHON",
  19514. !"QUAD", !"QUAD_DBZ", !"RAPPING", !"RIFLE",
  19515. !"RIOT", !"ROB_BANK", !"ROCKET", !"RUSTLER",
  19516. !"RYDER", !"SCRATCHING", !"SHAMAL", !"SHOP",
  19517. !"SHOTGUN", !"SILENCED", !"SKATE", !"SMOKING",
  19518. !"SNIPER", !"SPRAYCAN", !"STRIP", !"SUNBATHE",
  19519. !"SWAT", !"SWEET", !"SWIM", !"SWORD",
  19520. !"TANK", !"TATTOOS", !"TEC", !"TRAIN",
  19521. !"TRUCK", !"UZI", !"VAN", !"VENDING",
  19522. !"VORTEX", !"WAYFARER", !"WEAPONS", !"WUZI",
  19523. !"WOP", !"GFUNK", !"RUNNINGMAN", !"BLOWJOBZ",
  19524. !"SAMP"
  19525. };
  19526. for(new i = 0; i < sizeof(animLibraries); i ++)
  19527. {
  19528. ApplyAnimation(playerid, animLibraries[i], "null", 0.0, 0, 0, 0, 0, 0, 1);
  19529. }
  19530. }
  19531. ApplyAnimationEx(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time)
  19532. {
  19533. ApplyAnimation(playerid, animlib, animname, fDelta, loop, lockx, locky, freeze, time, 1);
  19534. if(loop > 0 || freeze > 0)
  19535. {
  19536. PlayerData[playerid][pLoopAnim] = 1;
  19537. if(!PlayerData[playerid][pToggleTextdraws])
  19538. {
  19539. TextDrawShowForPlayer(playerid, AnimationTD);
  19540. }
  19541. }
  19542. }
  19543. PlayerUseAnims(playerid)
  19544. {
  19545. if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT || GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CUFFED || PlayerData[playerid][pInjured] > 0 || PlayerData[playerid][pHospital] > 0 || PlayerData[playerid][pMiningTime] > 0 || PlayerData[playerid][pTazedTime] > 0 || PlayerData[playerid][pCuffed] > 0 || PlayerData[playerid][pLootTime] > 0)
  19546. {
  19547. return 0;
  19548. }
  19549. return 1;
  19550. }
  19551. GetAvailableAttachedSlot(playerid)
  19552. {
  19553. for(new i = 0; i < 5; i ++)
  19554. {
  19555. if(!IsPlayerAttachedObjectSlotUsed(playerid, i))
  19556. {
  19557. return i;
  19558. }
  19559. }
  19560. return -1;
  19561. }
  19562. CancelTaxiRide(playerid) // playerid is the driver of the taxi.
  19563. {
  19564. new
  19565. passengerid = PlayerData[playerid][pTaxiPassenger],
  19566. bill = PlayerData[playerid][pTaxiBill],
  19567. earned = PlayerData[playerid][pTaxiBill],
  19568. string[20];
  19569. if(PlayerData[playerid][pLaborUpgrade] != 0)
  19570. {
  19571. earned += percent(earned, PlayerData[playerid][pLaborUpgrade]);
  19572. }
  19573. SendClientMessageEx(passengerid, COLOR_AQUA, "This ride costed you {FF6347}$%i{33CCFF}.", bill);
  19574. SendClientMessageEx(playerid, COLOR_AQUA, "You earned {00AA00}$%i{33CCFF} for this ride.", earned);
  19575. format(string, sizeof(string), "~r~-$%i", bill);
  19576. GameTextForPlayer(passengerid, string, 5000, 1);
  19577. format(string, sizeof(string), "~g~+$%i", earned);
  19578. GameTextForPlayer(playerid, string, 5000, 1);
  19579. GivePlayerCash(passengerid, -bill);
  19580. AddToPaycheck(playerid, earned);
  19581. PlayerData[playerid][pTaxiPassenger] = INVALID_PLAYER_ID;
  19582. PlayerData[playerid][pTaxiBill] = 0;
  19583. PlayerData[playerid][pTaxiTime] = 0;
  19584. }
  19585. SetFreezePos(playerid, Float:x, Float:y, Float:z)
  19586. {
  19587. if(PlayerData[playerid][pFreezeTimer] >= 0)
  19588. {
  19589. KillTimer(PlayerData[playerid][pFreezeTimer]);
  19590. }
  19591. PlayerData[playerid][pFreezeTimer] = SetTimerEx("UnfreezePlayer", 3000, false, "ifff", playerid, x, y, z);
  19592. SetPlayerPos(playerid, x, y, z);
  19593. TogglePlayerControllable(playerid, false);
  19594. //GameTextForPlayer(playerid, "~w~Loading objects...", 3000, 3);
  19595. ShowFreezeTextdraw(playerid);
  19596. }
  19597. IsPlayerChatActive(playerid)
  19598. {
  19599. foreach(new i : Player)
  19600. {
  19601. if(chattingWith[playerid]{i})
  19602. {
  19603. return 1;
  19604. }
  19605. }
  19606. return 0;
  19607. }
  19608. PlayerHasJob(playerid, job)
  19609. {
  19610. return (PlayerData[playerid][pJob] == job || PlayerData[playerid][pSecondJob] == job);
  19611. }
  19612. GetWeaponClipSize(weaponid)
  19613. {
  19614. switch(weaponid)
  19615. {
  19616. case 22, 23:
  19617. return 17;
  19618. case 26:
  19619. return 2;
  19620. case 24, 27:
  19621. return 7;
  19622. case 28, 31, 32:
  19623. return 50;
  19624. case 29, 30:
  19625. return 30;
  19626. }
  19627. return 0;
  19628. }
  19629. ResetPlayerWeaponsEx(playerid)
  19630. {
  19631. ResetPlayerWeapons(playerid);
  19632. SetPlayerArmedWeapon(playerid, 0);
  19633. for(new i = 0; i < 13; i ++)
  19634. {
  19635. PlayerData[playerid][pWeapons][i] = 0;
  19636. PlayerData[playerid][pTempWeapons][i] = 0;
  19637. PlayerData[playerid][pAmmo][i] = 0;
  19638. }
  19639. PlayerData[playerid][pACTime] = gettime() + 2;
  19640. }
  19641. RemovePlayerWeapon(playerid, weaponid)
  19642. {
  19643. // Reset the player's weapons.
  19644. ResetPlayerWeapons(playerid);
  19645. // Set the armed slot to zero.
  19646. SetPlayerArmedWeapon(playerid, 0);
  19647. // Set the weapon in the slot to zero.
  19648. PlayerData[playerid][pACTime] = gettime() + 2;
  19649. PlayerData[playerid][pWeapons][weaponSlotIDs[weaponid]] = 0;
  19650. PlayerData[playerid][pTempWeapons][weaponSlotIDs[weaponid]] = 0;
  19651. PlayerData[playerid][pAmmo][weaponSlotIDs[weaponid]] = 0;
  19652. // Set the player's weapons.
  19653. SetPlayerWeapons(playerid);
  19654. // Save them to prevent rollbacks.
  19655. SavePlayerWeapons(playerid);
  19656. }
  19657. GivePlayerWeaponEx(playerid, weaponid, bool:temp = false)
  19658. {
  19659. if(1 <= weaponid <= 46)
  19660. {
  19661. if(temp)
  19662. {
  19663. PlayerData[playerid][pTempWeapons][weaponSlotIDs[weaponid]] = weaponid;
  19664. GivePlayerWeapon(playerid, weaponid, 29999);
  19665. }
  19666. else
  19667. {
  19668. PlayerData[playerid][pWeapons][weaponSlotIDs[weaponid]] = weaponid;
  19669. SetPlayerWeapons(playerid);
  19670. }
  19671. if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  19672. {
  19673. SetPlayerArmedWeapon(playerid, 0);
  19674. }
  19675. else if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
  19676. {
  19677. switch(weaponid)
  19678. {
  19679. case 22, 23, 25, 28..34:
  19680. {
  19681. SetPlayerArmedWeapon(playerid, weaponid);
  19682. }
  19683. default:
  19684. {
  19685. SetPlayerArmedWeapon(playerid, 0);
  19686. }
  19687. }
  19688. }
  19689. else
  19690. {
  19691. SetPlayerArmedWeapon(playerid, weaponid);
  19692. }
  19693. SavePlayerWeapons(playerid);
  19694. PlayerData[playerid][pACTime] = gettime() + 2;
  19695. }
  19696. }
  19697. GetScriptWeapon(playerid)
  19698. {
  19699. new weaponid = GetPlayerWeapon(playerid);
  19700. if(PlayerHasWeapon(playerid, weaponid))
  19701. {
  19702. return weaponid;
  19703. }
  19704. return 0;
  19705. }
  19706. PlayerHasWeapon(playerid, weaponid, bool:temp = false)
  19707. {
  19708. switch(weaponid)
  19709. {
  19710. case 0, 2, 40, 46:
  19711. {
  19712. return 1;
  19713. }
  19714. }
  19715. if(weaponid == 23 && (PlayerData[playerid][pTazer] || (IsLawEnforcement(playerid) || GetFactionType(playerid) == FACTION_GOVERNMENT)))
  19716. {
  19717. return 1;
  19718. }
  19719. if((temp) && PlayerData[playerid][pTempWeapons][weaponSlotIDs[weaponid]] == weaponid)
  19720. {
  19721. return 1;
  19722. }
  19723. return PlayerData[playerid][pWeapons][weaponSlotIDs[weaponid]] == weaponid;
  19724. }
  19725. SetPlayerWeapons(playerid)
  19726. {
  19727. if(!PlayerData[playerid][pJoinedEvent] && PlayerData[playerid][pPaintball] == 0 && PlayerData[playerid][pDueling] == INVALID_PLAYER_ID && !PlayerData[playerid][pJailType] && !PlayerData[playerid][pWeaponRestricted])
  19728. {
  19729. new weaponid = GetPlayerWeapon(playerid);
  19730. ResetPlayerWeapons(playerid);
  19731. for(new i = 0; i < 13; i ++)
  19732. {
  19733. if(PlayerData[playerid][pWeapons][i] > 0)
  19734. {
  19735. if(i == 2 && PlayerData[playerid][pTazer])
  19736. {
  19737. GivePlayerWeaponEx(playerid, 23, true);
  19738. continue;
  19739. }
  19740. if(16 <= PlayerData[playerid][pWeapons][i] <= 18)
  19741. GivePlayerWeapon(playerid, PlayerData[playerid][pWeapons][i], 1);
  19742. else
  19743. GivePlayerWeapon(playerid, PlayerData[playerid][pWeapons][i], 29999);
  19744. }
  19745. }
  19746. switch(GetPlayerState(playerid))
  19747. {
  19748. case PLAYER_STATE_DRIVER:
  19749. {
  19750. SetPlayerArmedWeapon(playerid, 0);
  19751. }
  19752. case PLAYER_STATE_PASSENGER:
  19753. {
  19754. switch(weaponid)
  19755. {
  19756. case 22, 23, 25, 28..34:
  19757. {
  19758. SetPlayerArmedWeapon(playerid, weaponid);
  19759. }
  19760. default:
  19761. {
  19762. SetPlayerArmedWeapon(playerid, 0);
  19763. }
  19764. }
  19765. }
  19766. default:
  19767. {
  19768. SetPlayerArmedWeapon(playerid, weaponid);
  19769. }
  19770. }
  19771. }
  19772. }
  19773. SetPlayerClothing(playerid)
  19774. {
  19775. // Reset any clothing that the player has on them.
  19776. for(new i = 0; i < MAX_PLAYER_CLOTHING; i ++)
  19777. {
  19778. if(ClothingInfo[playerid][i][cExists] && ClothingInfo[playerid][i][cAttached])
  19779. {
  19780. RemovePlayerAttachedObject(playerid, ClothingInfo[playerid][i][cAttachedIndex]);
  19781. }
  19782. }
  19783. // Now, we reapply the clothing to the player.
  19784. for(new i = 0; i < MAX_PLAYER_CLOTHING; i ++)
  19785. {
  19786. if(ClothingInfo[playerid][i][cExists] && ClothingInfo[playerid][i][cAttached])
  19787. {
  19788. if(ClothingInfo[playerid][i][cAttachedIndex] == -1)
  19789. {
  19790. ClothingInfo[playerid][i][cAttachedIndex] = GetAvailableAttachedSlot(playerid);
  19791. }
  19792. if(ClothingInfo[playerid][i][cAttachedIndex] >= 0)
  19793. {
  19794. SetPlayerAttachedObject(playerid, ClothingInfo[playerid][i][cAttachedIndex], ClothingInfo[playerid][i][cModel], ClothingInfo[playerid][i][cBone], ClothingInfo[playerid][i][cPosX], ClothingInfo[playerid][i][cPosY], ClothingInfo[playerid][i][cPosZ], ClothingInfo[playerid][i][cRotX], ClothingInfo[playerid][i][cRotY], ClothingInfo[playerid][i][cRotZ], ClothingInfo[playerid][i][cScaleX], ClothingInfo[playerid][i][cScaleY], ClothingInfo[playerid][i][cScaleZ]);
  19795. }
  19796. else
  19797. {
  19798. // Clothing wasn't attached... slots are probably all full.
  19799. ClothingInfo[playerid][i][cAttached] = 0;
  19800. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE clothing SET attached = 0 WHERE id = %i", ClothingInfo[playerid][i][cID]);
  19801. mysql_tquery(connectionID, queryBuffer);
  19802. }
  19803. }
  19804. }
  19805. PlayerData[playerid][pAwaitingClothing] = 0;
  19806. }
  19807. SetPlayerInPaintball(playerid, type)
  19808. {
  19809. if(PlayerData[playerid][pPaintball] == 0)
  19810. {
  19811. SavePlayerVariables(playerid);
  19812. ResetPlayerWeapons(playerid);
  19813. }
  19814. if(type == 1)
  19815. {
  19816. new rand = random(sizeof(paintballFSpawns));
  19817. SetPlayerPos(playerid, paintballFSpawns[rand][0], paintballFSpawns[rand][1], paintballFSpawns[rand][2]);
  19818. SetPlayerFacingAngle(playerid, paintballFSpawns[rand][3]);
  19819. SetPlayerInterior(playerid, 18);
  19820. SetPlayerVirtualWorld(playerid, 1000);
  19821. SetCameraBehindPlayer(playerid);
  19822. SetPlayerHealth(playerid, 100.0);
  19823. SetPlayerArmour(playerid, 100.0);
  19824. GivePlayerWeaponEx(playerid, 24, true);
  19825. GivePlayerWeaponEx(playerid, 27, true);
  19826. GivePlayerWeaponEx(playerid, 29, true);
  19827. GivePlayerWeaponEx(playerid, 31, true);
  19828. GivePlayerWeaponEx(playerid, 34, true);
  19829. PlayerData[playerid][pPaintball] = 1;
  19830. }
  19831. else if(type == 2)
  19832. {
  19833. SetPlayerPos(playerid, paintballTSpawns[pbNext][0], paintballTSpawns[pbNext][1], paintballTSpawns[pbNext][2]);
  19834. SetPlayerFacingAngle(playerid, paintballTSpawns[pbNext][3]);
  19835. SetPlayerInterior(playerid, 18);
  19836. SetPlayerVirtualWorld(playerid, 1001);
  19837. SetCameraBehindPlayer(playerid);
  19838. SetPlayerHealth(playerid, 100.0);
  19839. SetPlayerArmour(playerid, 100.0);
  19840. GivePlayerWeaponEx(playerid, 24, true);
  19841. GivePlayerWeaponEx(playerid, 27, true);
  19842. GivePlayerWeaponEx(playerid, 29, true);
  19843. GivePlayerWeaponEx(playerid, 31, true);
  19844. GivePlayerWeaponEx(playerid, 34, true);
  19845. PlayerData[playerid][pPaintball] = 2;
  19846. PlayerData[playerid][pPaintballTeam] = pbNext;
  19847. if(!pbNext)
  19848. {
  19849. pbNext = 1;
  19850. }
  19851. else
  19852. {
  19853. pbNext = 0;
  19854. }
  19855. }
  19856. else if(type == 3)
  19857. {
  19858. new rand = random(sizeof(paintballDSpawns));
  19859. SetPlayerPos(playerid, paintballDSpawns[rand][0], paintballDSpawns[rand][1], paintballDSpawns[rand][2]);
  19860. SetPlayerFacingAngle(playerid, paintballDSpawns[rand][3]);
  19861. SetPlayerInterior(playerid, 0);
  19862. SetPlayerVirtualWorld(playerid, 1000);
  19863. SetCameraBehindPlayer(playerid);
  19864. GangZoneShowForPlayer(playerid, zone_paintball[0], 0xFFFF0096);
  19865. SetPlayerHealth(playerid, 25.0);
  19866. SetPlayerArmour(playerid, 0.0);
  19867. GivePlayerWeaponEx(playerid, 24, true);
  19868. PlayerData[playerid][pPaintball] = 3;
  19869. }
  19870. else if(type == 4)
  19871. {
  19872. new rand = random(sizeof(paintballSSpawns));
  19873. SetPlayerPos(playerid, paintballSSpawns[rand][0], paintballSSpawns[rand][1], paintballSSpawns[rand][2]);
  19874. SetPlayerFacingAngle(playerid, paintballSSpawns[rand][3]);
  19875. SetPlayerInterior(playerid, 0);
  19876. SetPlayerVirtualWorld(playerid, 1001);
  19877. SetCameraBehindPlayer(playerid);
  19878. GangZoneShowForPlayer(playerid, zone_paintball[1], 0xFFFF0096);
  19879. SetPlayerHealth(playerid, 38.0);
  19880. SetPlayerArmour(playerid, 0.0);
  19881. GivePlayerWeaponEx(playerid, 34, true);
  19882. PlayerData[playerid][pPaintball] = 4;
  19883. }
  19884. }
  19885. SetPlayerInHospital(playerid, time = 15, type = -1)
  19886. {
  19887. PlayerData[playerid][pHospitalType] = (type == -1) ? (random(2) + 1) : (type);
  19888. PlayerData[playerid][pHospitalTime] = time;
  19889. PlayerData[playerid][pHospital] = 1;
  19890. TogglePlayerControllable(playerid, 0);
  19891. GameTextForPlayer(playerid, "~w~Recovering...", 1500, 3);
  19892. new rand = random( sizeof( SpawnBolnica ) );
  19893. SetPlayerPos( playerid, SpawnBolnica[ rand ][ 0 ], SpawnBolnica[ rand ][ 1 ], SpawnBolnica[ rand ][ 2 ] );
  19894. SetPlayerFacingAngle( playerid, 90.000 );
  19895. ApplyAnimation(playerid, "SWAT", "gnstwall_injurd", 4.1, 1, 0, 0, 0, 0);
  19896. //ApplyAnimation( playerid, "BEACH", "bather", 4.0, 1, 0, 0, 0, 0 );
  19897. SetPlayerCameraPos(playerid, -2280.1226, 105.9459, -3.6012);
  19898. SetPlayerCameraLookAt(playerid, -2279.2388, 105.4819, -3.9212);
  19899. }
  19900. SetPlayerInJail(playerid)
  19901. {
  19902. if(PlayerData[playerid][pJailType] == 1) // OOC jail
  19903. {
  19904. switch(random(4))
  19905. {
  19906. case 0:
  19907. {
  19908. SetPlayerPos(playerid, 227.4201, 110.0224, 999.0156);
  19909. }
  19910. case 1:
  19911. {
  19912. SetPlayerPos(playerid, 223.4770, 110.1765, 999.0156);
  19913. }
  19914. case 2:
  19915. {
  19916. SetPlayerPos(playerid, 219.4810, 110.4918, 999.0156);
  19917. }
  19918. case 3:
  19919. {
  19920. SetPlayerPos(playerid, 215.6093, 110.7171, 999.0156);
  19921. }
  19922. }
  19923. SetPlayerFacingAngle(playerid, 0.0000);
  19924. SetPlayerInterior(playerid, 10);
  19925. SetPlayerVirtualWorld(playerid, 99999);
  19926. SetCameraBehindPlayer(playerid);
  19927. }
  19928. else if(PlayerData[playerid][pJailType] == 2) // OOC prison
  19929. {
  19930. SetPlayerPos(playerid, -1132.9137, 856.5791, 3.0703);
  19931. SetPlayerFacingAngle(playerid, 36.0000);
  19932. SetPlayerInterior(playerid, 0);
  19933. SetPlayerVirtualWorld(playerid, 99999);
  19934. SetCameraBehindPlayer(playerid);
  19935. }
  19936. else if(PlayerData[playerid][pJailType] == 3) // IC prison
  19937. {
  19938. new index = random(sizeof(cellSpawns));
  19939. SetFreezePos(playerid, cellSpawns[index][0], cellSpawns[index][1], cellSpawns[index][2]);
  19940. SetPlayerFacingAngle(playerid, cellSpawns[index][3]);
  19941. SetPlayerInterior(playerid, 2);
  19942. SetPlayerVirtualWorld(playerid, GetStaticEntranceWorld("Police department"));
  19943. SetCameraBehindPlayer(playerid);
  19944. }
  19945. }
  19946. NOPCheck(playerid)
  19947. {
  19948. new vehicleid = GetPlayerVehicleID(playerid);
  19949. if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && gettime() - PlayerData[playerid][pLastUpdate] < 3 && PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  19950. {
  19951. if((pizzaVehicles[0] <= vehicleid <= pizzaVehicles[5]) && !PlayerHasJob(playerid, JOB_PIZZAMAN))
  19952. {
  19953. RemovePlayerFromVehicle(playerid);
  19954. PlayerData[playerid][pNOPTime]++;
  19955. }
  19956. else if((courierVehicles[0] <= vehicleid <= courierVehicles[6]) && !PlayerHasJob(playerid, JOB_COURIER))
  19957. {
  19958. RemovePlayerFromVehicle(playerid);
  19959. PlayerData[playerid][pNOPTime]++;
  19960. }
  19961. else if((sweeperVehicles[0] <= vehicleid <= sweeperVehicles[3]) && !PlayerHasJob(playerid, JOB_SWEEPER))
  19962. {
  19963. RemovePlayerFromVehicle(playerid);
  19964. PlayerData[playerid][pNOPTime]++;
  19965. }
  19966. else if((taxiVehicles[0] <= vehicleid <= taxiVehicles[3]) && !PlayerHasJob(playerid, JOB_TAXIDRIVER))
  19967. {
  19968. RemovePlayerFromVehicle(playerid);
  19969. PlayerData[playerid][pNOPTime]++;
  19970. }
  19971. else if((garbageVehicles[0] <= vehicleid <= garbageVehicles[5]) && !PlayerHasJob(playerid, JOB_GARBAGEMAN))
  19972. {
  19973. RemovePlayerFromVehicle(playerid);
  19974. PlayerData[playerid][pNOPTime]++;
  19975. }
  19976. else if((testVehicles[0] <= vehicleid <= testVehicles[4]) && !PlayerData[playerid][pDrivingTest])
  19977. {
  19978. RemovePlayerFromVehicle(playerid);
  19979. PlayerData[playerid][pNOPTime]++;
  19980. }
  19981. else if(VehicleInfo[vehicleid][vFactionType] != FACTION_NONE && GetFactionType(playerid) != VehicleInfo[vehicleid][vFactionType])
  19982. {
  19983. RemovePlayerFromVehicle(playerid);
  19984. PlayerData[playerid][pNOPTime]++;
  19985. }
  19986. else if(VehicleInfo[vehicleid][vGang] >= 0 && PlayerData[playerid][pGang] != VehicleInfo[vehicleid][vGang])
  19987. {
  19988. RemovePlayerFromVehicle(playerid);
  19989. PlayerData[playerid][pNOPTime]++;
  19990. }
  19991. else if(VehicleInfo[vehicleid][vJob] >= 0 && PlayerData[playerid][pJob] != VehicleInfo[vehicleid][vJob])
  19992. {
  19993. RemovePlayerFromVehicle(playerid);
  19994. PlayerData[playerid][pNOPTime]++;
  19995. }
  19996. else if(PlayerData[playerid][pNOPTime] > 0)
  19997. {
  19998. PlayerData[playerid][pNOPTime]--;
  19999. }
  20000. if(PlayerData[playerid][pNOPTime] >= 15)
  20001. {
  20002. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s was kicked for suspected NOP hacks.", GetRPName(playerid));
  20003. Log_Write("log_cheat", "%s (uid: %i) was kicked for suspected NOP hacks.", GetPlayerNameEx(playerid), PlayerData[playerid][pID]);
  20004. KickPlayer(playerid);
  20005. }
  20006. }
  20007. }
  20008. AFKCheck(playerid)
  20009. {
  20010. new
  20011. Float:x,
  20012. Float:y,
  20013. Float:z,
  20014. Float:cx,
  20015. Float:cy,
  20016. Float:cz;
  20017. GetPlayerPos(playerid, x, y, z);
  20018. GetPlayerCameraPos(playerid, cx, cy, cz);
  20019. if(PlayerData[playerid][pAFKPos][0] == x && PlayerData[playerid][pAFKPos][1] == y && PlayerData[playerid][pAFKPos][2] == z && PlayerData[playerid][pAFKPos][3] == cx && PlayerData[playerid][pAFKPos][4] == cy && PlayerData[playerid][pAFKPos][5] == cz)
  20020. {
  20021. PlayerData[playerid][pAFKTime]++;
  20022. if(!PlayerData[playerid][pAFK] && PlayerData[playerid][pAFKTime] >= 60)
  20023. {
  20024. //SendClientMessage(playerid, COLOR_LIGHTORANGE, "* You are now marked as {00AA00}Away from keyboard{F7A763} as you haven't moved in one minute.");
  20025. // SendClientMessage(playerid, COLOR_LIGHTRED, ">>{ffffff} You have been marked as AFK as you haven't moved in one minute.");
  20026. PlayerData[playerid][pAFK] = 1;
  20027. }
  20028. }
  20029. else
  20030. {
  20031. if(PlayerData[playerid][pAFK])
  20032. {
  20033. if(PlayerData[playerid][pAFKTime] < 120) {
  20034. //SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "* You are no longer marked as Away from Keyboard after %i seconds.", PlayerData[playerid][pAFKTime]);
  20035. // SendClientMessageEx(playerid, COLOR_LIGHTRED, ">>{ffffff} You are no longer marked as AFK after %i seconds.", PlayerData[playerid][pAFKTime]);
  20036. } else {
  20037. //SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "* You are no longer marked as Away from Keyboard after %i minutes.", PlayerData[playerid][pAFKTime] / 60);
  20038. // SendClientMessageEx(playerid, COLOR_LIGHTRED, ">>{ffffff} You are no longer marked as AFK after %i minutes.", PlayerData[playerid][pAFKTime] / 60);
  20039. }
  20040. PlayerData[playerid][pAFK] = 0;
  20041. }
  20042. PlayerData[playerid][pAFKTime] = 0;
  20043. }
  20044. PlayerData[playerid][pAFKPos][0] = x;
  20045. PlayerData[playerid][pAFKPos][1] = y;
  20046. PlayerData[playerid][pAFKPos][2] = z;
  20047. PlayerData[playerid][pAFKPos][3] = cx;
  20048. PlayerData[playerid][pAFKPos][4] = cy;
  20049. PlayerData[playerid][pAFKPos][5] = cz;
  20050. }
  20051. TeleportToVehicle(playerid, vehicleid)
  20052. {
  20053. new
  20054. Float:x,
  20055. Float:y,
  20056. Float:z,
  20057. Float:a,
  20058. interior,
  20059. garageid;
  20060. GetVehiclePos(vehicleid, x, y, z);
  20061. GetVehicleZAngle(vehicleid, a);
  20062. if((garageid = GetVehicleGarage(vehicleid)) >= 0)
  20063. {
  20064. interior = garageInteriors[GarageInfo[garageid][gType]][intID];
  20065. }
  20066. TeleportToCoords(playerid, x + 1, y + 1, z + 1, a, interior, GetVehicleVirtualWorld(vehicleid));
  20067. }
  20068. TeleportToPlayer(playerid, targetid, bool:vehicle = true)
  20069. {
  20070. new
  20071. Float:x,
  20072. Float:y,
  20073. Float:z,
  20074. Float:a;
  20075. GetPlayerPos(targetid, x, y, z);
  20076. GetPlayerFacingAngle(targetid, a);
  20077. TeleportToCoords(playerid, x + 1, y + 1, z, a, GetPlayerInterior(targetid), GetPlayerVirtualWorld(targetid), .vehicle = vehicle);
  20078. }
  20079. TeleportToCoords(playerid, Float:x, Float:y, Float:z, Float:angle, interiorid, worldid, bool:freeze = false, bool:vehicle = true)
  20080. {
  20081. new vehicleid = GetPlayerVehicleID(playerid);
  20082. if((vehicle) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  20083. {
  20084. foreach(new i : Player)
  20085. {
  20086. if(IsPlayerInVehicle(i, vehicleid))
  20087. {
  20088. SetPlayerInterior(i, interiorid);
  20089. SetPlayerVirtualWorld(i, worldid);
  20090. }
  20091. }
  20092. SetVehiclePos(vehicleid, x, y, z);
  20093. SetVehicleZAngle(vehicleid, angle);
  20094. SetVehicleVirtualWorld(vehicleid, worldid);
  20095. LinkVehicleToInterior(vehicleid, interiorid);
  20096. }
  20097. else
  20098. {
  20099. SetPlayerPos(playerid, x, y, z);
  20100. SetPlayerFacingAngle(playerid, angle);
  20101. SetPlayerInterior(playerid, interiorid);
  20102. SetPlayerVirtualWorld(playerid, worldid);
  20103. SetCameraBehindPlayer(playerid);
  20104. }
  20105. if((freeze) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  20106. {
  20107. SetTimerEx("VehicleUnfreeze", 3000, false, "iifffii", playerid, GetPlayerVehicleID(playerid), x, y, z, interiorid, worldid);
  20108. ShowFreezeTextdraw(playerid);
  20109. TogglePlayerControllable(playerid, 0);
  20110. }
  20111. new houseid;
  20112. if((houseid = GetInsideHouse(playerid)) >= 0)
  20113. {
  20114. if(HouseInfo[houseid][hLights] == 1)
  20115. {
  20116. TextDrawHideForPlayer(playerid, houseLights);
  20117. }
  20118. else
  20119. {
  20120. TextDrawShowForPlayer(playerid, houseLights);
  20121. }
  20122. }
  20123. }
  20124. ShowLandsOnMap(playerid, enable)
  20125. {
  20126. foreach(new i : Land)
  20127. {
  20128. if(LandInfo[i][lExists])
  20129. {
  20130. if(enable) {
  20131. GangZoneShowForPlayer(playerid, LandInfo[i][lGangZone], (LandInfo[i][lOwnerID] > 0) ? (0xFF6347AA) : (0x33CC33AA));
  20132. } else {
  20133. GangZoneHideForPlayer(playerid, LandInfo[i][lGangZone]);
  20134. }
  20135. }
  20136. }
  20137. PlayerData[playerid][pShowLands] = enable;
  20138. }
  20139. ShowTurfsOnMap(playerid, enable)
  20140. {
  20141. foreach(new i : Turf)
  20142. {
  20143. if(TurfInfo[i][tExists])
  20144. {
  20145. if(enable)
  20146. {
  20147. GangZoneShowForPlayer(playerid, TurfInfo[i][tGangZone], GetTurfColor(i));
  20148. if(TurfInfo[i][tCapturer] == INVALID_PLAYER_ID)
  20149. {
  20150. GangZoneStopFlashForPlayer(playerid, TurfInfo[i][tGangZone]);
  20151. }
  20152. else
  20153. {
  20154. if(IsLawEnforcement(TurfInfo[i][tCapturer]))
  20155. GangZoneFlashForPlayer(playerid, TurfInfo[i][tGangZone], 0x8D8DFF00);
  20156. else if(PlayerData[TurfInfo[i][tCapturer]][pGang] >= 0)
  20157. GangZoneFlashForPlayer(playerid, TurfInfo[i][tGangZone], (GangInfo[PlayerData[TurfInfo[i][tCapturer]][pGang]][gColor] & ~0xff) + 0xAA);
  20158. }
  20159. }
  20160. else
  20161. {
  20162. GangZoneHideForPlayer(playerid, TurfInfo[i][tGangZone]);
  20163. }
  20164. }
  20165. }
  20166. PlayerData[playerid][pShowTurfs] = enable;
  20167. }
  20168. /*ShowTurfsOnMap(playerid, enable)
  20169. {
  20170. foreach(new i : Turf)
  20171. {
  20172. if(TurfInfo[i][tExists])
  20173. {
  20174. if(enable)
  20175. {
  20176. GangZoneShowForPlayer(playerid, TurfInfo[i][tGangZone], GetTurfColor(i));
  20177. if(TurfInfo[i][tCapturer] == INVALID_PLAYER_ID)
  20178. {
  20179. GangZoneStopFlashForPlayer(playerid, TurfInfo[i][tGangZone]);
  20180. }
  20181. else
  20182. {
  20183. if(PlayerData[TurfInfo[i][tCapturer]][pGang] == -1 && IsLawEnforcement(TurfInfo[i][tCapturer]))
  20184. GangZoneFlashForPlayer(playerid, TurfInfo[i][tGangZone], 0x000000AA);
  20185. else if(PlayerData[TurfInfo[i][tCapturer]][pGang] >= 0)
  20186. GangZoneFlashForPlayer(playerid, TurfInfo[i][tGangZone], (GangInfo[PlayerData[TurfInfo[i][tCapturer]][pGang]][gColor] & ~0xff) + 0xAA);
  20187. }
  20188. }
  20189. else
  20190. {
  20191. GangZoneHideForPlayer(playerid, TurfInfo[i][tGangZone]);
  20192. }
  20193. }
  20194. }
  20195. PlayerData[playerid][pShowTurfs] = enable;
  20196. }*/
  20197. CancelZoneCreation(playerid)
  20198. {
  20199. for(new i = 0; i < 4; i ++)
  20200. {
  20201. DestroyDynamicPickup(PlayerData[playerid][pZonePickups][i]);
  20202. PlayerData[playerid][pZonePickups][i] = -1;
  20203. }
  20204. GangZoneDestroy(PlayerData[playerid][pZoneID]);
  20205. PlayerData[playerid][pZoneID] = -1;
  20206. PlayerData[playerid][pZoneCreation] = 0;
  20207. PlayerData[playerid][pMinX] = 0.0;
  20208. PlayerData[playerid][pMinY] = 0.0;
  20209. PlayerData[playerid][pMaxX] = 0.0;
  20210. PlayerData[playerid][pMaxY] = 0.0;
  20211. }
  20212. ResetCooking(playerid)
  20213. {
  20214. PlayerData[playerid][pCookMeth] = 0;
  20215. PlayerData[playerid][pCookGrams] = 0;
  20216. PlayerData[playerid][pCookTime] = 0;
  20217. }
  20218. ResetPlayer(playerid)
  20219. {
  20220. TextDrawHideForPlayer(playerid, welcomenew);
  20221. if(PlayerData[playerid][pJoinedEvent])
  20222. {
  20223. SetPlayerSkin(playerid, PlayerData[playerid][pSkin]);
  20224. ResetPlayerWeapons(playerid);
  20225. PlayerData[playerid][pJoinedEvent] = 0;
  20226. }
  20227. if(PlayerData[playerid][pPaintball] > 0)
  20228. {
  20229. ResetPlayerWeapons(playerid);
  20230. PlayerData[playerid][pPaintball] = 0;
  20231. PlayerData[playerid][pPaintballTeam] = -1;
  20232. }
  20233. if(PlayerData[playerid][pHospital])
  20234. {
  20235. GameTextForPlayer(playerid, " ", 100, 3);
  20236. PlayerData[playerid][pHospital] = 0;
  20237. PlayerData[playerid][pHospitalTime] = 0;
  20238. }
  20239. if (PlayerData[playerid][pWorkout] != WORKOUT_NONE)
  20240. {
  20241. StopWorkout(playerid);
  20242. }
  20243. if(PlayerData[playerid][pMiningTime] > 0)
  20244. {
  20245. ClearAnimations(playerid, 1);
  20246. }
  20247. if(PlayerData[playerid][pTazedTime] > 0)
  20248. {
  20249. ClearAnimations(playerid, 1);
  20250. TogglePlayerControllable(playerid, 1);
  20251. }
  20252. if(PlayerData[playerid][pCuffed])
  20253. {
  20254. TogglePlayerControllable(playerid, 1);
  20255. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
  20256. }
  20257. if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CARRY)
  20258. {
  20259. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
  20260. }
  20261. if(PlayerData[playerid][pLiveBroadcast] != INVALID_PLAYER_ID)
  20262. {
  20263. PlayerData[PlayerData[playerid][pLiveBroadcast]][pLiveBroadcast] = INVALID_PLAYER_ID;
  20264. PlayerData[playerid][pLiveBroadcast] = INVALID_PLAYER_ID;
  20265. }
  20266. if(PlayerData[playerid][pPlantedBomb])
  20267. {
  20268. DestroyDynamicObject(PlayerData[playerid][pBombObject]);
  20269. PlayerData[playerid][pBombObject] = INVALID_OBJECT_ID;
  20270. PlayerData[playerid][pPlantedBomb] = 0;
  20271. }
  20272. if(PlayerData[playerid][pFreezeTimer] >= 0)
  20273. {
  20274. KillTimer(PlayerData[playerid][pFreezeTimer]);
  20275. TogglePlayerControllable(playerid, 1);
  20276. PlayerData[playerid][pFreezeTimer] = -1;
  20277. }
  20278. if(PlayerData[playerid][pDueling] != INVALID_PLAYER_ID)
  20279. {
  20280. PlayerData[PlayerData[playerid][pDueling]][pDueling] = INVALID_PLAYER_ID;
  20281. PlayerData[playerid][pDueling] = INVALID_PLAYER_ID;
  20282. }
  20283. if(RobberyInfo[rPlanning] || RobberyInfo[rStarted])
  20284. {
  20285. RemoveFromBankRobbery(playerid);
  20286. }
  20287. hidemotd(playerid);
  20288. foreach(new i : Player)
  20289. {
  20290. if(PlayerData[i][pDraggedBy] == playerid)
  20291. {
  20292. PlayerData[i][pDraggedBy] = INVALID_PLAYER_ID;
  20293. }
  20294. }
  20295. PlayerData[playerid][pWeight] = 0;
  20296. PlayerData[playerid][pReps] = 0;
  20297. PlayerData[playerid][pSpeedLevel] = 0;
  20298. PlayerData[playerid][pDistanceRan] = 0;
  20299. if (PlayerData[playerid][pRangeBooth] != -1)
  20300. Booth_Leave(playerid);
  20301. PlayerData[playerid][pInTurf] = -1;
  20302. InsideShamal[playerid]= INVALID_VEHICLE_ID;
  20303. totalDamages[playerid] = 0;
  20304. PlayerData[playerid][pInjured] = 0;
  20305. PlayerData[playerid][pAcceptedHelp] = 0;
  20306. PlayerData[playerid][pMiningTime] = 0;
  20307. PlayerData[playerid][pMiningRock] = 0;
  20308. PlayerData[playerid][pChatstyle] = 0;
  20309. PlayerData[playerid][pSpeedTime] = 0;
  20310. PlayerData[playerid][pSweeping] = 0;
  20311. PlayerData[playerid][pGraffiti] = -1;
  20312. PlayerData[playerid][pGraffitiTime] = 0;
  20313. PlayerData[playerid][pSweepTime] = 0;
  20314. PlayerData[playerid][pSweepEarnings] = 0;
  20315. PlayerData[playerid][pTazer] = 0;
  20316. PlayerData[playerid][pTazedTime] = 0;
  20317. PlayerData[playerid][pCuffed] = 0;
  20318. PlayerData[playerid][pTied] = 0;
  20319. PlayerData[playerid][pDraggedBy] = INVALID_PLAYER_ID;
  20320. PlayerData[playerid][pDelivered] = 0;
  20321. PlayerData[playerid][pContractTaken] = INVALID_PLAYER_ID;
  20322. PlayerData[playerid][pPoisonTime] = 0;
  20323. PlayerData[playerid][pCapturingPoint] = -1;
  20324. PlayerData[playerid][pCaptureTime] = 0;
  20325. PlayerData[playerid][pCocaineTrunk] = INVALID_VEHICLE_ID;
  20326. PlayerData[playerid][pPreviewHouse] = -1;
  20327. PlayerData[playerid][pPreviewType] = 0;
  20328. PlayerData[playerid][pPreviewTime] = 0;
  20329. PlayerData[playerid][pHHCheck] = 0;
  20330. CancelActiveCheckpoint(playerid);
  20331. CancelBreakIn(playerid);
  20332. PlayerData[playerid][pRepairShop] = -1;
  20333. PlayerData[playerid][pRepairTime] = 0;
  20334. RemovePlayerAttachedObject(playerid, 9);
  20335. }
  20336. CancelBreakIn(playerid)
  20337. {
  20338. if(PlayerData[playerid][pLockBreak] != INVALID_VEHICLE_ID)
  20339. {
  20340. new
  20341. damage[4];
  20342. SetVehicleParams(PlayerData[playerid][pLockBreak], VEHICLE_ALARM, false);
  20343. GetVehicleDamageStatus(PlayerData[playerid][pLockBreak], damage[0], damage[1], damage[2], damage[3]);
  20344. UpdateVehicleDamageStatus(PlayerData[playerid][pLockBreak], damage[0], 0, damage[2], damage[3]);
  20345. DestroyDynamic3DTextLabel(PlayerData[playerid][pLockText]);
  20346. KillTimer(PlayerData[playerid][pLockTimer]);
  20347. PlayerData[playerid][pLockText] = Text3D:INVALID_3DTEXT_ID;
  20348. PlayerData[playerid][pLockBreak] = INVALID_VEHICLE_ID;
  20349. }
  20350. }
  20351. forward garbagewait(playerid);
  20352. public garbagewait(playerid)
  20353. {
  20354. ShowPlayerFooter(playerid, "Garbage Loaded....~n~Proceed to the next checkpoint.");
  20355. TogglePlayerControllable(playerid, 1);
  20356. }
  20357. CancelActiveCheckpoint(playerid)
  20358. {
  20359. if(PlayerData[playerid][pDrivingTest])
  20360. {
  20361. SetVehicleToRespawn(PlayerData[playerid][pTestVehicle]);
  20362. }
  20363. if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CARRY)
  20364. {
  20365. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
  20366. RemovePlayerAttachedObject(playerid, 9);
  20367. }
  20368. DisablePlayerCheckpoint(playerid);
  20369. PlayerData[playerid][pCP] = CHECKPOINT_NONE;
  20370. PlayerData[playerid][pPizzas] = 0;
  20371. PlayerData[playerid][pSmuggleMats] = 0;
  20372. PlayerData[playerid][pSmuggleDrugs] = 0;
  20373. PlayerData[playerid][pDrivingTest] = 0;
  20374. PlayerData[playerid][pTestVehicle] = INVALID_VEHICLE_ID;
  20375. PlayerData[playerid][pTestCP] = 0;
  20376. PlayerData[playerid][pMiningRock] = 0;
  20377. PlayerData[playerid][pShipment] = -1;
  20378. PlayerData[playerid][pGarbage] = 0;
  20379. }
  20380. ReferralCheck(playerid)
  20381. {
  20382. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT username, ip FROM "#TABLE_USERS" WHERE uid = %i", PlayerData[playerid][pReferralUID]);
  20383. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_REWARD_REFERRER, playerid);
  20384. }
  20385. PlayLoginMusic(playerid)
  20386. {
  20387. PlayAudioStreamForPlayer(playerid, "https://os-rp.net/music/osrp.mp3");
  20388. }
  20389. AwardAchievement(playerid, const name[])
  20390. {
  20391. for(new i = 0; i < sizeof(achievementInfo); i ++)
  20392. {
  20393. if(!strcmp(achievementInfo[i][aName], name))
  20394. {
  20395. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT IGNORE INTO achievements VALUES(%i, '%e')", PlayerData[playerid][pID], name);
  20396. mysql_tquery(connectionID, queryBuffer, "OnPlayerAchievementCheck", "is", playerid, name);
  20397. return 1;
  20398. }
  20399. }
  20400. return 0;
  20401. }
  20402. SendNewbieChatMessage(playerid, text[])
  20403. {
  20404. new string[64];
  20405. if((!isnull(PlayerData[playerid][pCustomTitle]) && strcmp(PlayerData[playerid][pCustomTitle], "None", true) != 0) && PlayerData[playerid][pAdminHide] == 0) {
  20406. new color;
  20407. if(PlayerData[playerid][pCustomTColor] == -1 || PlayerData[playerid][pCustomTColor] == -256)
  20408. {
  20409. color = 0xC8C8C8FF;
  20410. }
  20411. else
  20412. {
  20413. color = PlayerData[playerid][pCustomTColor];
  20414. }
  20415. format(string, sizeof(string), "{%06x}%s{7DAEFF} %s", color >>> 8, PlayerData[playerid][pCustomTitle], GetRPName(playerid));
  20416. } else if(PlayerData[playerid][pAdmin] > 1 && PlayerData[playerid][pAdminHide] == 0) {
  20417. format(string, sizeof(string), "{FF6347}%s{7DAEFF} %s", GetAdminRank(playerid), GetRPName(playerid));
  20418. } else if(PlayerData[playerid][pHelper] > 0) {
  20419. format(string, sizeof(string), "%s %s", GetHelperRank(playerid), GetRPName(playerid));
  20420. } else if(PlayerData[playerid][pFormerAdmin]) {
  20421. format(string, sizeof(string), "{FF69B5}Former Admin{7DAEFF} %s", GetRPName(playerid));
  20422. } else if(PlayerData[playerid][pDonator] > 0) {
  20423. format(string, sizeof(string), "{D909D9}%s VIP{7DAEFF} %s", GetVIPRank(PlayerData[playerid][pDonator]), GetRPName(playerid));
  20424. } else if(PlayerData[playerid][pLevel] > 1) {
  20425. format(string, sizeof(string), "Player %s", GetRPName(playerid));
  20426. } else if(PlayerData[playerid][pHours] > 250) {
  20427. format(string, sizeof(string), "OS:RP Veteran: %s", GetRPName(playerid));
  20428. } else {
  20429. format(string, sizeof(string), "Newbie %s", GetRPName(playerid));
  20430. }
  20431. foreach(new i : Player)
  20432. {
  20433. if(!PlayerData[i][pToggleNewbie])
  20434. {
  20435. if(strlen(text) > MAX_SPLIT_LENGTH)
  20436. {
  20437. SendClientMessageEx(i, COLOR_NEWBIE, "* %s: %.*s...", string, MAX_SPLIT_LENGTH, text);
  20438. SendClientMessageEx(i, COLOR_NEWBIE, "* %s: ...%s", string, text[MAX_SPLIT_LENGTH]);
  20439. }
  20440. else
  20441. {
  20442. SendClientMessageEx(i, COLOR_NEWBIE, "* %s: %s", string, text);
  20443. }
  20444. }
  20445. }
  20446. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN && PlayerData[playerid][pHelper] == 0)
  20447. {
  20448. PlayerData[playerid][pLastNewbie] = gettime();
  20449. }
  20450. }
  20451. ShowCopClothingMenu(playerid)
  20452. {
  20453. new models[sizeof(copClothing)];
  20454. for(new i = 0; i < sizeof(copClothing); i ++) {
  20455. models[i] = copClothing[i][cModel];
  20456. }
  20457. ShowPlayerSelectionMenu(playerid, MODEL_SELECTION_COPCLOTHING, "LEO Clothing", models, sizeof(models));
  20458. }
  20459. #if defined SERVER_INTRO
  20460. ShowServerIntro(playerid)
  20461. {
  20462. if(!PlayerData[playerid][pWatchingIntro])
  20463. {
  20464. TogglePlayerSpectating(playerid, 1);
  20465. TogglePlayerControllable(playerid, 0);
  20466. PlayAudioStreamForPlayer(playerid, "http://music.theroleplay.com/gtav.mp3");
  20467. SetPlayerVirtualWorld(playerid, playerid);
  20468. SetPlayerPos(playerid, 155.3337, -1776.4384, 14.8978+5.0);
  20469. SetPlayerCameraPos(playerid, 155.3337, -1776.4384, 14.8978);
  20470. SetPlayerCameraLookAt(playerid, 156.2734, -1776.0850, 14.2128);
  20471. InterpolateCameraLookAt(playerid, 156.2734, -1776.0850, 14.2128, 156.2713, -1776.0797, 14.7078, 5000, CAMERA_MOVE);
  20472. TextDrawShowForPlayer(playerid, introTextdraws[0]);
  20473. TextDrawShowForPlayer(playerid, introTextdraws[1]);
  20474. TextDrawShowForPlayer(playerid, introTextdraws[2]);
  20475. SetTimerEx("StreamNextStep", 4500, false, "ii", playerid, 0);
  20476. SetTimerEx("ShowLoginScreenTextdraw", 2400, false, "ii", playerid, 1);
  20477. PlayerData[playerid][pWatchingIntro] = 1;
  20478. }
  20479. }
  20480. #endif
  20481. /*ShowTutorialTextDraws(playerid)
  20482. {
  20483. TextDrawShowForPlayer(playerid, Tutorial[0]);
  20484. TextDrawShowForPlayer(playerid, Tutorial[1]);
  20485. TextDrawShowForPlayer(playerid, Tutorial[2]);
  20486. }*/
  20487. HideTutorialTextDraws(playerid)
  20488. {
  20489. TextDrawHideForPlayer(playerid, Tutorial[0]);
  20490. TextDrawHideForPlayer(playerid, Tutorial[1]);
  20491. TextDrawHideForPlayer(playerid, Tutorial[2]);
  20492. }
  20493. SellWeapon(playerid, targetid, weaponid, price = 0)
  20494. {
  20495. new cost;
  20496. switch(weaponid)
  20497. {
  20498. case 2, 5..8, 10, 14, 15: cost = 50;
  20499. case 22: cost = 100;
  20500. case 23: cost = 150;
  20501. case 24: cost = 2000;
  20502. case 25: cost = 200;
  20503. case 28, 32: cost = 500;
  20504. case 29: cost = 1000;
  20505. case 30: cost = 3500;
  20506. case 31: cost = 4500;
  20507. case 33: cost = 1000;
  20508. case 27: cost = 7500;
  20509. case 34: cost = 7500;
  20510. }
  20511. if((weaponid == 27 || weaponid == 34) && PlayerData[playerid][pDonator] == 3)
  20512. {
  20513. cost = 5000;
  20514. }
  20515. if(PlayerData[playerid][pMaterials] >= cost)
  20516. {
  20517. PlayerData[playerid][pMaterials] -= cost;
  20518. PlayerData[playerid][pLastSell] = gettime();
  20519. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET materials = %i WHERE uid = %i", PlayerData[playerid][pMaterials], PlayerData[playerid][pID]);
  20520. mysql_tquery(connectionID, queryBuffer);
  20521. if(targetid == playerid)
  20522. {
  20523. SendClientMessageEx(playerid, COLOR_AQUA, "You have crafted yourself a {FF6347}%s{33CCFF}.", GetWeaponNameEx(weaponid));
  20524. ShowActionBubble(playerid, "* %s puts together some materials and crafts themselves a %s.", GetRPName(playerid), GetWeaponNameEx(weaponid));
  20525. }
  20526. else
  20527. {
  20528. ShowActionBubble(playerid, "* %s puts together some materials and crafts a %s for %s.", GetRPName(playerid), GetWeaponNameEx(weaponid), GetRPName(targetid));
  20529. SendClientMessageEx(playerid, COLOR_AQUA, "You have sold %s a {FF6347}%s{33CCFF} for {00AA00}%s{33CCFF}.", GetRPName(targetid), GetWeaponNameEx(weaponid), FormatNumber(price));
  20530. SendClientMessageEx(targetid, COLOR_AQUA, "%s has sold you a {FF6347}%s{33CCFF} for {00AA00}%s{33CCFF}.", GetRPName(playerid), GetWeaponNameEx(weaponid), FormatNumber(price));
  20531. GivePlayerCash(playerid, price);
  20532. GivePlayerCash(targetid, -price);
  20533. }
  20534. if(weaponid >= 22)
  20535. {
  20536. IncreaseJobSkill(playerid, JOB_WEAPONDEALER);
  20537. }
  20538. GivePlayerWeaponEx(targetid, weaponid);
  20539. return 1;
  20540. }
  20541. else
  20542. {
  20543. SendClientMessage(targetid, COLOR_GREY, "That player has ran out of materials.");
  20544. }
  20545. return 0;
  20546. }
  20547. Namechange(playerid, oldname[], newname[])
  20548. {
  20549. if(!PlayerData[playerid][pUndercover][0])
  20550. {
  20551. foreach(new i : House)
  20552. {
  20553. if(HouseInfo[i][hExists] && !strcmp(HouseInfo[i][hOwner], oldname, false))
  20554. {
  20555. strcpy(HouseInfo[i][hOwner], newname, MAX_PLAYER_NAME);
  20556. ReloadHouse(i);
  20557. }
  20558. }
  20559. foreach(new i : Garage)
  20560. {
  20561. if(GarageInfo[i][gExists] && !strcmp(GarageInfo[i][gOwner], oldname, false))
  20562. {
  20563. strcpy(GarageInfo[i][gOwner], newname, MAX_PLAYER_NAME);
  20564. ReloadGarage(i);
  20565. }
  20566. }
  20567. foreach(new i : Business)
  20568. {
  20569. if(BusinessInfo[i][bExists] && !strcmp(BusinessInfo[i][bOwner], oldname, false))
  20570. {
  20571. strcpy(BusinessInfo[i][bOwner], newname, MAX_PLAYER_NAME);
  20572. ReloadBusiness(i);
  20573. }
  20574. }
  20575. foreach(new i : Land)
  20576. {
  20577. if(LandInfo[i][lExists] && !strcmp(LandInfo[i][lOwner], oldname, false))
  20578. {
  20579. strcpy(LandInfo[i][lOwner], newname, MAX_PLAYER_NAME);
  20580. ReloadLand(i);
  20581. }
  20582. }
  20583. foreach(new i: Vehicle)
  20584. {
  20585. if(VehicleInfo[i][vID] && !strcmp(VehicleInfo[i][vOwner], oldname, false))
  20586. {
  20587. strcpy(VehicleInfo[i][vOwner], newname, MAX_PLAYER_NAME);
  20588. }
  20589. }
  20590. // Updating queries.
  20591. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET owner = '%s' WHERE owner = '%s'", newname, oldname);
  20592. mysql_tquery(connectionID, queryBuffer);
  20593. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE garages SET owner = '%s' WHERE owner = '%s'", newname, oldname);
  20594. mysql_tquery(connectionID, queryBuffer);
  20595. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET owner = '%s' WHERE owner = '%s'", newname, oldname);
  20596. mysql_tquery(connectionID, queryBuffer);
  20597. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET owner = '%s' WHERE owner = '%s'", newname, oldname);
  20598. mysql_tquery(connectionID, queryBuffer);
  20599. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE lands SET owner = '%s' WHERE owner = '%s'", newname, oldname);
  20600. mysql_tquery(connectionID, queryBuffer);
  20601. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET username = '%s' WHERE uid = %i", newname, PlayerData[playerid][pID]);
  20602. mysql_tquery(connectionID, queryBuffer);
  20603. strcpy(PlayerData[playerid][pUsername], newname, MAX_PLAYER_NAME);
  20604. SetPlayerName(playerid, newname);
  20605. SavePlayerVariables(playerid);
  20606. }
  20607. }
  20608. /*
  20609. IsAVIPVehicle(vehicleid)
  20610. {
  20611. switch(GetVehicleModel(vehicleid))
  20612. {
  20613. case
  20614. 402,411,415,424,429,434,446,451,452,453,454,460,469,471,473,
  20615. 477,480,484,487,493,494,502,503,504,506,511,512,513,519,522,
  20616. 541,553,568,593,595,603: return 1;
  20617. }
  20618. return 0;
  20619. }
  20620. */
  20621. IsAPlane(vehicleid)
  20622. {
  20623. switch(GetVehicleModel(vehicleid))
  20624. {
  20625. case 460, 464, 476, 511..513, 519, 520, 553, 577, 592, 593: return 1;
  20626. }
  20627. return 0;
  20628. }
  20629. IsAHelicopter(vehicleid)
  20630. {
  20631. switch(GetVehicleModel(vehicleid))
  20632. {
  20633. case 417, 425, 447, 465, 469, 487, 488, 497, 501, 548, 563: return 1;
  20634. }
  20635. return 0;
  20636. }
  20637. IsABoat(vehicleid)
  20638. {
  20639. switch(GetVehicleModel(vehicleid))
  20640. {
  20641. case 430, 446, 452..454, 472, 473, 484, 493, 595: return 1;
  20642. }
  20643. return 0;
  20644. }
  20645. IsSurfVehicle(vehicleid)
  20646. {
  20647. switch(GetVehicleModel(vehicleid))
  20648. {
  20649. case 406, 408, 422, 430, 432, 433, 441, 444, 446, 452..455, 460, 464, 470, 472, 473, 476, 478, 481, 484, 490, 493, 509..513, 519, 520, 528, 537, 538, 543, 553, 554, 556, 557, 569, 570, 577, 578, 590, 592..595, 600, 605, 607, 608: return 1;
  20650. }
  20651. return 0;
  20652. }
  20653. VehicleHasDoors(vehicleid)
  20654. {
  20655. switch (GetVehicleModel(vehicleid))
  20656. {
  20657. case 400..424, 426..429, 431..440, 442..445, 451, 455, 456, 458, 459, 466, 467, 470, 474, 475, 477..480, 482, 483, 486, 489, 490..492, 494..496, 498..500, 502..508, 514..518, 524..529, 533..536, 540..547, 549..552, 554..562, 565..568, 573, 575, 576, 578..580, 582, 585, 587..589, 596..605, 609:
  20658. return 1;
  20659. }
  20660. return 0;
  20661. }
  20662. IsEmergencyFaction(playerid)
  20663. {
  20664. switch(GetFactionType(playerid))
  20665. {
  20666. case FACTION_POLICE, FACTION_FEDERAL, FACTION_MEDIC, FACTION_ARMY:
  20667. return 1;
  20668. }
  20669. return 0;
  20670. }
  20671. IsLawEnforcement(playerid)
  20672. {
  20673. return GetFactionType(playerid) == FACTION_POLICE || GetFactionType(playerid) == FACTION_FEDERAL || GetFactionType(playerid) == FACTION_ARMY;
  20674. }
  20675. iscop(playerid)
  20676. {
  20677. return GetFactionType(playerid) == FACTION_POLICE || GetFactionType(playerid) == FACTION_FEDERAL || GetFactionType(playerid) == FACTION_ARMY;
  20678. }
  20679. IsPlayerBeingFound(playerid)
  20680. {
  20681. foreach(new i : Player)
  20682. {
  20683. if(PlayerData[i][pFindPlayer] == playerid && PlayerData[i][pFindTime] > 0)
  20684. {
  20685. return 1;
  20686. }
  20687. }
  20688. return 0;
  20689. }
  20690. IsGateModel(modelid)
  20691. {
  20692. switch(modelid)
  20693. {
  20694. case 8957, 7891, 3037, 19861, 19864, 19912, 971, 975, 980, 985, 19870, 988:
  20695. {
  20696. return 1;
  20697. }
  20698. }
  20699. return 0;
  20700. }
  20701. IsDoorModel(modelid)
  20702. {
  20703. switch(modelid)
  20704. {
  20705. case 19802, 2930, 2911, 1567, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 1500, 1501, 1502, 1504, 1505, 1506, 1507, 1523, 8957, 7891, 3109, 3089, 3061, 3037, 3029, 2970, 2949, 2948,2947, 2946, 2944, 977:
  20706. {
  20707. return 1;
  20708. }
  20709. }
  20710. return 0;
  20711. }
  20712. IsGateObject(objectid)
  20713. {
  20714. new
  20715. modelid = Streamer_GetIntData(STREAMER_TYPE_OBJECT, objectid, E_STREAMER_MODEL_ID);
  20716. if((modelid) && IsGateModel(modelid))
  20717. {
  20718. return 1;
  20719. }
  20720. return 0;
  20721. }
  20722. IsDoorObject(objectid)
  20723. {
  20724. new
  20725. modelid = Streamer_GetIntData(STREAMER_TYPE_OBJECT, objectid, E_STREAMER_MODEL_ID);
  20726. if((modelid) && !IsGateObject(objectid))
  20727. {
  20728. for(new i = 0; i < sizeof(landArray); i ++)
  20729. {
  20730. if(!strcmp(landArray[i][fCategory], "Doors & Gates") && landArray[i][fModel] == modelid)
  20731. {
  20732. return 1;
  20733. }
  20734. }
  20735. }
  20736. return 0;
  20737. }
  20738. RemoveFaction(factionid)
  20739. {
  20740. foreach(new i : Player)
  20741. {
  20742. if(PlayerData[i][pFaction] == factionid)
  20743. {
  20744. SetPlayerFaction(i, -1);
  20745. SendClientMessageEx(i, COLOR_LIGHTRED, "The faction you were apart of has been deleted by an administrator.");
  20746. }
  20747. }
  20748. DestroyDynamic3DTextLabel(FactionInfo[factionid][fText]);
  20749. DestroyDynamicPickup(FactionInfo[factionid][fPickup]);
  20750. FactionInfo[factionid][fName] = 0;
  20751. FactionInfo[factionid][fLeader] = 0;
  20752. FactionInfo[factionid][fType] = FACTION_NONE;
  20753. FactionInfo[factionid][fColor] = 0;
  20754. FactionInfo[factionid][fRankCount] = 0;
  20755. FactionInfo[factionid][fTurfTokens] = 0;
  20756. FactionInfo[factionid][fText] = Text3D:INVALID_3DTEXT_ID;
  20757. FactionInfo[factionid][fPickup] = -1;
  20758. for(new i = 0; i < MAX_FACTION_RANKS; i ++)
  20759. {
  20760. strcpy(FactionRanks[factionid][i], "Unspecified", 32);
  20761. FactionInfo[factionid][fPaycheck][i] = 0;
  20762. }
  20763. for(new i = 0; i < MAX_FACTION_DIVISIONS; i ++)
  20764. {
  20765. FactionDivisions[factionid][i][0] = 0;
  20766. }
  20767. for(new i = 0; i < MAX_LOCKERS; i ++)
  20768. {
  20769. if(LockerInfo[i][lExists] && LockerInfo[i][lFaction] == factionid)
  20770. {
  20771. DestroyDynamic3DTextLabel(LockerInfo[i][lText]);
  20772. DestroyDynamicPickup(LockerInfo[i][lPickup]);
  20773. LockerInfo[i][lExists] = 0;
  20774. }
  20775. }
  20776. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM factions WHERE id = %i", factionid);
  20777. mysql_tquery(connectionID, queryBuffer);
  20778. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM factionranks WHERE id = %i", factionid);
  20779. mysql_tquery(connectionID, queryBuffer);
  20780. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM factionskins WHERE id = %i", factionid);
  20781. mysql_tquery(connectionID, queryBuffer);
  20782. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM factionpay WHERE id = %i", factionid);
  20783. mysql_tquery(connectionID, queryBuffer);
  20784. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM divisions WHERE id = %i", factionid);
  20785. mysql_tquery(connectionID, queryBuffer);
  20786. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM factionlockers WHERE factionid = %i", factionid);
  20787. mysql_tquery(connectionID, queryBuffer);
  20788. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET faction = -1, factionrank = 0, factionleader = 0, division = -1 WHERE faction = %i", factionid);
  20789. mysql_tquery(connectionID, queryBuffer);
  20790. }
  20791. GetFactionSkinCount(factionid)
  20792. {
  20793. new count;
  20794. for(new i = 0; i < MAX_FACTION_SKINS; i ++)
  20795. {
  20796. if(FactionInfo[factionid][fSkins][i] != 0)
  20797. {
  20798. count++;
  20799. }
  20800. }
  20801. return count;
  20802. }
  20803. GetTotalFactionPay(factionid)
  20804. {
  20805. new amount;
  20806. for(new i = 0; i < FactionInfo[factionid][fRankCount]; i ++)
  20807. {
  20808. amount += FactionInfo[factionid][fPaycheck][i];
  20809. }
  20810. return amount;
  20811. }
  20812. GetFactionType(playerid)
  20813. {
  20814. if(PlayerData[playerid][pFaction] >= 0)
  20815. {
  20816. return FactionInfo[PlayerData[playerid][pFaction]][fType];
  20817. }
  20818. return FACTION_NONE;
  20819. }
  20820. SetPlayerFaction(playerid, factionid, rank = 0, leader = 0)
  20821. {
  20822. // This needed its own function because I got fed up of having to put "[pFaction] = -1" everywhere.
  20823. if(factionid == -1)
  20824. {
  20825. if(PlayerData[playerid][pFaction] >= 0)
  20826. {
  20827. SetScriptSkin(playerid, 230);
  20828. ResetPlayerWeaponsEx(playerid);
  20829. }
  20830. PlayerData[playerid][pFaction] = -1;
  20831. PlayerData[playerid][pFactionRank] = 0;
  20832. PlayerData[playerid][pFactionLeader] = 0;
  20833. PlayerData[playerid][pDivision] = -1;
  20834. PlayerData[playerid][pDuty] = 0;
  20835. PlayerData[playerid][pTazer] = 0;
  20836. }
  20837. else if((0 <= factionid < MAX_FACTIONS) && FactionInfo[factionid][fType] != FACTION_NONE)
  20838. {
  20839. if(PlayerData[playerid][pFaction] >= 0 && factionid != PlayerData[playerid][pFaction])
  20840. {
  20841. PlayerData[playerid][pDivision] = -1;
  20842. }
  20843. PlayerData[playerid][pFaction] = factionid;
  20844. PlayerData[playerid][pFactionRank] = rank;
  20845. PlayerData[playerid][pFactionLeader] = leader;
  20846. }
  20847. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET faction = %i, factionrank = %i, division = %i, factionleader = %i WHERE uid = %i", PlayerData[playerid][pFaction], PlayerData[playerid][pFactionRank], PlayerData[playerid][pDivision], PlayerData[playerid][pFactionLeader], PlayerData[playerid][pID]);
  20848. mysql_tquery(connectionID, queryBuffer);
  20849. }
  20850. SetupFaction(factionid, name[], type)
  20851. {
  20852. strcpy(FactionInfo[factionid][fName], name, 48);
  20853. strcpy(FactionInfo[factionid][fShortName], "None", 24);
  20854. strcpy(FactionInfo[factionid][fMOTD], "None", 128);
  20855. strcpy(FactionInfo[factionid][fLeader], "No-one", MAX_PLAYER_NAME);
  20856. FactionInfo[factionid][fType] = type;
  20857. FactionInfo[factionid][fColor] = 0xFFFFFF00;
  20858. FactionInfo[factionid][fRankCount] = 6;
  20859. FactionInfo[factionid][fTurfTokens] = 0;
  20860. FactionInfo[factionid][fText] = Text3D:INVALID_3DTEXT_ID;
  20861. FactionInfo[factionid][fPickup] = -1;
  20862. for(new i = 0; i < MAX_FACTION_RANKS; i ++)
  20863. {
  20864. strcpy(FactionRanks[factionid][i], "Unspecified", 32);
  20865. FactionInfo[factionid][fPaycheck][i] = 0;
  20866. }
  20867. for(new i = 0; i < MAX_FACTION_SKINS; i ++)
  20868. {
  20869. FactionInfo[factionid][fSkins][i] = 0;
  20870. }
  20871. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO factions (id, name, type) VALUES(%i, '%e', %i)", factionid, name, type);
  20872. mysql_tquery(connectionID, queryBuffer);
  20873. }
  20874. IsPlayerInRangeOfLocker(playerid, factionid)
  20875. {
  20876. new lockerid;
  20877. if((lockerid = GetNearbyLocker(playerid)) >= 0 && LockerInfo[lockerid][lFaction] == factionid)
  20878. {
  20879. return 1;
  20880. }
  20881. return 0;
  20882. }
  20883. GetNearbyLocation(playerid, Float:radii)
  20884. {
  20885. for(new i = 0; i < MAX_LOCATIONS; i ++)
  20886. {
  20887. if(LocationInfo[i][locExists] && IsPlayerInRangeOfPoint(playerid, radii, LocationInfo[i][locPosX], LocationInfo[i][locPosY], LocationInfo[i][locPosZ]) && GetPlayerInterior(playerid) == 0 && GetPlayerVirtualWorld(playerid) == 0)
  20888. {
  20889. return i;
  20890. }
  20891. }
  20892. return -1;
  20893. }
  20894. GetNearbyAtm(playerid)
  20895. {
  20896. for (new i = 0; i < MAX_ATMS; i ++)
  20897. {
  20898. if (ATM[i][atmExists] && IsPlayerNearPoint(playerid, 2.0, ATM[i][atmSpawn][0], ATM[i][atmSpawn][1], ATM[i][atmSpawn][2], ATM[i][atmInterior], ATM[i][atmWorld]))
  20899. {
  20900. return i;
  20901. }
  20902. }
  20903. return -1;
  20904. }
  20905. GetNearbyLocker(playerid)
  20906. {
  20907. for(new i = 0; i < MAX_LOCKERS; i ++)
  20908. {
  20909. if(LockerInfo[i][lExists] && IsPlayerInRangeOfPoint(playerid, 3.0, LockerInfo[i][lPosX], LockerInfo[i][lPosY], LockerInfo[i][lPosZ]))
  20910. {
  20911. return i;
  20912. }
  20913. }
  20914. return -1;
  20915. }
  20916. ReloadLockers(factionid)
  20917. {
  20918. for(new i = 0; i < MAX_LOCKERS; i ++)
  20919. {
  20920. if(LockerInfo[i][lExists] && LockerInfo[i][lFaction] == factionid)
  20921. {
  20922. ReloadLocker(i);
  20923. }
  20924. }
  20925. }
  20926. ReloadLocker(lockerid)
  20927. {
  20928. if(LockerInfo[lockerid][lExists])
  20929. {
  20930. DestroyDynamic3DTextLabel(LockerInfo[lockerid][lText]);
  20931. DestroyDynamicPickup(LockerInfo[lockerid][lPickup]);
  20932. if(LockerInfo[lockerid][lLabel])
  20933. {
  20934. new string[128];
  20935. format(string, sizeof(string), "%s\nLocker access\n/locker to access locker.", FactionInfo[LockerInfo[lockerid][lFaction]][fName]);
  20936. LockerInfo[lockerid][lText] = CreateDynamic3DTextLabel(string, COLOR_YELLOW, LockerInfo[lockerid][lPosX], LockerInfo[lockerid][lPosY], LockerInfo[lockerid][lPosZ], 10.0, .worldid = LockerInfo[lockerid][lWorld], .interiorid = LockerInfo[lockerid][lInterior]);
  20937. }
  20938. LockerInfo[lockerid][lPickup] = CreateDynamicPickup(LockerInfo[lockerid][lIcon], 1, LockerInfo[lockerid][lPosX], LockerInfo[lockerid][lPosY], LockerInfo[lockerid][lPosZ], .worldid = LockerInfo[lockerid][lWorld], .interiorid = LockerInfo[lockerid][lInterior]);
  20939. }
  20940. }
  20941. SetupGang(gangid, name[])
  20942. {
  20943. strcpy(GangInfo[gangid][gName], name, 32);
  20944. strcpy(GangInfo[gangid][gMOTD], "None", 128);
  20945. strcpy(GangInfo[gangid][gLeader], "No-one", MAX_PLAYER_NAME);
  20946. GangInfo[gangid][gSetup] = 1;
  20947. GangInfo[gangid][gColor] = 0xFFFFFF00;
  20948. GangInfo[gangid][gStrikes] = 0;
  20949. GangInfo[gangid][gLevel] = 1;
  20950. GangInfo[gangid][gPoints] = 0;
  20951. GangInfo[gangid][gTurfTokens] = 0;
  20952. GangInfo[gangid][gStashX] = 0.0;
  20953. GangInfo[gangid][gStashY] = 0.0;
  20954. GangInfo[gangid][gStashZ] = 0.0;
  20955. GangInfo[gangid][gStashInterior] = 0;
  20956. GangInfo[gangid][gStashWorld] = 0;
  20957. GangInfo[gangid][gCash] = 0;
  20958. GangInfo[gangid][gMaterials] = 0;
  20959. GangInfo[gangid][gWeed] = 0;
  20960. GangInfo[gangid][gCocaine] = 0;
  20961. GangInfo[gangid][gMeth] = 0;
  20962. GangInfo[gangid][gPainkillers] = 0;
  20963. GangInfo[gangid][gArmsDealer] = 0;
  20964. GangInfo[gangid][gDrugDealer] = 0;
  20965. GangInfo[gangid][gArmsX] = 0.0;
  20966. GangInfo[gangid][gArmsY] = 0.0;
  20967. GangInfo[gangid][gArmsZ] = 0.0;
  20968. GangInfo[gangid][gDrugX] = 0.0;
  20969. GangInfo[gangid][gDrugY] = 0.0;
  20970. GangInfo[gangid][gDrugZ] = 0.0;
  20971. GangInfo[gangid][gArmsWorld] = 0;
  20972. GangInfo[gangid][gDrugWorld] = 0;
  20973. GangInfo[gangid][gDrugWeed] = 0;
  20974. GangInfo[gangid][gDrugCocaine] = 0;
  20975. GangInfo[gangid][gDrugMeth] = 0;
  20976. GangInfo[gangid][gArmsMaterials] = 0;
  20977. GangInfo[gangid][gAlliance] = -1;
  20978. GangInfo[gangid][gPickup] = -1;
  20979. GangInfo[gangid][gActors][0] = INVALID_ACTOR_ID;
  20980. GangInfo[gangid][gActors][1] = INVALID_ACTOR_ID;
  20981. GangInfo[gangid][gText][0] = Text3D:INVALID_3DTEXT_ID;
  20982. GangInfo[gangid][gText][1] = Text3D:INVALID_3DTEXT_ID;
  20983. GangInfo[gangid][gText][2] = Text3D:INVALID_3DTEXT_ID;
  20984. GangInfo[gangid][gWeaponRanks][GANGWEAPON_9MM] = 1;
  20985. GangInfo[gangid][gWeaponRanks][GANGWEAPON_SDPISTOL] = 1;
  20986. GangInfo[gangid][gWeaponRanks][GANGWEAPON_DEAGLE] = 2;
  20987. GangInfo[gangid][gWeaponRanks][GANGWEAPON_SHOTGUN] = 1;
  20988. // GangInfo[gangid][gWeaponRanks][GANGWEAPON_SPAS12] = 4;
  20989. // GangInfo[gangid][gWeaponRanks][GANGWEAPON_SAWNOFF] = 4;
  20990. GangInfo[gangid][gWeaponRanks][GANGWEAPON_TEC9] = 1;
  20991. GangInfo[gangid][gWeaponRanks][GANGWEAPON_UZI] = 1;
  20992. GangInfo[gangid][gWeaponRanks][GANGWEAPON_MP5] = 2;
  20993. GangInfo[gangid][gWeaponRanks][GANGWEAPON_AK47] = 3;
  20994. // GangInfo[gangid][gWeaponRanks][GANGWEAPON_M4] = 4;
  20995. GangInfo[gangid][gWeaponRanks][GANGWEAPON_RIFLE] = 2;
  20996. // GangInfo[gangid][gWeaponRanks][GANGWEAPON_SNIPER] = 5;
  20997. // GangInfo[gangid][gWeaponRanks][GANGWEAPON_MOLOTOV] = 5;
  20998. for(new i = 0; i < 7; i ++)
  20999. {
  21000. strcpy(GangRanks[gangid][i], "Unspecified", 32);
  21001. }
  21002. for(new i = 0; i < 12; i ++)
  21003. {
  21004. if(i < 3)
  21005. {
  21006. GangInfo[gangid][gDrugPrices][i] = 0;
  21007. }
  21008. GangInfo[gangid][gArmsPrices][i] = 0;
  21009. }
  21010. for(new i = 0; i < MAX_GANG_SKINS; i ++)
  21011. {
  21012. GangInfo[gangid][gSkins][i] = 0;
  21013. }
  21014. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO gangs (id, name) VALUES(%i, '%e')", gangid, name);
  21015. mysql_tquery(connectionID, queryBuffer);
  21016. }
  21017. GetNearbyPoint(playerid, Float:radius = 3.0)
  21018. {
  21019. for(new i = 0; i < MAX_POINTS; i ++)
  21020. {
  21021. if(PointInfo[i][pExists] && IsPlayerInRangeOfPoint(playerid, radius, PointInfo[i][pPointX], PointInfo[i][pPointY], PointInfo[i][pPointZ]) && GetPlayerInterior(playerid) == PointInfo[i][pPointInterior] && GetPlayerVirtualWorld(playerid) == PointInfo[i][pPointWorld])
  21022. {
  21023. return i;
  21024. }
  21025. }
  21026. return -1;
  21027. }
  21028. AddPointMoney(type, amount)
  21029. {
  21030. for(new i = 0; i < MAX_POINTS; i ++)
  21031. {
  21032. if(PointInfo[i][pExists] && PointInfo[i][pType] == type)
  21033. {
  21034. if(PointInfo[i][pCapturedGang] >= 0)
  21035. {
  21036. amount /= 2;
  21037. GangInfo[PointInfo[i][pCapturedGang]][gCash] += amount;
  21038. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET cash = %i WHERE id = %i", GangInfo[PointInfo[i][pCapturedGang]][gCash], PointInfo[i][pCapturedGang]);
  21039. mysql_tquery(connectionID, queryBuffer);
  21040. }
  21041. PointInfo[i][pProfits] += amount;
  21042. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE points SET profits = %i WHERE id = %i", PointInfo[i][pProfits], i);
  21043. mysql_tquery(connectionID, queryBuffer);
  21044. }
  21045. }
  21046. }
  21047. ReloadPoint(pointid)
  21048. {
  21049. if(PointInfo[pointid][pExists])
  21050. {
  21051. new string[128], name[32] = "None";
  21052. DestroyDynamic3DTextLabel(PointInfo[pointid][pText]);
  21053. DestroyDynamicPickup(PointInfo[pointid][pPickup]);
  21054. if(PointInfo[pointid][pCapturedGang] >= 0)
  21055. {
  21056. strcpy(name, GangInfo[PointInfo[pointid][pCapturedGang]][gName]);
  21057. }
  21058. if(PointInfo[pointid][pTime] > 0)
  21059. format(string, sizeof(string), "%s\nOwned by: %s\nAvailable in %i hours.", PointInfo[pointid][pName], name, PointInfo[pointid][pTime]);
  21060. else
  21061. format(string, sizeof(string), "%s\nOwned by: %s\nAvailable to capture!", PointInfo[pointid][pName], name);
  21062. PointInfo[pointid][pText] = CreateDynamic3DTextLabel(string, COLOR_YELLOW, PointInfo[pointid][pPointX], PointInfo[pointid][pPointY], PointInfo[pointid][pPointZ], 10.0, .worldid = PointInfo[pointid][pPointWorld], .interiorid = PointInfo[pointid][pPointInterior]);
  21063. PointInfo[pointid][pPickup] = CreateDynamicPickup(1239, 1, PointInfo[pointid][pPointX], PointInfo[pointid][pPointY], PointInfo[pointid][pPointZ], .worldid = PointInfo[pointid][pPointWorld], .interiorid = PointInfo[pointid][pPointInterior]);
  21064. }
  21065. }
  21066. AddATMMachine(Float:x, Float:y, Float:z, Float:angle, interior, world)
  21067. {
  21068. new
  21069. id = GetNextATMID();
  21070. if (id != -1)
  21071. {
  21072. ATM[id][atmExists] = 1;
  21073. ATM[id][atmSpawn][0] = x;
  21074. ATM[id][atmSpawn][1] = y;
  21075. ATM[id][atmSpawn][2] = z;
  21076. ATM[id][atmSpawn][3] = angle;
  21077. ATM[id][atmInterior] = interior;
  21078. ATM[id][atmWorld] = world;
  21079. ATM[id][atmObject] = INVALID_OBJECT_ID;
  21080. ATM[id][atmText] = INVALID_3DTEXT_ID;
  21081. UpdateATM(id);
  21082. format(queryBuffer, sizeof(queryBuffer), "INSERT INTO rp_atms (atmInterior) VALUES(%i)", interior);
  21083. mysql_tquery(connectionID, queryBuffer, "OnATMAdded", "i", id);
  21084. }
  21085. return id;
  21086. }
  21087. IsValidATMID(id)
  21088. {
  21089. return (id >= 0 && id < MAX_ATMS) && ATM[id][atmExists];
  21090. }
  21091. GetNextATMID()
  21092. {
  21093. for (new i = 0; i < MAX_ATMS; i ++)
  21094. {
  21095. if (!ATM[i][atmExists])
  21096. {
  21097. return i;
  21098. }
  21099. }
  21100. return -1;
  21101. }
  21102. SaveATM(id)
  21103. {
  21104. static
  21105. queryString[192];
  21106. if (!ATM[id][atmExists]) return 0;
  21107. format(queryString, sizeof(queryString), "UPDATE rp_atms SET atmX = %.4f, atmY = %.4f, atmZ = %.4f, atmA = %.4f, atmInterior = %i, atmWorld = %i WHERE atmID = %i",
  21108. ATM[id][atmSpawn][0],
  21109. ATM[id][atmSpawn][1],
  21110. ATM[id][atmSpawn][2],
  21111. ATM[id][atmSpawn][3],
  21112. ATM[id][atmInterior],
  21113. ATM[id][atmWorld],
  21114. ATM[id][atmID]
  21115. );
  21116. return mysql_tquery(connectionID, queryString);
  21117. }
  21118. UpdateATM(id)
  21119. {
  21120. if (!ATM[id][atmExists])
  21121. {
  21122. return 0;
  21123. }
  21124. DestroyDynamic3DTextLabel(ATM[id][atmText]);
  21125. DestroyDynamicObject(ATM[id][atmObject]);
  21126. ATM[id][atmObject] = CreateDynamicObject(19324, ATM[id][atmSpawn][0], ATM[id][atmSpawn][1], ATM[id][atmSpawn][2], 0.0, 0.0, ATM[id][atmSpawn][3], ATM[id][atmWorld], ATM[id][atmInterior]);
  21127. ATM[id][atmText] = CreateDynamic3DTextLabel("ATM machine\n/atm to operate.", COLOR_YELLOW, ATM[id][atmSpawn][0], ATM[id][atmSpawn][1], ATM[id][atmSpawn][2] + 0.9, 5.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, ATM[id][atmWorld], ATM[id][atmInterior]);
  21128. return 1;
  21129. }
  21130. ReloadGang(gangid)
  21131. {
  21132. if(GangInfo[gangid][gSetup])
  21133. {
  21134. new string[128], color;
  21135. DestroyDynamic3DTextLabel(GangInfo[gangid][gText][0]);
  21136. DestroyDynamic3DTextLabel(GangInfo[gangid][gText][1]);
  21137. DestroyDynamic3DTextLabel(GangInfo[gangid][gText][2]);
  21138. DestroyDynamicPickup(GangInfo[gangid][gPickup]);
  21139. DestroyActor(GangInfo[gangid][gActors][0]);
  21140. DestroyActor(GangInfo[gangid][gActors][1]);
  21141. if(GangInfo[gangid][gColor] == -1 || GangInfo[gangid][gColor] == -256)
  21142. {
  21143. color = 0xC8C8C8FF;
  21144. }
  21145. else
  21146. {
  21147. color = GangInfo[gangid][gColor];
  21148. }
  21149. if(GangInfo[gangid][gStashX] != 0.0 && GangInfo[gangid][gStashY] != 0.0 && GangInfo[gangid][gStashZ] != 0.0)
  21150. {
  21151. format(string, sizeof(string), "{%06x}%s Locker{C8C8C8}\nLevel %i ", color >>> 8, GangInfo[gangid][gName], GangInfo[gangid][gLevel]);
  21152. GangInfo[gangid][gText][0] = CreateDynamic3DTextLabel(string, COLOR_ORANGE, GangInfo[gangid][gStashX], GangInfo[gangid][gStashY], GangInfo[gangid][gStashZ], 10.0, .worldid = GangInfo[gangid][gStashWorld], .interiorid = GangInfo[gangid][gStashInterior]);
  21153. GangInfo[gangid][gPickup] = CreateDynamicPickup(1239, 1, GangInfo[gangid][gStashX], GangInfo[gangid][gStashY], GangInfo[gangid][gStashZ], .worldid = GangInfo[gangid][gStashWorld], .interiorid = GangInfo[gangid][gStashInterior]);
  21154. }
  21155. }
  21156. }
  21157. GiveGangPoints(gangid, amount)
  21158. {
  21159. if(GangInfo[gangid][gSetup])
  21160. {
  21161. GangInfo[gangid][gPoints] = GangInfo[gangid][gPoints] + amount;
  21162. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET points = %i WHERE id = %i", GangInfo[gangid][gPoints], gangid);
  21163. mysql_tquery(connectionID, queryBuffer);
  21164. }
  21165. }
  21166. RemoveGang(gangid)
  21167. {
  21168. if(GangInfo[gangid][gAlliance] >= 0)
  21169. {
  21170. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET alliance = -1 WHERE id = %i", gangid);
  21171. mysql_tquery(connectionID, queryBuffer);
  21172. GangInfo[GangInfo[gangid][gAlliance]][gAlliance] = -1;
  21173. }
  21174. foreach(new i : Player)
  21175. {
  21176. if(PlayerData[i][pGang] == gangid)
  21177. {
  21178. SendClientMessageEx(i, COLOR_LIGHTRED, "The gang you were apart of has been deleted by an administrator.");
  21179. PlayerData[i][pGang] = -1;
  21180. PlayerData[i][pGangRank] = 0;
  21181. }
  21182. }
  21183. for(new i = 0; i < MAX_GANG_CREWS; i ++)
  21184. {
  21185. GangCrews[gangid][i][0] = 0;
  21186. }
  21187. DestroyDynamic3DTextLabel(GangInfo[gangid][gText][0]);
  21188. DestroyDynamic3DTextLabel(GangInfo[gangid][gText][1]);
  21189. DestroyDynamic3DTextLabel(GangInfo[gangid][gText][2]);
  21190. DestroyDynamicPickup(GangInfo[gangid][gPickup]);
  21191. DestroyActor(GangInfo[gangid][gActors][0]);
  21192. DestroyActor(GangInfo[gangid][gActors][1]);
  21193. GangInfo[gangid][gSetup] = 0;
  21194. GangInfo[gangid][gName] = 0;
  21195. GangInfo[gangid][gMOTD] = 0;
  21196. GangInfo[gangid][gLeader] = 0;
  21197. GangInfo[gangid][gColor] = 0;
  21198. GangInfo[gangid][gStrikes] = 0;
  21199. GangInfo[gangid][gLevel] = 0;
  21200. GangInfo[gangid][gPoints] = 0;
  21201. GangInfo[gangid][gTurfTokens] = 0;
  21202. GangInfo[gangid][gStashX] = 0.0;
  21203. GangInfo[gangid][gStashY] = 0.0;
  21204. GangInfo[gangid][gStashZ] = 0.0;
  21205. GangInfo[gangid][gStashInterior] = 0;
  21206. GangInfo[gangid][gStashWorld] = 0;
  21207. GangInfo[gangid][gCash] = 0;
  21208. GangInfo[gangid][gMaterials] = 0;
  21209. GangInfo[gangid][gWeed] = 0;
  21210. GangInfo[gangid][gCocaine] = 0;
  21211. GangInfo[gangid][gMeth] = 0;
  21212. GangInfo[gangid][gPainkillers] = 0;
  21213. GangInfo[gangid][gArmsDealer] = 0;
  21214. GangInfo[gangid][gDrugDealer] = 0;
  21215. GangInfo[gangid][gArmsX] = 0.0;
  21216. GangInfo[gangid][gArmsY] = 0.0;
  21217. GangInfo[gangid][gArmsZ] = 0.0;
  21218. GangInfo[gangid][gDrugX] = 0.0;
  21219. GangInfo[gangid][gDrugY] = 0.0;
  21220. GangInfo[gangid][gDrugZ] = 0.0;
  21221. GangInfo[gangid][gArmsWorld] = 0;
  21222. GangInfo[gangid][gDrugWorld] = 0;
  21223. GangInfo[gangid][gDrugWeed] = 0;
  21224. GangInfo[gangid][gDrugCocaine] = 0;
  21225. GangInfo[gangid][gDrugMeth] = 0;
  21226. GangInfo[gangid][gArmsMaterials] = 0;
  21227. GangInfo[gangid][gPickup] = -1;
  21228. GangInfo[gangid][gActors][0] = INVALID_ACTOR_ID;
  21229. GangInfo[gangid][gActors][1] = INVALID_ACTOR_ID;
  21230. GangInfo[gangid][gText][0] = Text3D:INVALID_3DTEXT_ID;
  21231. GangInfo[gangid][gText][1] = Text3D:INVALID_3DTEXT_ID;
  21232. GangInfo[gangid][gText][2] = Text3D:INVALID_3DTEXT_ID;
  21233. GangInfo[gangid][gAlliance] = -1;
  21234. for(new i = 0; i < 7; i ++)
  21235. {
  21236. strcpy(GangRanks[gangid][i], "Unspecified", 32);
  21237. }
  21238. for(new i = 0; i < 14; i ++)
  21239. {
  21240. GangInfo[gangid][gWeapons][i] = 0;
  21241. }
  21242. for(new i = 0; i < MAX_GANG_SKINS; i ++)
  21243. {
  21244. GangInfo[gangid][gSkins][i] = 0;
  21245. }
  21246. for(new i = 0; i < MAX_POINTS; i ++)
  21247. {
  21248. if(PointInfo[i][pExists] && PointInfo[i][pCapturedGang] == gangid)
  21249. {
  21250. PointInfo[i][pCapturedGang] = -1;
  21251. }
  21252. }
  21253. foreach(new i : Turf)
  21254. {
  21255. if(TurfInfo[i][tExists] && TurfInfo[i][tCapturedGang] == gangid)
  21256. {
  21257. TurfInfo[i][tCapturedGang] = -1;
  21258. }
  21259. }
  21260. /* foreach(new i : Vehicle)
  21261. {
  21262. if(VehicleInfo[i][vID] > 0 && VehicleInfo[i][vGang] == gangid)
  21263. {
  21264. new testquery[2500];
  21265. mysql_format(connectionID, testquery, sizeof(testquery), "DELETE FROM vehicles WHERE id = %i", VehicleInfo[i][vID]);
  21266. mysql_tquery(connectionID, testquery);
  21267. DespawnVehicle(i, false);
  21268. }
  21269. }
  21270. */
  21271. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM gangs WHERE id = %i", gangid);
  21272. mysql_tquery(connectionID, queryBuffer);
  21273. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM gangranks WHERE id = %i", gangid);
  21274. mysql_tquery(connectionID, queryBuffer);
  21275. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM gangskins WHERE id = %i", gangid);
  21276. mysql_tquery(connectionID, queryBuffer);
  21277. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM crews WHERE id = %i", gangid);
  21278. mysql_tquery(connectionID, queryBuffer);
  21279. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE points SET capturedgang = -1 WHERE capturedgang = %i", gangid);
  21280. mysql_tquery(connectionID, queryBuffer);
  21281. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE turfs SET capturedgang = -1 WHERE capturedgang = %i", gangid);
  21282. mysql_tquery(connectionID, queryBuffer);
  21283. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET gang = -1, gangrank = 0 WHERE gang = %i", gangid);
  21284. mysql_tquery(connectionID, queryBuffer);
  21285. }
  21286. GetGangVehicles(gangid)
  21287. {
  21288. new count;
  21289. foreach(new i: Vehicle)
  21290. {
  21291. if(VehicleInfo[i][vID] > 0 && VehicleInfo[i][vGang] == gangid)
  21292. {
  21293. count++;
  21294. }
  21295. }
  21296. return count;
  21297. }
  21298. GetGangVehicleLimit(gangid)
  21299. {
  21300. switch(GangInfo[gangid][gLevel])
  21301. {
  21302. case 1: return 6;
  21303. case 2: return 8;
  21304. case 3: return 12;
  21305. }
  21306. return 0;
  21307. }
  21308. GetGangMemberLimit(gangid)
  21309. {
  21310. switch(GangInfo[gangid][gLevel])
  21311. {
  21312. case 1: return 30;
  21313. case 2: return 60;
  21314. case 3: return 80;
  21315. }
  21316. return 0;
  21317. }
  21318. GetGangSkinCount(gangid)
  21319. {
  21320. new count;
  21321. for(new i = 0; i < MAX_GANG_SKINS; i ++)
  21322. {
  21323. if(GangInfo[gangid][gSkins][i] != 0)
  21324. {
  21325. count++;
  21326. }
  21327. }
  21328. return count;
  21329. }
  21330. GetSpawnedVehicles(playerid)
  21331. {
  21332. new count;
  21333. foreach(new i: Vehicle)
  21334. {
  21335. if(IsVehicleOwner(playerid, i))
  21336. {
  21337. count++;
  21338. }
  21339. }
  21340. return count;
  21341. }
  21342. GetVehicleGarage(vehicleid)
  21343. {
  21344. foreach(new i : Garage)
  21345. {
  21346. if(GarageInfo[i][gExists] && GarageInfo[i][gWorld] == GetVehicleVirtualWorld(vehicleid))
  21347. {
  21348. return i;
  21349. }
  21350. }
  21351. return -1;
  21352. }
  21353. ResetVehicleObjects(vehicleid)
  21354. {
  21355. if(IsValidDynamicObject(vehicleSiren[vehicleid]))
  21356. {
  21357. DestroyDynamicObject(vehicleSiren[vehicleid]);
  21358. vehicleSiren[vehicleid] = INVALID_OBJECT_ID;
  21359. }
  21360. if(IsValidDynamic3DTextLabel(DonatorCallSign[vehicleid]))
  21361. {
  21362. DestroyDynamic3DTextLabel(DonatorCallSign[vehicleid]);
  21363. DonatorCallSign[vehicleid] = Text3D:INVALID_3DTEXT_ID;
  21364. }
  21365. if(IsValidDynamic3DTextLabel(vehicleCallsign[vehicleid]))
  21366. {
  21367. DestroyDynamic3DTextLabel(vehicleCallsign[vehicleid]);
  21368. vehicleCallsign[vehicleid] = Text3D:INVALID_3DTEXT_ID;
  21369. }
  21370. if(VehicleInfo[vehicleid][vNeonEnabled])
  21371. {
  21372. if(IsValidDynamicObject(VehicleInfo[vehicleid][vObjects][0]))
  21373. {
  21374. DestroyDynamicObject(VehicleInfo[vehicleid][vObjects][0]);
  21375. VehicleInfo[vehicleid][vObjects][0] = INVALID_OBJECT_ID;
  21376. }
  21377. if(IsValidDynamicObject(VehicleInfo[vehicleid][vObjects][1]))
  21378. {
  21379. DestroyDynamicObject(VehicleInfo[vehicleid][vObjects][1]);
  21380. VehicleInfo[vehicleid][vObjects][1] = INVALID_OBJECT_ID;
  21381. }
  21382. }
  21383. adminVehicle{vehicleid} = false;
  21384. }
  21385. DestroyVehicleEx(vehicleid)
  21386. {
  21387. if(IsValidVehicle(vehicleid))
  21388. {
  21389. ResetVehicleObjects(vehicleid);
  21390. }
  21391. return DestroyVehicle(vehicleid);
  21392. }
  21393. GetNearbyVehicle(playerid)
  21394. {
  21395. new Float:x, Float:y, Float:z;
  21396. foreach(new i: Vehicle)
  21397. {
  21398. if(IsVehicleStreamedIn(i, playerid))
  21399. {
  21400. GetVehiclePos(i, x, y, z);
  21401. if(IsPlayerInRangeOfPoint(playerid, 3.5, x, y, z))
  21402. {
  21403. return i;
  21404. }
  21405. }
  21406. }
  21407. return INVALID_VEHICLE_ID;
  21408. }
  21409. GetVehicleRelativePos(vehicleid, &Float:x, &Float:y, &Float:z, Float:xoff= 0.0, Float:yoff= 0.0, Float:zoff= 0.0)
  21410. {
  21411. new Float:rot;
  21412. GetVehicleZAngle(vehicleid, rot);
  21413. rot = 360 - rot;
  21414. GetVehiclePos(vehicleid, x, y, z);
  21415. x = floatsin(rot, degrees) * yoff + floatcos(rot, degrees) * xoff + x;
  21416. y = floatcos(rot, degrees) * yoff - floatsin(rot, degrees) * xoff + y;
  21417. z = zoff + z;
  21418. }
  21419. IsPlayerAtVehicleDoor(playerid, vehicleid, type)
  21420. {
  21421. new
  21422. Float:vx,
  21423. Float:vy,
  21424. Float:vz,
  21425. Float:va,
  21426. Float:x,
  21427. Float:y,
  21428. Float:z,
  21429. Float:a;
  21430. GetVehicleModelInfo(GetVehicleModel(vehicleid), VEHICLE_MODEL_INFO_FRONTSEAT, x, y, z);
  21431. if(type == DOOR_DRIVER) {
  21432. GetVehicleRelativePos(vehicleid, vx, vy, vz, -x * 2, y, z);
  21433. } else {
  21434. GetVehicleRelativePos(vehicleid, vx, vy, vz, x * 2, y, z);
  21435. }
  21436. GetPlayerFacingAngle(playerid, a);
  21437. GetVehicleZAngle(vehicleid, va);
  21438. if(IsPlayerInRangeOfPoint(playerid, 1.0, vx, vy, vz))
  21439. {
  21440. return 1;
  21441. }
  21442. return 0;
  21443. }
  21444. GetVehicleBoot(vehicleid, &Float:x, &Float:y, &Float:z)
  21445. {
  21446. if(IsValidVehicle(vehicleid))
  21447. {
  21448. new
  21449. Float:pos[7];
  21450. GetVehicleModelInfo(GetVehicleModel(vehicleid), VEHICLE_MODEL_INFO_SIZE, pos[0], pos[1], pos[2]);
  21451. GetVehiclePos(vehicleid, pos[3], pos[4], pos[5]);
  21452. GetVehicleZAngle(vehicleid, pos[6]);
  21453. x = pos[3] - (floatsqroot(pos[1] + pos[1]) * floatsin(-pos[6], degrees));
  21454. y = pos[4] - (floatsqroot(pos[1] + pos[1]) * floatcos(-pos[6], degrees));
  21455. z = pos[5];
  21456. return 1;
  21457. }
  21458. x = 0.0;
  21459. y = 0.0;
  21460. z = 0.0;
  21461. return 0;
  21462. }
  21463. IsPlayerInRangeOfBoot(playerid, vehicleid)
  21464. {
  21465. new
  21466. Float:x,
  21467. Float:y,
  21468. Float:z;
  21469. GetVehicleBoot(vehicleid, x, y, z);
  21470. return (GetPlayerVirtualWorld(playerid) == GetVehicleVirtualWorld(vehicleid)) && IsPlayerInRangeOfPoint(playerid, 3.0, x, y, z);
  21471. }
  21472. IsVehicleBeingPicked(vehicleid)
  21473. {
  21474. foreach(new i : Player)
  21475. {
  21476. if(PlayerData[i][pLockBreak] == vehicleid)
  21477. {
  21478. return 1;
  21479. }
  21480. }
  21481. return 0;
  21482. }
  21483. IsVehicleOwner(playerid, vehicleid)
  21484. {
  21485. return (VehicleInfo[vehicleid][vOwnerID] == PlayerData[playerid][pID]);
  21486. }
  21487. SetVehicleNeon(vehicleid, modelid)
  21488. {
  21489. if(18647 <= modelid <= 18652)
  21490. {
  21491. if(VehicleInfo[vehicleid][vNeonEnabled])
  21492. {
  21493. DestroyDynamicObject(VehicleInfo[vehicleid][vObjects][0]);
  21494. DestroyDynamicObject(VehicleInfo[vehicleid][vObjects][1]);
  21495. }
  21496. VehicleInfo[vehicleid][vNeon] = modelid;
  21497. VehicleInfo[vehicleid][vNeonEnabled] = (modelid > 0);
  21498. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET neon = %i, neonenabled = 1 WHERE id = %i", VehicleInfo[vehicleid][vNeon], VehicleInfo[vehicleid][vID]);
  21499. mysql_tquery(connectionID, queryBuffer);
  21500. ReloadVehicleNeon(vehicleid);
  21501. }
  21502. }
  21503. ReloadVehicleNeon(vehicleid)
  21504. {
  21505. if(VehicleInfo[vehicleid][vID] > 0)
  21506. {
  21507. DestroyDynamicObject(VehicleInfo[vehicleid][vObjects][0]);
  21508. DestroyDynamicObject(VehicleInfo[vehicleid][vObjects][1]);
  21509. if(VehicleInfo[vehicleid][vNeon] && VehicleInfo[vehicleid][vNeonEnabled])
  21510. {
  21511. new
  21512. Float:x,
  21513. Float:y,
  21514. Float:z;
  21515. GetVehicleModelInfo(VehicleInfo[vehicleid][vModel], VEHICLE_MODEL_INFO_SIZE, x, y, z);
  21516. VehicleInfo[vehicleid][vObjects][0] = CreateDynamicObject(VehicleInfo[vehicleid][vNeon], 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  21517. VehicleInfo[vehicleid][vObjects][1] = CreateDynamicObject(VehicleInfo[vehicleid][vNeon], 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  21518. AttachDynamicObjectToVehicle(VehicleInfo[vehicleid][vObjects][0], vehicleid, -x / 2.8, 0.0, -0.6, 0.0, 0.0, 0.0);
  21519. AttachDynamicObjectToVehicle(VehicleInfo[vehicleid][vObjects][1], vehicleid, x / 2.8, 0.0, -0.6, 0.0, 0.0, 0.0);
  21520. }
  21521. }
  21522. }
  21523. ResyncVehicle(vehicleid)
  21524. {
  21525. new
  21526. worldid = GetVehicleVirtualWorld(vehicleid);
  21527. SetVehicleVirtualWorld(vehicleid, cellmax);
  21528. SetVehicleVirtualWorld(vehicleid, worldid);
  21529. }
  21530. SaveVehicleModifications(vehicleid)
  21531. {
  21532. for(new i = 0; i < 14; i ++)
  21533. {
  21534. VehicleInfo[vehicleid][vMods][i] = GetVehicleComponentInSlot(vehicleid, i);
  21535. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET mod_%i = %i WHERE id = %i", i + 1, VehicleInfo[vehicleid][vMods][i], VehicleInfo[vehicleid][vID]);
  21536. mysql_tquery(connectionID, queryBuffer);
  21537. }
  21538. }
  21539. ReloadVehicle(vehicleid)
  21540. {
  21541. if(VehicleInfo[vehicleid][vPaintjob] >= 0)
  21542. {
  21543. ChangeVehiclePaintjob(vehicleid, VehicleInfo[vehicleid][vPaintjob]);
  21544. }
  21545. if(VehicleInfo[vehicleid][vNeon] && VehicleInfo[vehicleid][vNeonEnabled])
  21546. {
  21547. ReloadVehicleNeon(vehicleid);
  21548. }
  21549. for(new i = 0; i < 14; i ++)
  21550. {
  21551. if(VehicleInfo[vehicleid][vMods][i] >= 1000)
  21552. {
  21553. AddVehicleComponent(vehicleid, VehicleInfo[vehicleid][vMods][i]);
  21554. }
  21555. }
  21556. SetVehicleNumberPlate(vehicleid, VehicleInfo[vehicleid][vPlate]);
  21557. ResyncVehicle(VehicleInfo[vehicleid][vID]);
  21558. LinkVehicleToInterior(vehicleid, VehicleInfo[vehicleid][vInterior]);
  21559. SetVehicleVirtualWorld(vehicleid, VehicleInfo[vehicleid][vWorld]);
  21560. SetVehicleHealth(vehicleid, VehicleInfo[vehicleid][vHealth]);
  21561. SetVehicleParams(vehicleid, VEHICLE_DOORS, VehicleInfo[vehicleid][vLocked]);
  21562. }
  21563. DespawnVehicle(vehicleid, bool:save = true)
  21564. {
  21565. if(VehicleInfo[vehicleid][vID] > 0)
  21566. {
  21567. if(VehicleInfo[vehicleid][vNeonEnabled])
  21568. {
  21569. DestroyDynamicObject(VehicleInfo[vehicleid][vObjects][0]);
  21570. DestroyDynamicObject(VehicleInfo[vehicleid][vObjects][1]);
  21571. }
  21572. if(save) {
  21573. new
  21574. Float:health;
  21575. GetVehicleHealth(vehicleid, health);
  21576. SaveVehicleModifications(vehicleid);
  21577. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET fuel = %i, mileage = '%f', health = '%f' WHERE id = %i", vehicleFuel[vehicleid], VehicleInfo[vehicleid][vMileage], health, VehicleInfo[vehicleid][vID]);
  21578. mysql_tquery(connectionID, queryBuffer);
  21579. }
  21580. DestroyVehicleEx(vehicleid);
  21581. ResetVehicle(vehicleid);
  21582. }
  21583. }
  21584. ResetVehicle(vehicleid)
  21585. {
  21586. strcpy(VehicleInfo[vehicleid][vOwner], "Nobody", MAX_PLAYER_NAME);
  21587. if(VehicleInfo[vehicleid][vTimer] >= 0)
  21588. {
  21589. KillTimer(VehicleInfo[vehicleid][vTimer]);
  21590. }
  21591. strcpy(VehicleInfo[vehicleid][vPlate], "XYZSR998");
  21592. VehicleInfo[vehicleid][vID] = 0;
  21593. VehicleInfo[vehicleid][vOwnerID] = 0;
  21594. VehicleInfo[vehicleid][vModel] = 0;
  21595. VehicleInfo[vehicleid][vPrice] = 0;
  21596. VehicleInfo[vehicleid][vTickets] = 0;
  21597. VehicleInfo[vehicleid][vLocked] = 0;
  21598. VehicleInfo[vehicleid][vCorp] = -1;
  21599. VehicleInfo[vehicleid][vHealth] = 1000.0;
  21600. VehicleInfo[vehicleid][vPosX] = 0.0;
  21601. VehicleInfo[vehicleid][vPosY] = 0.0;
  21602. VehicleInfo[vehicleid][vPosZ] = 0.0;
  21603. VehicleInfo[vehicleid][vPosA] = 0.0;
  21604. VehicleInfo[vehicleid][vColor1] = 0;
  21605. VehicleInfo[vehicleid][vColor2] = 0;
  21606. VehicleInfo[vehicleid][vPaintjob] = -1;
  21607. VehicleInfo[vehicleid][vInterior] = 0;
  21608. VehicleInfo[vehicleid][vWorld] = 0;
  21609. VehicleInfo[vehicleid][vCash] = 0;
  21610. VehicleInfo[vehicleid][vMaterials] = 0;
  21611. VehicleInfo[vehicleid][vWeed] = 0;
  21612. VehicleInfo[vehicleid][vCocaine] = 0;
  21613. VehicleInfo[vehicleid][vMeth] = 0;
  21614. VehicleInfo[vehicleid][vPainkillers] = 0;
  21615. VehicleInfo[vehicleid][vWeapons][0] = 0;
  21616. VehicleInfo[vehicleid][vWeapons][1] = 0;
  21617. VehicleInfo[vehicleid][vWeapons][2] = 0;
  21618. VehicleInfo[vehicleid][vWeapons][3] = 0;
  21619. VehicleInfo[vehicleid][vWeapons][4] = 0;
  21620. VehicleInfo[vehicleid][vGang] = -1;
  21621. VehicleInfo[vehicleid][vFactionType] = FACTION_NONE;
  21622. VehicleInfo[vehicleid][vVIP] = 0;
  21623. VehicleInfo[vehicleid][vJob] = JOB_NONE;
  21624. VehicleInfo[vehicleid][vObjects][0] = INVALID_OBJECT_ID;
  21625. VehicleInfo[vehicleid][vObjects][1] = INVALID_OBJECT_ID;
  21626. VehicleInfo[vehicleid][vTimer] = -1;
  21627. VehicleInfo[vehicleid][vRank] = 0;
  21628. VehicleInfo[vehicleid][vMileage] = 0.0;
  21629. VehicleInfo[vehicleid][vForSale] = false;
  21630. VehicleInfo[vehicleid][vForSalePrice] = 0;
  21631. if(VehicleInfo[vehicleid][vForSaleLabel] != Text3D:INVALID_3DTEXT_ID) DestroyDynamic3DTextLabel(VehicleInfo[vehicleid][vForSaleLabel]);
  21632. VehicleInfo[vehicleid][vForSaleLabel] = Text3D:INVALID_3DTEXT_ID;
  21633. for(new i = 0; i < 14; i ++)
  21634. {
  21635. VehicleInfo[vehicleid][vMods][i] = 0;
  21636. }
  21637. ResetVehicleObjects(vehicleid);
  21638. }
  21639. IsPointInLand(landid, Float:x, Float:y)
  21640. {
  21641. if((LandInfo[landid][lMinX] <= x <= LandInfo[landid][lMaxX]) && (LandInfo[landid][lMinY] <= y <= LandInfo[landid][lMaxY]))
  21642. {
  21643. return 1;
  21644. }
  21645. return 0;
  21646. }
  21647. GangZoneCreateEx(Float:minx, Float:miny, Float:maxx, Float:maxy)
  21648. {
  21649. return GangZoneCreate((minx > maxx) ? (maxx) : (minx), (miny > maxy) ? (maxy) : (miny), (minx > maxx) ? (minx) : (maxx), (miny > maxy) ? (miny) : (maxy));
  21650. }
  21651. HasLandPerms(playerid, landid)
  21652. {
  21653. return IsLandOwner(playerid, landid) || PlayerData[playerid][pLandPerms] == landid;
  21654. }
  21655. IsLandOwner(playerid, landid)
  21656. {
  21657. return (LandInfo[landid][lOwnerID] == PlayerData[playerid][pID]);
  21658. }
  21659. SetLandOwner(landid, playerid)
  21660. {
  21661. if(playerid == INVALID_PLAYER_ID)
  21662. {
  21663. strcpy(LandInfo[landid][lOwner], "Nobody", MAX_PLAYER_NAME);
  21664. LandInfo[landid][lOwnerID] = 0;
  21665. }
  21666. else
  21667. {
  21668. GetPlayerName(playerid, LandInfo[landid][lOwner], MAX_PLAYER_NAME);
  21669. LandInfo[landid][lOwnerID] = PlayerData[playerid][pID];
  21670. }
  21671. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE lands SET ownerid = %i, owner = '%s' WHERE id = %i", LandInfo[landid][lOwnerID], LandInfo[landid][lOwner], LandInfo[landid][lID]);
  21672. mysql_tquery(connectionID, queryBuffer);
  21673. ReloadLand(landid);
  21674. }
  21675. GetLandObjectID(sql_id)
  21676. {
  21677. for(new i = 0, j = Streamer_GetUpperBound(STREAMER_TYPE_OBJECT); i <= j; i ++)
  21678. {
  21679. if(IsValidDynamicObject(i) && Streamer_GetExtraInt(i, E_OBJECT_TYPE) == E_OBJECT_LAND && Streamer_GetExtraInt(i, E_OBJECT_INDEX_ID) == sql_id)
  21680. {
  21681. return i;
  21682. }
  21683. }
  21684. return INVALID_OBJECT_ID;
  21685. }
  21686. GetLandObjectCapacity(level)
  21687. {
  21688. switch(level)
  21689. {
  21690. case 1: return 150;
  21691. case 2: return 200;
  21692. case 3: return 300;
  21693. case 4: return 500;
  21694. case 5: return 1000;
  21695. }
  21696. return 0;
  21697. }
  21698. RemoveLandObject(objectid)
  21699. {
  21700. if(IsValidDynamicObject(objectid) && Streamer_GetExtraInt(objectid, E_OBJECT_TYPE) == E_OBJECT_LAND)
  21701. {
  21702. new
  21703. id = Streamer_GetExtraInt(objectid, E_OBJECT_INDEX_ID);
  21704. DeleteLandObject(objectid);
  21705. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM landobjects WHERE id = %i", id);
  21706. mysql_tquery(connectionID, queryBuffer);
  21707. }
  21708. }
  21709. DeleteLandObject(objectid)
  21710. {
  21711. if(IsValidDynamicObject(objectid) && Streamer_GetExtraInt(objectid, E_OBJECT_TYPE) == E_OBJECT_LAND)
  21712. {
  21713. new Text3D:textid = Text3D:Streamer_GetExtraInt(objectid, E_OBJECT_3DTEXT_ID);
  21714. if(IsValidDynamic3DTextLabel(textid))
  21715. {
  21716. DestroyDynamic3DTextLabel(textid);
  21717. }
  21718. DestroyDynamicObject(objectid);
  21719. }
  21720. }
  21721. RemoveAllLandObjects(landid)
  21722. {
  21723. if(LandInfo[landid][lExists])
  21724. {
  21725. for(new i = 0, j = Streamer_GetUpperBound(STREAMER_TYPE_OBJECT); i <= j; i ++)
  21726. {
  21727. if(IsValidDynamicObject(i) && Streamer_GetExtraInt(i, E_OBJECT_TYPE) == E_OBJECT_LAND && Streamer_GetExtraInt(i, E_OBJECT_EXTRA_ID) == LandInfo[landid][lID])
  21728. {
  21729. DeleteLandObject(i);
  21730. }
  21731. }
  21732. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM landobjects WHERE landid = %i", LandInfo[landid][lID]);
  21733. mysql_tquery(connectionID, queryBuffer);
  21734. }
  21735. }
  21736. stock Graffiti_Refresh(id)
  21737. {
  21738. if (id != -1 && GraffitiData[id][graffitiExists])
  21739. {
  21740. if(GraffitiData[id][graffitiDefault] != 0)
  21741. {
  21742. if (IsValidDynamicObject(GraffitiData[id][graffitiObject]))
  21743. DestroyDynamicObject(GraffitiData[id][graffitiObject]);
  21744. GraffitiData[id][graffitiObject] = CreateDynamicObject(GraffitiData[id][graffitiDefault], GraffitiData[id][graffitiPos][0], GraffitiData[id][graffitiPos][1], GraffitiData[id][graffitiPos][2], 0.0, 0.0, GraffitiData[id][graffitiPos][3]);
  21745. }
  21746. else
  21747. {
  21748. if (IsValidDynamicMapIcon(GraffitiData[id][graffitiIcon]))
  21749. DestroyDynamicMapIcon(GraffitiData[id][graffitiIcon]);
  21750. if (IsValidDynamicObject(GraffitiData[id][graffitiObject]))
  21751. DestroyDynamicObject(GraffitiData[id][graffitiObject]);
  21752. //GraffitiData[id][graffitiIcon] = CreateDynamicMapIcon(GraffitiData[id][graffitiPos][0], GraffitiData[id][graffitiPos][1], GraffitiData[id][graffitiPos][2], 23, 0, -1, -1, -1, 100.0, MAPICON_GLOBAL);
  21753. GraffitiData[id][graffitiObject] = CreateDynamicObject(19482, GraffitiData[id][graffitiPos][0], GraffitiData[id][graffitiPos][1], GraffitiData[id][graffitiPos][2], 0.0, 0.0, GraffitiData[id][graffitiPos][3]);
  21754. new font[50];
  21755. strcpy(font, GraffitiData[id][graffitiFont]);
  21756. SetDynamicObjectMaterial(GraffitiData[id][graffitiObject], 0, 0, "none", "none", 0);
  21757. SetDynamicObjectMaterialText(GraffitiData[id][graffitiObject], 0, GraffitiData[id][graffitiText], OBJECT_MATERIAL_SIZE_256x128, font, 24, 1, GraffitiData[id][graffitiColor], 0, 0);
  21758. }
  21759. }
  21760. return 1;
  21761. }
  21762. stock IsSprayingInProgress(id)
  21763. {
  21764. foreach (new i : Player)
  21765. {
  21766. if (PlayerData[i][pGraffiti] == id && IsPlayerInRangeOfPoint(i, 5.0, GraffitiData[id][graffitiPos][0], GraffitiData[id][graffitiPos][1], GraffitiData[id][graffitiPos][2]))
  21767. return 1;
  21768. }
  21769. return 0;
  21770. }
  21771. stock Graffiti_Nearest(playerid)
  21772. {
  21773. for(new i = 0; i < sizeof(g_aGraffitiData); i++)
  21774. {
  21775. if(IsPlayerInRangeOfPoint(playerid, 4.0, g_aGraffitiData[i][graffitiPosX], g_aGraffitiData[i][graffitiPosY], g_aGraffitiData[i][graffitiPosZ]))
  21776. {
  21777. return i;
  21778. }
  21779. }
  21780. return -1;
  21781. }
  21782. stock GetPlayerFreeVehicleId(playerid)
  21783. {
  21784. for(new i; i < MAX_VEHICLES; ++i)
  21785. {
  21786. if(VehicleInfo[i][vModel] == 0) return i;
  21787. }
  21788. return -1;
  21789. }
  21790. stock SendQuestionToStaff(color, text[])
  21791. {
  21792. foreach(new x: Player)
  21793. {
  21794. if(PlayerData[x][pHelper] >= 1 || PlayerData[x][pAdmin] >= 1)
  21795. {
  21796. SendClientMessageEx(x, color, text);
  21797. }
  21798. }
  21799. }
  21800. stock SQL_ReturnEscaped(const string[])
  21801. {
  21802. new
  21803. entry[256];
  21804. mysql_real_escape_string(string, entry, connectionID);
  21805. return entry;
  21806. }
  21807. stock Graffiti_Delete(id)
  21808. {
  21809. if (id != -1 && GraffitiData[id][graffitiExists])
  21810. {
  21811. new
  21812. string[64];
  21813. if (IsValidDynamicMapIcon(GraffitiData[id][graffitiIcon]))
  21814. DestroyDynamicMapIcon(GraffitiData[id][graffitiIcon]);
  21815. if (IsValidDynamicObject(GraffitiData[id][graffitiObject]))
  21816. DestroyDynamicObject(GraffitiData[id][graffitiObject]);
  21817. format(string, sizeof(string), "DELETE FROM `graffiti` WHERE `graffitiID` = '%d'", GraffitiData[id][graffitiID]);
  21818. mysql_tquery(connectionID, string);
  21819. GraffitiData[id][graffitiExists] = false;
  21820. GraffitiData[id][graffitiText][0] = 0;
  21821. GraffitiData[id][graffitiID] = 0;
  21822. }
  21823. return 1;
  21824. }
  21825. stock Graffiti_Save(id)
  21826. {
  21827. format(queryBuffer, sizeof(queryBuffer), "UPDATE `graffiti` SET `graffitiX` = '%.4f', `graffitiY` = '%.4f', `graffitiZ` = '%.4f', `graffitiAngle` = '%.4f', `graffitiDefault` = '%d', `graffitiColor` = '%d', `graffitiFont` = '%s', `graffitiText` = '%s' WHERE `graffitiID` = '%d'",
  21828. GraffitiData[id][graffitiPos][0],
  21829. GraffitiData[id][graffitiPos][1],
  21830. GraffitiData[id][graffitiPos][2],
  21831. GraffitiData[id][graffitiPos][3],
  21832. GraffitiData[id][graffitiDefault],
  21833. GraffitiData[id][graffitiColor],
  21834. SQL_ReturnEscaped(GraffitiData[id][graffitiFont]),
  21835. SQL_ReturnEscaped(GraffitiData[id][graffitiText]),
  21836. GraffitiData[id][graffitiID]
  21837. );
  21838. return mysql_tquery(connectionID, queryBuffer);
  21839. }
  21840. stock Graffiti_Create(Float:x, Float:y, Float:z, Float:angle)
  21841. {
  21842. for (new i = 0; i < MAX_GRAFFITI_POINTS; i ++)
  21843. {
  21844. if (!GraffitiData[i][graffitiExists])
  21845. {
  21846. GraffitiData[i][graffitiExists] = 1;
  21847. GraffitiData[i][graffitiPos][0] = x;
  21848. GraffitiData[i][graffitiPos][1] = y;
  21849. GraffitiData[i][graffitiPos][2] = z;
  21850. GraffitiData[i][graffitiPos][3] = angle - 90.0;
  21851. GraffitiData[i][graffitiColor] = 0xFFFFFFFF;
  21852. format(GraffitiData[i][graffitiText], 32, "Graffiti");
  21853. Graffiti_Refresh(i);
  21854. mysql_tquery(connectionID, "INSERT INTO `graffiti` (`graffitiColor`) VALUES(0)", "OnGraffitiCreated", "d", i);
  21855. return i;
  21856. }
  21857. }
  21858. return -1;
  21859. }
  21860. forward Float:player_get_speed(playerid);
  21861. public Float:player_get_speed(playerid)
  21862. {
  21863. new
  21864. Float: fVelocity[3];
  21865. GetVehicleVelocity(GetPlayerVehicleID(playerid), fVelocity[0], fVelocity[1], fVelocity[2]);
  21866. return floatsqroot((fVelocity[0] * fVelocity[0]) + (fVelocity[1] * fVelocity[1]) + (fVelocity[2] * fVelocity[2])) * 100;
  21867. }
  21868. forward Graffiti_Load();
  21869. public Graffiti_Load()
  21870. {
  21871. static
  21872. rows,
  21873. fields;
  21874. cache_get_data(rows, fields, connectionID);
  21875. for (new i = 0; i < rows; i ++) if (i < MAX_GRAFFITI_POINTS)
  21876. {
  21877. cache_get_field_content(i, "graffitiText", GraffitiData[i][graffitiText], connectionID, 64);
  21878. cache_get_field_content(i, "graffitiFont", GraffitiData[i][graffitiFont], connectionID, 50);
  21879. GraffitiData[i][graffitiExists] = 1;
  21880. GraffitiData[i][graffitiID] = cache_get_field_content_int(i, "graffitiID");
  21881. GraffitiData[i][graffitiDefault] = cache_get_field_content_int(i, "graffitiDefault");
  21882. GraffitiData[i][graffitiPos][0] = cache_get_field_content_float(i, "graffitiX");
  21883. GraffitiData[i][graffitiPos][1] = cache_get_field_content_float(i, "graffitiY");
  21884. GraffitiData[i][graffitiPos][2] = cache_get_field_content_float(i, "graffitiZ");
  21885. GraffitiData[i][graffitiPos][3] = cache_get_field_content_float(i, "graffitiAngle");
  21886. GraffitiData[i][graffitiColor] = cache_get_field_content_int(i, "graffitiColor");
  21887. Graffiti_Refresh(i);
  21888. }
  21889. return 1;
  21890. }
  21891. ReloadLandObject(objectid, labels)
  21892. {
  21893. if(IsValidDynamicObject(objectid) && Streamer_GetExtraInt(objectid, E_OBJECT_TYPE) == E_OBJECT_LAND)
  21894. {
  21895. new
  21896. id = Streamer_GetExtraInt(objectid, E_OBJECT_INDEX_ID);
  21897. DeleteLandObject(objectid);
  21898. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM landobjects WHERE id = %i", id);
  21899. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LOAD_LANDOBJECTS, labels);
  21900. }
  21901. }
  21902. ReloadAllLandObjects(landid)
  21903. {
  21904. if(LandInfo[landid][lExists])
  21905. {
  21906. for(new i = 0, j = Streamer_GetUpperBound(STREAMER_TYPE_OBJECT); i <= j; i ++)
  21907. {
  21908. if(IsValidDynamicObject(i) && Streamer_GetExtraInt(i, E_OBJECT_TYPE) == E_OBJECT_LAND && Streamer_GetExtraInt(i, E_OBJECT_EXTRA_ID) == LandInfo[landid][lID])
  21909. {
  21910. DeleteLandObject(i);
  21911. }
  21912. }
  21913. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM landobjects WHERE landid = %i", LandInfo[landid][lID]);
  21914. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LOAD_LANDOBJECTS, LandInfo[landid][lLabels]);
  21915. }
  21916. }
  21917. ReloadLand(landid)
  21918. {
  21919. if(LandInfo[landid][lExists])
  21920. {
  21921. DestroyDynamicArea(LandInfo[landid][lArea]);
  21922. GangZoneDestroy(LandInfo[landid][lGangZone]);
  21923. DestroyDynamic3DTextLabel(LandInfo[landid][lTextdraw]);
  21924. LandInfo[landid][lArea] = CreateDynamicRectangle(LandInfo[landid][lMinX], LandInfo[landid][lMinY], LandInfo[landid][lMaxX], LandInfo[landid][lMaxY]);
  21925. LandInfo[landid][lGangZone] = GangZoneCreateEx(LandInfo[landid][lMinX], LandInfo[landid][lMinY], LandInfo[landid][lMaxX], LandInfo[landid][lMaxY]);
  21926. LandInfo[landid][lTextdraw] = CreateDynamic3DTextLabel("Land", COLOR_GREY, LandInfo[landid][lHeightX], LandInfo[landid][lHeightY], LandInfo[landid][lHeightZ], 10.0);
  21927. UpdateLandText(landid);
  21928. foreach(new i : Player)
  21929. {
  21930. if(PlayerData[i][pShowLands])
  21931. {
  21932. GangZoneShowForPlayer(i, LandInfo[landid][lGangZone], (LandInfo[landid][lOwnerID] > 0) ? (0xFF6347AA) : (0x33CC33AA));
  21933. }
  21934. }
  21935. }
  21936. }
  21937. GetNearbyLand(playerid)
  21938. {
  21939. if(GetPlayerInterior(playerid) == 0 && GetPlayerVirtualWorld(playerid) == 0)
  21940. {
  21941. foreach(new i : Land)
  21942. {
  21943. if(LandInfo[i][lExists] && IsPlayerInDynamicArea(playerid, LandInfo[i][lArea]))
  21944. {
  21945. return i;
  21946. }
  21947. }
  21948. }
  21949. return -1;
  21950. }
  21951. TurfTaxCheck(playerid, amount)
  21952. {
  21953. new turfid = GetNearbyTurf(playerid);
  21954. if(turfid >= 0 && TurfInfo[turfid][tType] == 7 && TurfInfo[turfid][tCapturedGang] >= 0)
  21955. {
  21956. if(!(PlayerData[playerid][pGang] >= 0 && PlayerData[playerid][pGang] == TurfInfo[turfid][tCapturedGang]))
  21957. {
  21958. amount = percent(amount, 10);
  21959. SendClientMessageEx(playerid, COLOR_AQUA, "You have been taxed a 10 percent fee of {FF6347}$%i{33CCFF} for selling in %s's turf.", amount, GangInfo[TurfInfo[turfid][tCapturedGang]][gName]);
  21960. GivePlayerCash(playerid, -amount);
  21961. GangInfo[TurfInfo[turfid][tCapturedGang]][gCash] += amount;
  21962. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET cash = %i WHERE id = %i", GangInfo[TurfInfo[turfid][tCapturedGang]][gCash], TurfInfo[turfid][tCapturedGang]);
  21963. mysql_tquery(connectionID, queryBuffer);
  21964. }
  21965. }
  21966. }
  21967. GetNearbyTurf(playerid)
  21968. {
  21969. if(GetPlayerInterior(playerid) == 0 && GetPlayerVirtualWorld(playerid) == 0)
  21970. {
  21971. foreach(new i : Turf)
  21972. {
  21973. if(TurfInfo[i][tExists] && IsPlayerInDynamicArea(playerid, TurfInfo[i][tArea]))
  21974. {
  21975. return i;
  21976. }
  21977. }
  21978. }
  21979. return -1;
  21980. }
  21981. GetTurfColor(turfid)
  21982. {
  21983. if(TurfInfo[turfid][tCapturedGang] >= 0)
  21984. {
  21985. return (GangInfo[TurfInfo[turfid][tCapturedGang]][gColor] & ~0xff) + 0xAA;
  21986. }
  21987. else if(TurfInfo[turfid][tCapturedGang] == -5)
  21988. {
  21989. return 0x8D8DFFAA;
  21990. }
  21991. return 0x000000AA;
  21992. }
  21993. /*public OnPlayerEnterDynamicArea(playerid, areaid)
  21994. {
  21995. foreach(new i : Player)
  21996. {
  21997. if(GetInTurfZone(playerid, i))
  21998. {
  21999. PlayerData[playerid][pBackup] = 1;
  22000. PlayerData[i][pBackup] = 1;
  22001. SetPlayerMarkerForPlayer(i, playerid, (GangInfo[PlayerData[i][pGang]][gColor] & ~0xff) + 0xFF);
  22002. SetPlayerMarkerForPlayer(playerid, i, (GangInfo[PlayerData[playerid][pGang]][gColor] & ~0xff) + 0xFF);
  22003. }
  22004. }
  22005. }*/
  22006. public OnPlayerLeaveDynamicArea(playerid, areaid)
  22007. {
  22008. foreach(new i : Player)
  22009. {
  22010. if(GetInTurfZone(playerid, i))
  22011. {
  22012. SetPlayerMarkerForPlayer(i, playerid, GetPlayerColor(playerid));
  22013. SetPlayerMarkerForPlayer(playerid, i, GetPlayerColor(i));
  22014. }
  22015. }
  22016. if(gettime() - PlayerData[playerid][pLastDeath] > 10 && (areaid == area_paintball[0] || areaid == area_paintball[1]))
  22017. {
  22018. if(PlayerData[playerid][pPaintball] == 3 || PlayerData[playerid][pPaintball] == 4)
  22019. {
  22020. SendClientMessage(playerid, COLOR_RED, "You were poisoned to death for leaving the arena. (Use /exit)");
  22021. SetPlayerHealth(playerid, 0.0);
  22022. }
  22023. }
  22024. return 1;
  22025. }
  22026. GetInTurfZone(playerid, target)
  22027. {
  22028. foreach(new i : Turf)
  22029. {
  22030. if(TurfInfo[i][tExists] && TurfInfo[i][tCapturer] != INVALID_PLAYER_ID && IsPlayerInDynamicArea(playerid, TurfInfo[i][tArea]) && IsPlayerInDynamicArea(target, TurfInfo[i][tArea]) && PlayerData[playerid][pGang] != -1 && PlayerData[target][pGang] != -1) return true;
  22031. }
  22032. return false;
  22033. }
  22034. ReloadTurf(turfid)
  22035. {
  22036. if(TurfInfo[turfid][tExists])
  22037. {
  22038. DestroyDynamicArea(TurfInfo[turfid][tArea]);
  22039. GangZoneDestroy(TurfInfo[turfid][tGangZone]);
  22040. TurfInfo[turfid][tArea] = CreateDynamicRectangle(TurfInfo[turfid][tMinX], TurfInfo[turfid][tMinY], TurfInfo[turfid][tMaxX], TurfInfo[turfid][tMaxY]);
  22041. TurfInfo[turfid][tGangZone] = GangZoneCreateEx(TurfInfo[turfid][tMinX], TurfInfo[turfid][tMinY], TurfInfo[turfid][tMaxX], TurfInfo[turfid][tMaxY]);
  22042. foreach(new i : Player)
  22043. {
  22044. if(PlayerData[i][pShowTurfs])
  22045. {
  22046. ShowTurfsOnMap(i, true);
  22047. }
  22048. }
  22049. }
  22050. }
  22051. GetNearbyEntranceEx(playerid)
  22052. {
  22053. return GetNearbyEntrance(playerid) == -1 ? GetInsideEntrance(playerid) : GetNearbyEntrance(playerid);
  22054. }
  22055. GetNearbyEntrance(playerid)
  22056. {
  22057. foreach(new i : Entrance)
  22058. {
  22059. if(EntranceInfo[i][eExists] && IsPlayerInRangeOfPoint(playerid, EntranceInfo[i][eRadius], EntranceInfo[i][ePosX], EntranceInfo[i][ePosY], EntranceInfo[i][ePosZ]) && GetPlayerInterior(playerid) == EntranceInfo[i][eOutsideInt] && GetPlayerVirtualWorld(playerid) == EntranceInfo[i][eOutsideVW])
  22060. {
  22061. return i;
  22062. }
  22063. }
  22064. return -1;
  22065. }
  22066. GetInsideEntrance(playerid)
  22067. {
  22068. foreach(new i : Entrance)
  22069. {
  22070. if(EntranceInfo[i][eExists] && IsPlayerInRangeOfPoint(playerid, 100.0, EntranceInfo[i][eIntX], EntranceInfo[i][eIntY], EntranceInfo[i][eIntZ]) && GetPlayerInterior(playerid) == EntranceInfo[i][eInterior] && GetPlayerVirtualWorld(playerid) == EntranceInfo[i][eWorld])
  22071. {
  22072. return i;
  22073. }
  22074. }
  22075. return -1;
  22076. }
  22077. SetEntranceOwner(entranceid, playerid)
  22078. {
  22079. if(playerid == INVALID_PLAYER_ID)
  22080. {
  22081. strcpy(EntranceInfo[entranceid][eOwner], "Nobody", MAX_PLAYER_NAME);
  22082. EntranceInfo[entranceid][eOwnerID] = 0;
  22083. }
  22084. else
  22085. {
  22086. GetPlayerName(playerid, EntranceInfo[entranceid][eOwner], MAX_PLAYER_NAME);
  22087. EntranceInfo[entranceid][eOwnerID] = PlayerData[playerid][pID];
  22088. }
  22089. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET ownerid = %i, owner = '%s' WHERE id = %i", EntranceInfo[entranceid][eOwnerID], EntranceInfo[entranceid][eOwner], EntranceInfo[entranceid][eID]);
  22090. mysql_tquery(connectionID, queryBuffer);
  22091. ReloadEntrance(entranceid);
  22092. }
  22093. ReloadEntrance(entranceid)
  22094. {
  22095. if(EntranceInfo[entranceid][eExists])
  22096. {
  22097. new
  22098. string[128];
  22099. DestroyDynamic3DTextLabel(EntranceInfo[entranceid][eText]);
  22100. DestroyDynamicPickup(EntranceInfo[entranceid][ePickup]);
  22101. DestroyDynamicMapIcon(EntranceInfo[entranceid][eMapIconID]);
  22102. if(EntranceInfo[entranceid][eLabel])
  22103. {
  22104. new color;
  22105. if(EntranceInfo[entranceid][eColor] == -256)
  22106. {
  22107. color = 0xC8C8C8FF;
  22108. color = EntranceInfo[entranceid][eColor];
  22109. }
  22110. else
  22111. {
  22112. color = EntranceInfo[entranceid][eColor];
  22113. }
  22114. if(EntranceInfo[entranceid][eOwnerID])
  22115. {
  22116. format(string, sizeof(string), "{ffff00}[{%06x}%s{ffff00}]{afafaf}\nOwner: %s\nPress 'y' to go inside.", color >>> 8, EntranceInfo[entranceid][eName], EntranceInfo[entranceid][eOwner]);
  22117. }
  22118. else
  22119. {
  22120. if(EntranceInfo[entranceid][eType] == 1)
  22121. format(string, sizeof(string), "%s\n{AFAFAF}/offerduel to duel.", EntranceInfo[entranceid][eName]);
  22122. else if(EntranceInfo[entranceid][eType] == 2)
  22123. format(string, sizeof(string), "%s\n{AFAFAF}/repaircar to repair your vehicle.", EntranceInfo[entranceid][eName]);
  22124. else
  22125. format(string, sizeof(string), "{ffff00}[{%06x}%s{ffff00}]\n{AFAFAF}Press 'y' to go inside.", color >>> 8, EntranceInfo[entranceid][eName]);
  22126. }
  22127. EntranceInfo[entranceid][eText] = CreateDynamic3DTextLabel(string, COLOR_WHITE, EntranceInfo[entranceid][ePosX], EntranceInfo[entranceid][ePosY], (EntranceInfo[entranceid][eIcon] == 19902) ? (EntranceInfo[entranceid][ePosZ] + 0.1) : (EntranceInfo[entranceid][ePosZ]), 10.0, .worldid = EntranceInfo[entranceid][eOutsideVW], .interiorid = EntranceInfo[entranceid][eOutsideInt]);
  22128. }
  22129. EntranceInfo[entranceid][ePickup] = CreateDynamicPickup(EntranceInfo[entranceid][eIcon], 1, EntranceInfo[entranceid][ePosX], EntranceInfo[entranceid][ePosY], (EntranceInfo[entranceid][eIcon] == 19902) ? (EntranceInfo[entranceid][ePosZ] - 1.0) : (EntranceInfo[entranceid][ePosZ]), .worldid = EntranceInfo[entranceid][eOutsideVW], .interiorid = EntranceInfo[entranceid][eOutsideInt]);
  22130. if(EntranceInfo[entranceid][eMapIcon])
  22131. {
  22132. EntranceInfo[entranceid][eMapIconID] = CreateDynamicMapIcon(EntranceInfo[entranceid][ePosX], EntranceInfo[entranceid][ePosY], EntranceInfo[entranceid][ePosZ], EntranceInfo[entranceid][eMapIcon], 0, .worldid = EntranceInfo[entranceid][eOutsideVW], .interiorid = EntranceInfo[entranceid][eOutsideInt]);
  22133. }
  22134. }
  22135. }
  22136. IsEntranceOwner(playerid, entranceid)
  22137. {
  22138. return (EntranceInfo[entranceid][eOwnerID] == PlayerData[playerid][pID]);
  22139. }
  22140. GetClosestBusiness(playerid, type)
  22141. {
  22142. new
  22143. Float:distance[2] = {99999.0, 0.0},
  22144. index = -1;
  22145. foreach(new i : Business)
  22146. {
  22147. if((BusinessInfo[i][bExists] && BusinessInfo[i][bType] == type) && (BusinessInfo[i][bOutsideInt] == 0 && BusinessInfo[i][bOutsideVW] == 0))
  22148. {
  22149. distance[1] = GetPlayerDistanceFromPoint(playerid, BusinessInfo[i][bPosX], BusinessInfo[i][bPosY], BusinessInfo[i][bPosZ]);
  22150. if(distance[0] > distance[1])
  22151. {
  22152. distance[0] = distance[1];
  22153. index = i;
  22154. }
  22155. }
  22156. }
  22157. return index;
  22158. }
  22159. GetNearbyBusinessEx(playerid)
  22160. {
  22161. return GetNearbyBusiness(playerid) == -1 ? GetInsideBusiness(playerid) : GetNearbyBusiness(playerid);
  22162. }
  22163. GetNearbyBusiness(playerid, Float:radius = 2.0)
  22164. {
  22165. foreach(new i : Business)
  22166. {
  22167. if(BusinessInfo[i][bExists] && IsPlayerInRangeOfPoint(playerid, radius, BusinessInfo[i][bPosX], BusinessInfo[i][bPosY], BusinessInfo[i][bPosZ]) && GetPlayerInterior(playerid) == BusinessInfo[i][bOutsideInt] && GetPlayerVirtualWorld(playerid) == BusinessInfo[i][bOutsideVW])
  22168. {
  22169. return i;
  22170. }
  22171. }
  22172. return -1;
  22173. }
  22174. GetInsideBusiness(playerid)
  22175. {
  22176. foreach(new i : Business)
  22177. {
  22178. if(BusinessInfo[i][bExists] && IsPlayerInRangeOfPoint(playerid, 100.0, BusinessInfo[i][bIntX], BusinessInfo[i][bIntY], BusinessInfo[i][bIntZ]) && GetPlayerInterior(playerid) == BusinessInfo[i][bInterior] && GetPlayerVirtualWorld(playerid) == BusinessInfo[i][bWorld])
  22179. {
  22180. return i;
  22181. }
  22182. }
  22183. return -1;
  22184. }
  22185. SetBusinessOwner(businessid, playerid)
  22186. {
  22187. if(playerid == INVALID_PLAYER_ID)
  22188. {
  22189. strcpy(BusinessInfo[businessid][bOwner], "Nobody", MAX_PLAYER_NAME);
  22190. BusinessInfo[businessid][bOwnerID] = 0;
  22191. }
  22192. else
  22193. {
  22194. GetPlayerName(playerid, BusinessInfo[businessid][bOwner], MAX_PLAYER_NAME);
  22195. BusinessInfo[businessid][bOwnerID] = PlayerData[playerid][pID];
  22196. }
  22197. BusinessInfo[businessid][bTimestamp] = gettime();
  22198. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET timestamp = %i, ownerid = %i, owner = '%s' WHERE id = %i", BusinessInfo[businessid][bTimestamp], BusinessInfo[businessid][bOwnerID], BusinessInfo[businessid][bOwner], BusinessInfo[businessid][bID]);
  22199. mysql_tquery(connectionID, queryBuffer);
  22200. ReloadBusiness(businessid);
  22201. }
  22202. /*
  22203. stock GetBusinessDefaultPickup(business)
  22204. {
  22205. switch (BusinessInfo[business][bType]) {
  22206. case BUSINESS_STORE: return 1274;
  22207. case BUSINESS_CLOTHES: return 1275;
  22208. case BUSINESS_RESTAURANT: return 19094;
  22209. case BUSINESS_TOOLSHOP: return 1274;
  22210. case BUSINESS_AGENCY: return 1274;
  22211. case BUSINESS_BARCLUB:
  22212. {
  22213. new rnd = random(4);
  22214. if (rnd == 0) return 1486;
  22215. if (rnd == 1) return 1543;
  22216. if (rnd == 2) return 1544;
  22217. if (rnd == 3) return 1951;
  22218. }
  22219. case BUSINESS_GYM: return 1318;
  22220. default: return 1274;
  22221. }
  22222. return 1318;
  22223. }*/
  22224. ReloadBusiness(businessid)
  22225. {
  22226. if(BusinessInfo[businessid][bExists])
  22227. {
  22228. new
  22229. string[300];
  22230. DestroyDynamic3DTextLabel(BusinessInfo[businessid][bText]);
  22231. DestroyDynamicPickup(BusinessInfo[businessid][bPickup]);
  22232. //DestroyDynamicMapIcon(BusinessInfo[businessid][bMapIcon]);
  22233. if(BusinessInfo[businessid][bOwnerID] == 0)
  22234. {
  22235. format(string, sizeof(string), "{AAC4E5}[BUSINESS] (ID %i)\n{FFFFFF}\nType: {AAC4E5}%s\n{FFFFFF}Entry Fee: $%i\nPrice: {FFFFFF}%s\n%s", businessid, bizInteriors[BusinessInfo[businessid][bType]][intType], BusinessInfo[businessid][bEntryFee], FormatNumber(BusinessInfo[businessid][bPrice]), (BusinessInfo[businessid][bLocked]) ? ("{FFFF00}Closed") : ("{00AA00}Opened"));
  22236. }
  22237. else
  22238. {
  22239. format(string, sizeof(string), "{AAC4E5}[BUSINESS] (ID %i)\n{FFFFFF}Owner: %s\nType: {AAC4E5}%s\n{FFFFFF}Entry Fee: $%i\n%s", businessid, BusinessInfo[businessid][bOwner], bizInteriors[BusinessInfo[businessid][bType]][intType], BusinessInfo[businessid][bEntryFee], (BusinessInfo[businessid][bLocked]) ? ("{FFFF00}Closed") : ("{00AA00}Opened"));
  22240. }
  22241. BusinessInfo[businessid][bText] = CreateDynamic3DTextLabel(string, COLOR_GREY1, BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ] + 0.4, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, BusinessInfo[businessid][bOutsideVW], BusinessInfo[businessid][bOutsideInt], -1 , 10.0);
  22242. BusinessInfo[businessid][bPickup] = CreateDynamicPickup(1272, 1, BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], .worldid = BusinessInfo[businessid][bOutsideVW], .interiorid = BusinessInfo[businessid][bOutsideInt]);
  22243. /*BusinessInfo[businessid][bPickup] = CreateDynamicPickup(GetBusinessDefaultPickup(businessid), 1, BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], .worldid = BusinessInfo[businessid][bOutsideVW], .interiorid = BusinessInfo[businessid][bOutsideInt]);
  22244. switch(BusinessInfo[businessid][bType])
  22245. {
  22246. case BUSINESS_STORE: BusinessInfo[businessid][bMapIcon] = CreateDynamicMapIcon(BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 17, 0, .worldid = BusinessInfo[businessid][bOutsideVW], .interiorid = BusinessInfo[businessid][bOutsideInt], .style = MAPICON_GLOBAL);
  22247. //case BUSINESS_GUNSHOP: BusinessInfo[businessid][bMapIcon] = CreateDynamicMapIcon(BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 6, 0, .worldid = BusinessInfo[businessid][bOutsideVW], .interiorid = BusinessInfo[businessid][bOutsideInt], .style = MAPICON_GLOBAL);
  22248. case BUSINESS_CLOTHES: BusinessInfo[businessid][bMapIcon] = CreateDynamicMapIcon(BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 45, 0, .worldid = BusinessInfo[businessid][bOutsideVW], .interiorid = BusinessInfo[businessid][bOutsideInt], .style = MAPICON_GLOBAL);
  22249. //case BUSINESS_RESTAURANT: BusinessInfo[businessid][bMapIcon] = CreateDynamicMapIcon(BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 10, 0, .worldid = BusinessInfo[businessid][bOutsideVW], .interiorid = BusinessInfo[businessid][bOutsideInt], .style = MAPICON_GLOBAL);
  22250. case BUSINESS_GYM: BusinessInfo[businessid][bMapIcon] = CreateDynamicMapIcon(BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 54, 0, .worldid = BusinessInfo[businessid][bOutsideVW], .interiorid = BusinessInfo[businessid][bOutsideInt], .style = MAPICON_GLOBAL);
  22251. //case BUSINESS_AGENCY: BusinessInfo[businessid][bMapIcon] = CreateDynamicMapIcon(BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 58, 0, .worldid = BusinessInfo[businessid][bOutsideVW], .interiorid = BusinessInfo[businessid][bOutsideInt], .style = MAPICON_GLOBAL);
  22252. //case BUSINESS_BARCLUB: BusinessInfo[businessid][bMapIcon] = CreateDynamicMapIcon(BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 49, 0, .worldid = BusinessInfo[businessid][bOutsideVW], .interiorid = BusinessInfo[businessid][bOutsideInt], .style = MAPICON_GLOBAL);
  22253. //case BUSINESS_TOOLSHOP: BusinessInfo[businessid][bMapIcon] = CreateDynamicMapIcon(BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 11, 0, .worldid = BusinessInfo[businessid][bOutsideVW], .interiorid = BusinessInfo[businessid][bOutsideInt], .style = MAPICON_GLOBAL);
  22254. }*/
  22255. }
  22256. }
  22257. IsBusinessOwner(playerid, businessid)
  22258. {
  22259. return (BusinessInfo[businessid][bOwnerID] == PlayerData[playerid][pID]);
  22260. }
  22261. IsGarageOwner(playerid, garageid)
  22262. {
  22263. return (GarageInfo[garageid][gOwnerID] == PlayerData[playerid][pID]);
  22264. }
  22265. GetNearbyGarageEx(playerid)
  22266. {
  22267. return GetNearbyGarage(playerid) == -1 ? GetInsideGarage(playerid) : GetNearbyGarage(playerid);
  22268. }
  22269. GetNearbyGarage(playerid)
  22270. {
  22271. foreach(new i : Garage)
  22272. {
  22273. if(GarageInfo[i][gExists] && IsPlayerInRangeOfPoint(playerid, 4.0, GarageInfo[i][gPosX], GarageInfo[i][gPosY], GarageInfo[i][gPosZ]))
  22274. {
  22275. return i;
  22276. }
  22277. }
  22278. return -1;
  22279. }
  22280. GetInsideGarage(playerid)
  22281. {
  22282. foreach(new i : Garage)
  22283. {
  22284. if(GarageInfo[i][gExists] && IsPlayerInRangeOfPoint(playerid, 50.0, garageInteriors[GarageInfo[i][gType]][intVX], garageInteriors[GarageInfo[i][gType]][intVY], garageInteriors[GarageInfo[i][gType]][intVZ]) && GetPlayerInterior(playerid) == garageInteriors[GarageInfo[i][gType]][intID] && GetPlayerVirtualWorld(playerid) == GarageInfo[i][gWorld])
  22285. {
  22286. return i;
  22287. }
  22288. }
  22289. return -1;
  22290. }
  22291. ReloadGarage(garageid)
  22292. {
  22293. if(GarageInfo[garageid][gExists])
  22294. {
  22295. new string[128];
  22296. DestroyDynamic3DTextLabel(GarageInfo[garageid][gText]);
  22297. DestroyDynamicPickup(GarageInfo[garageid][gPickup]);
  22298. if(GarageInfo[garageid][gOwnerID] == 0)
  22299. {
  22300. format(string, sizeof(string), "[{ADADAD}Garage{54878D}]\nPrice: {00AA00}%s{54878D}\nSize: %s\nCapacity: %i cars", FormatNumber(GarageInfo[garageid][gPrice]), garageInteriors[GarageInfo[garageid][gType]][intName], GarageInfo[garageid][gType] + 1);
  22301. }
  22302. else
  22303. {
  22304. format(string, sizeof(string), "[{ADADAD}Garage{54878D}]\nOwner: %s\nSize: %s\nCapacity: %i cars", GarageInfo[garageid][gOwner], garageInteriors[GarageInfo[garageid][gType]][intName], GarageInfo[garageid][gType] + 1);
  22305. }
  22306. GarageInfo[garageid][gText] = CreateDynamic3DTextLabel(string, 0x54878DFF, GarageInfo[garageid][gPosX], GarageInfo[garageid][gPosY], GarageInfo[garageid][gPosZ] + 0.1, 10.0);
  22307. GarageInfo[garageid][gPickup] = CreateDynamicPickup(1316, 1, GarageInfo[garageid][gPosX], GarageInfo[garageid][gPosY], GarageInfo[garageid][gPosZ]);
  22308. }
  22309. }
  22310. SetGarageOwner(garageid, playerid)
  22311. {
  22312. if(playerid == INVALID_PLAYER_ID)
  22313. {
  22314. strcpy(GarageInfo[garageid][gOwner], "Nobody", MAX_PLAYER_NAME);
  22315. GarageInfo[garageid][gOwnerID] = 0;
  22316. }
  22317. else
  22318. {
  22319. GetPlayerName(playerid, GarageInfo[garageid][gOwner], MAX_PLAYER_NAME);
  22320. GarageInfo[garageid][gOwnerID] = PlayerData[playerid][pID];
  22321. }
  22322. GarageInfo[garageid][gTimestamp] = gettime();
  22323. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE garages SET timestamp = %i, ownerid = %i, owner = '%s' WHERE id = %i", GarageInfo[garageid][gTimestamp], GarageInfo[garageid][gOwnerID], GarageInfo[garageid][gOwner], GarageInfo[garageid][gID]);
  22324. mysql_tquery(connectionID, queryBuffer);
  22325. ReloadGarage(garageid);
  22326. }
  22327. HasFurniturePerms(playerid, houseid)
  22328. {
  22329. return IsHouseOwner(playerid, houseid) || PlayerData[playerid][pFurniturePerms] == houseid;
  22330. }
  22331. IsValidFurnitureID(id)
  22332. {
  22333. return (id >= 0 && id < MAX_FURNITURE) && Furniture[id][fExists];
  22334. }
  22335. IsValidHouseID(id)
  22336. {
  22337. return (id >= 0 && id < MAX_HOUSES) && HouseInfo[id][hExists];
  22338. }
  22339. IsHouseOwner(playerid, houseid)
  22340. {
  22341. return (HouseInfo[houseid][hOwnerID] == PlayerData[playerid][pID]);
  22342. }
  22343. PreviewFurniture(playerid, index)
  22344. {
  22345. new
  22346. Float:x,
  22347. Float:y,
  22348. Float:z,
  22349. Float:angle;
  22350. GetPlayerPos(playerid, x, y, z);
  22351. GetPlayerFacingAngle(playerid, angle);
  22352. x += 2.0 * floatsin(-angle, degrees);
  22353. y += 2.0 * floatcos(-angle, degrees);
  22354. if (IsValidDynamicObject(gPreviewFurniture[playerid]))
  22355. {
  22356. DestroyDynamicObject(gPreviewFurniture[playerid]);
  22357. }
  22358. gPreviewFurniture[playerid] = CreateDynamicObject(g_FurnitureList[index][e_ModelID], x, y, z, 0.0, 0.0, angle, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid));
  22359. PlayerData[playerid][pPreviewIndex] = index;
  22360. EditDynamicObjectEx(playerid, EDIT_TYPE_PREVIEW, gPreviewFurniture[playerid]);
  22361. //EditDynamicObjectEx(playerid, EDIT_TYPE_FURNITURE, Furniture[furniture][fObject], furniture);
  22362. SendInfoMessage(playerid, "Press ESC to cancel. Click the disk icon to save changes.");
  22363. return 1;
  22364. }
  22365. ShowFurniturePreviewer(playerid)
  22366. {
  22367. new
  22368. models[MAX_SELECTION_MENU_ITEMS] = {-1, ...},
  22369. index;
  22370. PlayerData[playerid][pPreviewIndex] = -1;
  22371. for(new i = 0; i < sizeof(g_FurnitureList); i ++)
  22372. {
  22373. if (g_FurnitureList[i][e_ModelCategory] == PlayerData[playerid][pSelected])
  22374. {
  22375. if(PlayerData[playerid][pPreviewIndex] == -1)
  22376. {
  22377. PlayerData[playerid][pPreviewIndex] = i;
  22378. }
  22379. models[index++] = g_FurnitureList[i][e_ModelID];
  22380. }
  22381. }
  22382. ShowPlayerSelectionMenu(playerid, MODEL_SELECTION_FURNITURE, "House Furniture", models, index);
  22383. return 0;
  22384. }
  22385. UpdateFurniture(furniture)
  22386. {
  22387. if (!IsValidFurnitureID(furniture))
  22388. {
  22389. return 0;
  22390. }
  22391. DestroyDynamicObject(Furniture[furniture][fObject]);
  22392. Furniture[furniture][fObject] = CreateDynamicObject(Furniture[furniture][fModel], Furniture[furniture][fSpawn][0], Furniture[furniture][fSpawn][1], Furniture[furniture][fSpawn][2], Furniture[furniture][fSpawn][3], Furniture[furniture][fSpawn][4], Furniture[furniture][fSpawn][5], Furniture[furniture][fWorld], Furniture[furniture][fInterior]);
  22393. Streamer_SetExtraInt(Furniture[furniture][fObject], E_OBJECT_EXTRA_ID, Furniture[furniture][fID]);
  22394. for(new i = 0; i != 3; i ++)
  22395. {
  22396. if(MaterialIDs[Furniture[furniture][fMaterial][i]][ModelID] != 0)
  22397. {
  22398. SetDynamicObjectMaterial(Furniture[furniture][fObject], i, MaterialIDs[Furniture[furniture][fMaterial][i]][ModelID], MaterialIDs[Furniture[furniture][fMaterial][i]][TxdName], MaterialIDs[Furniture[furniture][fMaterial][i]][TextureName], MaterialColors[Furniture[furniture][fMatColour][i]][ColorHex]);
  22399. }
  22400. else if(Furniture[furniture][fMatColour][i] != 0)
  22401. {
  22402. SetDynamicObjectMaterial(Furniture[furniture][fObject], i, -1, MaterialIDs[Furniture[furniture][fMaterial][i]][TxdName], MaterialIDs[Furniture[furniture][fMaterial][i]][TextureName], MaterialColors[Furniture[furniture][fMatColour][i]][ColorHex]);
  22403. }
  22404. }
  22405. UpdateFurnitureText(furniture);
  22406. return 1;
  22407. }
  22408. UpdateFurnitureText(furniture)
  22409. {
  22410. new
  22411. string[64];
  22412. if (!IsValidFurnitureID(furniture))
  22413. {
  22414. return 0;
  22415. }
  22416. DestroyDynamic3DTextLabel(Furniture[furniture][fText]);
  22417. if (Furniture[furniture][fEdit])
  22418. {
  22419. format(string, sizeof(string), "ID: {00FF00}%i{FFFFFF}\n/edit, /delete.", furniture);
  22420. Furniture[furniture][fText] = CreateDynamic3DTextLabel(string, COLOR_WHITE, Furniture[furniture][fSpawn][0], Furniture[furniture][fSpawn][1], Furniture[furniture][fSpawn][2], 50.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, Furniture[furniture][fWorld], Furniture[furniture][fInterior]);
  22421. }
  22422. else
  22423. {
  22424. if (Furniture[furniture][fModel] == 2332)
  22425. {
  22426. if (Furniture[furniture][fSafeOpen])
  22427. {
  22428. Furniture[furniture][fText] = CreateDynamic3DTextLabel("Status: {00FF00}Opened{AFAFAF}\nPress Y to use safe", COLOR_GREY, Furniture[furniture][fSpawn][0], Furniture[furniture][fSpawn][1], Furniture[furniture][fSpawn][2], 3.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, Furniture[furniture][fWorld], Furniture[furniture][fInterior]);
  22429. }
  22430. else
  22431. {
  22432. Furniture[furniture][fText] = CreateDynamic3DTextLabel("Status: {FF5030}Closed{AFAFAF}\nPress Y to use safe", COLOR_GREY, Furniture[furniture][fSpawn][0], Furniture[furniture][fSpawn][1], Furniture[furniture][fSpawn][2], 3.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, Furniture[furniture][fWorld], Furniture[furniture][fInterior]);
  22433. }
  22434. }
  22435. else
  22436. {
  22437. Furniture[furniture][fText] = INVALID_3DTEXT_ID;
  22438. }
  22439. }
  22440. return 1;
  22441. }
  22442. SaveFurniture(furniture)
  22443. {
  22444. if (!IsValidFurnitureID(furniture)) return 0;
  22445. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE rp_furniture SET fModel = %i, fX = %.4f, fY = %.4f, fZ = %.4f, fRX = %.4f, fRY = %.4f, fRZ = %.4f, fInterior = %i, fWorld = %i, fCode = %i, fMoney = %i, Mat1 = %i, Mat2 = %i, Mat3 = %i, MatColor1 = %i, MatColor2 = %i, MatColor3 = %i WHERE fID = %i",
  22446. Furniture[furniture][fModel],
  22447. Furniture[furniture][fSpawn][0],
  22448. Furniture[furniture][fSpawn][1],
  22449. Furniture[furniture][fSpawn][2],
  22450. Furniture[furniture][fSpawn][3],
  22451. Furniture[furniture][fSpawn][4],
  22452. Furniture[furniture][fSpawn][5],
  22453. Furniture[furniture][fInterior],
  22454. Furniture[furniture][fWorld],
  22455. Furniture[furniture][fCode],
  22456. Furniture[furniture][fMoney],
  22457. Furniture[furniture][fMaterial][0],
  22458. Furniture[furniture][fMaterial][1],
  22459. Furniture[furniture][fMaterial][2],
  22460. Furniture[furniture][fMatColour][0],
  22461. Furniture[furniture][fMatColour][1],
  22462. Furniture[furniture][fMatColour][2],
  22463. Furniture[furniture][fID]
  22464. );
  22465. return mysql_tquery(connectionID, queryBuffer);
  22466. // return printf(queryBuffer);
  22467. }
  22468. DeleteFurniture(furniture)
  22469. {
  22470. if (!IsValidFurnitureID(furniture))
  22471. {
  22472. return 0;
  22473. }
  22474. DestroyDynamicObject(Furniture[furniture][fObject]);
  22475. DestroyDynamic3DTextLabel(Furniture[furniture][fText]);
  22476. format(queryBuffer, sizeof(queryBuffer), "DELETE FROM rp_furniture WHERE fID = %i", Furniture[furniture][fID]);
  22477. mysql_tquery(connectionID, queryBuffer);
  22478. Furniture[furniture][fID] = 0;
  22479. Furniture[furniture][fExists] = 0;
  22480. Furniture[furniture][fObject] = INVALID_OBJECT_ID;
  22481. Furniture[furniture][fText] = INVALID_3DTEXT_ID;
  22482. return 1;
  22483. }
  22484. ShowFurnitureCategories(playerid)
  22485. {
  22486. new string[192];
  22487. for (new i = 0; i < sizeof(g_FurnitureTypes); i ++) {
  22488. strcat(string, g_FurnitureTypes[i]);
  22489. strcat(string, "\n");
  22490. }
  22491. Dialog_Show(playerid, BuyFurniture, DIALOG_STYLE_LIST, "{FFFFFF}Select category", string, "Select", "Cancel");
  22492. }
  22493. SetFurnitureEditMode(house, enable)
  22494. {
  22495. HouseInfo[house][hEdit] = enable;
  22496. for (new i = 0; i < MAX_FURNITURE; i ++)
  22497. {
  22498. if (Furniture[i][fExists] && Furniture[i][fHouseID] == HouseInfo[house][hID])
  22499. {
  22500. Furniture[i][fEdit] = enable;
  22501. UpdateFurnitureText(i);
  22502. }
  22503. }
  22504. }
  22505. GetNextFurnitureID()
  22506. {
  22507. for (new i = 0; i < MAX_FURNITURE; i ++)
  22508. {
  22509. if (!Furniture[i][fExists])
  22510. {
  22511. return i;
  22512. }
  22513. }
  22514. return -1;
  22515. }
  22516. AddFurniture(house, modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, interior, worldid)
  22517. {
  22518. new
  22519. id = GetNextFurnitureID();
  22520. if (id != -1)
  22521. {
  22522. Furniture[id][fExists] = 1;
  22523. Furniture[id][fHouseID] = HouseInfo[house][hID];
  22524. Furniture[id][fEdit] = HouseInfo[house][hEdit];
  22525. Furniture[id][fModel] = modelid;
  22526. Furniture[id][fSpawn][0] = x;
  22527. Furniture[id][fSpawn][1] = y;
  22528. Furniture[id][fSpawn][2] = z;
  22529. Furniture[id][fSpawn][3] = rx;
  22530. Furniture[id][fSpawn][4] = ry;
  22531. Furniture[id][fSpawn][5] = rz;
  22532. Furniture[id][fInterior] = interior;
  22533. Furniture[id][fWorld] = worldid;
  22534. Furniture[id][fCode] = 0;
  22535. Furniture[id][fMoney] = 0;
  22536. Furniture[id][fSafeOpen] = 0;
  22537. Furniture[id][fDoorOpen] = 0;
  22538. Furniture[id][fObject] = INVALID_OBJECT_ID;
  22539. Furniture[id][fText] = INVALID_3DTEXT_ID;
  22540. for(new i = 0; i != 3; i ++)
  22541. {
  22542. Furniture[id][fMaterial][i] = 0;
  22543. Furniture[id][fMatColour][i] = 0;
  22544. }
  22545. UpdateFurniture(id);
  22546. format(queryBuffer, sizeof(queryBuffer), "INSERT INTO rp_furniture (fHouseID) VALUES(%i)", Furniture[id][fHouseID]);
  22547. mysql_tquery(connectionID, queryBuffer, "OnFurnitureAdded", "i", id);
  22548. }
  22549. return id;
  22550. }
  22551. forward OnFurnitureAdded(furniture);
  22552. public OnFurnitureAdded(furniture)
  22553. {
  22554. Furniture[furniture][fID] = cache_insert_id(connectionID);
  22555. SaveFurniture(furniture);
  22556. }
  22557. GetVehicleStashCapacity(vehicleid, item)
  22558. {
  22559. static const stashCapacities[][] = {
  22560. // Cash Mats W C M P W
  22561. {25000, 5000, 25, 25, 10, 5, 3}, // level 1
  22562. {50000, 10000, 50, 50, 25, 10, 4}, // level 2
  22563. {100000, 25000, 100, 75, 50, 20, 5} // level 3
  22564. };
  22565. if(VehicleInfo[vehicleid][vTrunk] > 0)
  22566. {
  22567. return stashCapacities[VehicleInfo[vehicleid][vTrunk] - 1][item];
  22568. }
  22569. return 0;
  22570. }
  22571. GetGangStashCapacity(gangid, item)
  22572. {
  22573. static const stashCapacities[][] = {
  22574. {1000000, 100000, 500, 500, 250, 50},
  22575. {2000000, 200000, 1000, 1000, 500, 100},
  22576. {3000000, 300000, 1500, 1500, 1000, 250}
  22577. };
  22578. return stashCapacities[GangInfo[gangid][gLevel] - 1][item];
  22579. }
  22580. GetHouseStashCapacity(houseid, item)
  22581. {
  22582. static const stashCapacities[][] = {
  22583. // Cash Mats W C M P W
  22584. {100000, 50000, 100, 50, 25, 20, 2}, // level 1
  22585. {250000, 75000, 250, 100, 50, 40, 4}, // level 2
  22586. {500000, 100000, 500, 250, 100, 60, 6}, // level 3
  22587. {750000, 250000, 750, 500, 200, 80, 8}, // level 4
  22588. {1000000, 500000, 1000, 750, 250, 100, 10}, // level 5
  22589. {1000000, 500000, 1000, 750, 250, 100, 10} // level 6
  22590. };
  22591. return stashCapacities[HouseInfo[houseid][hLevel] - 1][item];
  22592. }
  22593. GetHouseTenantCapacity(houseid)
  22594. {
  22595. switch(HouseInfo[houseid][hLevel])
  22596. {
  22597. case 0: return 5;
  22598. case 1: return 10;
  22599. case 2: return 15;
  22600. case 3: return 20;
  22601. case 4: return 25;
  22602. case 5, 6: return 30;
  22603. }
  22604. return 0;
  22605. }
  22606. GetHouseFurnitureCapacity(houseid)
  22607. {
  22608. switch(HouseInfo[houseid][hLevel])
  22609. {
  22610. case 0: return 50;
  22611. case 1: return 100;
  22612. case 2: return 150;
  22613. case 3: return 250;
  22614. case 4: return 400;
  22615. case 5: return 500;
  22616. case 6: return 9999;
  22617. }
  22618. return 0;
  22619. }
  22620. GetRandomHouse(playerid) // For pizzaboy job.
  22621. {
  22622. new index, houseIDs[MAX_HOUSES] = {-1, ...};
  22623. foreach(new i : House)
  22624. {
  22625. if(HouseInfo[i][hExists] && HouseInfo[i][hOutsideInt] == 0 && HouseInfo[i][hOutsideVW] == 0)
  22626. {
  22627. if(300.0 <= GetPlayerDistanceFromPoint(playerid, HouseInfo[i][hPosX], HouseInfo[i][hPosY], HouseInfo[i][hPosZ]) <= 1200.0)
  22628. {
  22629. if(HouseInfo[i][hDelivery])
  22630. {
  22631. houseIDs[index++] = i;
  22632. }
  22633. }
  22634. }
  22635. }
  22636. if(index == 0)
  22637. {
  22638. return -1;
  22639. }
  22640. return houseIDs[random(index)];
  22641. }
  22642. GetNearbyHouseEx(playerid)
  22643. {
  22644. return GetNearbyHouse(playerid) == -1 ? GetInsideHouse(playerid) : GetNearbyHouse(playerid);
  22645. }
  22646. GetFurnitureHouse(playerid)
  22647. {
  22648. foreach(new i : House)
  22649. {
  22650. if(HouseInfo[i][hExists] && IsHouseOwner(playerid, i) && IsPlayerInRangeOfPoint(playerid, 15.0, HouseInfo[i][hPosX], HouseInfo[i][hPosY], HouseInfo[i][hPosZ]) && GetPlayerInterior(playerid) == HouseInfo[i][hOutsideInt] && GetPlayerVirtualWorld(playerid) == HouseInfo[i][hOutsideVW])
  22651. {
  22652. return i;
  22653. }
  22654. }
  22655. return -1;
  22656. }
  22657. GetNearbyHouse(playerid)
  22658. {
  22659. foreach(new i : House)
  22660. {
  22661. if(HouseInfo[i][hExists] && IsPlayerInRangeOfPoint(playerid, 2.0, HouseInfo[i][hPosX], HouseInfo[i][hPosY], HouseInfo[i][hPosZ]) && GetPlayerInterior(playerid) == HouseInfo[i][hOutsideInt] && GetPlayerVirtualWorld(playerid) == HouseInfo[i][hOutsideVW])
  22662. {
  22663. return i;
  22664. }
  22665. }
  22666. return -1;
  22667. }
  22668. GetInsideHouse(playerid)
  22669. {
  22670. foreach(new i : House)
  22671. {
  22672. if(HouseInfo[i][hExists] && IsPlayerInRangeOfPoint(playerid, 100.0, HouseInfo[i][hIntX], HouseInfo[i][hIntY], HouseInfo[i][hIntZ]) && GetPlayerInterior(playerid) == HouseInfo[i][hInterior] && GetPlayerVirtualWorld(playerid) == HouseInfo[i][hWorld])
  22673. {
  22674. return i;
  22675. }
  22676. }
  22677. return -1;
  22678. }
  22679. SetHouseOwner(houseid, playerid)
  22680. {
  22681. if(playerid == INVALID_PLAYER_ID)
  22682. {
  22683. strcpy(HouseInfo[houseid][hOwner], "Nobody", MAX_PLAYER_NAME);
  22684. HouseInfo[houseid][hOwnerID] = 0;
  22685. }
  22686. else
  22687. {
  22688. GetPlayerName(playerid, HouseInfo[houseid][hOwner], MAX_PLAYER_NAME);
  22689. HouseInfo[houseid][hOwnerID] = PlayerData[playerid][pID];
  22690. }
  22691. HouseInfo[houseid][hTimestamp] = gettime();
  22692. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET timestamp = %i, ownerid = %i, owner = '%s' WHERE id = %i", HouseInfo[houseid][hTimestamp], HouseInfo[houseid][hOwnerID], HouseInfo[houseid][hOwner], HouseInfo[houseid][hID]);
  22693. mysql_tquery(connectionID, queryBuffer);
  22694. ReloadHouse(houseid);
  22695. }
  22696. ReloadHouse(houseid)
  22697. {
  22698. if(HouseInfo[houseid][hExists])
  22699. {
  22700. new
  22701. string[268],
  22702. type[16];
  22703. DestroyDynamic3DTextLabel(HouseInfo[houseid][hText]);
  22704. DestroyDynamicPickup(HouseInfo[houseid][hPickup]);
  22705. if(HouseInfo[houseid][hType] == -1)
  22706. {
  22707. type = "Other";
  22708. }
  22709. else
  22710. {
  22711. strcpy(type, houseInteriors[HouseInfo[houseid][hType]][intClass]);
  22712. }
  22713. if(HouseInfo[houseid][hOwnerID] == 0)
  22714. {
  22715. format(string, sizeof(string), "{AAC4E5}[HOUSE FOR SALE] ({FFFFFF}ID %i{AAC4E5})\n{FFFFFF}Class: {AAC4E5}%s\n{FFFFFF}House Level: {AAC4E5}%i\n{FFFFFF}Price: {AAC4E5}%s", houseid, type, HouseInfo[houseid][hLevel], FormatNumber(HouseInfo[houseid][hPrice]));
  22716. HouseInfo[houseid][hPickup] = CreateDynamicPickup(1273, 1, HouseInfo[houseid][hPosX], HouseInfo[houseid][hPosY], HouseInfo[houseid][hPosZ], .worldid = HouseInfo[houseid][hOutsideVW], .interiorid = HouseInfo[houseid][hOutsideInt]);
  22717. }
  22718. else
  22719. {
  22720. if(HouseInfo[houseid][hRentPrice] > 0)
  22721. {
  22722. format(string, sizeof(string), "{AAC4E5}[HOUSE] ({FFFFFF}ID %i{AAC4E5})\n{FFFFFF}Owner: {AAC4E5}%s\n{FFFFFF}Class: {AAC4E5}%s\n{FFFFFF}Rent: {AAC4E5}$%i\n{FFFFFF}House Level: {AAC4E5}%i", houseid, HouseInfo[houseid][hOwner], type, HouseInfo[houseid][hRentPrice], HouseInfo[houseid][hLevel]);
  22723. }
  22724. else
  22725. {
  22726. format(string, sizeof(string), "{AAC4E5}[HOUSE] ({FFFFFF}ID %i{AAC4E5})\n{FFFFFF}Owner: {AAC4E5}%s\n{FFFFFF}Class: {AAC4E5}%s\n{FFFFFF}House Level: {AAC4E5}%i", houseid, HouseInfo[houseid][hOwner], type, HouseInfo[houseid][hLevel]);
  22727. }
  22728. HouseInfo[houseid][hPickup] = CreateDynamicPickup(19522, 1, HouseInfo[houseid][hPosX], HouseInfo[houseid][hPosY], HouseInfo[houseid][hPosZ], .worldid = HouseInfo[houseid][hOutsideVW], .interiorid = HouseInfo[houseid][hOutsideInt]);
  22729. }
  22730. HouseInfo[houseid][hText] = CreateDynamic3DTextLabel(string, COLOR_WHITE, HouseInfo[houseid][hPosX], HouseInfo[houseid][hPosY], HouseInfo[houseid][hPosZ]+0.3, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, HouseInfo[houseid][hOutsideVW], HouseInfo[houseid][hOutsideInt], -1 , 10.0);
  22731. //HouseInfo[houseid][hMapIcon] = CreateDynamicMapIcon(HouseInfo[houseid][hPosX], HouseInfo[houseid][hPosY], HouseInfo[houseid][hPosZ], 31, 1, -1, -1, -1, 100.0);
  22732. }
  22733. }
  22734. IsNumeric(const string[])
  22735. {
  22736. new
  22737. len = strlen(string),
  22738. i;
  22739. if(string[0] == '-') i = 1;
  22740. while(i < len)
  22741. {
  22742. if(!('0' <= string[i++] <= '9'))
  22743. return 0;
  22744. }
  22745. return 1;
  22746. }
  22747. GetVehicleParams(vehicleid, param)
  22748. {
  22749. new
  22750. params[7];
  22751. GetVehicleParamsEx(vehicleid, params[0], params[1], params[2], params[3], params[4], params[5], params[6]);
  22752. return params[param] == VEHICLE_PARAMS_ON;
  22753. }
  22754. SetVehicleParams(vehicleid, param, status)
  22755. {
  22756. new
  22757. params[7];
  22758. GetVehicleParamsEx(vehicleid, params[0], params[1], params[2], params[3], params[4], params[5], params[6]);
  22759. params[param] = status;
  22760. return SetVehicleParamsEx(vehicleid, params[0], params[1], params[2], params[3], params[4], params[5], params[6]);
  22761. }
  22762. /*
  22763. Float:GetVehicleSpeedMPH(vehicleid)
  22764. {
  22765. new
  22766. Float:x,
  22767. Float:y,
  22768. Float:z;
  22769. if(GetVehicleVelocity(vehicleid, x, y, z))
  22770. {
  22771. return floatsqroot((x * x) + (y * y) + (z * z)) * 100;
  22772. }
  22773. return 0.0;
  22774. }*/
  22775. Float:GetVehicleSpeed(vehicleid)
  22776. {
  22777. new
  22778. Float:x,
  22779. Float:y,
  22780. Float:z;
  22781. if(GetVehicleVelocity(vehicleid, x, y, z))
  22782. {
  22783. return floatsqroot((x * x) + (y * y) + (z * z)) * 181.5;
  22784. }
  22785. return 0.0;
  22786. }
  22787. stock GetVehicleSpeedKMH(vehicleid)
  22788. {
  22789. new Float:speed_x, Float:speed_y, Float:speed_z, Float:temp_speed, round_speed;
  22790. GetVehicleVelocity(vehicleid, speed_x, speed_y, speed_z);
  22791. temp_speed = temp_speed = floatsqroot(((speed_x*speed_x) + (speed_y*speed_y)) + (speed_z*speed_z)) * 136.666667;
  22792. round_speed = floatround(temp_speed);
  22793. return round_speed;
  22794. }
  22795. VehicleHasWindows(vehicleid)
  22796. {
  22797. static const vehicleWindows[] = {
  22798. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0,
  22799. 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0,
  22800. 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1,
  22801. 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0,
  22802. 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  22803. 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1,
  22804. 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0
  22805. };
  22806. new
  22807. model = GetVehicleModel(vehicleid);
  22808. if(400 <= model <= 611)
  22809. {
  22810. return vehicleWindows[model - 400];
  22811. }
  22812. return 0;
  22813. }
  22814. VehicleHasEngine(vehicleid)
  22815. {
  22816. static const vehicleEngines[] = {
  22817. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  22818. 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  22819. 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  22820. 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  22821. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  22822. 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1,
  22823. 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0
  22824. };
  22825. new
  22826. modelid = GetVehicleModel(vehicleid);
  22827. if(400 <= modelid <= 611)
  22828. {
  22829. return vehicleEngines[modelid - 400];
  22830. }
  22831. return 0;
  22832. }
  22833. GetVehicleSeatCount(vehicleid)
  22834. {
  22835. static const vehicleSeats[] =
  22836. {
  22837. 4, 2, 2, 2, 4, 4, 1, 2, 2, 4, 2, 2, 2, 4, 2, 2, 4, 2, 4, 2, 4, 4, 2, 2, 2, 1, 4, 4, 4, 2,
  22838. 1, 7, 1, 2, 2, 0, 2, 7, 4, 2, 4, 1, 2, 2, 2, 4, 1, 2, 1, 0, 0, 2, 1, 1, 1, 2, 2, 2, 4,
  22839. 4, 2, 2, 2, 2, 1, 1, 4, 4, 2, 2, 4, 2, 1, 1, 2, 2, 1, 2, 2, 4, 2, 1, 4, 3, 1, 1, 1, 4, 2,
  22840. 2, 4, 2, 4, 1, 2, 2, 2, 4, 4, 2, 2, 1, 2, 2, 2, 2, 2, 4, 2, 1, 1, 2, 1, 1, 2, 2, 4, 2, 2,
  22841. 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 4, 1, 1, 1, 2, 2, 2, 2, 7, 7, 1, 4, 2, 2, 2, 2, 2, 4, 4,
  22842. 2, 2, 4, 4, 2, 1, 2, 2, 2, 2, 2, 2, 4, 4, 2, 2, 1, 2, 4, 4, 1, 0, 0, 1, 1, 2, 1, 2, 2, 1, 2,
  22843. 4, 4, 2, 4, 1, 0, 4, 2, 2, 2, 2, 0, 0, 7, 2, 2, 1, 4, 4, 4, 2, 2, 2, 2, 2, 4, 2, 0, 0, 0,
  22844. 4, 0, 0
  22845. };
  22846. new
  22847. modelid = GetVehicleModel(vehicleid);
  22848. if(400 <= modelid <= 611)
  22849. {
  22850. return vehicleSeats[modelid - 400];
  22851. }
  22852. return 0;
  22853. }
  22854. IsSeatOccupied(vehicleid, seatid)
  22855. {
  22856. foreach(new i : Player)
  22857. {
  22858. if(IsPlayerInVehicle(i, vehicleid) && GetPlayerVehicleSeat(i) == seatid)
  22859. {
  22860. return 1;
  22861. }
  22862. }
  22863. return 0;
  22864. }
  22865. GetVehicleName(vehicleid)
  22866. {
  22867. new
  22868. modelid = GetVehicleModel(vehicleid),
  22869. name[32];
  22870. if(400 <= modelid <= 611)
  22871. strcat(name, vehicleNames[modelid - 400]);
  22872. else
  22873. name = "Unknown";
  22874. return name;
  22875. }
  22876. GetVehicleModelByName(const string[])
  22877. {
  22878. new
  22879. modelid = strval(string);
  22880. if(400 <= modelid <= 611)
  22881. {
  22882. return modelid;
  22883. }
  22884. for(new i = 0; i < sizeof(vehicleNames); i ++)
  22885. {
  22886. if(strfind(vehicleNames[i], string, true) != -1)
  22887. {
  22888. return i + 400;
  22889. }
  22890. }
  22891. return 0;
  22892. }
  22893. GetVehicleDriver(vehicleid)
  22894. {
  22895. foreach(new i : Player)
  22896. {
  22897. if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == PLAYER_STATE_DRIVER)
  22898. {
  22899. return i;
  22900. }
  22901. }
  22902. return INVALID_PLAYER_ID;
  22903. }
  22904. IsVehicleOccupied(vehicleid)
  22905. {
  22906. foreach(new i : Player)
  22907. {
  22908. if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == PLAYER_STATE_DRIVER)
  22909. {
  22910. return 1;
  22911. }
  22912. }
  22913. return 0;
  22914. }
  22915. AnticheatCheck(playerid)
  22916. {
  22917. if(gettime() > PlayerData[playerid][pACTime] && !PlayerData[playerid][pKicked] && InsideTut[playerid] == 0)
  22918. {
  22919. // Speedhacking
  22920. if((gAnticheat) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER && GetVehicleSpeed(GetPlayerVehicleID(playerid)) > 350 && PlayerData[playerid][pAdmin] < JUNIOR_ADMIN && !IsAPlane(GetPlayerVehicleID(playerid)) && !IsAHelicopter(GetPlayerVehicleID(playerid)))
  22921. {
  22922. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] is possibly speedhacking, speed: %.1f km/h.", GetRPName(playerid), playerid, GetVehicleSpeed(GetPlayerVehicleID(playerid)));
  22923. Log_Write("log_cheat", "%s (uid: %i) possibly speedhacked, speed: %.1f km/h", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetVehicleSpeed(GetPlayerVehicleID(playerid)));
  22924. }
  22925. // Jetpack
  22926. if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK && PlayerData[playerid][pAdmin] < JUNIOR_ADMIN && !PlayerData[playerid][pJetpack])
  22927. {
  22928. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was autobanned by %s, reason: Jetpack", GetRPName(playerid), SERVER_ANTICHEAT);
  22929. BanPlayer(playerid, SERVER_ANTICHEAT, "Jetpack");
  22930. }
  22931. // Flying hacks
  22932. if((gAnticheat) && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
  22933. {
  22934. switch(GetPlayerAnimationIndex(playerid))
  22935. {
  22936. case 958, 1538, 1539, 1543:
  22937. {
  22938. new
  22939. Float:z,
  22940. Float:vx,
  22941. Float:vy,
  22942. Float:vz;
  22943. GetPlayerPos(playerid, z, z, z);
  22944. GetPlayerVelocity(playerid, vx, vy, vz);
  22945. if((z > 30.0) && (0.9 <= floatsqroot((vx * vx) + (vy * vy) + (vz * vz)) <= 1.9) && PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  22946. {
  22947. SendClientMessageToAllEx(COLOR_YELLOW, "AdmCmd: %s was kicked by %s, reason: Flying hacks", GetRPName(playerid), SERVER_ANTICHEAT);
  22948. KickPlayer(playerid);
  22949. }
  22950. }
  22951. }
  22952. }
  22953. // Armor hacks
  22954. if(!PlayerData[playerid][pJoinedEvent] && PlayerData[playerid][pPaintball] == 0 && PlayerData[playerid][pDueling] == INVALID_PLAYER_ID)
  22955. {
  22956. new
  22957. Float:armor;
  22958. GetPlayerArmour(playerid, armor);
  22959. if(floatround(armor) > floatround(PlayerData[playerid][pArmor]) && gettime() > PlayerData[playerid][pACTime] && gettime() > PlayerData[playerid][pArmorTime] && PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  22960. {
  22961. PlayerData[playerid][pACWarns]++;
  22962. PlayerData[playerid][pArmorTime] = gettime() + 10;
  22963. if(PlayerData[playerid][pACWarns] < MAX_ANTICHEAT_WARNINGS)
  22964. {
  22965. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] is possibly armor hacking. (old: %.2f, new: %.2f)", GetRPName(playerid), playerid, PlayerData[playerid][pArmor], armor);
  22966. Log_Write("log_cheat", "%s (uid: %i) possibly hacked armor. (old: %.2f, new: %.2f)", GetPlayerNameEx(playerid), PlayerData[playerid][pID], PlayerData[playerid][pArmor], armor);
  22967. }
  22968. else
  22969. {
  22970. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was autobanned by %s, reason: Armor hacking", GetRPName(playerid), SERVER_ANTICHEAT);
  22971. BanPlayer(playerid, SERVER_ANTICHEAT, "Armor hacking");
  22972. }
  22973. PlayerData[playerid][pArmor] = armor;
  22974. }
  22975. }
  22976. }
  22977. // Ammo hacks
  22978. if(!PlayerData[playerid][pJoinedEvent] && PlayerData[playerid][pPaintball] == 0 && PlayerData[playerid][pDueling] == INVALID_PLAYER_ID && !(PlayerData[playerid][pTazer] && GetPlayerWeapon(playerid) == 23))
  22979. {
  22980. new
  22981. weapon,
  22982. ammo;
  22983. GetPlayerWeaponData(playerid, 8, weapon, ammo);
  22984. if((16 <= weapon <= 18) && ammo <= 0)
  22985. {
  22986. RemovePlayerWeapon(playerid, weapon);
  22987. }
  22988. }
  22989. }
  22990. IsAnIP(ip[])
  22991. {
  22992. new part[4];
  22993. if(!sscanf(ip, "p<.>iiii", part[0], part[1], part[2], part[3]))
  22994. {
  22995. return (0 <= part[0] <= 255) && (0 <= part[1] <= 255) && (0 <= part[2] <= 255) && (0 <= part[3] <= 255);
  22996. }
  22997. else if(!sscanf(ip, "p<.>iicc", part[0], part[1], part[2], part[3]))
  22998. {
  22999. return (0 <= part[0] <= 255) && (0 <= part[1] <= 255) && (part[2] == '*' && part[3] == '*');
  23000. }
  23001. return 0;
  23002. }
  23003. IsValidName(name[])
  23004. {
  23005. for(new i = 0, j = strlen(name); i < j; i ++)
  23006. {
  23007. if(!(3 <= j <= MAX_PLAYER_NAME))
  23008. return 0;
  23009. switch(name[i])
  23010. {
  23011. case 'A'..'Z', 'a'..'z', '0'..'9', '_', '.', '[', ']', '(', ')', '=', '@':
  23012. {
  23013. continue;
  23014. }
  23015. default:
  23016. {
  23017. return 0;
  23018. }
  23019. }
  23020. }
  23021. return 1;
  23022. }
  23023. IsValidModel(modelid)
  23024. {
  23025. static modeldat[] =
  23026. {
  23027. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -128,
  23028. -515899393, -134217729, -1, -1, 33554431, -1, -1, -1, -14337, -1, -33,
  23029. 127, 0, 0, 0, 0, 0, -8388608, -1, -1, -1, -16385, -1, -1, -1, -1, -1,
  23030. -1, -1, -33, -1, -771751937, -1, -9, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  23031. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  23032. -1, -1, -1, -1, -1, -1, -1, -1, 33554431, -25, -1, -1, -1, -1, -1, -1,
  23033. -1073676289, -2147483648, 34079999, 2113536, -4825600, -5, -1, -3145729,
  23034. -1, -16777217, -63, -1, -1, -1, -1, -201326593, -1, -1, -1, -1, -1,
  23035. -257, -1, 1073741823, -133122, -1, -1, -65, -1, -1, -1, -1, -1, -1,
  23036. -2146435073, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1073741823, -64, -1,
  23037. -1, -1, -1, -2635777, 134086663, 0, -64, -1, -1, -1, -1, -1, -1, -1,
  23038. -536870927, -131069, -1, -1, -1, -1, -1, -1, -1, -1, -16384, -1,
  23039. -33554433, -1, -1, -1, -1, -1, -1610612737, 524285, -128, -1,
  23040. 2080309247, -1, -1, -1114113, -1, -1, -1, 66977343, -524288, -1, -1, -1,
  23041. -1, -2031617, -1, 114687, -256, -1, -4097, -1, -4097, -1, -1,
  23042. 1010827263, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -32768, -1, -1, -1, -1, -1,
  23043. 2147483647, -33554434, -1, -1, -49153, -1148191169, 2147483647,
  23044. -100781080, -262145, -57, 134217727, -8388608, -1, -1, -1, -1, -1, -1,
  23045. -1, -1, -1, -1, -1, -1, -1, -1, -1048577, -1, -449, -1017, -1, -1, -1,
  23046. -1, -1, -1, -1, -1, -1, -1, -1, -1835009, -2049, -1, -1, -1, -1, -1, -1,
  23047. -8193, -1, -536870913, -1, -1, -1, -1, -1, -87041, -1, -1, -1, -1, -1,
  23048. -1, -209860, -1023, -8388609, -2096897, -1, -1048577, -1, -1, -1, -1,
  23049. -1, -1, -897, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1610612737,
  23050. -3073, -28673, -1, -1, -1, -1537, -1, -1, -13, -1, -1, -1, -1, -1985,
  23051. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1056964609, -1, -1, -1,
  23052. -1, -1, -1, -1, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  23053. -236716037, -1, -1, -1, -1, -1, -1, -1, -536870913, 3, 0, 0, 0, 0, 0, 0,
  23054. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  23055. 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  23056. -1, -1, -1, -1, -1, -2097153, -2109441, -1, 201326591, -4194304, -1, -1,
  23057. -241, -1, -1, -1, -1, -1, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  23058. 0, -32768, -1, -1, -1, -2, -671096835, -1, -8388609, -66323585, -13,
  23059. -1793, -32257, -247809, -1, -1, -513, 16252911, 0, 0, 0, -131072,
  23060. 33554383, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  23061. 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  23062. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8356095, 0, 0, 0, 0, 0,
  23063. 0, -256, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  23064. -268435449, -1, -1, -2049, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  23065. 92274627, -65536, -2097153, -268435457, 591191935, 1, 0, -16777216, -1,
  23066. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 127
  23067. };
  23068. if((modelid >= 0) && ((modelid / 32) < sizeof (modeldat)) && (modeldat[modelid / 32] & (1 << (modelid % 32))))
  23069. {
  23070. return 1;
  23071. }
  23072. if((18632 <= modelid <= 19999) || (11682 <= modelid <= 11753))
  23073. {
  23074. return 1;
  23075. }
  23076. return 0;
  23077. }
  23078. IsPlayerOnline(const name[], &id = INVALID_PLAYER_ID)
  23079. {
  23080. foreach(new i : Player)
  23081. {
  23082. if(!strcmp(GetPlayerNameEx(i), name, true) && PlayerData[i][pLogged])
  23083. {
  23084. id = i;
  23085. return 1;
  23086. }
  23087. }
  23088. id = INVALID_PLAYER_ID;
  23089. return 0;
  23090. }
  23091. IsPlayerAiming(playerid)
  23092. {
  23093. new
  23094. keys,
  23095. ud,
  23096. lr;
  23097. GetPlayerKeys(playerid, keys, ud, lr);
  23098. if((keys & KEY_HANDBRAKE) & KEY_HANDBRAKE && (22 <= GetPlayerWeapon(playerid) <= 38))
  23099. {
  23100. switch(GetPlayerAnimationIndex(playerid))
  23101. {
  23102. case 1160..1167, 360..363, 220, 640, 1189, 1331, 1365, 1453, 1449, 1643:
  23103. {
  23104. return 1;
  23105. }
  23106. }
  23107. }
  23108. return 0;
  23109. }
  23110. IsPointInRangeOfPoint(Float:x1, Float:y1, Float:z1, Float:radius, Float:x2, Float:y2, Float:z2)
  23111. {
  23112. x1 -= x2;
  23113. y1 -= y2;
  23114. z1 -= z2;
  23115. return ((x1 * x1) + (y1 * y1) + (z1 * z1)) < (radius * radius);
  23116. }
  23117. IsVehicleInGarage(vehicleid, garageid)
  23118. {
  23119. new
  23120. Float:x,
  23121. Float:y,
  23122. Float:z;
  23123. GetVehiclePos(vehicleid, x, y, z);
  23124. return IsPointInRangeOfPoint(x, y, z, 50.0, garageInteriors[GarageInfo[garageid][gType]][intVX], garageInteriors[GarageInfo[garageid][gType]][intVY], garageInteriors[GarageInfo[garageid][gType]][intVZ]) && GetVehicleVirtualWorld(vehicleid) == GarageInfo[garageid][gWorld];
  23125. }
  23126. IsPlayerInMiningArea(playerid)
  23127. {
  23128. for(new i = 0; i < sizeof(minerPositions); i ++)
  23129. {
  23130. if(IsPlayerInRangeOfPoint(playerid, 4.0, minerPositions[i][0], minerPositions[i][1], minerPositions[i][2]))
  23131. {
  23132. return 1;
  23133. }
  23134. }
  23135. return 0;
  23136. }
  23137. IsPlayerAtFoodPlace(playerid)
  23138. {
  23139. if(IsPlayerInRangeOfPoint(playerid, 12.0, 1174.0956, -936.1318, 42.8307) || IsPlayerInRangeOfPoint(playerid, 12.0, 1514.9395, -1031.0515, 23.7966) || IsPlayerInRangeOfPoint(playerid, 12.0, 1202.5309, -1275.9502, 13.3616) || IsPlayerInRangeOfPoint(playerid, 12.0, 1418.1516, -1721.0294, 13.5469)) {
  23140. return 1;
  23141. } else if(IsPlayerInRangeOfPoint(playerid, 12.0, 339.2676, -1771.2668, 5.1687) || IsPlayerInRangeOfPoint(playerid, 12.0, 1023.6545, -1332.1298, 13.3842) || IsPlayerInRangeOfPoint(playerid, 12.0, 1189.3583, -1706.9924, 13.5755) || IsPlayerInRangeOfPoint(playerid, 12.0, 2083.0374, -1760.8845, 13.5625)) {
  23142. return 1;
  23143. } else if(IsPlayerInRangeOfPoint(playerid, 12.0, 2264.8145, -1309.9031, 23.9844))
  23144. {
  23145. return 1;
  23146. }
  23147. return 0;
  23148. }
  23149. IsAtDealership(playerid)
  23150. {
  23151. if(IsPlayerInRangeOfPoint(playerid, 3.0, 542.0433, -1293.5909, 17.2422) || IsPlayerInRangeOfPoint(playerid, 3.0, 1985.7753,-2068.1091,13.3803) || IsPlayerInRangeOfPoint(playerid, 3.0, 2131.8059,-1150.8885,24.1078))
  23152. {
  23153. return 1;
  23154. }
  23155. return 0;
  23156. }
  23157. IsPlayerAtFuelStation(playerid)
  23158. {
  23159. if(IsPlayerInRangeOfPoint(playerid, 12.0, 1004.0070, -939.3102, 42.1797) || IsPlayerInRangeOfPoint(playerid, 12.0, 1944.3260, -1772.9254, 13.3906) || IsPlayerInRangeOfPoint(playerid, 12.0, -90.5515, -1169.4578, 2.4079) || IsPlayerInRangeOfPoint(playerid, 12.0, -1609.7958, -2718.2048, 48.5391)) {
  23160. return 1;
  23161. } else if(IsPlayerInRangeOfPoint(playerid, 12.0, -2029.4968, 156.4366, 28.9498) || IsPlayerInRangeOfPoint(playerid, 12.0, -2408.7590, 976.0934, 45.4175) || IsPlayerInRangeOfPoint(playerid, 12.0, -2243.9629, -2560.6477, 31.8841) || IsPlayerInRangeOfPoint(playerid, 12.0, -1676.6323, 414.0262, 6.9484)) {
  23162. return 1;
  23163. } else if(IsPlayerInRangeOfPoint(playerid, 12.0, 2202.2349, 2474.3494, 10.5258) || IsPlayerInRangeOfPoint(playerid, 12.0, 614.9333, 1689.7418, 6.6968) || IsPlayerInRangeOfPoint(playerid, 12.0, -1328.8250, 2677.2173, 49.7665) || IsPlayerInRangeOfPoint(playerid, 12.0, 70.3882, 1218.6783, 18.5165)) {
  23164. return 1;
  23165. } else if(IsPlayerInRangeOfPoint(playerid, 12.0, 654.9641, -559.7485, 16.5015) || IsPlayerInRangeOfPoint(playerid, 12.0, 654.9617, -570.4176, 16.5015) || IsPlayerInRangeOfPoint(playerid, 12.0, 1382.9899, 461.9903, 20.1245) || IsPlayerInRangeOfPoint(playerid, 12.0, 1380.9395, 457.2494, 19.9260)) {
  23166. return 1;
  23167. } else if(IsPlayerInRangeOfPoint(playerid, 12.0, 1944.9109,-1583.2743,13.7161) || IsPlayerInRangeOfPoint(playerid, 12.0, 1943.8992,-1588.6217,13.7161)) {
  23168. return 1;
  23169. } else if((IsAPlane(GetPlayerVehicleID(playerid)) || IsAHelicopter(GetPlayerVehicleID(playerid))) && IsPlayerInRangeOfPoint(playerid, 20.0, 1439.7886, -2445.6777, 13.5547)) {
  23170. return 1;
  23171. } else if((IsABoat(GetPlayerVehicleID(playerid))) && IsPlayerInRangeOfPoint(playerid, 10.0, 133.461380, -1815.096557, 3.989328) || IsPlayerInRangeOfPoint(playerid, 10.0, 138.547210, -1815.308593, 3.989328) || IsPlayerInRangeOfPoint(playerid, 10.0, 144.042800, -1815.534912, 3.989328)) {
  23172. return 1;
  23173. }
  23174. return 0;
  23175. }
  23176. IsPlayerAtFishingPlace(playerid)
  23177. {
  23178. if(IsPlayerInRangeOfPoint(playerid, 1.0, 403.8266, -2088.7598, 7.8359) || IsPlayerInRangeOfPoint(playerid, 1.0, 398.7553, -2088.7490, 7.8359) || IsPlayerInRangeOfPoint(playerid, 1.0, 396.2197, -2088.6692, 7.8359) || IsPlayerInRangeOfPoint(playerid, 1.0, 391.1094, -2088.7976, 7.8359)) {
  23179. return 1;
  23180. } else if(IsPlayerInRangeOfPoint(playerid, 1.0, 383.4157, -2088.7849, 7.8359) || IsPlayerInRangeOfPoint(playerid, 1.0, 374.9598, -2088.7979, 7.8359) || IsPlayerInRangeOfPoint(playerid, 1.0, 369.8107, -2088.7927, 7.8359) || IsPlayerInRangeOfPoint(playerid, 1.0, 367.3637, -2088.7925, 7.8359)) {
  23181. return 1;
  23182. } else if(IsPlayerInRangeOfPoint(playerid, 1.0, 362.2244, -2088.7981, 7.8359) || IsPlayerInRangeOfPoint(playerid, 1.0, 354.5382, -2088.7979, 7.8359)) {
  23183. return 1;
  23184. }
  23185. return 0;
  23186. }
  23187. IsPlayerInRangeOfDynamicObject(playerid, objectid, Float:radius)
  23188. {
  23189. if(IsValidDynamicObject(objectid))
  23190. {
  23191. new
  23192. interiorid = Streamer_GetIntData(STREAMER_TYPE_OBJECT, objectid, E_STREAMER_INTERIOR_ID),
  23193. worldid = Streamer_GetIntData(STREAMER_TYPE_OBJECT, objectid, E_STREAMER_WORLD_ID),
  23194. Float:x,
  23195. Float:y,
  23196. Float:z;
  23197. GetDynamicObjectPos(objectid, x, y, z);
  23198. if(interiorid == -1) {
  23199. interiorid = GetPlayerInterior(playerid);
  23200. } if(worldid == -1) {
  23201. worldid = GetPlayerVirtualWorld(playerid);
  23202. }
  23203. if(IsPlayerInRangeOfPoint(playerid, radius, x, y, z) && GetPlayerInterior(playerid) == interiorid && GetPlayerVirtualWorld(playerid) == worldid)
  23204. {
  23205. return 1;
  23206. }
  23207. }
  23208. return 0;
  23209. }
  23210. IsPlayerInRangeOfPlayer(playerid, targetid, Float:radius)
  23211. {
  23212. new
  23213. Float:x,
  23214. Float:y,
  23215. Float:z;
  23216. GetPlayerPos(targetid, x, y, z);
  23217. if(IsPlayerInRangeOfPoint(playerid, radius, x, y, z) && GetPlayerInterior(playerid) == GetPlayerInterior(targetid) && GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(targetid))
  23218. {
  23219. return 1;
  23220. }
  23221. return 0;
  23222. }
  23223. SetMusicStream(type, extraid, url[])
  23224. {
  23225. switch(type)
  23226. {
  23227. case MUSIC_MP3PLAYER:
  23228. {
  23229. if(isnull(url) && PlayerData[extraid][pStreamType] == type)
  23230. {
  23231. StopAudioStreamForPlayer(extraid);
  23232. PlayerData[extraid][pStreamType] = MUSIC_NONE;
  23233. }
  23234. else
  23235. {
  23236. PlayAudioStreamForPlayer(extraid, url);
  23237. PlayerData[extraid][pStreamType] = type;
  23238. }
  23239. }
  23240. case MUSIC_BOOMBOX:
  23241. {
  23242. foreach(new i : Player)
  23243. {
  23244. if(PlayerData[i][pBoomboxListen] == extraid)
  23245. {
  23246. if(isnull(url) && PlayerData[i][pStreamType] == type)
  23247. {
  23248. StopAudioStreamForPlayer(i);
  23249. PlayerData[i][pStreamType] = MUSIC_NONE;
  23250. }
  23251. else if(PlayerData[i][pStreamType] == MUSIC_NONE || PlayerData[i][pStreamType] == MUSIC_BOOMBOX)
  23252. {
  23253. PlayAudioStreamForPlayer(i, url);
  23254. PlayerData[i][pStreamType] = type;
  23255. }
  23256. }
  23257. }
  23258. strcpy(PlayerData[extraid][pBoomboxURL], url, 128);
  23259. }
  23260. case MUSIC_VEHICLE:
  23261. {
  23262. foreach(new i : Player)
  23263. {
  23264. if(IsPlayerInVehicle(i, extraid))
  23265. {
  23266. if(isnull(url) && PlayerData[i][pStreamType] == type)
  23267. {
  23268. StopAudioStreamForPlayer(i);
  23269. PlayerData[i][pStreamType] = MUSIC_NONE;
  23270. }
  23271. else if(PlayerData[i][pStreamType] == MUSIC_NONE || PlayerData[i][pStreamType] == MUSIC_VEHICLE)
  23272. {
  23273. PlayAudioStreamForPlayer(i, url);
  23274. PlayerData[i][pStreamType] = type;
  23275. }
  23276. }
  23277. }
  23278. strcpy(vehicleStream[extraid], url, 128);
  23279. }
  23280. }
  23281. }
  23282. DestroyWeedPlant(playerid)
  23283. {
  23284. if(PlayerData[playerid][pWeedPlanted])
  23285. {
  23286. DestroyDynamicObject(PlayerData[playerid][pWeedObject]);
  23287. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET weedplanted = 0, weedtime = 0, weedgrams = 0, weed_x = 0.0, weed_y = 0.0, weed_z = 0.0, weed_a = 0.0 WHERE uid = %i", PlayerData[playerid][pID]);
  23288. mysql_tquery(connectionID, queryBuffer);
  23289. PlayerData[playerid][pWeedPlanted] = 0;
  23290. PlayerData[playerid][pWeedTime] = 0;
  23291. PlayerData[playerid][pWeedGrams] = 0;
  23292. PlayerData[playerid][pWeedX] = 0.0;
  23293. PlayerData[playerid][pWeedY] = 0.0;
  23294. PlayerData[playerid][pWeedZ] = 0.0;
  23295. PlayerData[playerid][pWeedA] = 0.0;
  23296. }
  23297. }
  23298. DestroyBoombox(playerid)
  23299. {
  23300. if(PlayerData[playerid][pBoomboxPlaced])
  23301. {
  23302. DestroyDynamicObject(PlayerData[playerid][pBoomboxObject]);
  23303. DestroyDynamic3DTextLabel(PlayerData[playerid][pBoomboxText]);
  23304. PlayerData[playerid][pBoomboxObject] = INVALID_OBJECT_ID;
  23305. PlayerData[playerid][pBoomboxText] = Text3D:INVALID_3DTEXT_ID;
  23306. PlayerData[playerid][pBoomboxPlaced] = 0;
  23307. PlayerData[playerid][pBoomboxURL] = 0;
  23308. }
  23309. }
  23310. GetNearbyBoombox(playerid)
  23311. {
  23312. foreach(new i : Player)
  23313. {
  23314. if(PlayerData[i][pBoomboxPlaced] && IsPlayerInRangeOfDynamicObject(playerid, PlayerData[i][pBoomboxObject], 30.0))
  23315. {
  23316. return i;
  23317. }
  23318. }
  23319. return INVALID_PLAYER_ID;
  23320. }
  23321. ShowActionBubble(playerid, text[], {Float, _}:...)
  23322. {
  23323. static
  23324. args,
  23325. str[192];
  23326. /*
  23327. * Custom function that uses #emit to format variables into a string.
  23328. * This code is very fragile; touching any code here will cause crashing!
  23329. */
  23330. if ((args = numargs()) <= 2)
  23331. {
  23332. SetPlayerChatBubble(playerid, text, COLOR_PURPLE, 25.0, 6000);
  23333. }
  23334. else
  23335. {
  23336. while (--args >= 2)
  23337. {
  23338. #emit LCTRL 5
  23339. #emit LOAD.alt args
  23340. #emit SHL.C.alt 2
  23341. #emit ADD.C 12
  23342. #emit ADD
  23343. #emit LOAD.I
  23344. #emit PUSH.pri
  23345. }
  23346. #emit PUSH.S text
  23347. #emit PUSH.C 192
  23348. #emit PUSH.C str
  23349. #emit LOAD.S.pri 8
  23350. #emit ADD.C 4
  23351. #emit PUSH.pri
  23352. #emit SYSREQ.C format
  23353. #emit LCTRL 5
  23354. #emit SCTRL 4
  23355. SetPlayerChatBubble(playerid, str, COLOR_PURPLE, 25.0, 6000);
  23356. #emit RETN
  23357. }
  23358. return 1;
  23359. }
  23360. SendPlayerSplitMessage(playerid, color, const text[])
  23361. {
  23362. new
  23363. string[192],
  23364. parse[12],
  23365. length
  23366. ;
  23367. length = strlen(text);
  23368. if (length < 100)
  23369. {
  23370. SendClientMessage(playerid, color, text);
  23371. }
  23372. else
  23373. {
  23374. for (new i = 0; i < 100; i ++)
  23375. {
  23376. if ((i + 7 < length) && (text[i] == '{' && text[i + 7] == '}'))
  23377. {
  23378. strmid(parse, text, i, i + 8);
  23379. }
  23380. }
  23381. strmid(string, text, 0, 100);
  23382. SendClientMessage(playerid, color, string);
  23383. strmid(string, text, 100, length);
  23384. strins(string, "...", 0);
  23385. if (strlen(parse) > 0)
  23386. {
  23387. strins(string, parse, 0);
  23388. }
  23389. SendClientMessage(playerid, color, string);
  23390. }
  23391. }
  23392. SendSplitMessage(playerid, color, const text[], {Float, _}:...)
  23393. {
  23394. static
  23395. args,
  23396. str[192];
  23397. /*
  23398. * Custom function that uses #emit to format variables into a string.
  23399. * This code is very fragile; touching any code here will cause crashing!
  23400. */
  23401. if ((args = numargs()) <= 3)
  23402. {
  23403. SendPlayerSplitMessage(playerid, color, text);
  23404. }
  23405. else
  23406. {
  23407. while (--args >= 3)
  23408. {
  23409. #emit LCTRL 5
  23410. #emit LOAD.alt args
  23411. #emit SHL.C.alt 2
  23412. #emit ADD.C 12
  23413. #emit ADD
  23414. #emit LOAD.I
  23415. #emit PUSH.pri
  23416. }
  23417. #emit PUSH.S text
  23418. #emit PUSH.C 192
  23419. #emit PUSH.C str
  23420. #emit PUSH.S 8
  23421. #emit SYSREQ.C format
  23422. #emit LCTRL 5
  23423. #emit SCTRL 4
  23424. SendPlayerSplitMessage(playerid, color, str);
  23425. #emit RETN
  23426. }
  23427. return 1;
  23428. }
  23429. PlayerTextDrawFormatString(playerid, PlayerText:playertextid, text[], {Float, _}:...)
  23430. {
  23431. static
  23432. args,
  23433. str[192];
  23434. /*
  23435. * Custom function that uses #emit to format variables into a string.
  23436. * This code is very fragile; touching any code here will cause crashing!
  23437. */
  23438. if ((args = numargs()) <= 3)
  23439. {
  23440. PlayerTextDrawSetString(playerid, playertextid, text);
  23441. }
  23442. else
  23443. {
  23444. while (--args >= 3)
  23445. {
  23446. #emit LCTRL 5
  23447. #emit LOAD.alt args
  23448. #emit SHL.C.alt 2
  23449. #emit ADD.C 12
  23450. #emit ADD
  23451. #emit LOAD.I
  23452. #emit PUSH.pri
  23453. }
  23454. #emit PUSH.S text
  23455. #emit PUSH.C 192
  23456. #emit PUSH.C str
  23457. #emit PUSH.S 8
  23458. #emit SYSREQ.C format
  23459. #emit LCTRL 5
  23460. #emit SCTRL 4
  23461. PlayerTextDrawSetString(playerid, playertextid, str);
  23462. #emit RETN
  23463. }
  23464. return 1;
  23465. }
  23466. SendDistanceMessage(playerid, Float:distance, color, const text[], {Float, _}:...)
  23467. {
  23468. static
  23469. args,
  23470. str[192];
  23471. /*
  23472. * Custom function that uses #emit to format variables into a string.
  23473. * This code is very fragile; touching any code here will cause crashing!
  23474. */
  23475. if ((args = numargs()) <= 4)
  23476. {
  23477. foreach (new i : Player)
  23478. {
  23479. if (IsPlayerInRangeOfPlayer(i, playerid, distance))
  23480. {
  23481. SendSplitMessage(i, color, text);
  23482. }
  23483. }
  23484. }
  23485. else
  23486. {
  23487. while (--args >= 4)
  23488. {
  23489. #emit LCTRL 5
  23490. #emit LOAD.alt args
  23491. #emit SHL.C.alt 2
  23492. #emit ADD.C 12
  23493. #emit ADD
  23494. #emit LOAD.I
  23495. #emit PUSH.pri
  23496. }
  23497. #emit PUSH.S text
  23498. #emit PUSH.C 192
  23499. #emit PUSH.C str
  23500. #emit LOAD.S.pri 8
  23501. #emit CONST.alt 4
  23502. #emit SUB
  23503. #emit PUSH.pri
  23504. #emit SYSREQ.C format
  23505. #emit LCTRL 5
  23506. #emit SCTRL 4
  23507. foreach (new i : Player)
  23508. {
  23509. if (IsPlayerInRangeOfPlayer(i, playerid, distance))
  23510. {
  23511. SendSplitMessage(i, color, str);
  23512. }
  23513. }
  23514. #emit RETN
  23515. }
  23516. return 1;
  23517. }
  23518. SendClientMessageEx(playerid, color, const text[], {Float,_}:...)
  23519. {
  23520. static
  23521. args,
  23522. str[192];
  23523. if((args = numargs()) <= 3)
  23524. {
  23525. SendClientMessage(playerid, color, text);
  23526. }
  23527. else
  23528. {
  23529. while(--args >= 3)
  23530. {
  23531. #emit LCTRL 5
  23532. #emit LOAD.alt args
  23533. #emit SHL.C.alt 2
  23534. #emit ADD.C 12
  23535. #emit ADD
  23536. #emit LOAD.I
  23537. #emit PUSH.pri
  23538. }
  23539. #emit PUSH.S text
  23540. #emit PUSH.C 192
  23541. #emit PUSH.C str
  23542. #emit PUSH.S 8
  23543. #emit SYSREQ.C format
  23544. #emit LCTRL 5
  23545. #emit SCTRL 4
  23546. SendClientMessage(playerid, color, str);
  23547. #emit RETN
  23548. }
  23549. return 1;
  23550. }
  23551. SendClientMessageToAllEx(color, const text[], {Float,_}:...)
  23552. {
  23553. static
  23554. args,
  23555. str[192];
  23556. if((args = numargs()) <= 2)
  23557. {
  23558. foreach(new i : Player)
  23559. {
  23560. if(PlayerData[i][pLogged])
  23561. {
  23562. SendClientMessage(i, color, text);
  23563. }
  23564. }
  23565. }
  23566. else
  23567. {
  23568. while(--args >= 2)
  23569. {
  23570. #emit LCTRL 5
  23571. #emit LOAD.alt args
  23572. #emit SHL.C.alt 2
  23573. #emit ADD.C 12
  23574. #emit ADD
  23575. #emit LOAD.I
  23576. #emit PUSH.pri
  23577. }
  23578. #emit PUSH.S text
  23579. #emit PUSH.C 192
  23580. #emit PUSH.C str
  23581. #emit LOAD.S.pri 8
  23582. #emit ADD.C 4
  23583. #emit PUSH.pri
  23584. #emit SYSREQ.C format
  23585. #emit LCTRL 5
  23586. #emit SCTRL 4
  23587. foreach(new i : Player)
  23588. {
  23589. if(PlayerData[i][pLogged])
  23590. {
  23591. SendClientMessage(i, color, str);
  23592. }
  23593. }
  23594. #emit RETN
  23595. }
  23596. return 1;
  23597. }
  23598. Log_Write(table[], const text[], {Float,_}:...)
  23599. {
  23600. static
  23601. args,
  23602. str[1024];
  23603. if((args = numargs()) <= 2)
  23604. {
  23605. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO %e VALUES(null, NOW(), '%e')", table, text);
  23606. mysql_tquery(connectionID, queryBuffer);
  23607. }
  23608. else
  23609. {
  23610. while(--args >= 2)
  23611. {
  23612. #emit LCTRL 5
  23613. #emit LOAD.alt args
  23614. #emit SHL.C.alt 2
  23615. #emit ADD.C 12
  23616. #emit ADD
  23617. #emit LOAD.I
  23618. #emit PUSH.pri
  23619. }
  23620. #emit PUSH.S text
  23621. #emit PUSH.C 192
  23622. #emit PUSH.C str
  23623. #emit LOAD.S.pri 8
  23624. #emit ADD.C 4
  23625. #emit PUSH.pri
  23626. #emit SYSREQ.C format
  23627. #emit LCTRL 5
  23628. #emit SCTRL 4
  23629. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO %e VALUES(null, NOW(), '%e')", table, str);
  23630. mysql_tquery(connectionID, queryBuffer);
  23631. #emit RETN
  23632. }
  23633. return 1;
  23634. }
  23635. SendFactionMessage(factionid, color, const text[], {Float,_}:...)
  23636. {
  23637. static
  23638. args,
  23639. str[192];
  23640. if((args = numargs()) <= 3)
  23641. {
  23642. foreach(new i : Player)
  23643. {
  23644. if(PlayerData[i][pLogged] && PlayerData[i][pFaction] == factionid)
  23645. {
  23646. SendClientMessage(i, color, text);
  23647. }
  23648. }
  23649. }
  23650. else
  23651. {
  23652. while(--args >= 3)
  23653. {
  23654. #emit LCTRL 5
  23655. #emit LOAD.alt args
  23656. #emit SHL.C.alt 2
  23657. #emit ADD.C 12
  23658. #emit ADD
  23659. #emit LOAD.I
  23660. #emit PUSH.pri
  23661. }
  23662. #emit PUSH.S text
  23663. #emit PUSH.C 192
  23664. #emit PUSH.C str
  23665. #emit PUSH.S 8
  23666. #emit SYSREQ.C format
  23667. #emit LCTRL 5
  23668. #emit SCTRL 4
  23669. foreach(new i : Player)
  23670. {
  23671. if(PlayerData[i][pLogged] && PlayerData[i][pFaction] == factionid)
  23672. {
  23673. SendClientMessage(i, color, str);
  23674. }
  23675. }
  23676. #emit RETN
  23677. }
  23678. return 1;
  23679. }
  23680. SendGangMessage(gangid, color, const text[], {Float,_}:...)
  23681. {
  23682. static
  23683. args,
  23684. str[192];
  23685. if((args = numargs()) <= 3)
  23686. {
  23687. foreach(new i : Player)
  23688. {
  23689. if(PlayerData[i][pLogged] && PlayerData[i][pGang] == gangid)
  23690. {
  23691. SendClientMessage(i, color, text);
  23692. }
  23693. }
  23694. }
  23695. else
  23696. {
  23697. while(--args >= 3)
  23698. {
  23699. #emit LCTRL 5
  23700. #emit LOAD.alt args
  23701. #emit SHL.C.alt 2
  23702. #emit ADD.C 12
  23703. #emit ADD
  23704. #emit LOAD.I
  23705. #emit PUSH.pri
  23706. }
  23707. #emit PUSH.S text
  23708. #emit PUSH.C 192
  23709. #emit PUSH.C str
  23710. #emit PUSH.S 8
  23711. #emit SYSREQ.C format
  23712. #emit LCTRL 5
  23713. #emit SCTRL 4
  23714. foreach(new i : Player)
  23715. {
  23716. if(PlayerData[i][pLogged] && PlayerData[i][pGang] == gangid)
  23717. {
  23718. SendClientMessage(i, color, str);
  23719. }
  23720. }
  23721. #emit RETN
  23722. }
  23723. return 1;
  23724. }
  23725. SendGraphicMessage(color, string2[])
  23726. {
  23727. foreach(new i : Player)
  23728. {
  23729. if(IsPlayerConnected(i))
  23730. {
  23731. if(PlayerData[i][pGraphic] >= 1 || PlayerData[i][pAdmin] >= 5)
  23732. {
  23733. SendClientMessage(i, color, string2);
  23734. }
  23735. }
  23736. }
  23737. }
  23738. SendFMMessage(color, string2[])
  23739. {
  23740. foreach(new i : Player)
  23741. {
  23742. if(IsPlayerConnected(i))
  23743. {
  23744. if(PlayerData[i][pFactionMod] >= 1 || PlayerData[i][pGameAffairs] || PlayerData[i][pAdmin] >= 7)
  23745. {
  23746. SendClientMessage(i, color, string2);
  23747. }
  23748. }
  23749. }
  23750. }
  23751. SendGMMessage(color, string2[])
  23752. {
  23753. foreach(new i : Player)
  23754. {
  23755. if(IsPlayerConnected(i))
  23756. {
  23757. if(PlayerData[i][pGangMod] >= 1 || PlayerData[i][pGameAffairs] || PlayerData[i][pAdmin] >= 7)
  23758. {
  23759. SendClientMessage(i, color, string2);
  23760. }
  23761. }
  23762. }
  23763. }
  23764. SendAPMessage(color, string2[])
  23765. {
  23766. foreach(new i : Player)
  23767. {
  23768. if(IsPlayerConnected(i))
  23769. {
  23770. if(PlayerData[i][pAdminPersonnel] >= 1 || PlayerData[i][pAdmin] >= MANAGEMENT)
  23771. {
  23772. SendClientMessage(i, color, string2);
  23773. }
  23774. }
  23775. }
  23776. }
  23777. SendWDMessage(color, string2[])
  23778. {
  23779. foreach(new i : Player)
  23780. {
  23781. if(IsPlayerConnected(i))
  23782. {
  23783. if(PlayerData[i][pWebDev] >= 1 || PlayerData[i][pAdmin] >= MANAGEMENT)
  23784. {
  23785. SendClientMessage(i, color, string2);
  23786. }
  23787. }
  23788. }
  23789. }
  23790. SendDGAMessage(color, string2[])
  23791. {
  23792. foreach(new i : Player)
  23793. {
  23794. if(IsPlayerConnected(i))
  23795. {
  23796. if(PlayerData[i][pGameAffairs] >= 1 || PlayerData[i][pAdmin] >= MANAGEMENT)
  23797. {
  23798. SendClientMessage(i, color, string2);
  23799. }
  23800. }
  23801. }
  23802. }
  23803. stock IsPlayerNearPlayer(playerid, TargetID, Float:radius)
  23804. {
  23805. static
  23806. Float:fX,
  23807. Float:fY,
  23808. Float:fZ;
  23809. GetPlayerPos(TargetID, fX, fY, fZ);
  23810. return (GetPlayerInterior(playerid) == GetPlayerInterior(TargetID) && GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(TargetID)) && IsPlayerInRangeOfPoint(playerid, radius, fX, fY, fZ);
  23811. }
  23812. //----------------------------------------------------------
  23813. stock SendNearbyMessage(playerid, Float:radius, color, const str[], {Float,_}:...)
  23814. {
  23815. static
  23816. args,
  23817. start,
  23818. end,
  23819. string[144]
  23820. ;
  23821. #emit LOAD.S.pri 8
  23822. #emit STOR.pri args
  23823. if (args > 16)
  23824. {
  23825. #emit ADDR.pri str
  23826. #emit STOR.pri start
  23827. for (end = start + (args - 16); end > start; end -= 4)
  23828. {
  23829. #emit LREF.pri end
  23830. #emit PUSH.pri
  23831. }
  23832. #emit PUSH.S str
  23833. #emit PUSH.C 144
  23834. #emit PUSH.C string
  23835. #emit LOAD.S.pri 8
  23836. #emit CONST.alt 4
  23837. #emit SUB
  23838. #emit PUSH.pri
  23839. #emit SYSREQ.C format
  23840. #emit LCTRL 5
  23841. #emit SCTRL 4
  23842. foreach (new i : Player)
  23843. {
  23844. if (IsPlayerNearPlayer(i, playerid, radius)) {
  23845. SendClientMessage(i, color, string);
  23846. }
  23847. }
  23848. return 1;
  23849. }
  23850. foreach (new i : Player)
  23851. {
  23852. if (IsPlayerNearPlayer(i, playerid, radius)) {
  23853. SendClientMessage(i, color, str);
  23854. }
  23855. }
  23856. return 1;
  23857. }
  23858. SendAdminMessage(color, const text[], {Float,_}:...)
  23859. {
  23860. static
  23861. args,
  23862. str[192];
  23863. if((args = numargs()) <= 2)
  23864. {
  23865. foreach(new i : Player)
  23866. {
  23867. if(PlayerData[i][pLogged] && PlayerData[i][pAdmin] > 0)
  23868. {
  23869. SendClientMessage(i, color, text);
  23870. }
  23871. }
  23872. print(text);
  23873. }
  23874. else
  23875. {
  23876. while(--args >= 2)
  23877. {
  23878. #emit LCTRL 5
  23879. #emit LOAD.alt args
  23880. #emit SHL.C.alt 2
  23881. #emit ADD.C 12
  23882. #emit ADD
  23883. #emit LOAD.I
  23884. #emit PUSH.pri
  23885. }
  23886. #emit PUSH.S text
  23887. #emit PUSH.C 192
  23888. #emit PUSH.C str
  23889. #emit LOAD.S.pri 8
  23890. #emit ADD.C 4
  23891. #emit PUSH.pri
  23892. #emit SYSREQ.C format
  23893. #emit LCTRL 5
  23894. #emit SCTRL 4
  23895. foreach(new i : Player)
  23896. {
  23897. if(PlayerData[i][pLogged] && PlayerData[i][pAdmin] > 0)
  23898. {
  23899. SendClientMessage(i, color, str);
  23900. }
  23901. }
  23902. print(str);
  23903. #emit RETN
  23904. }
  23905. return 1;
  23906. }
  23907. SendHelperMessage(color, const text[], {Float,_}:...)
  23908. {
  23909. static
  23910. args,
  23911. str[192];
  23912. if((args = numargs()) <= 2)
  23913. {
  23914. foreach(new i : Player)
  23915. {
  23916. if(PlayerData[i][pLogged] && PlayerData[i][pHelper] > 0)
  23917. {
  23918. SendClientMessage(i, color, text);
  23919. }
  23920. }
  23921. print(text);
  23922. }
  23923. else
  23924. {
  23925. while(--args >= 2)
  23926. {
  23927. #emit LCTRL 5
  23928. #emit LOAD.alt args
  23929. #emit SHL.C.alt 2
  23930. #emit ADD.C 12
  23931. #emit ADD
  23932. #emit LOAD.I
  23933. #emit PUSH.pri
  23934. }
  23935. #emit PUSH.S text
  23936. #emit PUSH.C 192
  23937. #emit PUSH.C str
  23938. #emit LOAD.S.pri 8
  23939. #emit ADD.C 4
  23940. #emit PUSH.pri
  23941. #emit SYSREQ.C format
  23942. #emit LCTRL 5
  23943. #emit SCTRL 4
  23944. foreach(new i : Player)
  23945. {
  23946. if(PlayerData[i][pLogged] && PlayerData[i][pHelper] > 0)
  23947. {
  23948. SendClientMessage(i, color, str);
  23949. }
  23950. }
  23951. print(str);
  23952. #emit RETN
  23953. }
  23954. return 1;
  23955. }
  23956. SendTurfMessage(turfid, color, const text[], {Float,_}:...)
  23957. {
  23958. static
  23959. args,
  23960. str[192];
  23961. if((args = numargs()) <= 3)
  23962. {
  23963. foreach(new i : Player)
  23964. {
  23965. if(PlayerData[i][pLogged] && GetNearbyTurf(i) == turfid && PlayerData[i][pToggleTurfs] == 0)
  23966. {
  23967. SendClientMessage(i, color, text);
  23968. }
  23969. }
  23970. }
  23971. else
  23972. {
  23973. while(--args >= 3)
  23974. {
  23975. #emit LCTRL 5
  23976. #emit LOAD.alt args
  23977. #emit SHL.C.alt 2
  23978. #emit ADD.C 12
  23979. #emit ADD
  23980. #emit LOAD.I
  23981. #emit PUSH.pri
  23982. }
  23983. #emit PUSH.S text
  23984. #emit PUSH.C 192
  23985. #emit PUSH.C str
  23986. #emit PUSH.S 8
  23987. #emit SYSREQ.C format
  23988. #emit LCTRL 5
  23989. #emit SCTRL 4
  23990. foreach(new i : Player)
  23991. {
  23992. if(PlayerData[i][pLogged] && GetNearbyTurf(i) == turfid && PlayerData[i][pToggleTurfs] == 0)
  23993. {
  23994. SendClientMessage(i, color, str);
  23995. }
  23996. }
  23997. #emit RETN
  23998. }
  23999. return 1;
  24000. }
  24001. SendStaffMessage(color, const text[], {Float,_}:...)
  24002. {
  24003. static
  24004. args,
  24005. str[192];
  24006. if((args = numargs()) <= 2)
  24007. {
  24008. foreach(new i : Player)
  24009. {
  24010. if(PlayerData[i][pLogged] && (PlayerData[i][pAdmin] > 0 || PlayerData[i][pHelper] > 0))
  24011. {
  24012. SendClientMessage(i, color, text);
  24013. }
  24014. }
  24015. print(text);
  24016. }
  24017. else
  24018. {
  24019. while(--args >= 2)
  24020. {
  24021. #emit LCTRL 5
  24022. #emit LOAD.alt args
  24023. #emit SHL.C.alt 2
  24024. #emit ADD.C 12
  24025. #emit ADD
  24026. #emit LOAD.I
  24027. #emit PUSH.pri
  24028. }
  24029. #emit PUSH.S text
  24030. #emit PUSH.C 192
  24031. #emit PUSH.C str
  24032. #emit LOAD.S.pri 8
  24033. #emit ADD.C 4
  24034. #emit PUSH.pri
  24035. #emit SYSREQ.C format
  24036. #emit LCTRL 5
  24037. #emit SCTRL 4
  24038. foreach(new i : Player)
  24039. {
  24040. if(PlayerData[i][pLogged] && (PlayerData[i][pAdmin] > 0 || PlayerData[i][pHelper] > 0))
  24041. {
  24042. SendClientMessage(i, color, str);
  24043. }
  24044. }
  24045. print(str);
  24046. #emit RETN
  24047. }
  24048. return 1;
  24049. }
  24050. SetPlayerBubbleText(playerid, Float:drawdistance, color, text[], {Float,_}:...)
  24051. {
  24052. static
  24053. args,
  24054. str[192];
  24055. if((args = numargs()) <= 4)
  24056. {
  24057. SetPlayerChatBubble(playerid, text, color, drawdistance, 8000);
  24058. }
  24059. else
  24060. {
  24061. while(--args >= 4)
  24062. {
  24063. #emit LCTRL 5
  24064. #emit LOAD.alt args
  24065. #emit SHL.C.alt 2
  24066. #emit ADD.C 12
  24067. #emit ADD
  24068. #emit LOAD.I
  24069. #emit PUSH.pri
  24070. }
  24071. #emit PUSH.S text
  24072. #emit PUSH.C 192
  24073. #emit PUSH.C str
  24074. #emit LOAD.S.pri 8
  24075. #emit CONST.alt 4
  24076. #emit SUB
  24077. #emit PUSH.pri
  24078. #emit SYSREQ.C format
  24079. #emit LCTRL 5
  24080. #emit SCTRL 4
  24081. SetPlayerChatBubble(playerid, str, color, drawdistance, 8000);
  24082. #emit RETN
  24083. }
  24084. return 1;
  24085. }
  24086. SendProximityMessage(playerid, Float:radius, color, const text[], {Float,_}:...)
  24087. {
  24088. static
  24089. args,
  24090. str[192];
  24091. if((args = numargs()) <= 4)
  24092. {
  24093. foreach(new i : Player)
  24094. {
  24095. if(IsPlayerInRangeOfPlayer(i, playerid, radius) || PlayerData[i][pListen])
  24096. {
  24097. SendClientMessage(i, color, text);
  24098. }
  24099. }
  24100. }
  24101. else
  24102. {
  24103. while(--args >= 4)
  24104. {
  24105. #emit LCTRL 5
  24106. #emit LOAD.alt args
  24107. #emit SHL.C.alt 2
  24108. #emit ADD.C 12
  24109. #emit ADD
  24110. #emit LOAD.I
  24111. #emit PUSH.pri
  24112. }
  24113. #emit PUSH.S text
  24114. #emit PUSH.C 192
  24115. #emit PUSH.C str
  24116. #emit LOAD.S.pri 8
  24117. #emit CONST.alt 4
  24118. #emit SUB
  24119. #emit PUSH.pri
  24120. #emit SYSREQ.C format
  24121. #emit LCTRL 5
  24122. #emit SCTRL 4
  24123. foreach(new i : Player)
  24124. {
  24125. if(IsPlayerInRangeOfPlayer(i, playerid, radius) || PlayerData[i][pListen])
  24126. {
  24127. SendClientMessage(i, color, str);
  24128. }
  24129. }
  24130. #emit RETN
  24131. }
  24132. return 1;
  24133. }
  24134. SendProximityFadeMessage(playerid, Float:radius, const text[], color1, color2, color3, color4, color5)
  24135. {
  24136. foreach(new i : Player)
  24137. {
  24138. if(IsPlayerInRangeOfPlayer(i, playerid, radius / 16))
  24139. {
  24140. SendClientMessage(i, color1, text);
  24141. }
  24142. else if(IsPlayerInRangeOfPlayer(i, playerid, radius / 8))
  24143. {
  24144. SendClientMessage(i, color2, text);
  24145. }
  24146. else if(IsPlayerInRangeOfPlayer(i, playerid, radius / 4))
  24147. {
  24148. SendClientMessage(i, color3, text);
  24149. }
  24150. else if(IsPlayerInRangeOfPlayer(i, playerid, radius / 2))
  24151. {
  24152. SendClientMessage(i, color4, text);
  24153. }
  24154. else if(IsPlayerInRangeOfPlayer(i, playerid, radius))
  24155. {
  24156. SendClientMessage(i, color5, text);
  24157. }
  24158. else if(PlayerData[i][pListen])
  24159. {
  24160. SendClientMessage(i, color5, text);
  24161. }
  24162. }
  24163. }
  24164. // ---------------------------------------
  24165. forward TutorialTimer(playerid, stage);
  24166. public TutorialTimer(playerid, stage)
  24167. {
  24168. //new string[2048];
  24169. if(PlayerData[playerid][pLogged] && PlayerData[playerid][pTutorial])
  24170. {
  24171. switch(stage)
  24172. {
  24173. /*case 1:
  24174. {
  24175. ClearChat(playerid);
  24176. ShowTutorialTextDraws(playerid);
  24177. InterpolateCameraPos(playerid, -37.715755, -2101.054931, 121.661994, 3031.810302, -638.207458, 196.425064, 12000);
  24178. InterpolateCameraLookAt(playerid, -33.558185, -2098.420898, 120.781112, 3028.381103, -641.794555, 195.814514, 12000);
  24179. format(string, sizeof(string), "Welcome to Old School Roleplay! Thanks for choosing us as your Roleplay Destination, we hope you enjoy your stay!");
  24180. strcat(string, "~n~Here at Ultimate, we pride ourselves in being a Medium Roleplay Community. Roleplay that is actually fun!");
  24181. strcat(string, "~n~What fun is a community where the rules are so strict, you've got to roleplay breathing? We ain't got time for that.");
  24182. strcat(string, "~n~Anyway, please enjoy this short introduction to get to know Old School Roleplay on a personal level.");
  24183. TextDrawSetString(Tutorial[2], string);
  24184. PlayerData[playerid][pTutorialTimer] = SetTimerEx("TutorialTimer", 16000, false, "ii", playerid, 2);
  24185. }
  24186. case 2:
  24187. {
  24188. ClearChat(playerid);
  24189. InterpolateCameraPos(playerid, 3022.353027, -640.721740, 193.414672, 1227.661254, -1835.082397, 25.913717, 12000);
  24190. InterpolateCameraLookAt(playerid, 3019.046142, -644.348388, 192.459640, 1226.208251, -1830.758422, 23.866357, 12000);
  24191. SetPlayerPos(playerid, 1223.7166,-1851.4952,8.3894);
  24192. format(string, sizeof(string), "You're about to see our Department of Motor Vehicles. This is where you'll obtain your drivers license.");
  24193. strcat(string, "~n~While you may drive without a license, it is recommended that you obtain one, else LSPD will be after you!");
  24194. strcat(string, "~n~Once you've obtained your drivers license, it's time to get a job! We have many great jobs to offer.");
  24195. strcat(string, "~n~If you're looking for a decent starting job, try out our courier job, garbage man job, or miner job!");
  24196. TextDrawSetString(Tutorial[2], string);
  24197. PlayerData[playerid][pTutorialTimer] = SetTimerEx("TutorialTimer", 15000, false, "ii", playerid, 3);
  24198. }
  24199. case 3:
  24200. {
  24201. PlayerData[playerid][pTutorialTimer] = SetTimerEx("TutorialTimer", 1000, false, "ii", playerid, 4);
  24202. }
  24203. case 4:
  24204. {
  24205. ClearChat(playerid);
  24206. InterpolateCameraPos(playerid, 1244.807250, -1896.417480, 62.970653, 1320.417602, -1480.743286, 78.601524, 5000);
  24207. InterpolateCameraLookAt(playerid, 1243.523193, -1892.262817, 60.502914, 1318.168212, -1476.724731, 76.654434, 5000);
  24208. SetPlayerPos(playerid, 1310.9757,-1445.2444,-27.2783);
  24209. format(string, sizeof(string), "This is the market area, the most common hangout on Old School Roleplay");
  24210. strcat(string, "~n~You'll be starting out as a level 1 newbie with no upgrades. You'll need to level up with respect points.");
  24211. strcat(string, "~n~For every hour you play, you'll gain 1 respect point. You earn this on your paycheck.");
  24212. strcat(string, "~n~Paychecks will be given out once every hour when the time hits xx:00.");
  24213. strcat(string, "~n~As a new player, your inventory is severely limited. You'll need to upgrade it with upgrade points.");
  24214. strcat(string, "~n~You'll also start out with a 2 hour weapon restriction to avoid deathmatching.");
  24215. strcat(string, "~n~We believe that our upgrades system gives the players an incentive to play and work hard.");
  24216. TextDrawSetString(Tutorial[2], string);
  24217. PlayerData[playerid][pTutorialTimer] = SetTimerEx("TutorialTimer", 15000, false, "ii", playerid, 5);
  24218. }
  24219. case 5:
  24220. {
  24221. ClearChat(playerid);
  24222. InterpolateCameraPos(playerid, 1320.417602, -1480.743408, 78.601516, 1482.683227, -1628.944824, 44.981044, 5000);
  24223. InterpolateCameraLookAt(playerid, 1317.750488, -1476.783447, 77.116455, 1486.893188, -1631.457153, 43.999187, 5000);
  24224. SetPlayerPos(playerid, 1493.3798,-1668.6997,-15.7351);
  24225. format(string, sizeof(string), "Old School Roleplay has many great factions to offer.");
  24226. strcat(string, "~n~You're currently looking at the Los Santos Police Department.");
  24227. strcat(string, "~n~Factions are legal organizations, each with their own unique roles.");
  24228. strcat(string, "~n~Factions are dedicated to helping the citizens of Los Santos,");
  24229. strcat(string, "~n~Whether it be enforcing the law, saving lives, or reporting the news.");
  24230. strcat(string, "~n~You can apply to become a faction member on our forum at os-rp.net");
  24231. strcat(string, "~n~Being in a faction is quite fun and can lead to some good cash and perks for you!");
  24232. TextDrawSetString(Tutorial[2], string);
  24233. PlayerData[playerid][pTutorialTimer] = SetTimerEx("TutorialTimer", 15000, false, "ii", playerid, 6);
  24234. }
  24235. case 6:
  24236. {
  24237. ClearChat(playerid);
  24238. InterpolateCameraPos(playerid, 1477.633544, -1627.411010, 50.594058, 2446.644531, -1661.652465, 29.177988, 7000);
  24239. InterpolateCameraLookAt(playerid, 1481.815795, -1629.860473, 49.365783, 2451.346191, -1662.243896, 27.582590, 7000);
  24240. SetPlayerPos(playerid, 2467.3708,-1666.0961,7.8903);
  24241. format(string, sizeof(string), "Doing things the legal way isnt your type? We've got you covered.");
  24242. strcat(string, "~n~Here on Old School Roleplay we have an amazing gang system with many unique features!");
  24243. strcat(string, "~n~Gangs are illegal organizations you may join by roleplaying with the higher ranks.");
  24244. strcat(string, "~n~Gangs offer many different types of roleplay, from street gangs to mafias & cartels.");
  24245. strcat(string, "~n~Gangs main objectives are to own the city of Los Santos by capturing points & turfs");
  24246. strcat(string, "~n~Grab yourself a gun and roleplay your way into a gang!");
  24247. strcat(string, "~n~You can also apply for your own gang slot at os-rp.net!!");
  24248. TextDrawSetString(Tutorial[2], string);
  24249. PlayerData[playerid][pTutorialTimer] = SetTimerEx("TutorialTimer", 15000, false, "ii", playerid, 7);
  24250. }
  24251. case 7:
  24252. {
  24253. ClearChat(playerid);
  24254. InterpolateCameraPos(playerid, 2426.551025, -1659.479614, 44.816139, 2097.071533, -1293.159912, 29.785530, 7000);
  24255. InterpolateCameraLookAt(playerid, 2431.008300, -1659.783935, 42.571231, 2095.802246, -1288.467041, 28.616756, 7000);
  24256. SetPlayerPos(playerid, 2093.6177,-1302.5441,4.6590);
  24257. format(string, sizeof(string), "Want your own piece of real estate? We've got you covered!");
  24258. strcat(string, "~n~Here on Old School Roleplay we offer a wide variety of property types you may own.");
  24259. strcat(string, "~n~Buying your own house will allow you to customize the interior and store your goodies!");
  24260. strcat(string, "~n~Buying a garage will allow you to keep your car from being stolen, repair it, and upgrade it! ");
  24261. strcat(string, "~n~Buying your own business is an excellent source of income! There are many different types!");
  24262. strcat(string, "~n~Lands are quite special. You can own your own piece of the map!");
  24263. strcat(string, "~n~Owning a land allows you to place walls and other objects, and customize your piece of land.");
  24264. TextDrawSetString(Tutorial[2], string);
  24265. PlayerData[playerid][pTutorialTimer] = SetTimerEx("TutorialTimer", 15000, false, "ii", playerid, 8);
  24266. }
  24267. case 8:
  24268. {
  24269. PlayerData[playerid][pTutorialTimer] = SetTimerEx("TutorialTimer", 1000, false, "ii", playerid, 9);
  24270. }
  24271. case 9:
  24272. {
  24273. ClearChat(playerid);
  24274. InterpolateCameraPos(playerid, 2100.492675, -1313.117553, 40.094261, 2214.083496, -1122.290161, 34.281135, 7000);
  24275. InterpolateCameraLookAt(playerid, 2099.261718, -1308.616088, 38.299301, 2214.811767, -1127.109375, 33.165603, 7000);
  24276. SetPlayerPos(playerid, 2216.8718,-1122.6305,4.1262);
  24277. format(string, sizeof(string), "Being a roleplay server, we do have rules, but we promise they're not too bad!");
  24278. strcat(string, "~n~1.) No deathmatching, e.g. killing without a proper reason. Don't ruin it for everyone else.");
  24279. strcat(string, "~n~2.) No metagaming. Metagaming is mixing OOC information in character.");
  24280. strcat(string, "~n~3.) No powergaming. Powergaming is commiting unrealistic acts and forcing actions upon others.");
  24281. strcat(string, "~n~4.) No hacking/cheating. We have zero tolerance for people who use cheats. Permanent ban.");
  24282. strcat(string, "~n~5.) No exploiting. If you find a bug that gives you an unfair advantage, report it on the forums.");
  24283. strcat(string, "~n~Please visit our website - os-rp.net for a complete list of our rules.!");
  24284. TextDrawSetString(Tutorial[2], string);
  24285. PlayerData[playerid][pTutorialTimer] = SetTimerEx("TutorialTimer", 18000, false, "ii", playerid, 10);
  24286. }
  24287. case 10:
  24288. {
  24289. ClearChat(playerid);
  24290. InterpolateCameraPos(playerid, 2214.083251, -1122.290527, 34.281147, 797.200866, -1325.562011, 16.992176, 12000);
  24291. InterpolateCameraLookAt(playerid, 2215.083740, -1127.120239, 33.460655, 800.632263, -1329.196899, 16.878904, 12000);
  24292. SetPlayerPos(playerid, 798.7332,-1325.8041,-18.0216);
  24293. format(string, sizeof(string), "Thanks for taking the time to read our tutorial, we greatly appreciate it.");
  24294. strcat(string, "~n~We know you'll have tons of fun here, and meet many great people.");
  24295. strcat(string, "~n~So get out there! Get a job and buy yourself some property! Make a name for yourself!");
  24296. strcat(string, "~n~You'll be spawned in just a moment.");
  24297. TextDrawSetString(Tutorial[2], string);
  24298. PlayerData[playerid][pTutorialTimer] = SetTimerEx("TutorialTimer", 15000, false, "ii", playerid, 11);
  24299. }*/
  24300. case 11:
  24301. {
  24302. PlayerData[playerid][pTutorial] = 0;
  24303. PlayerData[playerid][pSetup] = 0;
  24304. HideTutorialTextDraws(playerid);
  24305. SetPlayerSkin(playerid, PlayerData[playerid][pSkin]);
  24306. SetPlayerPos(playerid, 1585.4670,-2332.8362,13.5890);
  24307. SetPlayerFacingAngle(playerid, 87.7721);
  24308. print("Spawned player on spawn 2");
  24309. SetPlayerVirtualWorld(playerid, 0);
  24310. SetCameraBehindPlayer(playerid);
  24311. StopAudioStreamForPlayer(playerid);
  24312. TogglePlayerControllable(playerid, 1);
  24313. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET setup = 0, gender = %i, age = %i, skin = %i WHERE uid = %i", PlayerData[playerid][pGender], PlayerData[playerid][pAge], PlayerData[playerid][pSkin], PlayerData[playerid][pID]);
  24314. mysql_tquery(connectionID, queryBuffer);
  24315. SendClientMessage(playerid, COLOR_WHITE, "Welcome to {00aa00}Old School Roleplay{FFFFFF}. Make sure to visit os-rp.net for news and updates.");
  24316. SendClientMessage(playerid, COLOR_WHITE, "Use the {FFFF90}/locate{FFFFFF} command to point to locations of jobs, businesses, and common places.");
  24317. StopAudioStreamForPlayer(playerid);
  24318. DestroyDynamic3DTextLabel(fRepfamtext[playerid]);
  24319. fRepfamtext[playerid] = Text3D:INVALID_3DTEXT_ID;
  24320. SendStaffMessage(COLOR_YELLOW, "OnPlayerSpawn: %s[%d] has just spawned on Old School Roleplay for the first time!", GetRPName(playerid), playerid);
  24321. SendClientMessage(playerid, COLOR_AQUA, "You need a driver's license, the DMV has been marked on your map. Navigate to the marker to begin your drivers test.");
  24322. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  24323. SetPlayerCheckpoint(playerid, 1219.2590, -1812.1093, 16.5938, 3.0);
  24324. }
  24325. }
  24326. }
  24327. }
  24328. forward Countdown(playerid, count);
  24329. public Countdown(playerid, count)
  24330. {
  24331. foreach(new i : Player)
  24332. {
  24333. if(PlayerData[i][pJoinedEvent])
  24334. {
  24335. switch(count)
  24336. {
  24337. case 3:
  24338. {
  24339. GameTextForPlayer(i, "~g~3", 1500, 3);
  24340. PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
  24341. }
  24342. case 2:
  24343. {
  24344. GameTextForPlayer(i, "~g~2", 1500, 3);
  24345. PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
  24346. }
  24347. case 1:
  24348. {
  24349. GameTextForPlayer(i, "~g~1", 1500, 3);
  24350. PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
  24351. }
  24352. case 0:
  24353. {
  24354. GameTextForPlayer(i, "~g~Go! Go! Go!", 2000, 3);
  24355. PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
  24356. }
  24357. }
  24358. }
  24359. }
  24360. count--;
  24361. if(count >= 0)
  24362. {
  24363. SetTimerEx("Countdown", 1000, false, "ii", playerid, count);
  24364. }
  24365. }
  24366. #if defined SERVER_INTRO
  24367. forward ShowLoginScreenTextdraw(playerid, type);
  24368. public ShowLoginScreenTextdraw(playerid, type)
  24369. {
  24370. if(PlayerData[playerid][pWatchingIntro])
  24371. {
  24372. if(type == 1) {
  24373. TextDrawShowForPlayer(playerid, introTextdraws[3]);
  24374. } else if(type == 2) {
  24375. TextDrawShowForPlayer(playerid, introTextdraws[5]);
  24376. } else if(type == 3) {
  24377. TextDrawShowForPlayer(playerid, introTextdraws[19]);
  24378. } else if(type == 4) {
  24379. TextDrawShowForPlayer(playerid, introTextdraws[21]);
  24380. } else if(type == 5) {
  24381. TextDrawShowForPlayer(playerid, introTextdraws[24]);
  24382. } else if(type == 6) {
  24383. TextDrawShowForPlayer(playerid, introTextdraws[25]);
  24384. }
  24385. }
  24386. }
  24387. forward StreamNextStep(playerid, type);
  24388. public StreamNextStep(playerid, type)
  24389. {
  24390. if(!PlayerData[playerid][pWatchingIntro])
  24391. {
  24392. return 0;
  24393. }
  24394. switch(type)
  24395. {
  24396. case 0:
  24397. {
  24398. InterpolateCameraPos(playerid, 187.600982, -1791.727050, 119.087432, 193.731567, -1789.235473, 118.845245, 5000);
  24399. InterpolateCameraLookAt(playerid, 189.006942, -1790.279785, 114.512641, 195.057144, -1788.512817, 114.078620, 5000);
  24400. SetTimerEx("StreamNextStep", 4500, false, "ii", playerid, 1);
  24401. ClearChat(playerid);
  24402. TextDrawHideForPlayer(playerid, introTextdraws[2]);
  24403. TextDrawHideForPlayer(playerid, introTextdraws[3]);
  24404. TextDrawShowForPlayer(playerid, introTextdraws[4]);
  24405. SetTimerEx("ShowLoginScreenTextdraw", 2000, false, "ii", playerid, 2);
  24406. }
  24407. case 1:
  24408. {
  24409. InterpolateCameraPos(playerid, 300.803771, -1753.841796, 59.482250, 332.887237, -1753.466674, 60.534908, 4000);
  24410. InterpolateCameraLookAt(playerid, 302.467315, -1749.504394, 57.633026, 334.005126, -1748.907470, 58.813385, 4000);
  24411. SetTimerEx("StreamNextStep", 4000-600, false, "ii", playerid, 2);
  24412. ClearChat(playerid);
  24413. TextDrawHideForPlayer(playerid, introTextdraws[4]);
  24414. TextDrawHideForPlayer(playerid, introTextdraws[5]);
  24415. TextDrawShowForPlayer(playerid, introTextdraws[6]);
  24416. TextDrawShowForPlayer(playerid, introTextdraws[7]);
  24417. }
  24418. case 2:
  24419. {
  24420. InterpolateCameraPos(playerid, 350.840972, -1794.716308, 13.146982, 346.193756, -1800.415649, 10.697548, 8000);
  24421. InterpolateCameraLookAt(playerid, 348.053558, -1790.653564, 12.295993, 342.141357, -1797.657592, 9.712170, 8000);
  24422. SetTimerEx("StreamNextStep", 8000-600, false, "ii", playerid, 3);
  24423. ClearChat(playerid);
  24424. TextDrawHideForPlayer(playerid, introTextdraws[6]);
  24425. TextDrawHideForPlayer(playerid, introTextdraws[7]);
  24426. TextDrawShowForPlayer(playerid, introTextdraws[8]);
  24427. TextDrawShowForPlayer(playerid, introTextdraws[9]);
  24428. TextDrawShowForPlayer(playerid, introTextdraws[10]);
  24429. TextDrawShowForPlayer(playerid, introTextdraws[11]);
  24430. }
  24431. case 3:
  24432. {
  24433. InterpolateCameraPos(playerid, 169.602859, -1775.647705, 6.933395, 169.617141, -1776.156250, 12.790164, 5000);
  24434. InterpolateCameraLookAt(playerid, 169.547332, -1770.651367, 7.117267, 169.588928, -1771.159301, 12.618641, 5000);
  24435. SetTimerEx("StreamNextStep", 4500, false, "ii", playerid, 4);
  24436. ClearChat(playerid);
  24437. TextDrawHideForPlayer(playerid, introTextdraws[8]);
  24438. TextDrawHideForPlayer(playerid, introTextdraws[9]);
  24439. TextDrawHideForPlayer(playerid, introTextdraws[10]);
  24440. TextDrawHideForPlayer(playerid, introTextdraws[11]);
  24441. TextDrawShowForPlayer(playerid, introTextdraws[12]);
  24442. TextDrawShowForPlayer(playerid, introTextdraws[13]);
  24443. }
  24444. case 4:
  24445. {
  24446. InterpolateCameraPos(playerid, 386.273284, -2030.129516, 59.993469, 395.822113, -2044.595703, 59.993469, 5000);
  24447. InterpolateCameraLookAt(playerid, 386.591949, -2029.832275, 55.012496, 396.252319, -2044.526245, 55.012496, 5000);
  24448. SetTimerEx("StreamNextStep", 4500, false, "ii", playerid, 5);
  24449. ClearChat(playerid);
  24450. TextDrawHideForPlayer(playerid, introTextdraws[12]);
  24451. TextDrawHideForPlayer(playerid, introTextdraws[13]);
  24452. TextDrawShowForPlayer(playerid, introTextdraws[14]);
  24453. TextDrawShowForPlayer(playerid, introTextdraws[15]);
  24454. }
  24455. case 5:
  24456. {
  24457. InterpolateCameraPos(playerid, 341.018402, -2095.904052, 6.937077, 342.805603, -2096.498535, 6.648118, 5000);
  24458. InterpolateCameraLookAt(playerid, 345.258972, -2093.501220, 5.821543, 347.304443, -2094.563964, 5.639461, 5000);
  24459. SetTimerEx("StreamNextStep", 4500, false, "ii", playerid, 6);
  24460. ClearChat(playerid);
  24461. TextDrawHideForPlayer(playerid, introTextdraws[14]);
  24462. TextDrawHideForPlayer(playerid, introTextdraws[15]);
  24463. TextDrawShowForPlayer(playerid, introTextdraws[16]);
  24464. TextDrawShowForPlayer(playerid, introTextdraws[17]);
  24465. }
  24466. case 6:
  24467. {
  24468. InterpolateCameraPos(playerid, 481.641052, -1804.006835, 6.803627, 484.250549, -1802.375244, 6.660738, 5000);
  24469. InterpolateCameraLookAt(playerid, 485.734344, -1801.318481, 5.794973, 488.679290, -1800.236572, 5.759444, 5000);
  24470. SetTimerEx("StreamNextStep", 4500, false, "ii", playerid, 7);
  24471. ClearChat(playerid);
  24472. TextDrawHideForPlayer(playerid, introTextdraws[16]);
  24473. TextDrawHideForPlayer(playerid, introTextdraws[17]);
  24474. TextDrawShowForPlayer(playerid, introTextdraws[18]);
  24475. SetTimerEx("ShowLoginScreenTextdraw", 2000, false, "ii", playerid, 3);
  24476. //TextDrawShowForPlayer(playerid, introTextdraws[19]);
  24477. }
  24478. case 7:
  24479. {
  24480. InterpolateCameraPos(playerid, 662.689147, -1868.981201, 6.513285, 665.048583, -1870.174438, 6.864079, 5000);
  24481. InterpolateCameraLookAt(playerid, 658.142028, -1867.027709, 5.800874, 661.006286, -1867.294311, 6.260089, 5000);
  24482. SetTimerEx("StreamNextStep", 4500, false, "ii", playerid, 8);
  24483. ClearChat(playerid);
  24484. TextDrawHideForPlayer(playerid, introTextdraws[18]);
  24485. TextDrawHideForPlayer(playerid, introTextdraws[19]);
  24486. TextDrawShowForPlayer(playerid, introTextdraws[20]);
  24487. SetTimerEx("ShowLoginScreenTextdraw", 2000, false, "ii", playerid, 4);
  24488. //TextDrawShowForPlayer(playerid, introTextdraws[21]);
  24489. }
  24490. case 8:
  24491. {
  24492. InterpolateCameraPos(playerid, 542.343933, -1901.457519, 2.008791, 544.523376, -1901.883666, 2.085470, 5000);
  24493. InterpolateCameraLookAt(playerid, 544.995666, -1897.256958, 2.577868, 546.892395, -1897.521118, 2.681705, 5000);
  24494. SetTimerEx("StreamNextStep", 4500, false, "ii", playerid, 9);
  24495. ClearChat(playerid);
  24496. TextDrawHideForPlayer(playerid, introTextdraws[20]);
  24497. TextDrawHideForPlayer(playerid, introTextdraws[21]);
  24498. TextDrawShowForPlayer(playerid, introTextdraws[22]);
  24499. }
  24500. case 9:
  24501. {
  24502. InterpolateCameraPos(playerid, 542.945800, -1863.699707, 4.435829, 539.996215, -1863.695556, 4.304386, 7000);
  24503. InterpolateCameraLookAt(playerid, 537.950744, -1863.694213, 4.213245, 535.009887, -1863.990478, 4.081802, 7000);
  24504. SetTimerEx("StreamNextStep", 6500, false, "ii", playerid, 10);
  24505. ClearChat(playerid);
  24506. TextDrawHideForPlayer(playerid, introTextdraws[22]);
  24507. TextDrawShowForPlayer(playerid, introTextdraws[23]);
  24508. SetTimerEx("ShowLoginScreenTextdraw", 1000, false, "ii", playerid, 5);
  24509. SetTimerEx("ShowLoginScreenTextdraw", 3000, false, "ii", playerid, 6);
  24510. }
  24511. case 10:
  24512. {
  24513. for(new i = 0; i < 26; i ++)
  24514. {
  24515. TextDrawHideForPlayer(playerid, introTextdraws[i]);
  24516. }
  24517. SetPlayerVirtualWorld(playerid, 0);
  24518. ShowMainMenuCamera(playerid, 0);
  24519. ShowDialogToPlayer(playerid, DIALOG_REGISTER);
  24520. }
  24521. }
  24522. return 1;
  24523. }
  24524. #endif
  24525. forward GrandTheftAutoV(playerid, step, Float:x, Float:y, Float:z, Float:angle, Float:cx, Float:cy, Float:cz);
  24526. public GrandTheftAutoV(playerid, step, Float:x, Float:y, Float:z, Float:angle, Float:cx, Float:cy, Float:cz)
  24527. {
  24528. if(PlayerData[playerid][pLogged])
  24529. {
  24530. SetPlayerCameraLookAt(playerid, x, y, z);
  24531. switch(step)
  24532. {
  24533. case 1:
  24534. {
  24535. SetPlayerCameraPos(playerid, x, y, z + 100.0);
  24536. PlayerPlaySound(playerid, 16200, 0.0, 0.0, 0.0);
  24537. SetTimerEx("GrandTheftAutoV", 1000, false, "iifffffff", playerid, 2, x, y, z, angle, cx, cy, cz);
  24538. }
  24539. case 2:
  24540. {
  24541. SetPlayerCameraPos(playerid, x, y, z + 50.0);
  24542. PlayerPlaySound(playerid, 16200, 0.0, 0.0, 0.0);
  24543. SetTimerEx("GrandTheftAutoV", 1000, false, "iifffffff", playerid, 3, x, y, z, angle, cx, cy, cz);
  24544. }
  24545. case 3:
  24546. {
  24547. SetPlayerCameraPos(playerid, x, y, z + 25.0);
  24548. PlayerPlaySound(playerid, 16200, 0.0, 0.0, 0.0);
  24549. SetTimerEx("GrandTheftAutoV", 1000, false, "iifffffff", playerid, 4, x, y, z, angle, cx, cy, cz);
  24550. }
  24551. case 4:
  24552. {
  24553. InterpolateCameraPos(playerid, cx, cy, cz + 25.0, cx, cy, cz, 1000);
  24554. InterpolateCameraLookAt(playerid, x + 4.0 * floatsin(-angle, degrees), y + 4.0 * floatcos(-angle, degrees), z, x, y, z + 0.6, 1000);
  24555. SetTimerEx("GrandTheftAutoV", 1500, false, "iifffffff", playerid, 5, x, y, z, angle, cx, cy, cz);
  24556. }
  24557. case 5:
  24558. {
  24559. SetCameraBehindPlayer(playerid);
  24560. TogglePlayerControllable(playerid, 1);
  24561. PlayerData[playerid][pLoginCamera] = 0;
  24562. }
  24563. }
  24564. }
  24565. }
  24566. forward DestroyLockText(playerid);
  24567. public DestroyLockText(playerid)
  24568. {
  24569. if(IsValidDynamic3DTextLabel(PlayerData[playerid][pLockText]))
  24570. {
  24571. DestroyDynamic3DTextLabel(PlayerData[playerid][pLockText]);
  24572. PlayerData[playerid][pLockText] = Text3D:INVALID_3DTEXT_ID;
  24573. }
  24574. }
  24575. forward HideAchievementTextdraw(playerid);
  24576. public HideAchievementTextdraw(playerid)
  24577. {
  24578. for(new i = 6; i < 10; i ++)
  24579. {
  24580. PlayerTextDrawHide(playerid, PlayerData[playerid][pText][i]);
  24581. }
  24582. }
  24583. forward SpectateUpdate(playerid, targetid);
  24584. public SpectateUpdate(playerid, targetid)
  24585. {
  24586. if(PlayerData[playerid][pSpectating] == targetid)
  24587. {
  24588. SetPlayerInterior(playerid, GetPlayerInterior(targetid));
  24589. SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(targetid));
  24590. if(IsPlayerInAnyVehicle(targetid))
  24591. {
  24592. PlayerSpectateVehicle(playerid, GetPlayerVehicleID(targetid));
  24593. }
  24594. else
  24595. {
  24596. PlayerSpectatePlayer(playerid, targetid);
  24597. }
  24598. }
  24599. }
  24600. forward StreamedCheck(playerid, Float:x, Float:y, Float:z, interior, world);
  24601. public StreamedCheck(playerid, Float:x, Float:y, Float:z, interior, world)
  24602. {
  24603. foreach(new i : Entrance)
  24604. {
  24605. if(EntranceInfo[i][eExists] && EntranceInfo[i][eFreeze] && IsPointInRangeOfPoint(x, y, z, 100.0, EntranceInfo[i][eIntX], EntranceInfo[i][eIntY], EntranceInfo[i][eIntZ]) && interior == EntranceInfo[i][eInterior] && world == EntranceInfo[i][eWorld])
  24606. {
  24607. SetFreezePos(playerid, x, y, z);
  24608. return 1;
  24609. }
  24610. }
  24611. for(new i = 0; i < sizeof(staticEntrances); i ++)
  24612. {
  24613. if(staticEntrances[i][eFreeze] && IsPointInRangeOfPoint(x, y, z, 100.0, staticEntrances[i][eIntX], staticEntrances[i][eIntY], staticEntrances[i][eIntZ]) && world == staticEntrances[i][eWorld])
  24614. {
  24615. SetFreezePos(playerid, x, y, z);
  24616. return 1;
  24617. }
  24618. }
  24619. return 0;
  24620. }
  24621. forward UnfreezeNewbie(playerid);
  24622. public UnfreezeNewbie(playerid)
  24623. {
  24624. TogglePlayerControllable(playerid, 1);
  24625. }
  24626. forward VehicleUnfreeze(playerid, vehicleid, Float:x, Float:y, Float:z, interior, world);
  24627. public VehicleUnfreeze(playerid, vehicleid, Float:x, Float:y, Float:z, interior, world)
  24628. {
  24629. if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && IsPlayerInRangeOfPoint(playerid, 100.0, x, y, z) && GetPlayerInterior(playerid) == interior && GetPlayerVirtualWorld(playerid) == world)
  24630. {
  24631. SetVehiclePos(vehicleid, x, y, z);
  24632. }
  24633. PlayerTextDrawHide(playerid, LoadingObjects0[playerid]);
  24634. PlayerTextDrawHide(playerid, LoadingObjects1[playerid]);
  24635. PlayerTextDrawHide(playerid, LoadingObjects2[playerid]);
  24636. PlayerTextDrawHide(playerid, LoadingObjects3[playerid]);
  24637. PlayerTextDrawHide(playerid, LoadingObjects4[playerid]);
  24638. PlayerTextDrawHide(playerid, LoadingObjects5[playerid]);
  24639. TogglePlayerControllable(playerid, 1);
  24640. }
  24641. forward UnfreezePlayer(playerid, Float:x, Float:y, Float:z);
  24642. public UnfreezePlayer(playerid, Float:x, Float:y, Float:z)
  24643. {
  24644. if(IsPlayerInRangeOfPoint(playerid, 5.0, x, y, z))
  24645. {
  24646. SetPlayerPos(playerid, x, y, z);
  24647. TogglePlayerControllable(playerid, 1);
  24648. PlayerData[playerid][pFreezeTimer] = -1;
  24649. PlayerTextDrawHide(playerid, LoadingObjects0[playerid]);
  24650. PlayerTextDrawHide(playerid, LoadingObjects1[playerid]);
  24651. PlayerTextDrawHide(playerid, LoadingObjects2[playerid]);
  24652. PlayerTextDrawHide(playerid, LoadingObjects3[playerid]);
  24653. PlayerTextDrawHide(playerid, LoadingObjects4[playerid]);
  24654. PlayerTextDrawHide(playerid, LoadingObjects5[playerid]);
  24655. }
  24656. }
  24657. forward DestroyWater(objectid);
  24658. public DestroyWater(objectid)
  24659. {
  24660. DestroyDynamicObject(objectid);
  24661. }
  24662. forward SecondTimer();
  24663. public SecondTimer()
  24664. {
  24665. new hour, minute, boomboxid, string[128];
  24666. gettime(hour, minute);
  24667. if((gGMX) && mysql_unprocessed_queries(connectionID) == 0)
  24668. {
  24669. SendRconCommand("gmx");
  24670. }
  24671. foreach(new i : Player)
  24672. {
  24673. //SetPlayerTime(i, hour, minute);
  24674. if(PlayerData[i][pLogged] && !PlayerData[i][pKicked])
  24675. {
  24676. AFKCheck(i);
  24677. NOPCheck(i);
  24678. if(PlayerData[i][pLoopAnim] && !PlayerData[i][pToggleTextdraws]) {
  24679. TextDrawShowForPlayer(i, AnimationTD);
  24680. } else {
  24681. TextDrawHideForPlayer(i, AnimationTD);
  24682. }
  24683. if(GetPlayerSurfingVehicleID(i) != INVALID_PLAYER_ID && GetPlayerState(i) == PLAYER_STATE_ONFOOT && !IsSurfVehicle(GetPlayerSurfingVehicleID(i)) && !PlayerData[i][pAdminDuty] && GetVehicleSpeed(GetPlayerSurfingVehicleID(i)) > 40)
  24684. {
  24685. new
  24686. Float:x,
  24687. Float:y,
  24688. Float:z;
  24689. SendProximityMessage(i, 20.0, COLOR_PURPLE, "* %s slipped off the top of the vehicle.", GetRPName(i));
  24690. GetPlayerPos(i, x, y, z);
  24691. SetPlayerPos(i, x + 1, y, z + 3.0);
  24692. ApplyAnimation(i, "PED", "BIKE_fallR", 4.1, 0, 1, 1, 0, 0);
  24693. }
  24694. if (PlayerData[i][pSpeedTime] > 0)
  24695. {
  24696. PlayerData[i][pSpeedTime]--;
  24697. }
  24698. if(PlayerData[i][pShipment] >= 0)
  24699. {
  24700. if((GetPlayerState(i) == PLAYER_STATE_DRIVER) && (GetVehicleModel(GetPlayerVehicleID(i)) != 414 && GetVehicleModel(GetPlayerVehicleID(i)) != 498))
  24701. {
  24702. PlayerData[i][pShipment] = -1;
  24703. SendClientMessage(i, COLOR_GREY, "Shipment cancelled. You went into another vehicle.");
  24704. }
  24705. }
  24706. if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_DRINK_BEER || GetPlayerSpecialAction(i) == SPECIAL_ACTION_DRINK_WINE)
  24707. {
  24708. if(GetPlayerDrunkLevel(i) > 7000)
  24709. {
  24710. AwardAchievement(i, "Party hard");
  24711. }
  24712. }
  24713. if(PlayerData[i][pRepairTime] > 0)
  24714. {
  24715. PlayerData[i][pRepairTime]--;
  24716. if(PlayerData[i][pRepairTime] <= 0)
  24717. {
  24718. if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
  24719. {
  24720. new vehicleid = GetPlayerVehicleID(i);
  24721. foreach(new e : Player)
  24722. {
  24723. if(IsPlayerInVehicle(e, vehicleid))
  24724. {
  24725. SetCameraBehindPlayer(e);
  24726. }
  24727. }
  24728. SetVehiclePos(vehicleid, g_RepairShops[PlayerData[i][pRepairShop]][7], g_RepairShops[PlayerData[i][pRepairShop]][8], g_RepairShops[PlayerData[i][pRepairShop]][9]);
  24729. SetVehicleZAngle(vehicleid, g_RepairShops[PlayerData[i][pRepairShop]][10]);
  24730. SetCameraBehindPlayer(i);
  24731. RepairVehicle(vehicleid);
  24732. GameTextForPlayer(i, "~g~Vehicle Repaired", 5000, 1);
  24733. TogglePlayerControllable(i, 1);
  24734. }
  24735. PlayerData[i][pRepairShop] = -1;
  24736. }
  24737. }
  24738. if(PlayerData[i][pPizzas] > 0 && GetPlayerState(i) == PLAYER_STATE_DRIVER)
  24739. {
  24740. if(GetVehicleModel(GetPlayerVehicleID(i)) == 448)
  24741. {
  24742. if(PlayerData[i][pPizzaTime] < 90)
  24743. {
  24744. PlayerData[i][pPizzaTime]++;
  24745. }
  24746. }
  24747. else
  24748. {
  24749. PlayerData[i][pPizzas] = 0;
  24750. PlayerData[i][pCP] = 0;
  24751. DisablePlayerCheckpoint(i);
  24752. SendClientMessage(i, COLOR_GREY, "Pizza delivery cancelled. You went into another vehicle.");
  24753. }
  24754. }
  24755. else if (PlayerData[i][pGraffiti] != -1 && PlayerData[i][pGraffitiTime] > 0)
  24756. {
  24757. if (Graffiti_Nearest(i) != PlayerData[i][pGraffiti])
  24758. {
  24759. PlayerData[i][pGraffiti] = -1;
  24760. PlayerData[i][pGraffitiTime] = 0;
  24761. }
  24762. else
  24763. {
  24764. PlayerData[i][pGraffitiTime]--;
  24765. if (PlayerData[i][pGraffitiTime] < 1)
  24766. {
  24767. if(gang_tag_chosen[i] != 0)
  24768. {
  24769. new Float:x, Float:y, Float:z, Float:a;
  24770. GetPlayerPos(i, x, y, z);
  24771. GetPlayerFacingAngle(i, a);
  24772. GraffitiData[PlayerData[i][pGraffiti]][graffitiPos][3] = a + 90.0;
  24773. GraffitiData[PlayerData[i][pGraffiti]][graffitiDefault] = gang_tag_chosen[i];
  24774. printf("%d", gang_tag_chosen[i]);
  24775. printf("%d", GraffitiData[PlayerData[i][pGraffiti]][graffitiDefault]);
  24776. gang_tag_chosen[i] = 0;
  24777. Graffiti_Refresh(PlayerData[i][pGraffiti]);
  24778. Graffiti_Save(PlayerData[i][pGraffiti]);
  24779. ClearAnimations(i, 1);
  24780. SendProximityMessage(i, 30.0, COLOR_PURPLE, "* %s puts their can of spray paint away.", GetRPName(i));
  24781. PlayerData[i][pGraffiti] = -1;
  24782. PlayerData[i][pGraffitiTime] = 0;
  24783. }
  24784. else
  24785. {
  24786. new str[500];
  24787. new Float:x, Float:y, Float:z, Float:a;
  24788. GetPlayerPos(i, x, y, z);
  24789. GetPlayerFacingAngle(i, a);
  24790. strunpack(str, PlayerData[i][pGraffitiText]);
  24791. format(GraffitiData[PlayerData[i][pGraffiti]][graffitiText], 64, str);
  24792. GraffitiData[PlayerData[i][pGraffiti]][graffitiPos][3] = a - 90.0;
  24793. strreplace2(GraffitiData[PlayerData[i][pGraffiti]][graffitiText], "(n)", "\n");
  24794. GraffitiData[PlayerData[i][pGraffiti]][graffitiDefault] = 0;
  24795. gang_tag_chosen[i] = 0;
  24796. GraffitiData[PlayerData[i][pGraffiti]][graffitiColor] = GetGangColor(PlayerData[i][pGang]);
  24797. Graffiti_Refresh(PlayerData[i][pGraffiti]);
  24798. Graffiti_Save(PlayerData[i][pGraffiti]);
  24799. ClearAnimations(i, 1);
  24800. SendProximityMessage(i, 30.0, COLOR_PURPLE, "* %s puts their can of spray paint away.", GetRPName(i));
  24801. PlayerData[i][pGraffiti] = -1;
  24802. PlayerData[i][pGraffitiTime] = 0;
  24803. }
  24804. }
  24805. }
  24806. }
  24807. if(!PlayerData[i][pToggleTextdraws])
  24808. {
  24809. if(PlayerData[i][pGPSOn])
  24810. {
  24811. PlayerTextDrawSetString(i, PlayerData[i][pText][0], GetPlayerZoneName(i));
  24812. }
  24813. }
  24814. /*if(NetStats_PacketLossPercent(i) > 20.0 && gettime() - PlayerData[i][pLastDesync] > 120)
  24815. {
  24816. GameTextForPlayer(i, "You are desynced. Please relog once you see this message.", 10000, 6);
  24817. PlayerData[i][pLastDesync] = gettime();
  24818. }*/
  24819. if(PlayerData[i][pSpectating] != INVALID_PLAYER_ID)
  24820. {
  24821. if(GetPlayerInterior(i) != GetPlayerInterior(PlayerData[i][pSpectating])) SetPlayerInterior(i, GetPlayerInterior(PlayerData[i][pSpectating]));
  24822. if(GetPlayerVirtualWorld(i) != GetPlayerVirtualWorld(PlayerData[i][pSpectating])) SetPlayerVirtualWorld(i, GetPlayerVirtualWorld(PlayerData[i][pSpectating]));
  24823. }
  24824. if(PlayerData[i][pTutorial])
  24825. {
  24826. TogglePlayerControllable(i, 0);
  24827. }
  24828. if(PlayerData[i][pAwaitingClothing])
  24829. {
  24830. SetPlayerClothing(i);
  24831. }
  24832. if(PlayerData[i][pDraggedBy] != INVALID_PLAYER_ID)
  24833. {
  24834. TeleportToPlayer(i, PlayerData[i][pDraggedBy]);
  24835. }
  24836. if(PlayerData[i][pDonator] > 0 && gettime() > PlayerData[i][pVIPTime])
  24837. {
  24838. PlayerData[i][pDonator] = 0;
  24839. PlayerData[i][pVIPTime] = 0;
  24840. PlayerData[i][pSecondJob] = -1;
  24841. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET vippackage = 0, viptime = 0, secondjob = -1 WHERE uid = %i", PlayerData[i][pID]);
  24842. mysql_tquery(connectionID, queryBuffer);
  24843. SendClientMessage(i, COLOR_LIGHTRED, "Your VIP subscription has expired. You are no longer a VIP.");
  24844. }
  24845. if(PlayerData[i][pDonator] < 2 && PlayerData[i][pSecondJob] != JOB_NONE)
  24846. {
  24847. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET secondjob = -1 WHERE uid = %i", PlayerData[i][pID]);
  24848. mysql_tquery(connectionID, queryBuffer);
  24849. PlayerData[i][pSecondJob] = JOB_NONE;
  24850. SendClientMessage(i, COLOR_LIGHTRED, "Your second job has been removed as you aren't a Gold+ VIP.");
  24851. }
  24852. if(PlayerData[i][pHHCheck])
  24853. {
  24854. if(PlayerData[i][pHHTime] > 0)
  24855. {
  24856. new health = GetPlayerHealthEx(i);
  24857. if(health == PlayerData[i][pHHRounded])
  24858. {
  24859. PlayerData[i][pHHCount]++;
  24860. }
  24861. SetPlayerHealth(i, random(100) + 1);
  24862. PlayerData[i][pHHTime]--;
  24863. PlayerData[i][pHHRounded] = health;
  24864. }
  24865. else
  24866. {
  24867. if(gettime() - PlayerData[i][pLastUpdate] >= 3)
  24868. {
  24869. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] failed the health hack check as they tabbed.", GetRPName(i), i);
  24870. }
  24871. else if(PlayerData[i][pHHCount] > 0)
  24872. {
  24873. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] is possibly health hacking with a %i percent chance.", GetRPName(i), i, PlayerData[i][pHHCount] * 20);
  24874. }
  24875. else
  24876. {
  24877. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] does not appear to be health hacking.", GetRPName(i), i);
  24878. }
  24879. if(NetStats_PacketLossPercent(i) > 10.0)
  24880. {
  24881. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] is desynced and has a packet loss of %.1f percent.", GetRPName(i), i, NetStats_PacketLossPercent(i));
  24882. }
  24883. SetPlayerHealth(i, PlayerData[i][pHealth]);
  24884. PlayerData[i][pHHCheck] = 0;
  24885. }
  24886. }
  24887. if(PlayerData[i][pReceivingAid] && !PlayerData[i][pHHCheck])
  24888. {
  24889. new
  24890. Float:health;
  24891. GetPlayerHealth(i, health);
  24892. if((health + 1.0) > 100.0)
  24893. {
  24894. SetPlayerHealth(i, 100.0);
  24895. PlayerData[i][pReceivingAid] = 0;
  24896. }
  24897. else
  24898. {
  24899. SetPlayerHealth(i, health + 1.0);
  24900. }
  24901. }
  24902. if(PlayerData[i][pInjured] && IsPlayerInAnyVehicle(i) && GetVehicleModel(GetPlayerVehicleID(i)) != 416)
  24903. {
  24904. new
  24905. Float:x,
  24906. Float:y,
  24907. Float:z;
  24908. GetPlayerPos(i, x, y, z);
  24909. SetPlayerPos(i, x, y, z + 0.5);
  24910. ClearAnimations(i);
  24911. }
  24912. if(PlayerData[i][pTazedTime] > 0)
  24913. {
  24914. PlayerData[i][pTazedTime]--;
  24915. if(!PlayerData[i][pTazedTime])
  24916. {
  24917. ClearAnimations(i, 1);
  24918. if(!PlayerData[i][pCuffed])
  24919. {
  24920. TogglePlayerControllable(i, 1);
  24921. }
  24922. }
  24923. }
  24924. if(PlayerData[i][pFishTime] > 0)
  24925. {
  24926. PlayerData[i][pFishTime]--;
  24927. if(!IsPlayerAtFishingPlace(i))
  24928. {
  24929. ClearAnimations(i, 1);
  24930. RemovePlayerAttachedObject(i, 9);
  24931. PlayerData[i][pFishTime] = 0;
  24932. }
  24933. else if(PlayerData[i][pFishTime] <= 0 && IsPlayerAtFishingPlace(i))
  24934. {
  24935. new rand = Random(1, 100);
  24936. if(1 <= rand <= 20)
  24937. {
  24938. SendClientMessage(i, COLOR_GREY, "You reeled in your line and caught nothing...");
  24939. }
  24940. else if(21 <= rand <= 30)
  24941. {
  24942. new amount = 50 + random(100);
  24943. SendClientMessageEx(i, COLOR_AQUA, "You reeled in your line and caught a used wallet with {00AA00}$%i{33CCFF} inside.", amount);
  24944. GivePlayerCash(i, amount);
  24945. }
  24946. else if(98 <= rand <= 99)
  24947. {
  24948. new amount = random(2000) + 1000;
  24949. SendClientMessageEx(i, COLOR_AQUA, "You reeled in your line and caught a rare 18th century coin valued at {00AA00}$%i{33CCFF}!", amount);
  24950. GivePlayerCash(i, amount);
  24951. }
  24952. else
  24953. {
  24954. new weight, level = GetJobLevel(i, JOB_FISHERMAN);
  24955. if(PlayerData[i][pUsedBait]) {
  24956. weight = random(40) + (level * 10);
  24957. } else {
  24958. weight = random(15) + (level * 10);
  24959. }
  24960. SendClientMessageEx(i, COLOR_AQUA, "You reeled in your line and caught a fish weighing %i kg!", weight);
  24961. PlayerData[i][pFishWeight] += weight;
  24962. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET fishweight = %i WHERE uid = %i", PlayerData[i][pFishWeight], PlayerData[i][pID]);
  24963. mysql_tquery(connectionID, queryBuffer);
  24964. IncreaseJobSkill(i, JOB_FISHERMAN);
  24965. if(PlayerData[i][pFishWeight] >= 1500)
  24966. {
  24967. SendClientMessage(i, COLOR_YELLOW, "You have too much fish. You can continue fishing once you sell your load.");
  24968. }
  24969. }
  24970. ClearAnimations(i, 1);
  24971. RemovePlayerAttachedObject(i, 9);
  24972. }
  24973. }
  24974. if(PlayerData[i][pJailType] > 0)
  24975. {
  24976. PlayerData[i][pJailTime]--;
  24977. if(PlayerData[i][pJailTime] <= 0)
  24978. {
  24979. ResetPlayerWeaponsEx(i);
  24980. SendClientMessage(i, COLOR_GREY2, "Your jail sentence has expired.");
  24981. SetPlayerPos(i, 1544.4407, -1675.5522, 13.5584);
  24982. SetPlayerFacingAngle(i, 90.0000);
  24983. SetPlayerInterior(i, 0);
  24984. SetPlayerVirtualWorld(i, 0);
  24985. SetCameraBehindPlayer(i);
  24986. PlayerData[i][pJailType] = 0;
  24987. PlayerData[i][pJailTime] = 0;
  24988. }
  24989. }
  24990. if(PlayerData[i][pEditType] > 0 && IsValidDynamicObject(PlayerData[i][pEditObject]) && !IsPlayerInRangeOfDynamicObject(i, PlayerData[i][pEditObject], 50.0))
  24991. {
  24992. if(PlayerData[i][pEditType] == EDIT_LAND_OBJECT)
  24993. {
  24994. ReloadLandObject(PlayerData[i][pEditObject], LandInfo[PlayerData[i][pObjectLand]][lLabels]);
  24995. SendClientMessage(i, COLOR_GREY2, "You left the editing area. Editing mode has been disabled.");
  24996. }
  24997. else if(PlayerData[i][pEditType] == EDIT_LAND_OBJECT_PREVIEW)
  24998. {
  24999. SendClientMessage(i, COLOR_GREY2, "You left the editing area. Furniture previewing cancelled.");
  25000. DestroyDynamicObject(PlayerData[i][pEditObject]);
  25001. }
  25002. CancelEdit(i);
  25003. PlayerData[i][pEditType] = 0;
  25004. PlayerData[i][pEditObject] = INVALID_OBJECT_ID;
  25005. }
  25006. if(PlayerData[i][pHospital] && PlayerData[i][pHospitalTime])
  25007. {
  25008. PlayerData[i][pHospitalTime]--;
  25009. if(PlayerData[i][pHospitalTime] == 0)
  25010. {
  25011. if(PlayerData[i][pInsurance] > 0)
  25012. {
  25013. AwardAchievement(i, "Obamacare");
  25014. }
  25015. SetPlayerPos(i, -2297.6084,111.1512,-5.3336);//hospitalspawn
  25016. SetPlayerFacingAngle(i, 89.7591);
  25017. SetPlayerInterior(i, 1);
  25018. SetPlayerVirtualWorld(i, PlayerData[i][pHospitalType]);
  25019. SetCameraBehindPlayer(i);
  25020. ClearAnimations(i, 1);
  25021. ApplyAnimation(i, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0, 1);
  25022. if(!(GetFactionType(i) == FACTION_POLICE || GetFactionType(i) == FACTION_MEDIC))
  25023. {
  25024. GivePlayerCash(i, -500);
  25025. GameTextForPlayer(i, "~w~Discharged~n~~r~-$500", 5000, 1);
  25026. }
  25027. TogglePlayerControllable(i, 1);
  25028. SetPlayerDrunkLevel(i, 0);
  25029. if(PlayerData[i][pDelivered])
  25030. {
  25031. if(GetFactionType(i) == FACTION_POLICE || GetFactionType(i) == FACTION_MEDIC)
  25032. SendClientMessage(i, COLOR_DOCTOR, "You have not been billed for your stay. You also keep all of your weapons!");
  25033. else
  25034. SendClientMessage(i, COLOR_DOCTOR, "You have been billed $500 for your stay. You also keep all of your weapons!");
  25035. PlayerData[i][pDelivered] = 0;
  25036. }
  25037. else
  25038. {
  25039. if(GetFactionType(i) == FACTION_POLICE || GetFactionType(i) == FACTION_MEDIC)
  25040. SendClientMessage(i, COLOR_DOCTOR, "You have not been billed for your stay. Your weapons have been confiscated by staff.");
  25041. else
  25042. SendClientMessage(i, COLOR_DOCTOR, "You have been billed $500 for your stay. Your weapons have been confiscated by staff.");
  25043. SendClientMessage(i, COLOR_LIGHTRED, "(( You have lost 30 minutes of your memory. ))");
  25044. ClearAnimations(i, 1);
  25045. ApplyAnimation(i, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0, 1);
  25046. }
  25047. new hospital[32];
  25048. switch(PlayerData[i][pHospitalType])
  25049. {
  25050. case HOSPITAL_COUNTY: strcat(hospital, "All Saints General");
  25051. case HOSPITAL_ALLSAINTS: strcat(hospital, "County General");
  25052. case HOSPITAL_FMDHQ: strcat(hospital, "FMD HQ");
  25053. case HOSPITAL_VIPLOUNGE: strcat(hospital, "VIP Lounge");
  25054. }
  25055. foreach(new x : Player)
  25056. {
  25057. if(IsLawEnforcement(x) && PlayerData[i][pWantedLevel] > 0)
  25058. {
  25059. SendClientMessageEx(x, COLOR_YELLOW, "LSFMD: Wanted suspect %s[%i] was last spotted at the %s hospital!", GetRPName(i), i, hospital);
  25060. }
  25061. }
  25062. SetPlayerHealth(i, PlayerData[i][pSpawnHealth]);
  25063. SetScriptArmour(i, PlayerData[i][pSpawnArmor]);
  25064. ClearAnimations(i, 1);
  25065. ApplyAnimation(i, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0, 1);
  25066. PlayerData[i][pHospital] = 0;
  25067. PlayerData[i][pHospitalTime] = 0;
  25068. }
  25069. else
  25070. {
  25071. GameTextForPlayer(i, "~w~Recovering...", 1500, 3);
  25072. //SetPlayerDrunkLevel(i, 50000);
  25073. }
  25074. }
  25075. if(PlayerData[i][pRefuel] != INVALID_VEHICLE_ID)
  25076. {
  25077. PlayerData[i][pRefuelAmount] += 2;
  25078. vehicleFuel[PlayerData[i][pRefuel]]++;
  25079. if(vehicleFuel[PlayerData[i][pRefuel]] >= 100 || PlayerData[i][pCash] < PlayerData[i][pRefuelAmount])
  25080. {
  25081. AddPointMoney(POINT_FUEL, PlayerData[i][pRefuelAmount]);
  25082. GivePlayerCash(i, -PlayerData[i][pRefuelAmount]);
  25083. SendClientMessageEx(i, COLOR_AQUA, "You've refilled your vehicle's gas tank for {FF6347}$%i{33CCFF}.", PlayerData[i][pRefuelAmount]);
  25084. PlayerData[i][pRefuel] = INVALID_VEHICLE_ID;
  25085. PlayerData[i][pRefuelAmount] = 0;
  25086. }
  25087. }
  25088. if(PlayerData[i][pMiningTime] > 0)
  25089. {
  25090. PlayerData[i][pMiningTime]--;
  25091. if(PlayerData[i][pMiningTime] <= 0)
  25092. {
  25093. if(IsPlayerInMiningArea(i) && GetPlayerState(i) == PLAYER_STATE_ONFOOT && !PlayerData[i][pTazedTime] && !PlayerData[i][pCuffed])
  25094. {
  25095. new number = random(10) + 1;
  25096. PlayerData[i][pCP] = CHECKPOINT_MINING;
  25097. SetPlayerAttachedObject(i, 9, 3929, 1, 0.242999, 0.324000, 0.012000, -17.200078, 20.699993, 9.800034, 0.579999, 0.617999, 0.676999);
  25098. SetPlayerSpecialAction(i, SPECIAL_ACTION_CARRY);
  25099. ApplyAnimation(i, "CARRY", "liftup", 4.1, 0, 0, 0, 0, 0, 1);
  25100. SetPlayerCheckpoint(i, 1278.0778, -1267.9661, 12.5413, 2.0);
  25101. if(1 <= number <= 5)
  25102. {
  25103. PlayerData[i][pMiningRock] = 1;
  25104. SendClientMessage(i, COLOR_AQUA, "You have dug up an ordinary stone. Drop it off at the marker.");
  25105. }
  25106. else if(number == 6 && !PlayerData[i][pRareTime])
  25107. {
  25108. SendClientMessage(i, COLOR_AQUA, "Woah, this looks oddly weird to find in the middle of a city, lets show it to the boss.");
  25109. PlayerData[i][pMiningRock] = 3;
  25110. }
  25111. else
  25112. {
  25113. PlayerData[i][pMiningRock] = 2;
  25114. SendClientMessage(i, COLOR_AQUA, "You have dug up a quality stone. Drop it off at the marker.");
  25115. }
  25116. }
  25117. else
  25118. {
  25119. RemovePlayerAttachedObject(i, 9);
  25120. ClearAnimations(i, 1);
  25121. }
  25122. }
  25123. }
  25124. if(PlayerData[i][pSweeping] && GetVehicleModel(GetPlayerVehicleID(i)) == 574 && GetVehicleSpeed(GetPlayerVehicleID(i)) > 35.0 && !PlayerData[i][pAFK])
  25125. {
  25126. PlayerData[i][pSweepTime]--;
  25127. if(PlayerData[i][pSweepTime] <= 0)
  25128. {
  25129. new cost = 1200 + random(50);
  25130. if(PlayerData[i][pLaborUpgrade] > 0)
  25131. {
  25132. cost += percent(cost, PlayerData[i][pLaborUpgrade]);
  25133. }
  25134. AddToPaycheck(i, cost);
  25135. format(string, sizeof(string), "~g~+$%i", cost);
  25136. GameTextForPlayer(i, string, 5000, 1);
  25137. PlayerData[i][pSweepEarnings] += cost;
  25138. PlayerData[i][pSweepTime] = 30;
  25139. }
  25140. }
  25141. if(PlayerData[i][pTaxiPassenger] != INVALID_PLAYER_ID)
  25142. {
  25143. if((GetVehicleModel(GetPlayerVehicleID(i)) != 420 && GetVehicleModel(GetPlayerVehicleID(i)) != 438) || !IsPlayerInVehicle(PlayerData[i][pTaxiPassenger], GetPlayerVehicleID(i)) || PlayerData[i][pTaxiFare] == 0 || PlayerData[PlayerData[i][pTaxiPassenger]][pCash] < PlayerData[i][pTaxiBill])
  25144. {
  25145. CancelTaxiRide(i);
  25146. }
  25147. else
  25148. {
  25149. PlayerData[i][pTaxiTime]++;
  25150. if(PlayerData[i][pTaxiTime] >= 15)
  25151. {
  25152. PlayerData[i][pTaxiTime] = 0;
  25153. PlayerData[i][pTaxiBill] += PlayerData[i][pTaxiFare];
  25154. }
  25155. format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~g~Taxi Meter:~w~ $%i", PlayerData[i][pTaxiBill]);
  25156. GameTextForPlayer(i, string, 3000, 3);
  25157. }
  25158. }
  25159. if(PlayerData[i][pMuted] > 0)
  25160. {
  25161. PlayerData[i][pMuted]--;
  25162. if(PlayerData[i][pMuted] <= 0)
  25163. {
  25164. SendClientMessage(i, COLOR_GREY, "You are no longer muted.");
  25165. }
  25166. }
  25167. if(PlayerData[i][pSpamTime] > 0)
  25168. {
  25169. PlayerData[i][pSpamTime]--;
  25170. }
  25171. if(PlayerData[i][pVehicleCount] > 0)
  25172. {
  25173. PlayerData[i][pVehicleCount]--;
  25174. }
  25175. if(PlayerData[i][pMechanicCall] > 0)
  25176. {
  25177. PlayerData[i][pMechanicCall]--;
  25178. }
  25179. if(PlayerData[i][pTaxiCall] > 0)
  25180. {
  25181. PlayerData[i][pTaxiCall]--;
  25182. }
  25183. if(PlayerData[i][pEmergencyCall] > 0)
  25184. {
  25185. PlayerData[i][pEmergencyCall]--;
  25186. }
  25187. if(PlayerData[i][pCourierCooldown] > 0)
  25188. {
  25189. PlayerData[i][pCourierCooldown]--;
  25190. }
  25191. if(PlayerData[i][pPizzaCooldown] > 0)
  25192. {
  25193. PlayerData[i][pPizzaCooldown]--;
  25194. }
  25195. if(PlayerData[i][pDetectiveCooldown] > 0)
  25196. {
  25197. PlayerData[i][pDetectiveCooldown]--;
  25198. }
  25199. if(PlayerData[i][pThiefCooldown] > 0)
  25200. {
  25201. PlayerData[i][pThiefCooldown]--;
  25202. }
  25203. if(PlayerData[i][pCocaineCooldown] > 0)
  25204. {
  25205. PlayerData[i][pCocaineCooldown]--;
  25206. }
  25207. if(PlayerData[i][pACFired] > 0)
  25208. {
  25209. PlayerData[i][pACFired]--;
  25210. }
  25211. if(PlayerData[i][pRapidFire] > 0)
  25212. {
  25213. PlayerData[i][pRapidFire]--;
  25214. }
  25215. if(PlayerData[i][pGodmode] > 0)
  25216. {
  25217. PlayerData[i][pGodmode]--;
  25218. }
  25219. if(PlayerData[i][pTicketTime] != 0)
  25220. {
  25221. PlayerData[i][pTicketTime]--;
  25222. }
  25223. if(PlayerData[i][pPreviewHouse] >= 0)
  25224. {
  25225. PlayerData[i][pPreviewTime]--;
  25226. if(PlayerData[i][pPreviewTime] <= 0 && GetPlayerInterior(i) == houseInteriors[PlayerData[i][pPreviewType]][intID])
  25227. {
  25228. SetPlayerPos(i, HouseInfo[PlayerData[i][pPreviewHouse]][hIntX], HouseInfo[PlayerData[i][pPreviewHouse]][hIntY], HouseInfo[PlayerData[i][pPreviewHouse]][hIntZ]);
  25229. SetPlayerFacingAngle(i, HouseInfo[PlayerData[i][pPreviewHouse]][hIntA]);
  25230. SetPlayerInterior(i, HouseInfo[PlayerData[i][pPreviewHouse]][hInterior]);
  25231. SetPlayerVirtualWorld(i, HouseInfo[PlayerData[i][pPreviewHouse]][hWorld]);
  25232. SetCameraBehindPlayer(i);
  25233. PlayerData[i][pPreviewHouse] = -1;
  25234. PlayerData[i][pPreviewType] = 0;
  25235. PlayerData[i][pPreviewTime] = 0;
  25236. SendClientMessage(i, COLOR_WHITE, "You are no longer previewing the interior as the time period ran out.");
  25237. }
  25238. }
  25239. if(PlayerData[i][pCocaineTrunk] != INVALID_VEHICLE_ID)
  25240. {
  25241. if(!IsPlayerInRangeOfBoot(i, PlayerData[i][pCocaineTrunk]))
  25242. {
  25243. SendClientMessage(i, COLOR_GREY, "You are no longer cracking the trunk as you left your spot.");
  25244. PlayerData[i][pCocaineTrunk] = INVALID_VEHICLE_ID;
  25245. }
  25246. else if(VehicleInfo[PlayerData[i][pCocaineTrunk]][vLocked])
  25247. {
  25248. SendClientMessage(i, COLOR_GREY, "You are no longer cracking the trunk as the vehicle is now locked.");
  25249. PlayerData[i][pCocaineTrunk] = INVALID_VEHICLE_ID;
  25250. }
  25251. else
  25252. {
  25253. PlayerData[i][pCocaineTime]--;
  25254. if(PlayerData[i][pCocaineTime] <= 0)
  25255. {
  25256. new count;
  25257. for(new x = 0; x < 5; x ++)
  25258. {
  25259. if(VehicleInfo[PlayerData[i][pCocaineTrunk]][vWeapons][x] != 0)
  25260. {
  25261. count++;
  25262. }
  25263. }
  25264. if(count == 0 && VehicleInfo[PlayerData[i][pCocaineTrunk]][vCocaine] == 0 && VehicleInfo[PlayerData[i][pCocaineTrunk]][vMeth] == 0 && VehicleInfo[PlayerData[i][pCocaineTrunk]][vWeed] == 0 && VehicleInfo[PlayerData[i][pCocaineTrunk]][vPainkillers] == 0 && VehicleInfo[PlayerData[i][pCocaineTrunk]][vMaterials] == 0 && VehicleInfo[PlayerData[i][pCocaineTrunk]][vCash] == 0)
  25265. {
  25266. SendProximityMessage(i, 20.0, COLOR_PURPLE, "* %s cracks open the trunk of the %s and finds nothing.", GetRPName(i), GetVehicleName(PlayerData[i][pCocaineTrunk]));
  25267. }
  25268. else
  25269. {
  25270. PlayerData[i][pCocaineFrom] = PlayerData[i][pCocaineTrunk];
  25271. ShowDialogToPlayer(i, DIALOG_CRACKTRUNK);
  25272. }
  25273. PlayerData[i][pCocaineTrunk] = INVALID_VEHICLE_ID;
  25274. }
  25275. else
  25276. {
  25277. format(string, sizeof(string), "~w~Cracking trunk... ~r~%i", PlayerData[i][pCocaineTime]);
  25278. GameTextForPlayer(i, string, 2000, 3);
  25279. }
  25280. }
  25281. }
  25282. if(PlayerData[i][pLootTime] > 0)
  25283. {
  25284. PlayerData[i][pLootTime]--;
  25285. if(IsPlayerInBankRobbery(i) && PlayerData[i][pLootTime] <= 0)
  25286. {
  25287. new amount = random(500) + 500;
  25288. ClearAnimations(i, 1);
  25289. PlayerData[i][pRobCash] += amount;
  25290. PlayerData[i][pCP] = CHECKPOINT_ROBBERY;
  25291. PlayerData[i][pLastLoad] = gettime();
  25292. format(string, sizeof(string), "~g~+$%i", amount);
  25293. GameTextForPlayer(i, string, 5000, 1);
  25294. SendClientMessageEx(i, COLOR_AQUA, "You have looted {00AA00}$%i{33CCFF} and now have $%i. You can keep looting or deliver the cash to the {FF6347}marker{33CCFF}.", amount, PlayerData[i][pRobCash]);
  25295. SetPlayerCheckpoint(i, 1429.9939, 1066.9581, 9.8938, 3.0);
  25296. }
  25297. else if((PlayerData[i][pRobbingBiz] >= 0 && PlayerData[i][pRobbingBiz] == GetInsideBusiness(i)) && PlayerData[i][pLootTime] <= 0)
  25298. {
  25299. new amount = random(300) + 100;
  25300. ClearAnimations(i, 1);
  25301. PlayerData[i][pRobCash] += amount;
  25302. PlayerData[i][pCP] = CHECKPOINT_ROBBERY;
  25303. PlayerData[i][pLastLoad] = gettime();
  25304. format(string, sizeof(string), "~g~+$%i", amount);
  25305. GameTextForPlayer(i, string, 5000, 1);
  25306. SendClientMessageEx(i, COLOR_AQUA, "You have looted {00AA00}$%i{33CCFF} and now have $%i. You can keep looting or deliver the cash to the {FF6347}marker{33CCFF} (/stoprobbery).", amount, PlayerData[i][pRobCash]);
  25307. SetPlayerCheckpoint(i, 1429.9939, 1066.9581, 9.8938, 3.0);
  25308. if(PlayerData[i][pRobCash] < 10000)
  25309. {
  25310. ApplyAnimation(i, "BOMBER", "BOM_Plant_Loop", 4.1, 1, 0, 0, 0, 0, 1);
  25311. GameTextForPlayer(i, "~w~Looting business vault...", 5000, 3);
  25312. PlayerData[i][pLootTime] = 5;
  25313. }
  25314. else
  25315. {
  25316. callcmd::stoprobbery(i, "/1");
  25317. }
  25318. }
  25319. }
  25320. if(PlayerData[i][pHunted] > 0)
  25321. {
  25322. foreach(new x : Player)
  25323. {
  25324. if(PlayerData[x][pLogged] && GetPlayerInterior(x) == GetPlayerInterior(i) && PlayerData[i][pHunted] > 0)
  25325. {
  25326. SetPlayerMarkerForPlayer(x, i, COLOR_RETIRED);
  25327. }
  25328. }
  25329. }
  25330. if(PlayerData[i][pFindTime] > 0)
  25331. {
  25332. PlayerData[i][pFindTime]--;
  25333. if(PlayerData[i][pFindTime] == 0)
  25334. {
  25335. SetPlayerMarkerForPlayer(i, PlayerData[i][pFindPlayer], GetPlayerColor(PlayerData[i][pFindPlayer]));
  25336. PlayerData[i][pFindPlayer] = INVALID_PLAYER_ID;
  25337. }
  25338. }
  25339. if((PlayerData[i][pToggleMusic]) || (PlayerData[i][pBoomboxListen] != INVALID_PLAYER_ID && GetNearbyBoombox(i) != PlayerData[i][pBoomboxListen]))
  25340. {
  25341. PlayerData[i][pBoomboxListen] = INVALID_PLAYER_ID;
  25342. if(PlayerData[i][pStreamType] == MUSIC_BOOMBOX)
  25343. {
  25344. StopAudioStreamForPlayer(i);
  25345. PlayerData[i][pStreamType] = MUSIC_NONE;
  25346. }
  25347. }
  25348. if((!PlayerData[i][pToggleMusic]) && ((boomboxid = GetNearbyBoombox(i)) != INVALID_PLAYER_ID && PlayerData[i][pBoomboxListen] != boomboxid))
  25349. {
  25350. PlayerData[i][pBoomboxListen] = boomboxid;
  25351. if(PlayerData[i][pStreamType] == MUSIC_NONE)
  25352. {
  25353. PlayAudioStreamForPlayer(i, PlayerData[boomboxid][pBoomboxURL]);
  25354. PlayerData[i][pStreamType] = MUSIC_BOOMBOX;
  25355. }
  25356. }
  25357. if(PlayerData[i][pPickPlant] != INVALID_PLAYER_ID)
  25358. {
  25359. PlayerData[i][pPickTime]--;
  25360. if(PlayerData[i][pPickTime] <= 0)
  25361. {
  25362. new planterid = PlayerData[i][pPickPlant];
  25363. if(!IsPlayerConnected(planterid) || !PlayerData[planterid][pLogged] || !PlayerData[planterid][pWeedPlanted])
  25364. {
  25365. SendClientMessage(i, COLOR_GREY, "This plant is no longer available to pick.");
  25366. }
  25367. else if(!IsPlayerInRangeOfPoint(i, 3.0, PlayerData[planterid][pWeedX], PlayerData[planterid][pWeedY], PlayerData[planterid][pWeedZ]))
  25368. {
  25369. SendClientMessage(i, COLOR_GREY, "Picking failed. You left the area of the plant.");
  25370. }
  25371. else if(GetPlayerSpecialAction(i) != SPECIAL_ACTION_DUCK)
  25372. {
  25373. SendClientMessage(i, COLOR_GREY, "Picking failed. You must stay crouched when picking a plant.");
  25374. }
  25375. else
  25376. {
  25377. PlayerData[i][pWeed] += PlayerData[planterid][pWeedGrams];
  25378. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET weed = %i WHERE uid = %i", PlayerData[i][pWeed], PlayerData[i][pID]);
  25379. mysql_tquery(connectionID, queryBuffer);
  25380. SendClientMessageEx(i, COLOR_AQUA, "You have harvested %i grams of weed from this plant.", PlayerData[planterid][pWeedGrams]);
  25381. DestroyWeedPlant(planterid);
  25382. }
  25383. PlayerData[i][pPickPlant] = INVALID_PLAYER_ID;
  25384. PlayerData[i][pPickTime] = 0;
  25385. }
  25386. }
  25387. if(PlayerData[i][pCookMeth] > 0)
  25388. {
  25389. PlayerData[i][pCookTime]--;
  25390. if(PlayerData[i][pCookTime] <= 0)
  25391. {
  25392. if(!IsPlayerInRangeOfPoint(i, 5.0, 1.2179, 2.8095, 999.4284))
  25393. {
  25394. SendClientMessage(i, COLOR_GREY, "Cooking failed. You have left the cooking spot.");
  25395. ResetCooking(i);
  25396. }
  25397. else if(PlayerData[i][pEphedrine] <= 0)
  25398. {
  25399. SendClientMessage(i, COLOR_GREY, "Cooking failed. You have ran out of ephedrine.");
  25400. ResetCooking(i);
  25401. }
  25402. else if(PlayerData[i][pMeth] + 2 > GetPlayerCapacity(i, CAPACITY_METH))
  25403. {
  25404. SendClientMessage(i, COLOR_GREY, "Cooking failed. You have ran out of inventory space for meth.");
  25405. ResetCooking(i);
  25406. }
  25407. else
  25408. {
  25409. GameTextForPlayer(i, "~g~+2~w~ grams of meth", 3000, 3);
  25410. PlayerData[i][pEphedrine] -= 1;
  25411. PlayerData[i][pMeth] += 2;
  25412. PlayerData[i][pCookGrams] += 2;
  25413. if((PlayerData[i][pCookGrams] % 4) == 0)
  25414. {
  25415. PlayerData[i][pMuriaticAcid]--;
  25416. }
  25417. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET ephedrine = %i, meth = %i, muriaticacid = %i WHERE uid = %i", PlayerData[i][pEphedrine], PlayerData[i][pMeth], PlayerData[i][pMuriaticAcid], PlayerData[i][pID]);
  25418. mysql_tquery(connectionID, queryBuffer);
  25419. if(!PlayerData[i][pEphedrine])
  25420. {
  25421. SendClientMessageEx(i, COLOR_LIGHTRED, "You ran out of ephedrine therefore ending your cookoff. You made %i grams of meth from %i grams of ephedrine.", PlayerData[i][pCookGrams], PlayerData[i][pCookGrams] / 2);
  25422. ResetCooking(i);
  25423. }
  25424. else if(!PlayerData[i][pMuriaticAcid])
  25425. {
  25426. SendClientMessageEx(i, COLOR_LIGHTRED, "You ran out of muriatic acid therefore ending your cookoff. You made %i grams of meth from %i grams of ephedrine.", PlayerData[i][pCookGrams], PlayerData[i][pCookGrams] / 2);
  25427. ResetCooking(i);
  25428. }
  25429. else if(PlayerData[i][pMeth] >= GetPlayerCapacity(i, CAPACITY_METH))
  25430. {
  25431. SendClientMessageEx(i, COLOR_LIGHTRED, "You ran out of inventory space for meth therefore ending your cookoff. You made %i grams of meth from %i grams of ephedrine.", PlayerData[i][pCookGrams], PlayerData[i][pCookGrams] / 2);
  25432. ResetCooking(i);
  25433. }
  25434. else
  25435. {
  25436. PlayerData[i][pCookTime] = 15;
  25437. }
  25438. }
  25439. }
  25440. }
  25441. if(PlayerData[i][pDrugsUsed] >= 4)
  25442. {
  25443. PlayerData[i][pDrugsTime]--;
  25444. if(PlayerData[i][pDrugsTime] <= 0)
  25445. {
  25446. SendClientMessage(i, COLOR_GREY, "You are no longer stoned.");
  25447. SetPlayerWeather(i, gWeather);
  25448. SetPlayerTime(i, gWorldTime, 0);
  25449. SetPlayerDrunkLevel(i, 500);
  25450. PlayerData[i][pDrugsUsed] = 0;
  25451. PlayerData[i][pDrugsTime] = 0;
  25452. }
  25453. else
  25454. {
  25455. SetPlayerWeather(i, -66);
  25456. SetPlayerTime(i, 12, 0);
  25457. SetPlayerDrunkLevel(i, 40000);
  25458. }
  25459. }
  25460. if(PlayerData[i][pCapturingPoint] >= 0)
  25461. {
  25462. PlayerData[i][pCaptureTime]--;
  25463. if(PlayerData[i][pCaptureTime] <= 0)
  25464. {
  25465. new Float:x, Float:y, Float:z;
  25466. GetPlayerPos(i, x, y, z);
  25467. if(PointInfo[PlayerData[i][pCapturingPoint]][pTime] == 0 && PlayerData[i][pPointX] == x && PlayerData[i][pPointY] == y && PlayerData[i][pPointZ] == z)
  25468. {
  25469. SendClientMessageToAllEx(COLOR_YELLOW, "Point wars: %s attempted to capture %s for %s. It will be theirs in 15 minutes.", GetRPName(i), PointInfo[PlayerData[i][pCapturingPoint]][pName], GangInfo[PlayerData[i][pGang]][gName]);
  25470. PointInfo[PlayerData[i][pCapturingPoint]][pCaptureTime] = 15;
  25471. PointInfo[PlayerData[i][pCapturingPoint]][pCapturer] = i;
  25472. }
  25473. else
  25474. {
  25475. SendClientMessage(i, COLOR_GREY, "You moved from your position and therefore failed to capture.");
  25476. }
  25477. PlayerData[i][pCapturingPoint] = -1;
  25478. PlayerData[i][pCaptureTime] = 0;
  25479. }
  25480. }
  25481. if(PlayerData[i][pPoisonTime] > 0)
  25482. {
  25483. new
  25484. Float:health;
  25485. GetPlayerHealth(i, health);
  25486. SetPlayerHealth(i, health - 3.0 < 1.0 ? 1.0 : health - 3.0);
  25487. PlayerData[i][pPoisonTime]--;
  25488. }
  25489. AnticheatCheck(i);
  25490. // UpdateSpeedCamerasForPlayer(i);
  25491. //GetPlayerHealth(i, PlayerData[i][pHealth]);
  25492. if(PlayerData[i][pGang] >= 0 && !PlayerData[i][pBandana])
  25493. {
  25494. new id;
  25495. if((id = GetNearbyTurf(i)) >= 0 && TurfInfo[id][tTime] == 0 && TurfInfo[id][tCapturer] != INVALID_PLAYER_ID)
  25496. {
  25497. new color;
  25498. if(GangInfo[PlayerData[i][pGang]][gColor] == -1 || GangInfo[PlayerData[i][pGang]][gColor] == -256)
  25499. {
  25500. color = 0xC8C8C8FF;
  25501. }
  25502. else
  25503. {
  25504. color = GangInfo[PlayerData[i][pGang]][gColor];
  25505. }
  25506. PlayerData[i][pBandana] = 1;
  25507. SendClientMessage(i, COLOR_WHITE, "Your bandana was enabled automatically as you entered a turf in an active war.");
  25508. new stringa[120];
  25509. format(stringa, sizeof(stringa), "{%06x}%s", color >>> 8, GangInfo[PlayerData[i][pGang]][gName]);
  25510. fRepfamtext[i] = CreateDynamic3DTextLabel(stringa, COLOR_WHITE, 0.0, 0.0, -0.3, 20.0, .attachedplayer = i, .testlos = 1);
  25511. }
  25512. if((id = GetNearbyPoint(i, 30.0)) >= 0 && PointInfo[id][pTime] == 0 && PointInfo[id][pCapturer] != INVALID_PLAYER_ID)
  25513. {
  25514. PlayerData[i][pBandana] = 1;
  25515. SendClientMessage(i, COLOR_WHITE, "Your bandana was enabled automatically as you are in range of an active point.");
  25516. }
  25517. }
  25518. if(!PlayerData[i][pBackup] && !IsPlayerBeingFound(i) && PlayerData[i][pInTurf] == 0)
  25519. {
  25520. // Yeah, this is indeed a mess. But it works. Cleaning this section is on my list.
  25521. if(PlayerData[i][pPaintball] == 2) {
  25522. SetPlayerColor(i, (PlayerData[i][pPaintballTeam] == 1) ? (0x33CCFF00) : (0xFFFF9900));
  25523. } else if(PlayerData[i][pJailType] == 2) {
  25524. SetPlayerColor(i, 0xAD7A2100);
  25525. } else if(PlayerData[i][pFaction] >= 0 && PlayerData[i][pDuty] && FactionInfo[PlayerData[i][pFaction]][fType] != FACTION_HITMAN) {
  25526. SetPlayerColor(i, FactionInfo[PlayerData[i][pFaction]][fColor] & ~0xff);
  25527. } else if(PlayerHasJob(i, JOB_TAXIDRIVER) && PlayerData[i][pTaxiFare] > 0) {
  25528. SetPlayerColor(i, 0xF5DEB300);
  25529. } else if(PlayerData[i][pDonator] > 0 && PlayerData[i][pVIPColor]) {
  25530. SetPlayerColor(i, 0xFF00FF00);
  25531. } else if(PlayerData[i][pHunted] == 1) {
  25532. SetPlayerColor(i, 0xFF69B5FF);
  25533. }
  25534. #if defined zombiemode
  25535. if(GetPVarType(playerid, "pZombieBit"))
  25536. {
  25537. SetPlayerColor(playerid, 0xFFCC0000);
  25538. return 1;
  25539. }
  25540. if(GetPVarType(playerid, "pIsZombie"))
  25541. {
  25542. SetPlayerColor(playerid, 0x0BC43600);
  25543. return 1;
  25544. }
  25545. if(GetPVarType(playerid, "pEventZombie"))
  25546. {
  25547. SetPlayerColor(playerid, 0x0BC43600);
  25548. return 1;
  25549. }
  25550. #endif
  25551. else if(IsPlayerNPC(i))
  25552. {
  25553. SetPlayerColor(i, 0x00AA00AA);
  25554. }
  25555. else
  25556. {
  25557. SetPlayerColor(i, 0xFFFFFF00); //LMAO
  25558. }
  25559. }
  25560. }
  25561. }
  25562. for(new i = 0; i < MAX_ACTORS; i ++)
  25563. {
  25564. if(IsValidActor(i))
  25565. {
  25566. new
  25567. Float:x,
  25568. Float:y,
  25569. Float:z;
  25570. GetActorPos(i, x, y, z);
  25571. SetActorPos(i, x, y, z);
  25572. }
  25573. }
  25574. format(string, sizeof(string), "Raw ephedrine\nStock: %i\nPrice: $1,000/gram\n/buydrug ephedrine [amount]", gEphedrineStock);
  25575. UpdateDynamic3DTextLabelText(gEphedrineStockText, COLOR_YELLOW, string);
  25576. format(string, sizeof(string), "Marijuana seeds\nStock: %i\nPrice: $500/seed\n/buydrug seeds [amount]", gSeedsStock);
  25577. UpdateDynamic3DTextLabelText(gSeedsStockText, COLOR_YELLOW, string);
  25578. format(string, sizeof(string), "Cocaine\nStock: %i\nPrice: $750/gram\n/buydrug cocaine [amount]", gCocaineStock);
  25579. UpdateDynamic3DTextLabelText(gCocaineText, COLOR_YELLOW, string);
  25580. if(Iter_Count(Player) > gPlayerRecord)
  25581. {
  25582. gPlayerRecord = Iter_Count(Player);
  25583. gRecordDate = GetDate();
  25584. SaveServerInfo();
  25585. }
  25586. }
  25587. forward LastAlertPayCheck(playerid);
  25588. public LastAlertPayCheck(playerid)
  25589. {
  25590. if(PayCheckCode[playerid] != 0)
  25591. {
  25592. ShowPlayerFooter(playerid, "~w~Type /paycheck");
  25593. SendClientMessage(playerid, COLOR_WHITE, "You have one minute left before your paycheck code expires. Please type /paycheck to get your paycheck.");
  25594. SetTimerEx("DestroyCheck", 60000, false, "i", playerid);
  25595. }
  25596. }
  25597. forward DestroyCheck(playerid);
  25598. public DestroyCheck(playerid)
  25599. {
  25600. if(PayCheckCode[playerid] != 0)
  25601. {
  25602. PayCheckCode[playerid] = 0;
  25603. SendClientMessage(playerid, COLOR_WHITE, "Your paycheck code expired. Please remember to use /paycheck next time.");
  25604. }
  25605. }
  25606. CMD:taxhelp(playerid, params[])
  25607. {
  25608. SendClientMessageEx(playerid, COLOR_GREY, "The tax is currently set to {33CCFF}%i percent", gTax);
  25609. return 1;
  25610. }
  25611. CMD:paycheck(playerid, params[])
  25612. {
  25613. if(PayCheckCode[playerid] == 0) return SendClientMessage(playerid, COLOR_WHITE, "There is no paycheck to sign. Please wait for the next paycheck.");
  25614. new string[128];
  25615. format(string, sizeof(string), "Check code: %d\n\nEnter your check code to receive your paycheck:", PayCheckCode[playerid]);
  25616. Dialog_Show(playerid, DIALOG_PAYCHECK, DIALOG_STYLE_INPUT, "Sign check", string, "Sign check","Cancel");
  25617. return 1;
  25618. }
  25619. forward MinuteTimer();
  25620. public MinuteTimer()
  25621. {
  25622. new hour;
  25623. gettime(.hour = hour);
  25624. RefreshTime();
  25625. if(gacooldown)
  25626. {
  25627. for(new x = 0; x < MAX_GANGS; x++)
  25628. {
  25629. if(GangInfo[x][gInvCooldown] > 0)
  25630. {
  25631. GangInfo[x][gInvCooldown]--;
  25632. }
  25633. }
  25634. }
  25635. if(gHour != hour)
  25636. {
  25637. SendClientMessageToAllEx(COLOR_WHITE, "Old School Roleplay: The time is now {AFAFAF}%02d:00{FFFFFF}.", hour);
  25638. autoWeather();
  25639. new budget;
  25640. for(new i = 0; i < MAX_FACTIONS; i ++)
  25641. {
  25642. if(FactionInfo[i][fType] != FACTION_NONE)
  25643. {
  25644. budget += FactionInfo[i][fBudget] - GetTotalFactionPay(i);
  25645. }
  25646. }
  25647. AddToTaxVault(-budget);
  25648. for(new i = 0; i < MAX_POINTS; i ++)
  25649. {
  25650. if(PointInfo[i][pExists])
  25651. {
  25652. if(PointInfo[i][pTime] > 0)
  25653. {
  25654. PointInfo[i][pTime]--;
  25655. ReloadPoint(i);
  25656. }
  25657. if(!PointInfo[i][pTime])
  25658. {
  25659. SendClientMessageToAllEx(COLOR_YELLOW, "Point wars: %s is now available to capture.", PointInfo[i][pName]);
  25660. PointInfo[i][pCapturedGang] = -1;
  25661. }
  25662. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE points SET time = %i, capturedgang = %i WHERE id = %i", PointInfo[i][pTime], PointInfo[i][pCapturedGang], i);
  25663. mysql_tquery(connectionID, queryBuffer);
  25664. }
  25665. }
  25666. foreach(new i : Turf)
  25667. {
  25668. if(TurfInfo[i][tExists])
  25669. {
  25670. if(TurfInfo[i][tTime] > 0)
  25671. {
  25672. TurfInfo[i][tTime]--;
  25673. ReloadTurf(i);
  25674. }
  25675. if(!TurfInfo[i][tTime] && TurfInfo[i][tType] != 8)
  25676. {
  25677. SendTurfMessage(i, COLOR_YELLOW, "Turf wars: %s is now available to capture.", TurfInfo[i][tName]);
  25678. }
  25679. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE turfs SET time = %i WHERE id = %i", TurfInfo[i][tTime], i);
  25680. mysql_tquery(connectionID, queryBuffer);
  25681. }
  25682. }
  25683. switch(hour)
  25684. {
  25685. case 0, 4, 8, 12, 16, 18:
  25686. {
  25687. for(new i = 0; i < MAX_GANGS; i ++)
  25688. {
  25689. if(GangInfo[i][gSetup] && GangInfo[i][gTurfTokens] < 10)
  25690. {
  25691. GangInfo[i][gTurfTokens]++;
  25692. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET turftokens = turftokens + 1 WHERE id = %i", i);
  25693. mysql_tquery(connectionID, queryBuffer);
  25694. }
  25695. }
  25696. for(new i = 0; i < MAX_FACTIONS; i ++)
  25697. {
  25698. if((FactionInfo[i][fType] == FACTION_POLICE || FactionInfo[i][fType] == FACTION_FEDERAL || FactionInfo[i][fType] == FACTION_ARMY) && FactionInfo[i][fTurfTokens] < 3)
  25699. {
  25700. FactionInfo[i][fTurfTokens]++;
  25701. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_FACTIONS" SET turftokens = turftokens + 1 WHERE id = %i", i);
  25702. mysql_tquery(connectionID, queryBuffer);
  25703. }
  25704. }
  25705. }
  25706. }
  25707. foreach(new i : Player)
  25708. {
  25709. if(PlayerData[i][pLogged] && !PlayerData[i][pKicked])
  25710. {
  25711. if(PlayerData[i][pAFK] && PlayerData[i][pAFKTime] > 900)
  25712. {
  25713. SendClientMessage(i, COLOR_LIGHTRED, "You didn't receive a paycheck this hour as you were AFK for more than 15 minutes.");
  25714. }
  25715. else if(PlayerData[i][pMinutes] < 25)
  25716. {
  25717. SendClientMessage(i, COLOR_LIGHTRED, "You are ineligible for a paycheck as you played less than 25 minutes this hour.");
  25718. }
  25719. else
  25720. {
  25721. new code = Random(100000, 999999);
  25722. PayCheckCode[i] = code;
  25723. SendClientMessage(i, COLOR_GREY,"_______________________________________________________________");
  25724. SendClientMessage(i, COLOR_WHITE,"Information for tax on paychecks: {33CCFF}/taxhelp");
  25725. SendClientMessage(i, COLOR_GREY,"_______________________________________________________________");
  25726. SendClientMessage(i, COLOR_WHITE,"Sign the check to receive your paycheck.");
  25727. SendClientMessage(i, COLOR_AQUA, "Type /paycheck");
  25728. SendClientMessage(i, COLOR_WHITE,"You have 5 minutes to sign the check before it becomes invalid.");
  25729. SendClientMessage(i, COLOR_GREY,"_______________________________________________________________");
  25730. GameTextForPlayer(i, "~w~Type /paycheck", 2500, 1);
  25731. SetTimerEx("LastAlertPayCheck", 240000, false, "i", i);
  25732. }
  25733. if(GetFactionType(i) == FACTION_GOVERNMENT)
  25734. {
  25735. SendClientMessageEx(i, COLOR_YELLOW2, "%s were taken out of the tax vault for every faction's paycheck.", FormatNumber(budget));
  25736. }
  25737. if(PlayerData[i][pReportMuted])
  25738. {
  25739. PlayerData[i][pReportMuted]--;
  25740. if(PlayerData[i][pReportMuted] <= 0)
  25741. {
  25742. PlayerData[i][pReportMuted] = 0;
  25743. PlayerData[i][pReportWarns] = 0;
  25744. SendClientMessage(i, COLOR_YELLOW, "Your report mute has automatically been lifted.");
  25745. }
  25746. }
  25747. }
  25748. }
  25749. if(RobberyInfo[rTime] > 0)
  25750. {
  25751. RobberyInfo[rTime]--;
  25752. }
  25753. SetWorldTime(hour);
  25754. gWorldTime = hour;
  25755. gHour = hour;
  25756. gCharityHealth = 0;
  25757. gCharityArmor = 0;
  25758. }
  25759. else
  25760. {
  25761. foreach(new i : Player)
  25762. {
  25763. if(PlayerData[i][pWeedPlanted] && PlayerData[i][pWeedTime] > 0)
  25764. {
  25765. PlayerData[i][pWeedTime]--;
  25766. if((PlayerData[i][pWeedTime] % 2) == 0)
  25767. {
  25768. PlayerData[i][pWeedGrams]++;
  25769. }
  25770. }
  25771. if(PlayerData[i][pLogged] && PlayerData[i][pAFKTime] < 900)
  25772. {
  25773. //new amount = 35 * min(PlayerData[i][pLevel], 21);
  25774. //AddToPaycheck(i, amount);
  25775. PlayerData[i][pMinutes]++;
  25776. }
  25777. }
  25778. for(new i = 0; i < MAX_POINTS; i ++)
  25779. {
  25780. if(PointInfo[i][pExists] && PointInfo[i][pCapturer] != INVALID_PLAYER_ID && PointInfo[i][pCaptureTime] > 0)
  25781. {
  25782. if(PlayerData[PointInfo[i][pCapturer]][pGang] == -1)// || PlayerData[PointInfo[i][pCapturer]][pGangRank] < 5)
  25783. {
  25784. PointInfo[i][pCapturer] = INVALID_PLAYER_ID;
  25785. PointInfo[i][pCaptureTime] = 0;
  25786. }
  25787. else
  25788. {
  25789. PointInfo[i][pCaptureTime]--;
  25790. if(PointInfo[i][pCaptureTime] <= 0)
  25791. {
  25792. GiveGangPoints(PlayerData[PointInfo[i][pCapturer]][pGang], 50);
  25793. GetPlayerName(PointInfo[i][pCapturer], PointInfo[i][pCapturedBy], MAX_PLAYER_NAME);
  25794. PointInfo[i][pCapturedGang] = PlayerData[PointInfo[i][pCapturer]][pGang];
  25795. GangInfo[PointInfo[i][pCapturedGang]][gCash] += PointInfo[i][pProfits];
  25796. GangInfo[PointInfo[i][pCapturedGang]][gTurfTokens] ++;
  25797. SendClientMessageToAllEx(COLOR_YELLOW, "Point wars: %s has successfully captured %s for %s.", GetRPName(PointInfo[i][pCapturer]), PointInfo[i][pName], GangInfo[PointInfo[i][pCapturedGang]][gName]);
  25798. SendGangMessage(PointInfo[i][pCapturedGang], COLOR_YELLOW, "Your gang has earned $%i, 50 GP, and 1 Turf Token for successfully capturing this point.", PointInfo[i][pProfits]);
  25799. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET turftokens = %i, cash = %i WHERE id = %i", GangInfo[PointInfo[i][pCapturedGang]][gTurfTokens], GangInfo[PointInfo[i][pCapturedGang]][gCash], PointInfo[i][pCapturedGang]);
  25800. mysql_tquery(connectionID, queryBuffer);
  25801. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE points SET capturedby = '%s', capturedgang = %i, profits = 0, time = 20 WHERE id = %i", PointInfo[i][pCapturedBy], PointInfo[i][pCapturedGang], i);
  25802. mysql_tquery(connectionID, queryBuffer);
  25803. PointInfo[i][pCapturer] = INVALID_PLAYER_ID;
  25804. PointInfo[i][pCaptureTime] = 0;
  25805. PointInfo[i][pProfits] = 0;
  25806. PointInfo[i][pTime] = 20;
  25807. ReloadPoint(i);
  25808. }
  25809. }
  25810. }
  25811. }
  25812. foreach(new i : Turf)
  25813. {
  25814. if(TurfInfo[i][tExists] && TurfInfo[i][tCapturer] != INVALID_PLAYER_ID && TurfInfo[i][tCaptureTime] > 0)
  25815. {
  25816. if(!IsLawEnforcement(TurfInfo[i][tCapturer]) && (PlayerData[TurfInfo[i][tCapturer]][pGang] == -1))
  25817. {
  25818. TurfInfo[i][tCapturer] = INVALID_PLAYER_ID;
  25819. TurfInfo[i][tCaptureTime] = 0;
  25820. ReloadTurf(i);
  25821. }
  25822. else
  25823. {
  25824. TurfInfo[i][tCaptureTime]--;
  25825. if(TurfInfo[i][tCaptureTime] <= 0)
  25826. {
  25827. GetPlayerName(TurfInfo[i][tCapturer], TurfInfo[i][tCapturedBy], MAX_PLAYER_NAME);
  25828. if(IsLawEnforcement(TurfInfo[i][tCapturer]))
  25829. {
  25830. SendClientMessageToAllEx(COLOR_YELLOW, "Turf wars: %s has been successfully claimed back by %s.", TurfInfo[i][tName], GetRPName(TurfInfo[i][tCapturer]));
  25831. GetPlayerName(TurfInfo[i][tCapturer], TurfInfo[i][tCapturedBy], MAX_PLAYER_NAME);
  25832. TurfInfo[i][tBeingCaptured] = -1;
  25833. TurfInfo[i][tCapturedGang] = -5;
  25834. SendTurfMessage(i, COLOR_YELLOW, "Turf wars: The police have succesfully shutdown %s.", TurfInfo[i][tName]);
  25835. for(new y = 0; y < MAX_FACTIONS; y++)
  25836. {
  25837. if(FactionInfo[y][fType] == FACTION_POLICE || FactionInfo[y][fType] == FACTION_FEDERAL || FactionInfo[y][fType] == FACTION_ARMY)
  25838. {
  25839. SendFactionMessage(y, COLOR_YELLOW, "TURFS: Your faction has successfully shutdown a turf, You have earned $5000.");
  25840. foreach(new x: Player)
  25841. {
  25842. if(PlayerData[x][pFaction] == y)
  25843. {
  25844. GivePlayerCash(x, 5000);
  25845. }
  25846. }
  25847. }
  25848. }
  25849. }
  25850. else
  25851. {
  25852. new gangid = PlayerData[TurfInfo[i][tCapturer]][pGang];
  25853. TurfInfo[i][tCapturedGang] = gangid;
  25854. TurfInfo[i][tBeingCaptured] = -1;
  25855. GiveGangPoints(gangid, 25);
  25856. SendClientMessageToAllEx(COLOR_YELLOW, "Turf wars: %s has been successfully claimed by %s for %s.", TurfInfo[i][tName], GetRPName(TurfInfo[i][tCapturer]), GangInfo[gangid][gName]);
  25857. switch(TurfInfo[i][tType])
  25858. {
  25859. case 1:
  25860. {
  25861. new amount = 10000 + (5000*GangInfo[gangid][gMatLevel]);
  25862. GangInfo[gangid][gMaterials] = GangInfo[gangid][gMaterials] + amount > GetGangStashCapacity(gangid, STASH_CAPACITY_MATERIALS) ? GetGangStashCapacity(gangid, STASH_CAPACITY_MATERIALS) : GangInfo[gangid][gMaterials] + 15000;
  25863. SendGangMessage(gangid, COLOR_YELLOW, "Your gang earned %i materials in the stash for capturing this turf!", amount);
  25864. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET materials = %i WHERE id = %i", GangInfo[gangid][gMaterials], gangid);
  25865. mysql_tquery(connectionID, queryBuffer);
  25866. }
  25867. case 2:
  25868. {
  25869. new amount = 10 + GangInfo[gangid][gGunLevel];
  25870. GangInfo[gangid][gWeapons][GANGWEAPON_9MM] += amount;
  25871. GangInfo[gangid][gWeapons][GANGWEAPON_SDPISTOL] += amount;
  25872. GangInfo[gangid][gWeapons][GANGWEAPON_SHOTGUN] += amount;
  25873. GangInfo[gangid][gWeapons][GANGWEAPON_TEC9] += amount;
  25874. GangInfo[gangid][gWeapons][GANGWEAPON_UZI] += amount;
  25875. SendGangMessage(gangid, COLOR_YELLOW, "Your gang earned +%i of 9mm/SDPistol/Shotgun/Tec9/Uzi each in its stash for capturing this turf!", amount);
  25876. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET weapon_9mm = %i, weapon_sdpistol = %i, weapon_shotgun = %i, weapon_tec9 = %i, weapon_uzi = %i WHERE id = %i", GangInfo[gangid][gWeapons][GANGWEAPON_9MM], GangInfo[gangid][gWeapons][GANGWEAPON_SDPISTOL], GangInfo[gangid][gWeapons][GANGWEAPON_SHOTGUN], GangInfo[gangid][gWeapons][GANGWEAPON_TEC9], GangInfo[gangid][gWeapons][GANGWEAPON_UZI], gangid);
  25877. mysql_tquery(connectionID, queryBuffer);
  25878. }
  25879. case 3:
  25880. {
  25881. new amount = 10 + GangInfo[gangid][gGunLevel];
  25882. GangInfo[gangid][gWeapons][GANGWEAPON_MP5] += amount;
  25883. GangInfo[gangid][gWeapons][GANGWEAPON_AK47] += amount;
  25884. GangInfo[gangid][gWeapons][GANGWEAPON_RIFLE] += amount;
  25885. SendGangMessage(gangid, COLOR_YELLOW, "Your gang earned +%i of MP5/AK47/Rifle each in its stash for capturing this turf!", amount);
  25886. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET weapon_mp5 = %i, weapon_ak47 = %i, weapon_rifle = %i WHERE id = %i", GangInfo[gangid][gWeapons][GANGWEAPON_MP5], GangInfo[gangid][gWeapons][GANGWEAPON_AK47], GangInfo[gangid][gWeapons][GANGWEAPON_RIFLE], gangid);
  25887. mysql_tquery(connectionID, queryBuffer);
  25888. }
  25889. case 4:
  25890. {
  25891. new amount = 10 + GangInfo[gangid][gGunLevel];
  25892. GangInfo[gangid][gWeapons][GANGWEAPON_AK47] += amount;
  25893. GangInfo[gangid][gWeapons][GANGWEAPON_DEAGLE] += amount;
  25894. //GangInfo[gangid][gWeapons][GANGWEAPON_SNIPER] += amount;
  25895. // GangInfo[gangid][gWeapons][GANGWEAPON_SPAS12] += (amount-8);
  25896. SendGangMessage(gangid, COLOR_YELLOW, "Your gang earned +%i of AK/Deagle each in its stash for capturing this turf!", amount);
  25897. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET weapon_ak47 = %i, weapon_deagle = %i WHERE id = %i", GangInfo[gangid][gWeapons][GANGWEAPON_AK47], GangInfo[gangid][gWeapons][GANGWEAPON_DEAGLE], gangid);
  25898. mysql_tquery(connectionID, queryBuffer);
  25899. }
  25900. case 5:
  25901. {
  25902. GangInfo[gangid][gWeed] = GangInfo[gangid][gWeed] + 100 > GetGangStashCapacity(gangid, STASH_CAPACITY_WEED) ? GetGangStashCapacity(gangid, STASH_CAPACITY_WEED) : GangInfo[gangid][gWeed] + 100;
  25903. GangInfo[gangid][gMeth] = GangInfo[gangid][gMeth] + 50 > GetGangStashCapacity(gangid, STASH_CAPACITY_METH) ? GetGangStashCapacity(gangid, STASH_CAPACITY_METH) : GangInfo[gangid][gMeth] + 50;
  25904. SendGangMessage(gangid, COLOR_YELLOW, "Your gang earned 100 grams of weed & 50 grams of meth in the stash for capturing this turf!");
  25905. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET weed = %i, meth = %i WHERE id = %i", GangInfo[gangid][gWeed], GangInfo[gangid][gMeth], gangid);
  25906. mysql_tquery(connectionID, queryBuffer);
  25907. }
  25908. case 6:
  25909. {
  25910. GangInfo[gangid][gCocaine] = GangInfo[gangid][gCocaine] + 75 > GetGangStashCapacity(gangid, STASH_CAPACITY_COCAINE) ? GetGangStashCapacity(gangid, STASH_CAPACITY_COCAINE) : GangInfo[gangid][gCocaine] + 75;
  25911. SendGangMessage(gangid, COLOR_YELLOW, "Your gang earned 75 grams of cocaine in the stash for capturing this turf!");
  25912. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET cocaine = %i WHERE id = %i", GangInfo[gangid][gCocaine], gangid);
  25913. mysql_tquery(connectionID, queryBuffer);
  25914. }
  25915. case 7:
  25916. {
  25917. SendGangMessage(gangid, COLOR_YELLOW, "Your gang will now receive 10 percents of all sales in this turf.");
  25918. }
  25919. }
  25920. }
  25921. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE turfs SET capturedby = '%s', capturedgang = %i, time = 12 WHERE id = %i", TurfInfo[i][tCapturedBy], TurfInfo[i][tCapturedGang], i);
  25922. mysql_tquery(connectionID, queryBuffer);
  25923. TurfInfo[i][tCapturer] = INVALID_PLAYER_ID;
  25924. TurfInfo[i][tCaptureTime] = 0;
  25925. TurfInfo[i][tTime] = 12;
  25926. ReloadTurf(i);
  25927. }
  25928. }
  25929. }
  25930. }
  25931. for(new i = 0; i < MAX_REPORTS; i ++)
  25932. {
  25933. if(ReportInfo[i][rExists] && ReportInfo[i][rTime] > 0)
  25934. {
  25935. ReportInfo[i][rTime]--;
  25936. if(ReportInfo[i][rTime] <= 0 && ReportInfo[i][rAccepted] == 0)
  25937. {
  25938. SendClientMessage(ReportInfo[i][rReporter], COLOR_GREY, "Your report has expired. You can make an admin request on os-rp.net if you still need help.");
  25939. ReportInfo[i][rExists] = 0;
  25940. }
  25941. }
  25942. }
  25943. }
  25944. }
  25945. forward FuelTimer();
  25946. public FuelTimer()
  25947. {
  25948. new driverid;
  25949. foreach(new i: Vehicle)
  25950. {
  25951. if((driverid = GetVehicleDriver(i)) != INVALID_VEHICLE_ID && !IsABike(i) && GetVehicleParams(i, VEHICLE_ENGINE))//vehfuel
  25952. {
  25953. if(vehicleFuel[i] > 0)
  25954. {
  25955. vehicleFuel[i]--;
  25956. switch(vehicleFuel[i])
  25957. {
  25958. case 15, 10, 5:
  25959. {
  25960. SendClientMessage(driverid, COLOR_LIGHTRED, "* This vehicle is running low on fuel. Visit the nearest gas station to fill up. (/refuel)");
  25961. }
  25962. }
  25963. }
  25964. if(vehicleFuel[i] <= 0 && driverid != INVALID_PLAYER_ID && !IsABike(i))
  25965. {
  25966. GameTextForPlayer(driverid, "~r~Out of fuel", 5000, 3);
  25967. SetVehicleParams(i, VEHICLE_ENGINE, false);
  25968. // TogglePlayerControllable(driverid, 0);
  25969. }
  25970. }
  25971. }
  25972. }
  25973. forward InjuredTimer();
  25974. public InjuredTimer()
  25975. {
  25976. foreach(new i : Player)
  25977. {
  25978. if(PlayerData[i][pLogged] && PlayerData[i][pInjured] && GetVehicleModel(GetPlayerVehicleID(i)) != 416)
  25979. {
  25980. new
  25981. Float:health;
  25982. GetPlayerHealth(i, health);
  25983. SetPlayerHealth(i, health - 1.0);
  25984. }
  25985. }
  25986. }
  25987. forward MileageTimer();
  25988. public MileageTimer()
  25989. {
  25990. foreach(new i: Vehicle)
  25991. {
  25992. if((GetVehicleDriver(i)) != INVALID_VEHICLE_ID)
  25993. {
  25994. new speed = GetVehicleSpeedKMH(i);
  25995. VehicleInfo[i][vMileage] += (speed * 0.00009722222);
  25996. }
  25997. }
  25998. }
  25999. forward RandomFire(check);
  26000. public RandomFire(check)
  26001. {
  26002. new count, index, announced, rand = random(10);
  26003. if(!IsFireActive())
  26004. {
  26005. if(check)
  26006. {
  26007. foreach(new i : Player)
  26008. {
  26009. if(GetFactionType(i) == FACTION_MEDIC)
  26010. {
  26011. count++;
  26012. }
  26013. }
  26014. }
  26015. else
  26016. {
  26017. count = 3;
  26018. }
  26019. if(count >= 3)
  26020. {
  26021. for(new i = 0; i < sizeof(randomFireSpawns); i ++)
  26022. {
  26023. if(randomFireSpawns[i][fireIndex] == rand)
  26024. {
  26025. if(!announced)
  26026. {
  26027. foreach(new x : Player)
  26028. {
  26029. if(IsPlayerInRangeOfPoint(x, 30.0, randomFireSpawns[i][fireX], randomFireSpawns[i][fireY], randomFireSpawns[i][fireZ]))
  26030. {
  26031. SendClientMessage(x, COLOR_PURPLE, "* An explosion can be heard. Smoke is rising from a building nearby.");
  26032. }
  26033. if(GetFactionType(x) == FACTION_MEDIC)
  26034. {
  26035. PlayerData[x][pCP] = CHECKPOINT_MISC;
  26036. SetPlayerCheckpoint(x, randomFireSpawns[i][fireX], randomFireSpawns[i][fireY], randomFireSpawns[i][fireZ], 3.0);
  26037. SendClientMessageEx(x, COLOR_DOCTOR, "* All units, a fire has been reported in %s. Please head to the beacon on your map. *", GetZoneName(randomFireSpawns[i][fireX], randomFireSpawns[i][fireY], randomFireSpawns[i][fireZ]));
  26038. }
  26039. }
  26040. announced = 1;
  26041. }
  26042. gFireObjects[index] = CreateDynamicObject(18691, randomFireSpawns[i][fireX], randomFireSpawns[i][fireY], randomFireSpawns[i][fireZ], 0.0, 0.0, randomFireSpawns[i][fireA], .streamdistance = 50.0);
  26043. gFireHealth[index++] = 50.0;
  26044. }
  26045. }
  26046. gFires = index;
  26047. }
  26048. }
  26049. }
  26050. forward KickPlayer(playerid);
  26051. public KickPlayer(playerid)
  26052. {
  26053. if(!PlayerData[playerid][pKicked])
  26054. {
  26055. PlayerData[playerid][pKicked] = 1;
  26056. SetTimerEx("KickPlayer", 200, false, "i", playerid);
  26057. }
  26058. else
  26059. {
  26060. PlayerData[playerid][pKicked] = 0;
  26061. Kick(playerid);
  26062. }
  26063. }
  26064. #if defined SERVER_INTRO
  26065. forward ShowMainMenuCamera(playerid, query);
  26066. public ShowMainMenuCamera(playerid, query)
  26067. {
  26068. if(!query)
  26069. {
  26070. InterpolateCameraPos(playerid, 836.923767, -1779.394165, 18.188320, 970.047790, -1792.450439, 21.380487, 15000);
  26071. InterpolateCameraLookAt(playerid, 840.450439, -1775.850219, 18.139299, 966.497192, -1789.023559, 20.574161, 10000);
  26072. }
  26073. else
  26074. {
  26075. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM bans WHERE username = '%s' OR ip = '%s' OR ip LIKE '%s'", GetPlayerNameEx(playerid), GetPlayerIP(playerid), GetPlayerIPRange(playerid));
  26076. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LOOKUP_BANS, playerid);
  26077. }
  26078. }
  26079. #else
  26080. forward ShowMainMenuCamera(playerid);
  26081. public ShowMainMenuCamera(playerid)
  26082. {
  26083. PlayLoginMusic(playerid);
  26084. ClearChat(playerid);
  26085. ShowRandomCamera(playerid);
  26086. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM bans WHERE username = '%s' OR ip = '%s' OR ip LIKE '%s'", GetRPName(playerid), GetPlayerIP(playerid), GetPlayerIPRange(playerid));
  26087. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LOOKUP_BANS, playerid);
  26088. }
  26089. #endif
  26090. forward ShowRandomCamera(playerid);
  26091. public ShowRandomCamera(playerid)
  26092. {
  26093. if(PlayerData[playerid][pLogged] == 0)
  26094. {
  26095. TextDrawShowForPlayer(playerid, welcomenew);
  26096. switch(random(2))
  26097. {
  26098. case 0:
  26099. {
  26100. InterpolateCameraPos(playerid, 1534.284423, -1312.871093, 513.042114, 1561.539794, -1314.386108, 16.426090, 25000);
  26101. InterpolateCameraLookAt(playerid, 1534.702758, -1312.993041, 508.061126, 1558.089111, -1313.615966, 19.961624, 10000);
  26102. }
  26103. case 1:
  26104. {
  26105. InterpolateCameraPos(playerid, 1402.380126, -1216.866333, 350.959869, 1660.696655, -1303.045410, 74.042839, 7000);
  26106. InterpolateCameraLookAt(playerid, 1404.336425, -1219.865234, 347.469909, 1657.485961, -1304.525756, 77.578369, 7000);
  26107. }
  26108. }
  26109. }
  26110. }
  26111. forward DespawnTimer(vehicleid);
  26112. public DespawnTimer(vehicleid)
  26113. {
  26114. if(VehicleInfo[vehicleid][vOwnerID] > 0 && !IsVehicleOccupied(vehicleid) && !IsVehicleBeingPicked(vehicleid))
  26115. {
  26116. DespawnVehicle(vehicleid);
  26117. }
  26118. else
  26119. {
  26120. // ANOTHER TEN MINUTES!
  26121. VehicleInfo[vehicleid][vTimer] = SetTimerEx("DespawnTimer", 300000, false, "i", vehicleid);
  26122. }
  26123. }
  26124. /*forward HTTP_ListShoutcastStations(index, response_code, data[]);
  26125. public HTTP_ListShoutcastStations(index, response_code, data[])
  26126. {
  26127. }*/
  26128. forward HTTP_ProxyCheck(playerid, response_code, data[]);
  26129. public HTTP_ProxyCheck(playerid, response_code, data[])
  26130. {
  26131. if(response_code == 200)
  26132. {
  26133. if(data[0] == 'Y')
  26134. {
  26135. SendAdminMessage(COLOR_YELLOW,"AdmWarning: %s[%i] has attempted to connect with a proxy/VPN.", GetRPName(playerid), playerid);
  26136. SendClientMessage(playerid, COLOR_RED, "_________Please disable your proxy/VPN and rejoin!_________");
  26137. KickPlayer(playerid);
  26138. }
  26139. if(data[0] == 'X')
  26140. {
  26141. printf("WRONG IP FORMAT");
  26142. }
  26143. }
  26144. else
  26145. {
  26146. printf("The request failed! The response code was: %d", response_code);
  26147. }
  26148. return 1;
  26149. }
  26150. forward HTTP_OnMusicFetchResponse(index, response_code, data[]);
  26151. public HTTP_OnMusicFetchResponse(index, response_code, data[])
  26152. {
  26153. if(response_code == 200)
  26154. {
  26155. new
  26156. buffer[2048],
  26157. string[288],
  26158. count,
  26159. start,
  26160. pos;
  26161. strcpy(buffer, data);
  26162. while((pos = strfind(buffer, "<br/>")) != -1)
  26163. {
  26164. strdel(buffer, pos, pos + 5);
  26165. if(++count == 8)
  26166. {
  26167. strmid(string, buffer, start, pos);
  26168. SendClientMessage(index, COLOR_YELLOW, string);
  26169. start = pos;
  26170. count = 0;
  26171. }
  26172. else
  26173. {
  26174. if((strlen(buffer) - pos) < 6)
  26175. {
  26176. strmid(string, buffer, start, pos);
  26177. SendClientMessage(index, COLOR_YELLOW, string);
  26178. break;
  26179. }
  26180. strins(buffer, ", ", pos);
  26181. }
  26182. }
  26183. }
  26184. else
  26185. {
  26186. SendClientMessageEx(index, COLOR_RED, "The music database is currently not available. (error %i)", response_code);
  26187. }
  26188. }
  26189. forward Radio_PlayStation(playerid);
  26190. public Radio_PlayStation(playerid)
  26191. {
  26192. if(cache_get_row_count(connectionID))
  26193. {
  26194. new name[128], url[128];
  26195. cache_get_field_content(0, "name", name);
  26196. cache_get_field_content(0, "url", url);
  26197. switch(PlayerData[playerid][pMusicType])
  26198. {
  26199. case MUSIC_MP3PLAYER:
  26200. {
  26201. ShowActionBubble(playerid, "* %s changes the radio station on their MP3 player.", GetRPName(playerid));
  26202. SendClientMessageEx(playerid, COLOR_AQUA, "You are now tuned in to {00AA00}%s{33CCFF}.", name);
  26203. SetMusicStream(MUSIC_MP3PLAYER, playerid, url);
  26204. }
  26205. case MUSIC_BOOMBOX:
  26206. {
  26207. ShowActionBubble(playerid, "* %s changes the radio station on their boombox.", GetRPName(playerid));
  26208. SendClientMessageEx(playerid, COLOR_AQUA, "Your boombox is now tuned in to {00AA00}%s{33CCFF}.", name);
  26209. SetMusicStream(MUSIC_BOOMBOX, playerid, url);
  26210. }
  26211. case MUSIC_VEHICLE:
  26212. {
  26213. if(IsPlayerInAnyVehicle(playerid))
  26214. {
  26215. ShowActionBubble(playerid, "* %s changes the radio station in their vehicle.", GetRPName(playerid));
  26216. SendClientMessageEx(playerid, COLOR_AQUA, "Your radio is now tuned in to {00AA00}%s{33CCFF}.", name);
  26217. SetMusicStream(MUSIC_VEHICLE, GetPlayerVehicleID(playerid), url);
  26218. }
  26219. }
  26220. }
  26221. }
  26222. }
  26223. forward Radio_ListStations(playerid);
  26224. public Radio_ListStations(playerid)
  26225. {
  26226. new rows = cache_get_row_count(connectionID);
  26227. if((!rows) && PlayerData[playerid][pSearch] && PlayerData[playerid][pPage] == 1)
  26228. {
  26229. SendClientMessage(playerid, COLOR_GREY, "No results found.");
  26230. ShowDialogToPlayer(playerid, DIALOG_MP3RADIOSEARCH);
  26231. }
  26232. else if(rows)
  26233. {
  26234. static string[MAX_LISTED_STATIONS * 64], name[128];
  26235. string[0] = 0;
  26236. for(new i = 0; i < rows; i ++)
  26237. {
  26238. cache_get_field_content(i, "name", name);
  26239. format(string, sizeof(string), "%s\n%s", string, name);
  26240. }
  26241. if(PlayerData[playerid][pPage] > 1)
  26242. {
  26243. strcat(string, "\n{FF6347}<< Go back{FFFFFF}");
  26244. }
  26245. if(rows == MAX_LISTED_STATIONS)
  26246. {
  26247. strcat(string, "\n{00AA00}>> Next page{FFFFFF}");
  26248. }
  26249. Dialog_Show(playerid, DIALOG_MP3RADIORESULTS, DIALOG_STYLE_LIST, "Results", string, "Play", "Back");
  26250. }
  26251. }
  26252. forward MDC_ListCharges(playerid);
  26253. public MDC_ListCharges(playerid)
  26254. {
  26255. new rows = cache_get_row_count(connectionID);
  26256. if(!rows)
  26257. {
  26258. SendClientMessage(playerid, COLOR_GREY, "This player has no active charges on them.");
  26259. }
  26260. else
  26261. {
  26262. new chargedby[MAX_PLAYER_NAME], date[24], reason[128], string[512];
  26263. string = "Charged by\tDate\tReason";
  26264. for(new i = 0; i < rows; i ++)
  26265. {
  26266. cache_get_field_content(i, "chargedby", chargedby);
  26267. cache_get_field_content(i, "date", date);
  26268. cache_get_field_content(i, "reason", reason);
  26269. format(string, sizeof(string), "%s\n%s\t%s\t%s", string, chargedby, date, reason);
  26270. }
  26271. Dialog_Show(playerid, DIALOG_MDCCHARGES, DIALOG_STYLE_TABLIST_HEADERS, "Active charges:", string, "<<", "");
  26272. }
  26273. return 1;
  26274. }
  26275. forward MDC_ClearCharges(playerid);
  26276. public MDC_ClearCharges(playerid)
  26277. {
  26278. if(cache_get_row_count(connectionID))
  26279. {
  26280. new username[MAX_PLAYER_NAME], id = PlayerData[playerid][pSelected];
  26281. cache_get_field_content(0, "username", username);
  26282. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM charges WHERE uid = %i", id);
  26283. mysql_tquery(connectionID, queryBuffer);
  26284. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET wantedlevel = 0 WHERE uid = %i", id);
  26285. mysql_tquery(connectionID, queryBuffer);
  26286. foreach(new i : Player)
  26287. {
  26288. if(!strcmp(GetPlayerNameEx(i), username))
  26289. {
  26290. SendClientMessageEx(i, COLOR_WHITE, "Your crimes were cleared by %s.", GetRPName(playerid));
  26291. PlayerData[i][pWantedLevel] = 0;
  26292. }
  26293. }
  26294. SendFactionMessage(PlayerData[playerid][pFaction], COLOR_OLDSCHOOL, "* HQ: %s %s has cleared %s's charges and wanted level.", FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid), username);
  26295. }
  26296. }
  26297. forward MDC_PlayerLookup(playerid, username[]);
  26298. public MDC_PlayerLookup(playerid, username[])
  26299. {
  26300. if(!cache_get_row_count(connectionID))
  26301. {
  26302. SendClientMessage(playerid, COLOR_GREY, "That player doesn't exist and therefore has no information to view.");
  26303. Dialog_Show(playerid, DIALOG_PLAYERLOOKUP, DIALOG_STYLE_INPUT, "Player lookup", "Enter the full name of the player to lookup:", "Submit", "Cancel");
  26304. }
  26305. else
  26306. {
  26307. new string[200];
  26308. PlayerData[playerid][pSelected] = cache_get_field_content_int(0, "uid");
  26309. format(string, sizeof(string), "Name: %s\nGender: %s\nAge: %i years old\nCrimes commited: %i\nTimes arrested: %i\nWanted level: %i/6\nDrivers license: %s", username, (cache_get_field_content_int(0, "gender") == 2) ? ("Female") : ("Male"), cache_get_field_content_int(0, "age"), cache_get_field_content_int(0, "crimes"), cache_get_field_content_int(0, "arrested"), cache_get_field_content_int(0, "wantedlevel"), cache_get_field_content_int(0, "carlicense") ? ("Yes") : ("No"));
  26310. Dialog_Show(playerid, DIALOG_MDCPLAYER1, DIALOG_STYLE_MSGBOX, "Player lookup", string, "Options", "Cancel");
  26311. }
  26312. }
  26313. public OnPlayerExitVehicle(playerid, vehicleid)
  26314. {
  26315. if (CarRadars[playerid] == 1)
  26316. {
  26317. PlayerTextDrawHide(playerid, _crTextTarget[playerid]);
  26318. PlayerTextDrawHide(playerid, _crTextSpeed[playerid]);
  26319. PlayerTextDrawHide(playerid, _crTickets[playerid]);
  26320. DeletePVar(playerid, "_lastTicketWarning");
  26321. }
  26322. if(isharvesting[playerid] == 1)
  26323. {
  26324. SendClientMessage(playerid, COLOR_GREY, "You left your vehicle, you cannot complete the job.");
  26325. // callcmd::ccp(playerid);
  26326. CancelActiveCheckpoint(playerid);
  26327. isharvesting[playerid] = 0;
  26328. }
  26329. if(Renting[playerid])
  26330. {
  26331. SendClientMessage(playerid, COLOR_RED, "You have 60 seconds to go back at truck otherwise you will have to re-pay for it.");
  26332. SetTimerEx("LeftVehicle", 60000, false, "i", playerid);
  26333. }
  26334. if(seatbelt[playerid] == 1)
  26335. {
  26336. RemovePlayerAttachedObject(playerid, 7);
  26337. ShowActionBubble(playerid, "* %s reaches for their seatbelt, and unbuckles it.", GetRPName(playerid));
  26338. SendClientMessage(playerid, COLOR_WHITE, "You have taken off your seatbelt.");
  26339. }
  26340. return 1;
  26341. }
  26342. forward LeftVehicle(playerid);
  26343. public LeftVehicle(playerid)
  26344. {
  26345. Renting[playerid] = 0;
  26346. SendClientMessage(playerid, COLOR_RED, "Your renting timer is over, you are now able to rent again.");
  26347. return 1;
  26348. }
  26349. forward OnPlayerUpgradeGarage(playerid, garageid);
  26350. public OnPlayerUpgradeGarage(playerid, garageid)
  26351. {
  26352. new count, rows = cache_get_row_count(connectionID), vehicleid;
  26353. for(new i = 0; i < rows; i ++)
  26354. {
  26355. vehicleid = GetVehicleLinkedID(cache_get_field_content_int(0, "id"));
  26356. if((vehicleid == INVALID_VEHICLE_ID) || (vehicleid != INVALID_VEHICLE_ID && GetVehicleVirtualWorld(vehicleid) == GarageInfo[garageid][gWorld]))
  26357. {
  26358. count++;
  26359. }
  26360. }
  26361. if(count)
  26362. {
  26363. SendClientMessage(playerid, COLOR_GREY, "You have despawned vehicles parked in your garage. Park them outside before upgrading.");
  26364. }
  26365. else
  26366. {
  26367. foreach(new i : Player)
  26368. {
  26369. if(GetInsideGarage(i) == garageid)
  26370. {
  26371. SetPlayerPos(i, garageInteriors[GarageInfo[garageid][gType] + 1][intVX], garageInteriors[GarageInfo[garageid][gType] + 1][intVY], garageInteriors[GarageInfo[garageid][gType] + 1][intVZ]);
  26372. SetPlayerFacingAngle(i, garageInteriors[GarageInfo[garageid][gType] + 1][intVA]);
  26373. SetPlayerInterior(i, garageInteriors[GarageInfo[garageid][gType] + 1][intID]);
  26374. SetCameraBehindPlayer(i);
  26375. }
  26376. }
  26377. GarageInfo[garageid][gType]++;
  26378. GarageInfo[garageid][gPrice] = garageInteriors[GarageInfo[garageid][gType]][intPrice];
  26379. GivePlayerCash(playerid, -garageInteriors[GarageInfo[garageid][gType]][intPrice]);
  26380. SendClientMessageEx(playerid, COLOR_GREEN, "You have upgraded your garage's size to %s for %s.", garageInteriors[GarageInfo[garageid][gType]][intName], FormatNumber(garageInteriors[GarageInfo[garageid][gType]][intPrice]));
  26381. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE garages SET type = %i, price = %i WHERE id = %i", GarageInfo[garageid][gType], GarageInfo[garageid][gPrice], GarageInfo[garageid][gID]);
  26382. mysql_tquery(connectionID, queryBuffer);
  26383. Log_Write("log_property", "%s (uid: %i) upgraded their garage (id: %i) to %s size for $%i.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GarageInfo[garageid][gID], garageInteriors[GarageInfo[garageid][gType]][intName], garageInteriors[GarageInfo[garageid][gType]][intPrice]);
  26384. }
  26385. }
  26386. forward OnPlayerCheckMoney(playerid, achievement[]);
  26387. public OnPlayerCheckMoney(playerid, achievement[])
  26388. {
  26389. if(cache_get_row_count(connectionID))
  26390. {
  26391. AwardAchievement(playerid, achievement);
  26392. }
  26393. }
  26394. forward OnPlayerAwardedAchievement(playerid, name[]);
  26395. public OnPlayerAwardedAchievement(playerid, name[])
  26396. {
  26397. new count = cache_get_row_int(0, 0), string[64];
  26398. format(string, sizeof(string), "~g~~h~~h~%s~n~~w~(%i/%i unlocked)", name, count, sizeof(achievementInfo));
  26399. PlayerTextDrawSetString(playerid, PlayerData[playerid][pText][9], string);
  26400. for(new i = 6; i < 10; i ++)
  26401. {
  26402. PlayerTextDrawShow(playerid, PlayerData[playerid][pText][i]);
  26403. }
  26404. if(count == sizeof(achievementInfo))
  26405. {
  26406. SendClientMessageToAllEx(COLOR_GREEN, "Congratulations to %s for completeting the achievement challenge, they've received 50 cookies.", GetRPName(playerid));
  26407. SendClientMessage(playerid, COLOR_AQUA, "Well done! You have completed all achievements and received 50 cookies.");
  26408. PlayerData[playerid][pCookies] += 50;
  26409. }
  26410. SetTimerEx("HideAchievementTextdraw", 10000, false, "i", playerid);
  26411. }
  26412. forward OnPlayerAchievementCheck(playerid, name[]);
  26413. public OnPlayerAchievementCheck(playerid, name[])
  26414. {
  26415. if(cache_affected_rows(connectionID) > 0)
  26416. {
  26417. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT COUNT(*) FROM achievements WHERE uid = %i", PlayerData[playerid][pID]);
  26418. mysql_tquery(connectionID, queryBuffer, "OnPlayerAwardedAchievement", "is", playerid, name);
  26419. }
  26420. }
  26421. forward OnPlayerUseCarStorage(playerid);
  26422. public OnPlayerUseCarStorage(playerid)
  26423. {
  26424. new vehicleid = GetVehicleLinkedID(cache_get_field_content_int(0, "id"));
  26425. if(vehicleid != INVALID_VEHICLE_ID)
  26426. {
  26427. if(IsVehicleOccupied(vehicleid) && GetVehicleDriver(vehicleid) != playerid)
  26428. {
  26429. SendClientMessage(playerid, COLOR_GREY, "This vehicle is occupied.");
  26430. }
  26431. else if(IsVehicleBeingPicked(vehicleid))
  26432. {
  26433. SendClientMessage(playerid, COLOR_GREY, "This vehicle is being broken into!");
  26434. }
  26435. else
  26436. {
  26437. new
  26438. Float:health;
  26439. GetVehicleHealth(vehicleid, health);
  26440. if(health < 600.0)
  26441. {
  26442. SendClientMessage(playerid, COLOR_GREY, "This vehicle is too damaged to be despawned.");
  26443. }
  26444. else
  26445. {
  26446. SendClientMessageEx(playerid, COLOR_AQUA, "Your {FF6347}%s{33CCFF} which is located in %s has been despawned.", GetVehicleName(vehicleid), GetVehicleZoneName(vehicleid));
  26447. DespawnVehicle(vehicleid);
  26448. }
  26449. }
  26450. }
  26451. else
  26452. {
  26453. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM vehicles WHERE id = %i AND ownerid = %i", cache_get_field_content_int(0, "id"), PlayerData[playerid][pID]);
  26454. mysql_tquery(connectionID, queryBuffer, "OnPlayerSpawnVehicle", "ii", playerid, false);
  26455. }
  26456. }
  26457. forward OnPlayerAttemptResetUpgrades(playerid);
  26458. public OnPlayerAttemptResetUpgrades(playerid)
  26459. {
  26460. if(PlayerData[playerid][pDonator] == 0 && cache_get_row_int(0, 0) > 3)
  26461. {
  26462. SendClientMessageEx(playerid, COLOR_GREY, "You own %i/%i vehicle at the moment. Please sell one of them before using this command.", cache_get_row_int(0, 0), GetPlayerAssetLimit(playerid, LIMIT_HOUSES));
  26463. }
  26464. else
  26465. {
  26466. PlayerData[playerid][pUpgradePoints] = (PlayerData[playerid][pLevel] - 1) * 2;
  26467. PlayerData[playerid][pInventoryUpgrade] = 0;
  26468. PlayerData[playerid][pAddictUpgrade] = 0;
  26469. PlayerData[playerid][pTraderUpgrade] = 0;
  26470. PlayerData[playerid][pAssetUpgrade] = 0;
  26471. PlayerData[playerid][pLaborUpgrade] = 0;
  26472. PlayerData[playerid][pSpawnHealth] = 50.0;
  26473. PlayerData[playerid][pSpawnArmor] = 0.0;
  26474. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET upgradepoints = %i, inventoryupgrade = 0, addictupgrade = 0, traderupgrade = 0, assetupgrade = 0, laborupgrade = 0, spawnhealth = '50.0', spawnarmor = '0.0' WHERE uid = %i", PlayerData[playerid][pUpgradePoints], PlayerData[playerid][pID]);
  26475. mysql_tquery(connectionID, queryBuffer);
  26476. SendClientMessageEx(playerid, COLOR_GREEN, "You have reset your upgrade points. You now have %i upgrade points available.", PlayerData[playerid][pUpgradePoints]);
  26477. }
  26478. }
  26479. forward OnBanAttempt(username[], ip[], from[], reason[], permanent);
  26480. public OnBanAttempt(username[], ip[], from[], reason[], permanent)
  26481. {
  26482. if(cache_get_row_count(connectionID))
  26483. {
  26484. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE bans SET reason = '%e' WHERE id = %i", reason, cache_get_row_int(0, 0));
  26485. mysql_tquery(connectionID, queryBuffer);
  26486. }
  26487. else
  26488. {
  26489. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO bans VALUES(null, '%s', '%s', '%s', NOW(), '%e', %i)", username, ip, from, reason, permanent);
  26490. mysql_tquery(connectionID, queryBuffer);
  26491. }
  26492. }
  26493. forward OnPlayerAttemptInviteGang(playerid, targetid);
  26494. public OnPlayerAttemptInviteGang(playerid, targetid)
  26495. {
  26496. if(cache_get_row_int(0, 0) >= GetGangMemberLimit(PlayerData[playerid][pGang]))
  26497. {
  26498. SendClientMessageEx(playerid, COLOR_GREY, "Your gang can't have more than %i members at its level.", GetGangMemberLimit(PlayerData[playerid][pGang]));
  26499. }
  26500. else
  26501. {
  26502. PlayerData[targetid][pGangOffer] = playerid;
  26503. PlayerData[targetid][pGangOffered] = PlayerData[playerid][pGang];
  26504. SendClientMessageEx(targetid, COLOR_AQUA, "%s has invited you to join {00AA00}%s{33CCFF} (/accept gang).", GetRPName(playerid), GangInfo[PlayerData[playerid][pGang]][gName]);
  26505. SendClientMessageEx(playerid, COLOR_AQUA, "You have invited %s to join your gang.", GetRPName(targetid));
  26506. }
  26507. }
  26508. forward OnPlayerAttemptBuyVehicleEx(playerid, offeredby, vehicleid, price);
  26509. public OnPlayerAttemptBuyVehicleEx(playerid, offeredby, vehicleid, price)
  26510. {
  26511. new count = cache_get_row_int(0, 0);
  26512. if(count >= GetPlayerAssetLimit(playerid, LIMIT_VEHICLES))
  26513. {
  26514. SendClientMessageEx(playerid, COLOR_GREY, "You currently own %i/%i vehicles. You can't own anymore unless you upgrade your asset perk.", count, GetPlayerAssetLimit(playerid, LIMIT_VEHICLES));
  26515. }
  26516. else
  26517. {
  26518. GetPlayerName(playerid, VehicleInfo[vehicleid][vOwner], MAX_PLAYER_NAME);
  26519. VehicleInfo[vehicleid][vOwnerID] = PlayerData[playerid][pID];
  26520. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET ownerid = %i, owner = '%s' WHERE id = %i", VehicleInfo[vehicleid][vOwnerID], VehicleInfo[vehicleid][vOwner], VehicleInfo[vehicleid][vID]);
  26521. mysql_tquery(connectionID, queryBuffer);
  26522. if(VehicleInfo[vehicleid][vForSale])
  26523. {
  26524. VehicleInfo[vehicleid][vForSale] = false;
  26525. VehicleInfo[vehicleid][vForSalePrice] = 0;
  26526. DestroyDynamic3DTextLabel(VehicleInfo[vehicleid][vForSaleLabel]);
  26527. VehicleInfo[vehicleid][vForSaleLabel] = Text3D:INVALID_3DTEXT_ID;
  26528. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET forsale = 0, forsaleprice = 0 WHERE id = %i", VehicleInfo[vehicleid][vID]);
  26529. mysql_tquery(connectionID, queryBuffer);
  26530. }
  26531. GivePlayerCash(offeredby, price);
  26532. GivePlayerCash(playerid, -price);
  26533. SendClientMessageEx(playerid, COLOR_AQUA, "* You have accepted %s's vehicle offer and paid %s for their %s.", GetRPName(offeredby), FormatNumber(price), GetVehicleName(vehicleid));
  26534. SendClientMessageEx(offeredby, COLOR_AQUA, "* %s accepted your vehicle offer and paid %s for your %s.", GetRPName(playerid), FormatNumber(price), GetVehicleName(vehicleid));
  26535. Log_Write("log_property", "%s (uid: %i) (IP: %s) sold their %s (id: %i) for $%i to %s (uid: %i) (IP: %s)", GetPlayerNameEx(offeredby), PlayerData[offeredby][pID], GetPlayerIP(offeredby), GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID], price, GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerIP(playerid));
  26536. }
  26537. }
  26538. forward OnPlayerAttemptBuyVehicle(playerid, index);
  26539. public OnPlayerAttemptBuyVehicle(playerid, index)
  26540. {
  26541. new count = cache_get_row_int(0, 0);
  26542. if(count >= GetPlayerAssetLimit(playerid, LIMIT_VEHICLES))
  26543. {
  26544. SendClientMessageEx(playerid, COLOR_GREY, "You currently own %i/%i vehicles. You can't own anymore unless you upgrade your asset perk.", count, GetPlayerAssetLimit(playerid, LIMIT_VEHICLES));
  26545. }
  26546. else
  26547. {
  26548. new string[952];
  26549. if(PlayerData[playerid][pCash] < DealershipCars[index][dcPrice])
  26550. {
  26551. SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this vehicle.");
  26552. }
  26553. else if(GetSpawnedVehicles(playerid) >= MAX_SPAWNED_VEHICLES)
  26554. {
  26555. SendClientMessageEx(playerid, COLOR_GREY, "You can't have more than %i vehicles spawned at a time.", MAX_SPAWNED_VEHICLES);
  26556. }
  26557. else
  26558. {
  26559. AwardAchievement(playerid, "First wheels");
  26560. printf(queryBuffer);
  26561. AddPointMoney(POINT_AUTOEXPORT, percent(DealershipCars[index][dcPrice], 3));
  26562. GivePlayerCash(playerid, -DealershipCars[index][dcPrice]);
  26563. format(string, sizeof(string), "~r~-$%i", DealershipCars[index][dcPrice]);
  26564. GameTextForPlayer(playerid, string, 5000, 1);
  26565. SendClientMessageEx(playerid, COLOR_GREEN, "%s purchased for $%i. /carstorage to spawn this vehicle.", GetVehicleModelName(DealershipCars[index][dcModel]), DealershipCars[index][dcPrice]);
  26566. Log_Write("log_property", "%s (uid: %i) purchased a %s for $%i.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetVehicleModelName(DealershipCars[index][dcModel]), DealershipCars[index][dcPrice]);
  26567. }
  26568. }
  26569. }
  26570. forward OnPlayerChangeNumber(playerid, number);
  26571. public OnPlayerChangeNumber(playerid, number)
  26572. {
  26573. if(cache_get_row_count(connectionID))
  26574. {
  26575. SendClientMessage(playerid, COLOR_GREY, "That phone number is already taken.");
  26576. Dialog_Show(playerid, DIALOG_COOKIENUMBER, DIALOG_STYLE_INPUT, "Number change", "Enter your phone number of choice:", "Submit", "Cancel");
  26577. }
  26578. else
  26579. {
  26580. PlayerData[playerid][pCookies] -= 75;
  26581. PlayerData[playerid][pPhone] = number;
  26582. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET cookies = %i, phone = %i WHERE uid = %i", PlayerData[playerid][pCookies], PlayerData[playerid][pPhone], PlayerData[playerid][pID]);
  26583. mysql_tquery(connectionID, queryBuffer);
  26584. SendClientMessageEx(playerid, COLOR_AQUA, "You have redeemed 75 cookies for a {00AA00}number change{33CCFF} to %i.", number);
  26585. }
  26586. }
  26587. forward OnHitmanPassport(playerid, name[], level, skinid);
  26588. public OnHitmanPassport(playerid, name[], level, skinid)
  26589. {
  26590. if(cache_get_row_count(connectionID))
  26591. {
  26592. SendClientMessage(playerid, COLOR_GREY, "That name is already taken, please choose another.");
  26593. }
  26594. else
  26595. {
  26596. strcpy(PlayerData[playerid][pNameChange], name, MAX_PLAYER_NAME);
  26597. PlayerData[playerid][pFreeNamechange] = 2;
  26598. PlayerData[playerid][pChosenLevel] = level;
  26599. PlayerData[playerid][pChosenSkin] = skinid;
  26600. SendClientMessageEx(playerid, COLOR_AQUA, "You have requested a namechange to {00AA00}%s{33CCFF} for free, please wait for admin approval.", name);
  26601. SendClientMessageEx(playerid, COLOR_AQUA, "Once the namechange has been approved, you will receive your chosen name, level and skin.");
  26602. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] is requesting a namechange to %s. (/acceptname %i or /denyname %i)", GetRPName(playerid), playerid, name, playerid, playerid);
  26603. }
  26604. }
  26605. forward OnPlayerAttemptNameChange(playerid, name[]);
  26606. public OnPlayerAttemptNameChange(playerid, name[])
  26607. {
  26608. if(cache_get_row_count(connectionID))
  26609. {
  26610. SendClientMessage(playerid, COLOR_GREY, "That name is already taken, please choose another.");
  26611. if(PlayerData[playerid][pFreeNamechange])
  26612. {
  26613. Dialog_Show(playerid, DIALOG_FREENAMECHANGE, DIALOG_STYLE_INPUT, "Non-RP Name", "An administrator has came to the conclusion that your name is non-RP.\nTherefore you have been given this free namechange in order to correct it.\n\nEnter a name in the Firstname_Lastname format in the box below:", "Submit", "Cancel");
  26614. }
  26615. }
  26616. else
  26617. {
  26618. strcpy(PlayerData[playerid][pNameChange], name, MAX_PLAYER_NAME);
  26619. if(PlayerData[playerid][pFreeNamechange]) {
  26620. SendClientMessageEx(playerid, COLOR_AQUA, "You have requested a namechange to {00AA00}%s{33CCFF} for free, please wait for admin approval.", name);
  26621. } else {
  26622. SendClientMessageEx(playerid, COLOR_AQUA, "You have requested a namechange to {00AA00}%s{33CCFF} for %s, please wait for admin approval.", name, FormatNumber(PlayerData[playerid][pLevel] * 7500));
  26623. }
  26624. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] is requesting a namechange to %s. (/acceptname %i or /denyname %i)", GetRPName(playerid), playerid, name, playerid, playerid);
  26625. }
  26626. }
  26627. forward OnPlayerRamLandDoor(playerid, objectid, id);
  26628. public OnPlayerRamLandDoor(playerid, objectid, id)
  26629. {
  26630. if(cache_get_field_content_int(0, "door_opened"))
  26631. {
  26632. SendClientMessage(playerid, COLOR_GREY, "The door is already opened.");
  26633. }
  26634. else
  26635. {
  26636. new
  26637. Float:rx,
  26638. Float:ry,
  26639. Float:rz;
  26640. ShowActionBubble(playerid, "* %s rams the door down.", GetRPName(playerid));
  26641. GetDynamicObjectRot(objectid, rx, ry, rz);
  26642. rz -= 90.0;
  26643. SetDynamicObjectRot(objectid, rx, ry, rz);
  26644. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE landobjects SET rot_z = '%f', door_locked = 0, door_opened = 1 WHERE id = %i", rz, id);
  26645. mysql_tquery(connectionID, queryBuffer);
  26646. }
  26647. }
  26648. forward OnPlayerLockLandDoor(playerid, id);
  26649. public OnPlayerLockLandDoor(playerid, id)
  26650. {
  26651. new status = !cache_get_field_content_int(0, "door_locked");
  26652. if(status) {
  26653. ShowActionBubble(playerid, "* %s locks the door.", GetRPName(playerid));
  26654. } else {
  26655. ShowActionBubble(playerid, "* %s unlocks the door.", GetRPName(playerid));
  26656. }
  26657. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE landobjects SET door_locked = %i WHERE id = %i", status, id);
  26658. mysql_tquery(connectionID, queryBuffer);
  26659. }
  26660. forward OnPlayerUseLandGate(playerid, objectid, id);
  26661. public OnPlayerUseLandGate(playerid, objectid, id)
  26662. {
  26663. if(!Streamer_GetExtraInt(objectid, E_OBJECT_OPENED))
  26664. {
  26665. new
  26666. Float:x = cache_get_field_content_float(0, "move_x"),
  26667. Float:y = cache_get_field_content_float(0, "move_y"),
  26668. Float:z = cache_get_field_content_float(0, "move_z");
  26669. if(x == 0.0 && y == 0.0 && z == 0.0)
  26670. {
  26671. SendClientMessage(playerid, COLOR_GREY, "This gate has no destination set.");
  26672. }
  26673. else
  26674. {
  26675. MoveDynamicObject(objectid, x, y, z, 3.0, cache_get_field_content_float(0, "move_rx"), cache_get_field_content_float(0, "move_ry"), cache_get_field_content_float(0, "move_rz"));
  26676. ShowActionBubble(playerid, "* %s uses their remote to open the gate.", GetRPName(playerid));
  26677. Streamer_SetExtraInt(objectid, E_OBJECT_OPENED, 1);
  26678. }
  26679. }
  26680. else
  26681. {
  26682. MoveDynamicObject(objectid, cache_get_field_content_float(0, "pos_x"), cache_get_field_content_float(0, "pos_y"), cache_get_field_content_float(0, "pos_z"), 3.0, cache_get_field_content_float(0, "rot_x"), cache_get_field_content_float(0, "rot_y"), cache_get_field_content_float(0, "rot_z"));
  26683. ShowActionBubble(playerid, "* %s uses their remote to close the gate.", GetRPName(playerid));
  26684. Streamer_SetExtraInt(objectid, E_OBJECT_OPENED, 0);
  26685. }
  26686. }
  26687. forward OnPlayerUseLandDoor(playerid, objectid, id);
  26688. public OnPlayerUseLandDoor(playerid, objectid, id)
  26689. {
  26690. if(cache_get_row_int(0, 1))
  26691. {
  26692. SendClientMessage(playerid, COLOR_GREY, "This door is locked.");
  26693. }
  26694. else
  26695. {
  26696. new
  26697. status = !cache_get_row_int(0, 0),
  26698. Float:rx,
  26699. Float:ry,
  26700. Float:rz;
  26701. GetDynamicObjectRot(objectid, rx, ry, rz);
  26702. if(status) {
  26703. rz -= 90.0;
  26704. } else {
  26705. rz += 90.0;
  26706. }
  26707. SetDynamicObjectRot(objectid, rx, ry, rz);
  26708. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE landobjects SET rot_z = '%f', door_opened = %i WHERE id = %i", rz, status, id);
  26709. mysql_tquery(connectionID, queryBuffer);
  26710. if(status)
  26711. ShowActionBubble(playerid, "* %s opens the door.", GetRPName(playerid));
  26712. else
  26713. ShowActionBubble(playerid, "* %s closes the door.", GetRPName(playerid));
  26714. }
  26715. }
  26716. forward OnPlayerAddToPhonebook(playerid, number, name[]);
  26717. public OnPlayerAddToPhonebook(playerid, number, name[])
  26718. {
  26719. if(cache_get_row_count(connectionID))
  26720. {
  26721. SendClientMessage(playerid, COLOR_GREY, "That number is already in the phonebook.");
  26722. }
  26723. else
  26724. {
  26725. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO phonebook VALUES('%e', %i)", name, number);
  26726. mysql_tquery(connectionID, queryBuffer);
  26727. SendClientMessageEx(playerid, COLOR_GREEN, "You have added %s with number %i to the phonebook directory.", name, number);
  26728. Log_Write("log_faction", "%s (uid: %i) added %s with number %i to the phonebook.", GetRPName(playerid), PlayerData[playerid][pID], name, number);
  26729. }
  26730. return 1;
  26731. }
  26732. forward OnPlayerRemoveFromPhonebook(playerid, number);
  26733. public OnPlayerRemoveFromPhonebook(playerid, number)
  26734. {
  26735. if(!cache_get_row_count(connectionID))
  26736. {
  26737. SendClientMessage(playerid, COLOR_GREY, "That number is not in the phonebook.");
  26738. }
  26739. else
  26740. {
  26741. new name[MAX_PLAYER_NAME];
  26742. cache_get_row(0, 0, name);
  26743. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM phonebook WHERE number = %i", number);
  26744. mysql_tquery(connectionID, queryBuffer);
  26745. SendClientMessageEx(playerid, COLOR_GREEN, "You have removed %s with number %i from the phonebook directory.", name, number);
  26746. Log_Write("log_faction", "%s (uid: %i) removed %s with number %i from the phonebook.", GetRPName(playerid), PlayerData[playerid][pID], name, number);
  26747. }
  26748. return 1;
  26749. }
  26750. forward OnPlayerListInjuries(playerid, targetid);
  26751. public OnPlayerListInjuries(playerid, targetid)
  26752. {
  26753. new rows = cache_get_row_count(connectionID);
  26754. if(!rows)
  26755. {
  26756. SendClientMessage(playerid, COLOR_GREY, "That player doesn't have any injuries.");
  26757. }
  26758. else
  26759. {
  26760. SendClientMessageEx(playerid, COLOR_NAVYBLUE, "______ %s's Injuries ______", GetRPName(targetid));
  26761. for(new i = 0; i < rows; i ++)
  26762. {
  26763. SendClientMessageEx(playerid, COLOR_YELLOW, "[%i seconds ago] %s was shot with a %s", gettime() - cache_get_row_int(i, 1), GetRPName(targetid), GetWeaponNameEx(cache_get_row_int(i, 0)));
  26764. }
  26765. }
  26766. }
  26767. forward OnPlayerOfflineKickFaction(playerid, username[]);
  26768. public OnPlayerOfflineKickFaction(playerid, username[])
  26769. {
  26770. if(!cache_get_row_count(connectionID))
  26771. {
  26772. SendClientMessage(playerid, COLOR_GREY, "The player specified doesn't exist.");
  26773. }
  26774. else if(cache_get_row_int(0, 1) != PlayerData[playerid][pFaction])
  26775. {
  26776. SendClientMessage(playerid, COLOR_GREY, "That player is not apart of your faction.");
  26777. }
  26778. /*else if(cache_get_row_int(0, 2) > PlayerData[playerid][pFactionRank])
  26779. {
  26780. SendClientMessage(playerid, COLOR_GREY, "That player has a higher rank than you.");
  26781. }*/
  26782. else
  26783. {
  26784. new uid = cache_get_row_int(0, 0), factionid = cache_get_row_int(0, 1), rankid = cache_get_row_int(0, 2);
  26785. Log_Write("log_faction", "%s (uid: %i) offline kicked %s (uid: %i) from %s (id: %i) as rank %s (%i).", GetPlayerNameEx(playerid), PlayerData[playerid][pID], username, uid, FactionInfo[factionid][fName], factionid, FactionRanks[factionid][rankid], rankid);
  26786. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET faction = -1, factionrank = 0, factionleader = 0, division = -1 WHERE uid = %i", uid);
  26787. mysql_tquery(connectionID, queryBuffer);
  26788. SendClientMessageEx(playerid, COLOR_AQUA, "You have offline kicked %s from your faction.", username);
  26789. }
  26790. }
  26791. forward OnPlayerOfflineKickGang(playerid, username[]);
  26792. public OnPlayerOfflineKickGang(playerid, username[])
  26793. {
  26794. if(!cache_get_row_count(connectionID))
  26795. {
  26796. SendClientMessage(playerid, COLOR_GREY, "The player specified doesn't exist.");
  26797. }
  26798. else if(cache_get_row_int(0, 1) != PlayerData[playerid][pGang])
  26799. {
  26800. SendClientMessage(playerid, COLOR_GREY, "That player is not apart of your gang.");
  26801. }
  26802. else if(cache_get_row_int(0, 2) > PlayerData[playerid][pGangRank])
  26803. {
  26804. SendClientMessage(playerid, COLOR_GREY, "That player has a higher rank than you.");
  26805. }
  26806. else
  26807. {
  26808. new uid = cache_get_row_int(0, 0), gangid = cache_get_row_int(0, 1), rankid = cache_get_row_int(0, 2);
  26809. Log_Write("log_gang", "%s (uid: %i) offlinekicked %s (uid: %i) from %s (id: %i) as rank %s (%i).", GetPlayerNameEx(playerid), PlayerData[playerid][pID], username, uid, GangInfo[gangid][gName], gangid, GangRanks[gangid][rankid], rankid);
  26810. //("log_gang", PlayerData[playerid][pGang], "%s (uid: %i) offlinekicked %s (uid: %i) from %s (id: %i) as rank %s (%i).", GetPlayerNameEx(playerid), PlayerData[playerid][pID], username, uid, GangInfo[gangid][gName], gangid, GangRanks[gangid][rankid], rankid);
  26811. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET gang = -1, gangrank = 0 WHERE uid = %i", uid);
  26812. mysql_tquery(connectionID, queryBuffer);
  26813. SendClientMessageEx(playerid, COLOR_AQUA, "You have offline kicked %s from your gang.", username);
  26814. }
  26815. }
  26816. forward OnPlayerListGangs(playerid, gangid);
  26817. public OnPlayerListGangs(playerid, gangid)
  26818. {
  26819. new color, members = cache_get_row_int(0, 0), color2, gangstring[3000], allyname[32];
  26820. if(GangInfo[gangid][gColor] == -1 || GangInfo[gangid][gColor] == -256)
  26821. {
  26822. color = 0xC8C8C8FF;
  26823. }
  26824. else
  26825. {
  26826. color = GangInfo[gangid][gColor];
  26827. }
  26828. new alliance = GangInfo[gangid][gAlliance];
  26829. if(alliance >= 0)
  26830. {
  26831. strcpy(allyname, GangInfo[alliance][gName]);
  26832. if(GangInfo[alliance][gColor] == -1 || GangInfo[alliance][gColor] == -256)
  26833. {
  26834. color2 = 0xC8C8C8FF;
  26835. }
  26836. else
  26837. {
  26838. color2 = GangInfo[alliance][gColor];
  26839. }
  26840. }
  26841. if(alliance >= 0)
  26842. {
  26843. format(gangstring, sizeof(gangstring), "(Id %i) {%06x}%s{C8C8C8} | Leader: %s | Members: %i/%i | Strikes: %i/3 | Ally: {%06x}%s{C8C8C8}", gangid, color >>> 8, GangInfo[gangid][gName], GangInfo[gangid][gLeader], members, GetGangMemberLimit(gangid), GangInfo[gangid][gStrikes], color2 >>> 8, allyname);
  26844. SendClientMessage(playerid, 0xC8C8C8AA, gangstring);
  26845. }
  26846. else if(alliance >= 0)
  26847. {
  26848. format(gangstring, sizeof(gangstring), "(Id %i) {%06x}%s{C8C8C8} | Leader: %s | Members: %i/%i | Strikes: %i/3 | Ally: {%06x}%s", gangid, color >>> 8, GangInfo[gangid][gName], GangInfo[gangid][gLeader], members, GetGangMemberLimit(gangid), GangInfo[gangid][gStrikes], color2 >>> 8, allyname);
  26849. SendClientMessage(playerid, COLOR_GREY2, gangstring);
  26850. }
  26851. else
  26852. {
  26853. SendClientMessageEx(playerid, COLOR_GREY2, "(Id %i) {%06x}%s{C8C8C8} | Leader: %s | Members: %i/%i | Strikes: %i/3", gangid, color >>> 8, GangInfo[gangid][gName], GangInfo[gangid][gLeader], members, GetGangMemberLimit(gangid), GangInfo[gangid][gStrikes]);
  26854. }
  26855. }
  26856. forward OnPlayerListFactions(playerid, factionid);
  26857. public OnPlayerListFactions(playerid, factionid)
  26858. {
  26859. new color, members = cache_get_row_int(0, 0);
  26860. if(FactionInfo[factionid][fColor] == -1 || FactionInfo[factionid][fColor] == -256)
  26861. {
  26862. color = 0xC8C8C8FF;
  26863. }
  26864. else
  26865. {
  26866. color = FactionInfo[factionid][fColor];
  26867. }
  26868. if(FactionInfo[factionid][fType] == FACTION_HITMAN && PlayerData[playerid][pAdmin] < ASST_MANAGEMENT)
  26869. {
  26870. SendClientMessageEx(playerid, COLOR_WHITE, "ID: %i | Name: {%06x}%s{FFFFFF} | Leader: Classified | Members: 0", factionid, color >>> 8, FactionInfo[factionid][fName]);
  26871. }
  26872. else
  26873. {
  26874. SendClientMessageEx(playerid, COLOR_WHITE, "ID: %i | Name: {%06x}%s{FFFFFF} | Leader: %s | Members: %i", factionid, color >>> 8, FactionInfo[factionid][fName], FactionInfo[factionid][fLeader], members);
  26875. }
  26876. }
  26877. forward OnPlayerBuyPhoneNumber(playerid, number);
  26878. public OnPlayerBuyPhoneNumber(playerid, number)
  26879. {
  26880. if(cache_get_row_count(connectionID))
  26881. {
  26882. SendClientMessage(playerid, COLOR_GREY, "The specified phone number is already taken.");
  26883. }
  26884. else
  26885. {
  26886. PlayerData[playerid][pPhone] = number;
  26887. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET phone = %i WHERE uid = %i", number, PlayerData[playerid][pID]);
  26888. mysql_tquery(connectionID, queryBuffer);
  26889. GivePlayerCash(playerid, -10000);
  26890. GameTextForPlayer(playerid, "~r~-$10,000", 5000, 1);
  26891. SendClientMessageEx(playerid, COLOR_AQUA, "You paid $10,000 to change your phone number to %i.", number);
  26892. Log_Write("log_vip", "%s VIP %s (uid: %i) has purchased phone number: %i for $10000.", GetVIPRank(PlayerData[playerid][pDonator]), GetPlayerNameEx(playerid), PlayerData[playerid][pID], number);
  26893. }
  26894. }
  26895. forward OnPlayerSpawnVehicle(playerid, parked);
  26896. public OnPlayerSpawnVehicle(playerid, parked)
  26897. {
  26898. if(!cache_get_row_count(connectionID))
  26899. {
  26900. SendClientMessage(playerid, COLOR_GREY, "The slot specified contains no valid vehicle which you can spawn.");
  26901. }
  26902. else
  26903. {
  26904. if(GetVehicleLinkedID(cache_get_field_content_int(0, "id")) != INVALID_VEHICLE_ID)
  26905. {
  26906. return SendClientMessage(playerid, COLOR_GREY, "This vehicle is spawned already. /findcar to track it.");
  26907. }
  26908. if(GetSpawnedVehicles(playerid) >= MAX_SPAWNED_VEHICLES && PlayerData[playerid][pDonator] < 3)//vipveh
  26909. {
  26910. return SendClientMessageEx(playerid, COLOR_GREY, "You can't have more than %i vehicles spawned at a time.", MAX_SPAWNED_VEHICLES);
  26911. }
  26912. new
  26913. modelid = cache_get_field_content_int(0, "modelid"),
  26914. Float:x = cache_get_field_content_float(0, "pos_x"),
  26915. Float:y = cache_get_field_content_float(0, "pos_y"),
  26916. Float:z = cache_get_field_content_float(0, "pos_z"),
  26917. Float:a = cache_get_field_content_float(0, "pos_a"),
  26918. color1 = cache_get_field_content_int(0, "color1"),
  26919. color2 = cache_get_field_content_int(0, "color2"),
  26920. vehicleid;
  26921. vehicleid = CreateVehicle(modelid, x, y, z, a, color1, color2, -1);
  26922. if(vehicleid != INVALID_VEHICLE_ID)
  26923. {
  26924. ResetVehicle(vehicleid);
  26925. cache_get_field_content(0, "owner", VehicleInfo[vehicleid][vOwner], connectionID, MAX_PLAYER_NAME);
  26926. cache_get_field_content(0, "plate", VehicleInfo[vehicleid][vPlate], connectionID, 32);
  26927. VehicleInfo[vehicleid][vID] = cache_get_field_content_int(0, "id");
  26928. VehicleInfo[vehicleid][vOwnerID] = cache_get_field_content_int(0, "ownerid");
  26929. VehicleInfo[vehicleid][vPrice] = cache_get_field_content_int(0, "price");
  26930. VehicleInfo[vehicleid][vTickets] = cache_get_field_content_int(0, "tickets");
  26931. VehicleInfo[vehicleid][vLocked] = cache_get_field_content_int(0, "locked");
  26932. VehicleInfo[vehicleid][vHealth] = cache_get_field_content_float(0, "health");
  26933. VehicleInfo[vehicleid][vPaintjob] = cache_get_field_content_int(0, "paintjob");
  26934. VehicleInfo[vehicleid][vInterior] = cache_get_field_content_int(0, "interior");
  26935. VehicleInfo[vehicleid][vWorld] = cache_get_field_content_int(0, "world");
  26936. VehicleInfo[vehicleid][vNeon] = cache_get_field_content_int(0, "neon");
  26937. VehicleInfo[vehicleid][vNeonEnabled] = cache_get_field_content_int(0, "neonenabled");
  26938. VehicleInfo[vehicleid][vTrunk] = cache_get_field_content_int(0, "trunk");
  26939. VehicleInfo[vehicleid][vAlarm] = cache_get_field_content_int(0, "alarm");
  26940. VehicleInfo[vehicleid][vMods][0] = cache_get_field_content_int(0, "mod_1");
  26941. VehicleInfo[vehicleid][vMods][1] = cache_get_field_content_int(0, "mod_2");
  26942. VehicleInfo[vehicleid][vMods][2] = cache_get_field_content_int(0, "mod_3");
  26943. VehicleInfo[vehicleid][vMods][3] = cache_get_field_content_int(0, "mod_4");
  26944. VehicleInfo[vehicleid][vMods][4] = cache_get_field_content_int(0, "mod_5");
  26945. VehicleInfo[vehicleid][vMods][5] = cache_get_field_content_int(0, "mod_6");
  26946. VehicleInfo[vehicleid][vMods][6] = cache_get_field_content_int(0, "mod_7");
  26947. VehicleInfo[vehicleid][vMods][7] = cache_get_field_content_int(0, "mod_8");
  26948. VehicleInfo[vehicleid][vMods][8] = cache_get_field_content_int(0, "mod_9");
  26949. VehicleInfo[vehicleid][vMods][9] = cache_get_field_content_int(0, "mod_10");
  26950. VehicleInfo[vehicleid][vMods][10] = cache_get_field_content_int(0, "mod_11");
  26951. VehicleInfo[vehicleid][vMods][11] = cache_get_field_content_int(0, "mod_12");
  26952. VehicleInfo[vehicleid][vMods][12] = cache_get_field_content_int(0, "mod_13");
  26953. VehicleInfo[vehicleid][vMods][13] = cache_get_field_content_int(0, "mod_14");
  26954. VehicleInfo[vehicleid][vCash] = cache_get_field_content_int(0, "cash");
  26955. VehicleInfo[vehicleid][vMaterials] = cache_get_field_content_int(0, "materials");
  26956. VehicleInfo[vehicleid][vWeed] = cache_get_field_content_int(0, "weed");
  26957. VehicleInfo[vehicleid][vCocaine] = cache_get_field_content_int(0, "cocaine");
  26958. VehicleInfo[vehicleid][vMeth] = cache_get_field_content_int(0, "meth");
  26959. VehicleInfo[vehicleid][vPainkillers] = cache_get_field_content_int(0, "painkillers");
  26960. VehicleInfo[vehicleid][vWeapons][0] = cache_get_field_content_int(0, "weapon_1");
  26961. VehicleInfo[vehicleid][vWeapons][1] = cache_get_field_content_int(0, "weapon_2");
  26962. VehicleInfo[vehicleid][vWeapons][2] = cache_get_field_content_int(0, "weapon_3");
  26963. VehicleInfo[vehicleid][vWeapons][3] = cache_get_field_content_int(0, "weapon_4");
  26964. VehicleInfo[vehicleid][vWeapons][4] = cache_get_field_content_int(0, "weapon_5");
  26965. VehicleInfo[vehicleid][vGang] = -1;
  26966. VehicleInfo[vehicleid][vFactionType] = FACTION_NONE;
  26967. VehicleInfo[vehicleid][vJob] = JOB_NONE;
  26968. VehicleInfo[vehicleid][vRespawnDelay] = -1;
  26969. VehicleInfo[vehicleid][vModel] = modelid;
  26970. VehicleInfo[vehicleid][vPosX] = x;
  26971. VehicleInfo[vehicleid][vPosY] = y;
  26972. VehicleInfo[vehicleid][vPosZ] = z;
  26973. VehicleInfo[vehicleid][vPosA] = a;
  26974. VehicleInfo[vehicleid][vColor1] = color1;
  26975. VehicleInfo[vehicleid][vColor2] = color2;
  26976. VehicleInfo[vehicleid][vObjects][0] = INVALID_OBJECT_ID;
  26977. VehicleInfo[vehicleid][vObjects][1] = INVALID_OBJECT_ID;
  26978. VehicleInfo[vehicleid][vTimer] = -1;
  26979. VehicleInfo[vehicleid][vRank] = 0;
  26980. VehicleInfo[vehicleid][carImpounded] = cache_get_field_content_int(0, "carImpounded");
  26981. VehicleInfo[vehicleid][carImpoundPrice] = cache_get_field_content_int(0, "carImpoundPrice");
  26982. vehicleFuel[vehicleid] = cache_get_field_content_int(0, "fuel");
  26983. adminVehicle{vehicleid} = false;
  26984. VehicleInfo[vehicleid][vForSale] = bool:cache_get_field_content_int(0, "forsale");
  26985. VehicleInfo[vehicleid][vForSalePrice] = cache_get_field_content_int(0, "forsaleprice");
  26986. VehicleInfo[vehicleid][vMileage] = cache_get_field_content_float(0, "mileage");
  26987. if(VehicleInfo[vehicleid][vForSale])
  26988. {
  26989. new forsale[264];
  26990. format(forsale, sizeof(forsale), "FOR SALE\n%s - %s\nPh: %i.", GetVehicleName(vehicleid), FormatNumber(VehicleInfo[vehicleid][vForSalePrice]), PlayerData[playerid][pPhone]);
  26991. VehicleInfo[vehicleid][vForSaleLabel] = CreateDynamic3DTextLabel(forsale, COLOR_GREY2, 0.0, 0.0, 0.0, 10.0, INVALID_PLAYER_ID, vehicleid, 1, -1, 0, -1, 30.0);
  26992. }
  26993. SetVehicleToRespawn(vehicleid);
  26994. ReloadVehicle(vehicleid);
  26995. if(!parked)
  26996. {
  26997. SendClientMessageEx(playerid, COLOR_AQUA, "You have spawned your {00AA00}%s{33CCFF} which is located in %s. /findcar to track it.", GetVehicleName(vehicleid), GetVehicleZoneName(vehicleid));
  26998. }
  26999. }
  27000. }
  27001. return 1;
  27002. }
  27003. forward OnPlayerAttachCopClothing(playerid, name[], clothingid);
  27004. public OnPlayerAttachCopClothing(playerid, name[], clothingid)
  27005. {
  27006. strcpy(ClothingInfo[playerid][clothingid][cName], name, 32);
  27007. ClothingInfo[playerid][clothingid][cID] = cache_insert_id(connectionID);
  27008. ClothingInfo[playerid][clothingid][cExists] = 1;
  27009. ClothingInfo[playerid][clothingid][cAttached] = 0;
  27010. ClothingInfo[playerid][clothingid][cAttachedIndex] = -1;
  27011. SendClientMessageEx(playerid, COLOR_AQUA, "%s added to clothing inventory. /clothing to attach your new item.", name);
  27012. }
  27013. forward OnPlayerBuyClothingItem(playerid, name[], price, businessid, clothingid);
  27014. public OnPlayerBuyClothingItem(playerid, name[], price, businessid, clothingid)
  27015. {
  27016. new string[16];
  27017. if(PlayerData[playerid][pTraderUpgrade] > 0)
  27018. {
  27019. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  27020. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  27021. }
  27022. strcpy(ClothingInfo[playerid][clothingid][cName], name, 32);
  27023. ClothingInfo[playerid][clothingid][cID] = cache_insert_id(connectionID);
  27024. ClothingInfo[playerid][clothingid][cExists] = 1;
  27025. ClothingInfo[playerid][clothingid][cAttached] = 0;
  27026. ClothingInfo[playerid][clothingid][cAttachedIndex] = -1;
  27027. BusinessInfo[businessid][bCash] += price;
  27028. BusinessInfo[businessid][bProducts]--;
  27029. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  27030. mysql_tquery(connectionID, queryBuffer);
  27031. GivePlayerCash(playerid, -price);
  27032. SendClientMessageEx(playerid, COLOR_AQUA, "%s purchased for {00AA00}$%i{33CCFF}. /clothing to find your new item.", name, price);
  27033. SetPVarInt(playerid, "ColorToy", clothingid);
  27034. // Dialog_Show(playerid, Clothing_MatColor1, DIALOG_STYLE_LIST, "Choose a layer.", "First\nSecond", "Select", "Close");
  27035. format(string, sizeof(string), "~r~-$%i", price);
  27036. GameTextForPlayer(playerid, string, 5000, 1);
  27037. }
  27038. forward OnPlayerSendTextMessage(playerid, number, msg[]);
  27039. public OnPlayerSendTextMessage(playerid, number, msg[])
  27040. {
  27041. if(!cache_get_row_count(connectionID))
  27042. {
  27043. SendClientMessage(playerid, COLOR_GREY, "The number you're trying to reach does not belong to any particular person.");
  27044. }
  27045. else if(cache_get_row_int(0, 1))
  27046. {
  27047. SendClientMessage(playerid, COLOR_GREY, "That player is currently imprisoned and cannot use their phone.");
  27048. }
  27049. else if(cache_get_row_int(0, 2))
  27050. {
  27051. SendClientMessage(playerid, COLOR_GREY, "That player has their mobile phone switched off.");
  27052. }
  27053. else
  27054. {
  27055. new
  27056. username[MAX_PLAYER_NAME];
  27057. cache_get_row(0, 0, username);
  27058. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO texts VALUES(null, %i, %i, '%s', NOW(), '%e')", PlayerData[playerid][pPhone], number, GetPlayerNameEx(playerid), msg);
  27059. mysql_tquery(connectionID, queryBuffer);
  27060. ShowActionBubble(playerid, "* %s takes out a cellphone and sends a message.", GetRPName(playerid));
  27061. SendClientMessageEx(playerid, COLOR_YELLOW, "* SMS to %s (%i): %s *", username, number, msg);
  27062. SendClientMessage(playerid, COLOR_WHITE, "The player who owns the number is offline, but will receive your text when they log in.");
  27063. GivePlayerCash(playerid, -1);
  27064. GameTextForPlayer(playerid, "~w~Text sent!~n~~r~-$1", 5000, 1);
  27065. }
  27066. }
  27067. //case DIALOG_HOUSERENT:
  27068. //{
  27069. // if(response)
  27070. // {
  27071. forward OnPlayerRentHouse(playerid, houseid);
  27072. public OnPlayerRentHouse(playerid, houseid)
  27073. {
  27074. if(cache_get_row_int(0, 0) >= GetHouseTenantCapacity(houseid))
  27075. {
  27076. SendClientMessageEx(playerid, COLOR_GREY, "This house has reached its limit of %i tenants.", GetHouseTenantCapacity(houseid));
  27077. }
  27078. else
  27079. {
  27080. // Dialog_Show(HouseInfo[houseid][hOwner], DIALOG_HOUSERENT, DIALOG_STYLE_MSGBOX, "House Rent", "%s is trying to rent a room in your house, do you accept it?", "Accept", "Decline");
  27081. // SendClientMessage(playerid, COLOR_GREY, "Your renting deal has been sent to the owner, please wait.");
  27082. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET rentinghouse = %i WHERE uid = %i", HouseInfo[houseid][hID], PlayerData[playerid][pID]);
  27083. mysql_tquery(connectionID, queryBuffer);
  27084. PlayerData[playerid][pRentingHouse] = HouseInfo[houseid][hID];
  27085. SendClientMessageEx(playerid, COLOR_GREEN, "You are now renting at %s's house. You will pay %s every paycheck.", HouseInfo[houseid][hOwner], FormatNumber(HouseInfo[houseid][hRentPrice]));
  27086. }
  27087. }
  27088. forward OnPlayerEvict(playerid, username[]);
  27089. public OnPlayerEvict(playerid, username[])
  27090. {
  27091. if(!cache_get_row_count(connectionID))
  27092. {
  27093. return SendClientMessage(playerid, COLOR_GREY, "That player doesn't exist, or is not renting at your home.");
  27094. }
  27095. else
  27096. {
  27097. foreach(new i : Player)
  27098. {
  27099. if(!strcmp(GetPlayerNameEx(i), username) && PlayerData[i][pLogged])
  27100. {
  27101. PlayerData[i][pRentingHouse] = 0;
  27102. SendClientMessage(i, COLOR_RED, "You have been evicted from your home by the owner.");
  27103. }
  27104. }
  27105. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET rentinghouse = 0 WHERE username = '%e'", username);
  27106. mysql_tquery(connectionID, queryBuffer);
  27107. SendClientMessageEx(playerid, COLOR_WHITE, "You have evicted %s from your property.", username);
  27108. }
  27109. return 1;
  27110. }
  27111. forward OnListPlayerFlags(playerid, targetid);
  27112. public OnListPlayerFlags(playerid, targetid)
  27113. {
  27114. new rows = cache_get_row_count(connectionID);
  27115. if(!rows)
  27116. {
  27117. SendClientMessage(playerid, COLOR_GREY, "This player has no flags listed under their account.");
  27118. }
  27119. else
  27120. {
  27121. new flaggedby[24], date[24], desc[128];
  27122. SendClientMessageEx(playerid, COLOR_NAVYBLUE, "_________ %s's Flags _________", GetRPName(targetid));
  27123. for(new i = 0; i < rows; i ++)
  27124. {
  27125. cache_get_field_content(i, "flaggedby", flaggedby);
  27126. cache_get_field_content(i, "date", date);
  27127. cache_get_field_content(i, "description", desc);
  27128. SendClientMessageEx(playerid, COLOR_GREY2, "[%i][%s] %s (from: %s)", i + 1, date, desc, flaggedby);
  27129. }
  27130. }
  27131. }
  27132. forward OnVerifyRemoveFlag(playerid, targetid);
  27133. public OnVerifyRemoveFlag(playerid, targetid)
  27134. {
  27135. if(cache_get_row_count(connectionID))
  27136. {
  27137. new
  27138. desc[128];
  27139. cache_get_field_content(0, "description", desc);
  27140. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM flags WHERE id = %i", cache_get_field_content_int(0, "id"));
  27141. mysql_tquery(connectionID, queryBuffer);
  27142. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s %s has removed %s's flag for '%s'.", GetAdmCmdRank(playerid), GetRPName(playerid), GetRPName(targetid), desc);
  27143. }
  27144. }
  27145. forward OnVerifyRemoveVehicle(playerid, targetid);
  27146. public OnVerifyRemoveVehicle(playerid, targetid)
  27147. {
  27148. if(cache_get_row_count(connectionID))
  27149. {
  27150. new vehicleid = GetVehicleLinkedID(cache_get_field_content_int(0, "id")), modelid = cache_get_field_content_int(0, "modelid");
  27151. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM vehicles WHERE id = %i", cache_get_field_content_int(0, "id"));
  27152. mysql_tquery(connectionID, queryBuffer);
  27153. if(vehicleid != INVALID_VEHICLE_ID)
  27154. {
  27155. DespawnVehicle(vehicleid, false);
  27156. }
  27157. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s %s has removed %s's %s.", GetAdmCmdRank(playerid), GetRPName(playerid), GetRPName(targetid), vehicleNames[modelid - 400]);
  27158. SendClientMessageEx(targetid, COLOR_AQUA, "%s has removed your {FF6347}%s{33CCFF} from your vehicle list.", GetRPName(playerid), vehicleNames[modelid - 400]);
  27159. }
  27160. }
  27161. forward OnUpdatePartner(playerid);
  27162. public OnUpdatePartner(playerid)
  27163. {
  27164. if(cache_get_row_count(connectionID))
  27165. {
  27166. cache_get_field_content(0, "username", PlayerData[playerid][pMarriedName], connectionID, MAX_PLAYER_NAME);
  27167. }
  27168. }
  27169. forward OnAdminSetPhoneNumber(playerid, targetid, number);
  27170. public OnAdminSetPhoneNumber(playerid, targetid, number)
  27171. {
  27172. if(cache_get_row_count(connectionID))
  27173. {
  27174. SendClientMessage(playerid, COLOR_GREY, "The number specified is already taken.");
  27175. }
  27176. else
  27177. {
  27178. PlayerData[targetid][pPhone] = number;
  27179. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's phone number to %i.", GetRPName(targetid), number);
  27180. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET phone = %i WHERE uid = %i", number, PlayerData[targetid][pID]);
  27181. mysql_tquery(connectionID, queryBuffer);
  27182. Log_Write("log_admin", "%s (uid: %i) set %s's (uid: %i) phone number to %i", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], number);
  27183. }
  27184. }
  27185. forward OnAdminChangePassword(playerid, username[], password[]);
  27186. public OnAdminChangePassword(playerid, username[], password[])
  27187. {
  27188. if(!cache_get_row_count(connectionID))
  27189. {
  27190. SendClientMessage(playerid, COLOR_GREY, "The player specified doesn't exist.");
  27191. }
  27192. else
  27193. {
  27194. new
  27195. hashed[129];
  27196. WP_Hash(hashed, sizeof(hashed), password);
  27197. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET password = '%s' WHERE username = '%e'", hashed, username);
  27198. mysql_tquery(connectionID, queryBuffer);
  27199. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s %s has changed %s's account password.",GetAdmCmdRank(playerid), GetRPName(playerid), username);
  27200. }
  27201. }
  27202. forward OnAdminListVehiclesForRemoval(playerid, targetid);
  27203. public OnAdminListVehiclesForRemoval(playerid, targetid)
  27204. {
  27205. new rows = cache_get_row_count(connectionID);
  27206. if(!rows)
  27207. {
  27208. SendClientMessage(playerid, COLOR_GREY, "This player owns no vehicles.");
  27209. }
  27210. else
  27211. {
  27212. static string[1024];
  27213. string = "#\tModel\tLocation";
  27214. for(new i = 0; i < rows; i ++)
  27215. {
  27216. new
  27217. vehicleid = GetVehicleLinkedID(cache_get_field_content_int(i, "id"));
  27218. if(vehicleid == INVALID_VEHICLE_ID)
  27219. {
  27220. format(string, sizeof(string), "%s\nn/a\t%s\t%s", string, vehicleNames[cache_get_field_content_int(i, "modelid") - 400], (cache_get_field_content_int(i, "interior")) ? ("Garage") : GetZoneName(cache_get_field_content_float(i, "pos_x"), cache_get_field_content_float(i, "pos_y"), cache_get_field_content_float(i, "pos_z")));
  27221. }
  27222. else
  27223. {
  27224. format(string, sizeof(string), "%s\nID %i\t%s\t%s", string, vehicleid, GetVehicleName(vehicleid), GetVehicleZoneName(vehicleid));
  27225. }
  27226. }
  27227. PlayerData[playerid][pRemoveFrom] = targetid;
  27228. Dialog_Show(playerid, DIALOG_REMOVEPVEH, DIALOG_STYLE_TABLIST_HEADERS, "Choose a vehicle to remove.", string, "Select", "Cancel");
  27229. }
  27230. }
  27231. forward OnAdminListVehicles(playerid, targetid);
  27232. public OnAdminListVehicles(playerid, targetid)
  27233. {
  27234. new rows = cache_get_row_count(connectionID);
  27235. SendClientMessageEx(playerid, COLOR_NAVYBLUE, "_____ %s's Vehicles _____", GetRPName(targetid));
  27236. for(new i = 0; i < rows; i ++)
  27237. {
  27238. new
  27239. vehicleid = GetVehicleLinkedID(cache_get_field_content_int(i, "id"));
  27240. if(vehicleid == INVALID_VEHICLE_ID)
  27241. {
  27242. SendClientMessageEx(playerid, COLOR_GREY2, "ID: n/a | Model: %s | Location: %s", vehicleNames[cache_get_field_content_int(i, "modelid") - 400], (cache_get_field_content_int(i, "interior")) ? ("Garage") : GetZoneName(cache_get_field_content_float(i, "pos_x"), cache_get_field_content_float(i, "pos_y"), cache_get_field_content_float(i, "pos_z")));
  27243. }
  27244. else
  27245. {
  27246. SendClientMessageEx(playerid, COLOR_GREY2, "ID: %i | Model: %s | Location: %s", vehicleid, GetVehicleName(vehicleid), GetVehicleZoneName(vehicleid));
  27247. }
  27248. }
  27249. }
  27250. forward OnAdminOfflineDM(playerid, username[]);
  27251. public OnAdminOfflineDM(playerid, username[])
  27252. {
  27253. if(cache_get_row_count(connectionID))
  27254. {
  27255. if(cache_get_field_content_int(0, "adminlevel") > PlayerData[playerid][pAdmin])
  27256. {
  27257. SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be punished.");
  27258. }
  27259. else
  27260. {
  27261. new ip[16], id = cache_get_field_content_int(0, "uid"), warns = cache_get_field_content_int(0, "warns");
  27262. warns++;
  27263. if(warns < 3)
  27264. {
  27265. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET jailtype = 2, jailtime = %i, dmwarnings = %i, weaponrestricted = %i, prisonedby = '%s', prisonreason = 'DM' WHERE uid = %i", warns * 3600, warns, warns * 4, GetPlayerNameEx(playerid), id);
  27266. mysql_tquery(connectionID, queryBuffer);
  27267. Log_Write("log_punishments", "%s (uid: %i) offline prisoned %s (uid: %i) for %i minutes, reason: DM [/dm]", GetPlayerNameEx(playerid), PlayerData[playerid][pID], username, id, warns * 60);
  27268. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s was offline DM Warned & Prisoned for %i minutes by %s %s, reason: DM (%i/3)", username, warns * 60, GetAdmCmdRank(playerid), GetRPName(playerid), warns);
  27269. }
  27270. else
  27271. {
  27272. cache_get_field_content(0, "ip", ip);
  27273. AddBan(username, ip, GetPlayerNameEx(playerid), "DM (3/3 warnings)");
  27274. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET dmwarnings = 0 WHERE uid = %i", id);
  27275. mysql_tquery(connectionID, queryBuffer);
  27276. Log_Write("log_punishments", "%s (uid: %i) offline banned %s (uid: %i), reason: DM (3/3 warnings)", GetPlayerNameEx(playerid), PlayerData[playerid][pID], username, id);
  27277. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s was offline banned by %s %s, reason: DM (3/3 warnings)", username, GetAdmCmdRank(playerid), GetRPName(playerid));
  27278. }
  27279. }
  27280. }
  27281. else
  27282. {
  27283. SendClientMessage(playerid, COLOR_GREY, "The player specified doesn't exist.");
  27284. }
  27285. }
  27286. forward OnAdminCheckNameHistory(playerid, targetid);
  27287. public OnAdminCheckNameHistory(playerid, targetid)
  27288. {
  27289. new rows = cache_get_row_count(connectionID);
  27290. if(!rows)
  27291. {
  27292. SendClientMessage(playerid, COLOR_GREY, "This player has no namechange history recorded.");
  27293. }
  27294. else
  27295. {
  27296. new oldname[MAX_PLAYER_NAME], newname[MAX_PLAYER_NAME], changedby[MAX_PLAYER_NAME], date[24];
  27297. SendClientMessage(playerid, COLOR_NAVYBLUE, "_____ Namechange History _____");
  27298. for(new i = 0; i < rows; i ++)
  27299. {
  27300. cache_get_field_content(i, "oldname", oldname);
  27301. cache_get_field_content(i, "newname", newname);
  27302. cache_get_field_content(i, "changedby", changedby);
  27303. cache_get_field_content(i, "date", date);
  27304. SendClientMessageEx(playerid, COLOR_YELLOW, "[%s] %s has changed %s's name to %s.", date, changedby, oldname, newname);
  27305. }
  27306. }
  27307. }
  27308. forward OnAdminListFlagsForRemoval(playerid, targetid);
  27309. public OnAdminListFlagsForRemoval(playerid, targetid)
  27310. {
  27311. new rows = cache_get_row_count(connectionID);
  27312. if(!rows)
  27313. {
  27314. SendClientMessage(playerid, COLOR_GREY, "This player has no flags listed under their account.");
  27315. }
  27316. else
  27317. {
  27318. static string[4096], flaggedby[24], date[24], desc[128];
  27319. string = "#\tFlagged by\tDate\tDescription";
  27320. for(new i = 0; i < rows; i ++)
  27321. {
  27322. cache_get_field_content(i, "flaggedby", flaggedby);
  27323. cache_get_field_content(i, "date", date);
  27324. cache_get_field_content(i, "description", desc);
  27325. format(string, sizeof(string), "%s\n%i\t%s\t%s\t%s", string, i + 1, flaggedby, date, desc);
  27326. }
  27327. PlayerData[playerid][pRemoveFrom] = targetid;
  27328. Dialog_Show(playerid, DIALOG_REMOVEFLAG, DIALOG_STYLE_TABLIST_HEADERS, "Choose a flag to remove.", string, "Select", "Cancel");
  27329. }
  27330. }
  27331. forward OnAdminCreateLocker(playerid, lockerid, factionid, Float:x, Float:y, Float:z, interior, world);
  27332. public OnAdminCreateLocker(playerid, lockerid, factionid, Float:x, Float:y, Float:z, interior, world)
  27333. {
  27334. LockerInfo[lockerid][lID] = cache_insert_id(connectionID);
  27335. LockerInfo[lockerid][lExists] = 1;
  27336. LockerInfo[lockerid][lFaction] = factionid;
  27337. LockerInfo[lockerid][lPosX] = x;
  27338. LockerInfo[lockerid][lPosY] = y;
  27339. LockerInfo[lockerid][lPosZ] = z;
  27340. LockerInfo[lockerid][lInterior] = interior;
  27341. LockerInfo[lockerid][lWorld] = world;
  27342. LockerInfo[lockerid][lIcon] = 1239;
  27343. LockerInfo[lockerid][lLabel] = 1;
  27344. // CHANGE SQL TOO PLS
  27345. LockerInfo[lockerid][locKevlar] = { 1, 100 };
  27346. LockerInfo[lockerid][locMedKit] = { 1, 50 };
  27347. LockerInfo[lockerid][locNitestick] = { 0, 0 };
  27348. LockerInfo[lockerid][locMace] = { 0, 0 };
  27349. LockerInfo[lockerid][locDeagle] = { 1, 850 };
  27350. LockerInfo[lockerid][locShotgun] = { 1, 1000 };
  27351. LockerInfo[lockerid][locMP5] = { 1, 1500 };
  27352. LockerInfo[lockerid][locM4] = { 1, 2500 };
  27353. LockerInfo[lockerid][locSpas12] = { 1, 3500 };
  27354. LockerInfo[lockerid][locSniper] = { 1, 5000 };
  27355. LockerInfo[lockerid][locCamera] = { 0, 0 };
  27356. LockerInfo[lockerid][locFireExt] = { 0, 0 };
  27357. LockerInfo[lockerid][locPainKillers] = { 0, 0 };
  27358. LockerInfo[lockerid][lText] = Text3D:INVALID_3DTEXT_ID;
  27359. LockerInfo[lockerid][lPickup] = -1;
  27360. ReloadLocker(lockerid);
  27361. SendClientMessageEx(playerid, COLOR_GREEN, "* Locker %i created for %s.", lockerid, FactionInfo[factionid][fName]);
  27362. }
  27363. forward OnAdminCreateLocation(playerid, location, name[], Float:x, Float:y, Float:z);
  27364. public OnAdminCreateLocation(playerid, location, name[], Float:x, Float:y, Float:z)
  27365. {
  27366. LocationInfo[location][locID] = cache_insert_id(connectionID);
  27367. LocationInfo[location][locExists] = true;
  27368. strcpy(LocationInfo[location][locName], name, 32);
  27369. LocationInfo[location][locPosX] = x;
  27370. LocationInfo[location][locPosY] = y;
  27371. LocationInfo[location][locPosZ] = z;
  27372. SendClientMessageEx(playerid, COLOR_GREEN, "* Location [%i] %s created at %.1f, %.1f, %.1f.", location, name, x, y, z);
  27373. }
  27374. forward OnAdminOfflineCheck(playerid, username[]);
  27375. public OnAdminOfflineCheck(playerid, username[])
  27376. {
  27377. if(!cache_get_row_count(connectionID))
  27378. {
  27379. SendClientMessage(playerid, COLOR_GREY, "The player specified doesn't exist.");
  27380. }
  27381. else
  27382. {
  27383. // At first I didn't know how I was going to do this. But then I came up with a plan.
  27384. // Load everything into an unused player slot, use DisplayStats as normal, then destroy the data.
  27385. // This ensures that whenever I add a new thing to /stats for instance, I don't have to maintain
  27386. // two stats functions, I can just call DisplayStats and let the work do itself.
  27387. PlayerData[MAX_PLAYERS][pID] = cache_get_field_content_int(0, "uid");
  27388. PlayerData[MAX_PLAYERS][pSetup] = cache_get_field_content_int(0, "setup");
  27389. PlayerData[MAX_PLAYERS][pGender] = cache_get_field_content_int(0, "gender");
  27390. PlayerData[MAX_PLAYERS][pAge] = cache_get_field_content_int(0, "age");
  27391. PlayerData[MAX_PLAYERS][pSkin] = cache_get_field_content_int(0, "skin");
  27392. PlayerData[MAX_PLAYERS][pCameraX] = cache_get_field_content_float(0, "camera_x");
  27393. PlayerData[MAX_PLAYERS][pCameraY] = cache_get_field_content_float(0, "camera_y");
  27394. PlayerData[MAX_PLAYERS][pCameraZ] = cache_get_field_content_float(0, "camera_z");
  27395. PlayerData[MAX_PLAYERS][pPosX] = cache_get_field_content_float(0, "pos_x");
  27396. PlayerData[MAX_PLAYERS][pPosY] = cache_get_field_content_float(0, "pos_y");
  27397. PlayerData[MAX_PLAYERS][pPosZ] = cache_get_field_content_float(0, "pos_z");
  27398. PlayerData[MAX_PLAYERS][pPosA] = cache_get_field_content_float(0, "pos_a");
  27399. PlayerData[MAX_PLAYERS][pInterior] = cache_get_field_content_int(0, "interior");
  27400. PlayerData[MAX_PLAYERS][pWorld] = cache_get_field_content_int(0, "world");
  27401. PlayerData[MAX_PLAYERS][pCash] = cache_get_field_content_int(0, "cash");
  27402. PlayerData[MAX_PLAYERS][pBank] = cache_get_field_content_int(0, "bank");
  27403. PlayerData[MAX_PLAYERS][pPaycheck] = cache_get_field_content_int(0, "paycheck");
  27404. PlayerData[MAX_PLAYERS][pLevel] = cache_get_field_content_int(0, "level");//pVehicleCMD
  27405. PlayerData[MAX_PLAYERS][pAdminStrike] = cache_get_field_content_int(0, "adminstrike");
  27406. PlayerData[MAX_PLAYERS][pGunLicense] = cache_get_field_content_int(0, "gunlicense");
  27407. PlayerData[MAX_PLAYERS][pvLock] = cache_get_field_content_int(0, "vehlock");
  27408. PlayerData[MAX_PLAYERS][pGraphic] = cache_get_field_content_int(0, "graphic");
  27409. PlayerData[MAX_PLAYERS][pEXP] = cache_get_field_content_int(0, "exp");
  27410. PlayerData[MAX_PLAYERS][pMinutes] = cache_get_field_content_int(0, "minutes");
  27411. PlayerData[MAX_PLAYERS][pHours] = cache_get_field_content_int(0, "hours");
  27412. PlayerData[MAX_PLAYERS][pAdmin] = cache_get_field_content_int(0, "adminlevel");
  27413. PlayerData[MAX_PLAYERS][pHelper] = cache_get_field_content_int(0, "helperlevel");
  27414. PlayerData[MAX_PLAYERS][pHealth] = cache_get_field_content_float(0, "health");
  27415. PlayerData[MAX_PLAYERS][pArmor] = cache_get_field_content_float(0, "armor");
  27416. PlayerData[MAX_PLAYERS][pUpgradePoints] = cache_get_field_content_int(0, "upgradepoints");
  27417. PlayerData[MAX_PLAYERS][pWarnings] = cache_get_field_content_int(0, "warnings");
  27418. PlayerData[MAX_PLAYERS][pInjured] = cache_get_field_content_int(0, "injured");
  27419. PlayerData[MAX_PLAYERS][pHospital] = cache_get_field_content_int(0, "hospital");
  27420. PlayerData[MAX_PLAYERS][pSpawnHealth] = cache_get_field_content_float(0, "spawnhealth");
  27421. PlayerData[MAX_PLAYERS][pSpawnArmor] = cache_get_field_content_float(0, "spawnarmor");
  27422. PlayerData[MAX_PLAYERS][pJailType] = cache_get_field_content_int(0, "jailtype");
  27423. PlayerData[MAX_PLAYERS][pJailTime] = cache_get_field_content_int(0, "jailtime");
  27424. PlayerData[MAX_PLAYERS][pNewbieMuted] = cache_get_field_content_int(0, "newbiemuted");
  27425. PlayerData[MAX_PLAYERS][pHelpMuted] = cache_get_field_content_int(0, "helpmuted");
  27426. PlayerData[MAX_PLAYERS][pAdMuted] = cache_get_field_content_int(0, "admuted");
  27427. PlayerData[MAX_PLAYERS][pLiveMuted] = cache_get_field_content_int(0, "livemuted");
  27428. PlayerData[MAX_PLAYERS][pGlobalMuted] = cache_get_field_content_int(0, "globalmuted");
  27429. PlayerData[MAX_PLAYERS][pReportMuted] = cache_get_field_content_int(0, "reportmuted");
  27430. PlayerData[MAX_PLAYERS][pReportWarns] = cache_get_field_content_int(0, "reportwarns");
  27431. PlayerData[MAX_PLAYERS][pFightStyle] = cache_get_field_content_int(0, "fightstyle");
  27432. PlayerData[MAX_PLAYERS][pCookies] = cache_get_field_content_int(0, "cookies");
  27433. PlayerData[MAX_PLAYERS][pPhone] = cache_get_field_content_int(0, "phone");
  27434. PlayerData[MAX_PLAYERS][pJob] = cache_get_field_content_int(0, "job");
  27435. PlayerData[MAX_PLAYERS][pSecondJob] = cache_get_field_content_int(0, "secondjob");
  27436. PlayerData[MAX_PLAYERS][pCrimes] = cache_get_field_content_int(0, "crimes");
  27437. PlayerData[MAX_PLAYERS][pArrested] = cache_get_field_content_int(0, "arrested");
  27438. PlayerData[MAX_PLAYERS][pWantedLevel] = cache_get_field_content_int(0, "wantedlevel");
  27439. PlayerData[MAX_PLAYERS][pMaterials] = cache_get_field_content_int(0, "materials");
  27440. PlayerData[MAX_PLAYERS][pWeed] = cache_get_field_content_int(0, "weed");
  27441. PlayerData[MAX_PLAYERS][pCocaine] = cache_get_field_content_int(0, "cocaine");
  27442. PlayerData[MAX_PLAYERS][pMeth] = cache_get_field_content_int(0, "meth");
  27443. PlayerData[MAX_PLAYERS][pPainkillers] = cache_get_field_content_int(0, "painkillers");
  27444. PlayerData[MAX_PLAYERS][pSeeds] = cache_get_field_content_int(0, "seeds");
  27445. PlayerData[MAX_PLAYERS][pEphedrine] = cache_get_field_content_int(0, "ephedrine");
  27446. PlayerData[MAX_PLAYERS][pMuriaticAcid] = cache_get_field_content_int(0, "muriaticacid");
  27447. PlayerData[MAX_PLAYERS][pBakingSoda] = cache_get_field_content_int(0, "bakingsoda");
  27448. PlayerData[MAX_PLAYERS][pCigars] = cache_get_field_content_int(0, "cigars");
  27449. PlayerData[MAX_PLAYERS][pWalkieTalkie] = cache_get_field_content_int(0, "walkietalkie");
  27450. PlayerData[MAX_PLAYERS][pChannel] = cache_get_field_content_int(0, "channel");
  27451. PlayerData[MAX_PLAYERS][pRentingHouse] = cache_get_field_content_int(0, "rentinghouse");
  27452. PlayerData[MAX_PLAYERS][pSpraycans] = cache_get_field_content_int(0, "spraycans");
  27453. PlayerData[MAX_PLAYERS][pBoombox] = cache_get_field_content_int(0, "boombox");
  27454. PlayerData[MAX_PLAYERS][pMP3Player] = cache_get_field_content_int(0, "mp3player");
  27455. PlayerData[MAX_PLAYERS][pPhonebook] = cache_get_field_content_int(0, "phonebook");
  27456. PlayerData[MAX_PLAYERS][pFishingRod] = cache_get_field_content_int(0, "fishingrod");
  27457. PlayerData[MAX_PLAYERS][pFishingBait] = cache_get_field_content_int(0, "fishingbait");
  27458. PlayerData[MAX_PLAYERS][pFishWeight] = cache_get_field_content_int(0, "fishweight");
  27459. PlayerData[MAX_PLAYERS][pComponents] = cache_get_field_content_int(0, "components");
  27460. PlayerData[MAX_PLAYERS][pCourierSkill] = cache_get_field_content_int(0, "courierskill");
  27461. PlayerData[MAX_PLAYERS][pFishingSkill] = cache_get_field_content_int(0, "fishingskill");
  27462. PlayerData[MAX_PLAYERS][pGuardSkill] = cache_get_field_content_int(0, "guardskill");
  27463. PlayerData[MAX_PLAYERS][pWeaponSkill] = cache_get_field_content_int(0, "weaponskill");
  27464. PlayerData[MAX_PLAYERS][pMechanicSkill] = cache_get_field_content_int(0, "mechanicskill");
  27465. PlayerData[MAX_PLAYERS][pLawyerSkill] = cache_get_field_content_int(0, "lawyerskill");
  27466. PlayerData[MAX_PLAYERS][pSmugglerSkill] = cache_get_field_content_int(0, "smugglerskill");
  27467. PlayerData[MAX_PLAYERS][pDetectiveSkill] = cache_get_field_content_int(0, "detectiveskill");
  27468. PlayerData[MAX_PLAYERS][pThiefSkill] = cache_get_field_content_int(0, "thiefskill");
  27469. PlayerData[MAX_PLAYERS][pToggleTextdraws] = cache_get_field_content_int(0, "toggletextdraws");
  27470. PlayerData[MAX_PLAYERS][pToggleOOC] = cache_get_field_content_int(0, "toggleooc");
  27471. PlayerData[MAX_PLAYERS][pTogglePhone] = cache_get_field_content_int(0, "togglephone");
  27472. PlayerData[MAX_PLAYERS][pToggleAdmin] = cache_get_field_content_int(0, "toggleadmin");
  27473. PlayerData[MAX_PLAYERS][pToggleHelper] = cache_get_field_content_int(0, "togglehelper");
  27474. PlayerData[MAX_PLAYERS][pTogglePoints] = cache_get_field_content_int(0, "togglepoints");
  27475. PlayerData[MAX_PLAYERS][pToggleTurfs] = cache_get_field_content_int(0, "toggleturfs");
  27476. PlayerData[MAX_PLAYERS][pToggleNewbie] = cache_get_field_content_int(0, "togglenewbie");
  27477. PlayerData[MAX_PLAYERS][pToggleWT] = cache_get_field_content_int(0, "togglewt");
  27478. PlayerData[MAX_PLAYERS][pToggleRadio] = cache_get_field_content_int(0, "toggleradio");
  27479. PlayerData[MAX_PLAYERS][pTogglePM] = cache_get_field_content_int(0, "togglepm");
  27480. PlayerData[MAX_PLAYERS][pToggleVIP] = cache_get_field_content_int(0, "togglevip");
  27481. PlayerData[MAX_PLAYERS][pToggleMusic] = cache_get_field_content_int(0, "togglemusic");
  27482. PlayerData[MAX_PLAYERS][pToggleFaction] = cache_get_field_content_int(0, "togglefaction");
  27483. PlayerData[MAX_PLAYERS][pToggleNews] = cache_get_field_content_int(0, "togglenews");
  27484. PlayerData[MAX_PLAYERS][pToggleGlobal] = cache_get_field_content_int(0, "toggleglobal");
  27485. PlayerData[MAX_PLAYERS][pToggleCam] = cache_get_field_content_int(0, "togglecam");
  27486. PlayerData[MAX_PLAYERS][pToggleHUD] = cache_get_field_content_int(0, "togglehud");
  27487. PlayerData[MAX_PLAYERS][pToggleReports] = cache_get_field_content_int(0, "togglereports");
  27488. PlayerData[MAX_PLAYERS][pToggleWhisper] = cache_get_field_content_int(0, "togglewhisper");
  27489. PlayerData[MAX_PLAYERS][pCarLicense] = cache_get_field_content_int(0, "carlicense");
  27490. PlayerData[MAX_PLAYERS][pDonator] = cache_get_field_content_int(0, "vippackage");
  27491. PlayerData[MAX_PLAYERS][pVIPTime] = cache_get_field_content_int(0, "viptime");
  27492. PlayerData[MAX_PLAYERS][pVIPCooldown] = cache_get_field_content_int(0, "vipcooldown");
  27493. PlayerData[MAX_PLAYERS][pWeapons][0] = cache_get_field_content_int(0, "weapon_0");
  27494. PlayerData[MAX_PLAYERS][pWeapons][1] = cache_get_field_content_int(0, "weapon_1");
  27495. PlayerData[MAX_PLAYERS][pWeapons][2] = cache_get_field_content_int(0, "weapon_2");
  27496. PlayerData[MAX_PLAYERS][pWeapons][3] = cache_get_field_content_int(0, "weapon_3");
  27497. PlayerData[MAX_PLAYERS][pWeapons][4] = cache_get_field_content_int(0, "weapon_4");
  27498. PlayerData[MAX_PLAYERS][pWeapons][5] = cache_get_field_content_int(0, "weapon_5");
  27499. PlayerData[MAX_PLAYERS][pWeapons][6] = cache_get_field_content_int(0, "weapon_6");
  27500. PlayerData[MAX_PLAYERS][pWeapons][7] = cache_get_field_content_int(0, "weapon_7");
  27501. PlayerData[MAX_PLAYERS][pWeapons][8] = cache_get_field_content_int(0, "weapon_8");
  27502. PlayerData[MAX_PLAYERS][pWeapons][9] = cache_get_field_content_int(0, "weapon_9");
  27503. PlayerData[MAX_PLAYERS][pWeapons][10] = cache_get_field_content_int(0, "weapon_10");
  27504. PlayerData[MAX_PLAYERS][pWeapons][11] = cache_get_field_content_int(0, "weapon_11");
  27505. PlayerData[MAX_PLAYERS][pWeapons][12] = cache_get_field_content_int(0, "weapon_12");
  27506. PlayerData[MAX_PLAYERS][pAmmo][0] = cache_get_field_content_int(0, "ammo_0");
  27507. PlayerData[MAX_PLAYERS][pAmmo][1] = cache_get_field_content_int(0, "ammo_1");
  27508. PlayerData[MAX_PLAYERS][pAmmo][2] = cache_get_field_content_int(0, "ammo_2");
  27509. PlayerData[MAX_PLAYERS][pAmmo][3] = cache_get_field_content_int(0, "ammo_3");
  27510. PlayerData[MAX_PLAYERS][pAmmo][4] = cache_get_field_content_int(0, "ammo_4");
  27511. PlayerData[MAX_PLAYERS][pAmmo][5] = cache_get_field_content_int(0, "ammo_5");
  27512. PlayerData[MAX_PLAYERS][pAmmo][6] = cache_get_field_content_int(0, "ammo_6");
  27513. PlayerData[MAX_PLAYERS][pAmmo][7] = cache_get_field_content_int(0, "ammo_7");
  27514. PlayerData[MAX_PLAYERS][pAmmo][8] = cache_get_field_content_int(0, "ammo_8");
  27515. PlayerData[MAX_PLAYERS][pAmmo][9] = cache_get_field_content_int(0, "ammo_9");
  27516. PlayerData[MAX_PLAYERS][pAmmo][10] = cache_get_field_content_int(0, "ammo_10");
  27517. PlayerData[MAX_PLAYERS][pAmmo][11] = cache_get_field_content_int(0, "ammo_11");
  27518. PlayerData[MAX_PLAYERS][pAmmo][12] = cache_get_field_content_int(0, "ammo_12");
  27519. PlayerData[MAX_PLAYERS][pFaction] = cache_get_field_content_int(0, "faction");
  27520. PlayerData[MAX_PLAYERS][pFactionRank] = cache_get_field_content_int(0, "factionrank");
  27521. PlayerData[MAX_PLAYERS][pFactionLeader] = cache_get_field_content_int(0, "factionleader");
  27522. PlayerData[MAX_PLAYERS][pGang] = cache_get_field_content_int(0, "gang");
  27523. PlayerData[MAX_PLAYERS][pGangRank] = cache_get_field_content_int(0, "gangrank");
  27524. PlayerData[MAX_PLAYERS][pDivision] = cache_get_field_content_int(0, "division");
  27525. PlayerData[MAX_PLAYERS][pCrew] = cache_get_field_content_int(0, "crew");
  27526. PlayerData[MAX_PLAYERS][pContracted] = cache_get_field_content_int(0, "contracted");
  27527. PlayerData[MAX_PLAYERS][pBombs] = cache_get_field_content_int(0, "bombs");
  27528. PlayerData[MAX_PLAYERS][pCompletedHits] = cache_get_field_content_int(0, "completedhits");
  27529. PlayerData[MAX_PLAYERS][pFailedHits] = cache_get_field_content_int(0, "failedhits");
  27530. PlayerData[MAX_PLAYERS][pReports] = cache_get_field_content_int(0, "reports");
  27531. PlayerData[MAX_PLAYERS][pNewbies] = cache_get_field_content_int(0, "newbies");
  27532. PlayerData[MAX_PLAYERS][pHelpRequests] = cache_get_field_content_int(0, "helprequests");
  27533. PlayerData[MAX_PLAYERS][pSpeedometer] = cache_get_field_content_int(0, "speedometer");
  27534. PlayerData[MAX_PLAYERS][pFactionMod] = cache_get_field_content_int(0, "factionmod");
  27535. PlayerData[MAX_PLAYERS][pWebDev] = cache_get_field_content_int(0, "webdev");
  27536. PlayerData[MAX_PLAYERS][pGangMod] = cache_get_field_content_int(0, "gangmod");
  27537. PlayerData[MAX_PLAYERS][pBanAppealer] = cache_get_field_content_int(0, "banappealer");
  27538. PlayerData[MAX_PLAYERS][pFormerAdmin] = cache_get_field_content_int(0, "FormerAdmin");
  27539. PlayerData[MAX_PLAYERS][pDeveloper] = cache_get_field_content_int(0, "scripter");
  27540. PlayerData[MAX_PLAYERS][pWeedPlanted] = cache_get_field_content_int(0, "weedplanted");
  27541. PlayerData[MAX_PLAYERS][pWeedTime] = cache_get_field_content_int(0, "weedtime");
  27542. PlayerData[MAX_PLAYERS][pWeedGrams] = cache_get_field_content_int(0, "weedgrams");
  27543. PlayerData[MAX_PLAYERS][pWeedX] = cache_get_field_content_float(0, "weed_x");
  27544. PlayerData[MAX_PLAYERS][pWeedY] = cache_get_field_content_float(0, "weed_y");
  27545. PlayerData[MAX_PLAYERS][pWeedZ] = cache_get_field_content_float(0, "weed_z");
  27546. PlayerData[MAX_PLAYERS][pWeedA] = cache_get_field_content_float(0, "weed_a");
  27547. PlayerData[MAX_PLAYERS][pInventoryUpgrade] = cache_get_field_content_int(0, "inventoryupgrade");
  27548. PlayerData[MAX_PLAYERS][pAddictUpgrade] = cache_get_field_content_int(0, "addictupgrade");
  27549. PlayerData[MAX_PLAYERS][pTraderUpgrade] = cache_get_field_content_int(0, "traderupgrade");
  27550. PlayerData[MAX_PLAYERS][pAssetUpgrade] = cache_get_field_content_int(0, "assetupgrade");
  27551. PlayerData[MAX_PLAYERS][pLaborUpgrade] = cache_get_field_content_int(0, "laborupgrade");
  27552. PlayerData[MAX_PLAYERS][pDMWarnings] = cache_get_field_content_int(0, "dmwarnings");
  27553. PlayerData[MAX_PLAYERS][pWeaponRestricted] = cache_get_field_content_int(0, "weaponrestricted");
  27554. PlayerData[MAX_PLAYERS][pReferralUID] = cache_get_field_content_int(0, "referral_uid");
  27555. PlayerData[MAX_PLAYERS][pWatch] = cache_get_field_content_int(0, "watch");
  27556. PlayerData[MAX_PLAYERS][pGPS] = cache_get_field_content_int(0, "gps");
  27557. PlayerData[MAX_PLAYERS][pClothes] = cache_get_field_content_int(0, "clothes");
  27558. PlayerData[MAX_PLAYERS][pShowLands] = cache_get_field_content_int(0, "showlands");
  27559. PlayerData[MAX_PLAYERS][pShowTurfs] = cache_get_field_content_int(0, "showturfs");
  27560. PlayerData[MAX_PLAYERS][pWatchOn] = cache_get_field_content_int(0, "watchon");
  27561. PlayerData[MAX_PLAYERS][pGPSOn] = cache_get_field_content_int(0, "gpson");
  27562. PlayerData[MAX_PLAYERS][pDoubleXP] = cache_get_field_content_int(0, "doublexp");
  27563. PlayerData[MAX_PLAYERS][pCourierCooldown] = cache_get_field_content_int(0, "couriercooldown");
  27564. PlayerData[MAX_PLAYERS][pPizzaCooldown] = cache_get_field_content_int(0, "pizzacooldown");
  27565. PlayerData[MAX_PLAYERS][pDetectiveCooldown] = cache_get_field_content_int(0, "detectivecooldown");
  27566. PlayerData[MAX_PLAYERS][pThiefCooldown] = cache_get_field_content_int(0, "thiefcooldown");
  27567. PlayerData[MAX_PLAYERS][pCocaineCooldown] = cache_get_field_content_int(0, "crackcooldown");
  27568. PlayerData[MAX_PLAYERS][pGasCan] = cache_get_field_content_int(0, "gascan");
  27569. PlayerData[MAX_PLAYERS][pDuty] = cache_get_field_content_int(0, "duty");
  27570. PlayerData[MAX_PLAYERS][pBandana] = cache_get_field_content_int(0, "bandana");
  27571. PlayerData[MAX_PLAYERS][pPassport] = cache_get_field_content_int(0, "passport");
  27572. PlayerData[MAX_PLAYERS][pPassportLevel] = cache_get_field_content_int(0, "passportlevel");
  27573. PlayerData[MAX_PLAYERS][pPassportSkin] = cache_get_field_content_int(0, "passportskin");
  27574. PlayerData[MAX_PLAYERS][pPassportPhone] = cache_get_field_content_int(0, "passportphone");
  27575. PlayerData[MAX_PLAYERS][pNewbieMuteTime] = cache_get_field_content_int(0, "newbiemutetime");
  27576. PlayerData[MAX_PLAYERS][pReportMuteTime] = cache_get_field_content_int(0, "reportmutetime");
  27577. PlayerData[MAX_PLAYERS][pGlobalMuteTime] = cache_get_field_content_int(0, "globalmutetime");
  27578. PlayerData[MAX_PLAYERS][pAdminHide] = cache_get_field_content_int(0, "adminhide");
  27579. PlayerData[MAX_PLAYERS][pInsurance] = cache_get_field_content_int(0, "insurance");
  27580. PlayerData[MAX_PLAYERS][pRope] = cache_get_field_content_int(0, "rope");
  27581. PlayerData[MAX_PLAYERS][pTotalPatients] = cache_get_field_content_int(0, "totalpatients");
  27582. PlayerData[MAX_PLAYERS][pTotalFires] = cache_get_field_content_int(0, "totalfires");
  27583. strcpy(PlayerData[MAX_PLAYERS][pUsername], username, MAX_PLAYER_NAME);
  27584. DisplayStats(MAX_PLAYERS, playerid);
  27585. }
  27586. }
  27587. forward OnAdminOfflineFlag(playerid, username[], desc[]);
  27588. public OnAdminOfflineFlag(playerid, username[], desc[])
  27589. {
  27590. if(!cache_get_row_count(connectionID))
  27591. {
  27592. SendClientMessage(playerid, COLOR_GREY, "The player specified doesn't exist.");
  27593. }
  27594. else
  27595. {
  27596. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO flags VALUES(null, %i, '%s', NOW(), '%e')", cache_get_field_content_int(0, "uid"), GetPlayerNameEx(playerid), desc);
  27597. mysql_tquery(connectionID, queryBuffer);
  27598. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s %s offline flagged %s's account for '%s'.",GetAdmCmdRank(playerid), GetRPName(playerid), username, desc);
  27599. }
  27600. }
  27601. forward OnAdminCheckBanHistory(playerid, username[]);
  27602. public OnAdminCheckBanHistory(playerid, username[])
  27603. {
  27604. new rows = cache_get_row_count(connectionID);
  27605. if(!rows)
  27606. {
  27607. SendClientMessage(playerid, COLOR_GREY, "This player has no ban history recorded.");
  27608. }
  27609. else
  27610. {
  27611. new date[24], description[255];
  27612. for(new i = 0; i < rows; i ++)
  27613. {
  27614. cache_get_row(i, 0, date);
  27615. cache_get_row(i, 1, description);
  27616. SendClientMessageEx(playerid, COLOR_LIGHTRED, "[%s] %s", date, description);
  27617. }
  27618. }
  27619. }
  27620. forward OnAdminCheckLastActive(playerid, username[]);
  27621. public OnAdminCheckLastActive(playerid, username[])
  27622. {
  27623. if(!cache_get_row_count(connectionID))
  27624. {
  27625. SendClientMessage(playerid, COLOR_GREY, "The player specified doesn't exist.");
  27626. }
  27627. else
  27628. {
  27629. new
  27630. date[40];
  27631. cache_get_row(0, 0, date);
  27632. SendClientMessageEx(playerid, COLOR_GREEN, "%s last logged in on the %s (server time).", username, date);
  27633. }
  27634. }
  27635. forward OnAdminSetHelperLevel(playerid, username[], level);
  27636. public OnAdminSetHelperLevel(playerid, username[], level)
  27637. {
  27638. if(!cache_get_row_count(connectionID))
  27639. {
  27640. SendClientMessage(playerid, COLOR_GREY, "The player specified doesn't exist.");
  27641. }
  27642. else if((PlayerData[playerid][pAdmin] < GENERAL_MANAGER) && cache_get_row_int(0, 0) > PlayerData[playerid][pHelper] && level < cache_get_row_int(0, 0))
  27643. {
  27644. SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher helper level than you. They cannot be demoted.");
  27645. }
  27646. else
  27647. {
  27648. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET helperlevel = %i WHERE username = '%e'", level, username);
  27649. mysql_tquery(connectionID, queryBuffer);
  27650. SendStaffMessage(COLOR_LIGHTRED, "AdmCmd: %s %s has offline set %s's helper level to %i.",GetAdmCmdRank(playerid), GetRPName(playerid), username, level);
  27651. Log_Write("log_admin", "%s (uid: %i) has offline set %s's helper level to %i.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], username, level);
  27652. }
  27653. }
  27654. forward OnAdminSetAdminLevel(playerid, username[], level);
  27655. public OnAdminSetAdminLevel(playerid, username[], level)
  27656. {
  27657. if(!cache_get_row_count(connectionID))
  27658. {
  27659. SendClientMessage(playerid, COLOR_GREY, "The player specified doesn't exist.");
  27660. }
  27661. else if(cache_get_row_int(0, 0) > PlayerData[playerid][pAdmin] && level < cache_get_row_int(0, 0))
  27662. {
  27663. SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be demoted.");
  27664. }
  27665. else
  27666. {
  27667. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET adminlevel = %i WHERE username = '%e'", level, username);
  27668. mysql_tquery(connectionID, queryBuffer);
  27669. if(level == 0)
  27670. {
  27671. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET scripter = 0, gangmod = 0, banappealer = 0, factionmod = 0, helpermanager = 0, webdev = 0, dynamicadmin = 0, adminpersonnel = 0 WHERE username = '%e'", username);
  27672. mysql_tquery(connectionID, queryBuffer);
  27673. }
  27674. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s %s has offline set %s's admin level to %i.",GetAdmCmdRank(playerid), GetRPName(playerid), username, level);
  27675. Log_Write("log_admin", "%s (uid: %i) has offline set %s's admin level to %i.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], username, level);
  27676. }
  27677. }
  27678. forward OnAdminCreateTurf(playerid, turfid, name[], type, Float:minx, Float:miny, Float:maxx, Float:maxy, Float:height);
  27679. public OnAdminCreateTurf(playerid, turfid, name[], type, Float:minx, Float:miny, Float:maxx, Float:maxy, Float:height)
  27680. {
  27681. strcpy(TurfInfo[turfid][tName], name, 32);
  27682. strcpy(TurfInfo[turfid][tCapturedBy], "No-one", MAX_PLAYER_NAME);
  27683. TurfInfo[turfid][tExists] = 1;
  27684. TurfInfo[turfid][tCapturedGang] = -1;
  27685. TurfInfo[turfid][tBeingCaptured] = -1;
  27686. TurfInfo[turfid][tTime] = 12;
  27687. TurfInfo[turfid][tType] = type;
  27688. TurfInfo[turfid][tMinX] = minx;
  27689. TurfInfo[turfid][tMinY] = miny;
  27690. TurfInfo[turfid][tMaxX] = maxx;
  27691. TurfInfo[turfid][tMaxY] = maxy;
  27692. TurfInfo[turfid][tHeight] = height;
  27693. TurfInfo[turfid][tGangZone] = -1;
  27694. TurfInfo[turfid][tArea] = -1;
  27695. TurfInfo[turfid][tCaptureTime] = 0;
  27696. TurfInfo[turfid][tCapturer] = INVALID_PLAYER_ID;
  27697. Iter_Add(Turf, turfid);
  27698. ReloadTurf(turfid);
  27699. SendClientMessageEx(playerid, COLOR_GREEN, "* Turf %i created successfully.", turfid);
  27700. }
  27701. forward OnAdminCreateLand(playerid, landid, price, Float:minx, Float:miny, Float:maxx, Float:maxy, Float:heightx, Float:heighty, Float:heightz);
  27702. public OnAdminCreateLand(playerid, landid, price, Float:minx, Float:miny, Float:maxx, Float:maxy, Float:heightx, Float:heighty, Float:heightz)
  27703. {
  27704. GetPlayerPos(playerid, heightx, heighty, heightz);
  27705. strcpy(LandInfo[landid][lOwner], "Nobody", MAX_PLAYER_NAME);
  27706. LandInfo[landid][lExists] = 1;
  27707. LandInfo[landid][lID] = cache_insert_id(connectionID);
  27708. LandInfo[landid][lOwnerID] = 0;
  27709. LandInfo[landid][lLevel] = 1;
  27710. LandInfo[landid][lPrice] = price;
  27711. LandInfo[landid][lMinX] = minx;
  27712. LandInfo[landid][lMinY] = miny;
  27713. LandInfo[landid][lMaxX] = maxx;
  27714. LandInfo[landid][lMaxY] = maxy;
  27715. LandInfo[landid][lHeightX] = heightx;
  27716. LandInfo[landid][lHeightY] = heighty;
  27717. LandInfo[landid][lHeightZ] = heightz;
  27718. LandInfo[landid][lGangZone] = -1;
  27719. LandInfo[landid][lArea] = -1;
  27720. Iter_Add(Land, landid);
  27721. ReloadLand(landid);
  27722. SendClientMessageEx(playerid, COLOR_GREEN, "* Land %i created successfully.", landid);
  27723. }
  27724. forward OnAdminCreateEntrance(playerid, entranceid, name[], Float:x, Float:y, Float:z, Float:angle);
  27725. public OnAdminCreateEntrance(playerid, entranceid, name[], Float:x, Float:y, Float:z, Float:angle)
  27726. {
  27727. strcpy(EntranceInfo[entranceid][eOwner], "Nobody", MAX_PLAYER_NAME);
  27728. strcpy(EntranceInfo[entranceid][eName], name, 40);
  27729. strcpy(EntranceInfo[entranceid][ePassword], "None", 64);
  27730. EntranceInfo[entranceid][eExists] = 1;
  27731. EntranceInfo[entranceid][eID] = cache_insert_id(connectionID);
  27732. EntranceInfo[entranceid][eOwnerID] = 0;
  27733. EntranceInfo[entranceid][eIcon] = 19198;
  27734. EntranceInfo[entranceid][eLocked] = 0;
  27735. EntranceInfo[entranceid][eRadius] = 3.0;
  27736. EntranceInfo[entranceid][ePosX] = x;
  27737. EntranceInfo[entranceid][ePosY] = y;
  27738. EntranceInfo[entranceid][ePosZ] = z;
  27739. EntranceInfo[entranceid][ePosA] = angle;
  27740. EntranceInfo[entranceid][eIntX] = 0.0;
  27741. EntranceInfo[entranceid][eIntY] = 0.0;
  27742. EntranceInfo[entranceid][eIntZ] = 0.0;
  27743. EntranceInfo[entranceid][eIntA] = 0.0;
  27744. EntranceInfo[entranceid][eInterior] = 0;
  27745. EntranceInfo[entranceid][eWorld] = EntranceInfo[entranceid][eID] + 4000000;
  27746. EntranceInfo[entranceid][eOutsideInt] = GetPlayerInterior(playerid);
  27747. EntranceInfo[entranceid][eOutsideVW] = GetPlayerVirtualWorld(playerid);
  27748. EntranceInfo[entranceid][eAdminLevel] = 0;
  27749. EntranceInfo[entranceid][eFactionType] = FACTION_NONE;
  27750. EntranceInfo[entranceid][eGang] = -1;
  27751. EntranceInfo[entranceid][eVIP] = 0;
  27752. EntranceInfo[entranceid][eVehicles] = 0;
  27753. EntranceInfo[entranceid][eFreeze] = 0;
  27754. EntranceInfo[entranceid][eLabel] = 1;
  27755. EntranceInfo[entranceid][eType] = 0;
  27756. EntranceInfo[entranceid][eMapIcon] = 0;
  27757. EntranceInfo[entranceid][eText] = Text3D:INVALID_3DTEXT_ID;
  27758. EntranceInfo[entranceid][ePickup] = -1;
  27759. EntranceInfo[entranceid][eMapIconID] = -1;
  27760. EntranceInfo[entranceid][eColor] = -256;
  27761. Iter_Add(Entrance, entranceid);
  27762. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET world = %i WHERE id = %i", EntranceInfo[entranceid][eWorld], EntranceInfo[entranceid][eID]);
  27763. mysql_tquery(connectionID, queryBuffer);
  27764. ReloadEntrance(entranceid);
  27765. SendClientMessageEx(playerid, COLOR_GREEN, "* Entrance %i created successfully.", entranceid);
  27766. }
  27767. forward OnAdminCreateBusiness(playerid, businessid, type, Float:x, Float:y, Float:z, Float:angle);
  27768. public OnAdminCreateBusiness(playerid, businessid, type, Float:x, Float:y, Float:z, Float:angle)
  27769. {
  27770. strcpy(BusinessInfo[businessid][bOwner], "Nobody", MAX_PLAYER_NAME);
  27771. BusinessInfo[businessid][bExists] = 1;
  27772. BusinessInfo[businessid][bID] = cache_insert_id(connectionID);
  27773. BusinessInfo[businessid][bOwnerID] = 0;
  27774. BusinessInfo[businessid][bType] = type;
  27775. BusinessInfo[businessid][bPrice] = bizInteriors[type][intPrice];
  27776. BusinessInfo[businessid][bEntryFee] = 0;
  27777. BusinessInfo[businessid][bLocked] = 0;
  27778. BusinessInfo[businessid][bPosX] = x;
  27779. BusinessInfo[businessid][bPosY] = y;
  27780. BusinessInfo[businessid][bPosZ] = z;
  27781. BusinessInfo[businessid][bPosA] = angle;
  27782. BusinessInfo[businessid][bIntX] = bizInteriors[type][intX];
  27783. BusinessInfo[businessid][bIntY] = bizInteriors[type][intY];
  27784. BusinessInfo[businessid][bIntZ] = bizInteriors[type][intZ];
  27785. BusinessInfo[businessid][bIntA] = bizInteriors[type][intA];
  27786. BusinessInfo[businessid][bInterior] = bizInteriors[type][intID];
  27787. BusinessInfo[businessid][bWorld] = BusinessInfo[businessid][bID] + 3000000;
  27788. BusinessInfo[businessid][bOutsideInt] = GetPlayerInterior(playerid);
  27789. BusinessInfo[businessid][bOutsideVW] = GetPlayerVirtualWorld(playerid);
  27790. BusinessInfo[businessid][bCash] = 0;
  27791. BusinessInfo[businessid][bProducts] = 500;
  27792. BusinessInfo[businessid][bMaterials] = 0;
  27793. BusinessInfo[businessid][bText] = Text3D:INVALID_3DTEXT_ID;
  27794. BusinessInfo[businessid][bPickup] = -1;
  27795. // BusinessInfo[businessid][bMapIcon] = -1;
  27796. Iter_Add(Business, businessid);
  27797. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET world = %i WHERE id = %i", BusinessInfo[businessid][bWorld], BusinessInfo[businessid][bID]);
  27798. mysql_tquery(connectionID, queryBuffer);
  27799. ReloadBusiness(businessid);
  27800. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s %s has created a business id %i, type %i.",GetAdmCmdRank(playerid), GetRPName(playerid), businessid, BusinessInfo[businessid][bType]);
  27801. SendClientMessageEx(playerid, COLOR_GREEN, "* Business %i created successfully.", businessid);
  27802. }
  27803. forward OnAdminCreateGarage(playerid, garageid, type, Float:x, Float:y, Float:z, Float:angle);
  27804. public OnAdminCreateGarage(playerid, garageid, type, Float:x, Float:y, Float:z, Float:angle)
  27805. {
  27806. strcpy(GarageInfo[garageid][gOwner], "Nobody", MAX_PLAYER_NAME);
  27807. GarageInfo[garageid][gExists] = 1;
  27808. GarageInfo[garageid][gID] = cache_insert_id(connectionID);
  27809. GarageInfo[garageid][gOwnerID] = 0;
  27810. GarageInfo[garageid][gType] = type;
  27811. GarageInfo[garageid][gPrice] = garageInteriors[type][intPrice];
  27812. GarageInfo[garageid][gLocked] = 0;
  27813. GarageInfo[garageid][gPosX] = x;
  27814. GarageInfo[garageid][gPosY] = y;
  27815. GarageInfo[garageid][gPosZ] = z;
  27816. GarageInfo[garageid][gPosA] = angle;
  27817. GarageInfo[garageid][gExitX] = x - 3.0 * floatsin(-angle, degrees);
  27818. GarageInfo[garageid][gExitY] = y - 3.0 * floatsin(-angle, degrees);
  27819. GarageInfo[garageid][gExitZ] = z;
  27820. GarageInfo[garageid][gExitA] = angle - 180.0;
  27821. GarageInfo[garageid][gWorld] = GarageInfo[garageid][gID] + 2000000;
  27822. GarageInfo[garageid][gText] = Text3D:INVALID_3DTEXT_ID;
  27823. GarageInfo[garageid][gPickup] = -1;
  27824. Iter_Add(Garage, garageid);
  27825. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE garages SET world = %i WHERE id = %i", GarageInfo[garageid][gWorld], GarageInfo[garageid][gID]);
  27826. mysql_tquery(connectionID, queryBuffer);
  27827. ReloadGarage(garageid);
  27828. SendClientMessageEx(playerid, COLOR_GREEN, "* Garage %i created successfully.", garageid);
  27829. }
  27830. forward OnAdminCreateHouse(playerid, houseid, type, Float:x, Float:y, Float:z, Float:angle);
  27831. public OnAdminCreateHouse(playerid, houseid, type, Float:x, Float:y, Float:z, Float:angle)
  27832. {
  27833. strcpy(HouseInfo[houseid][hOwner], "Nobody", MAX_PLAYER_NAME);
  27834. HouseInfo[houseid][hExists] = 1;
  27835. HouseInfo[houseid][hID] = cache_insert_id(connectionID);
  27836. HouseInfo[houseid][hOwnerID] = 0;
  27837. HouseInfo[houseid][hType] = type;
  27838. HouseInfo[houseid][hPrice] = houseInteriors[type][intPrice];
  27839. HouseInfo[houseid][hRentPrice] = 0;
  27840. HouseInfo[houseid][hLevel] = 1;
  27841. HouseInfo[houseid][hLocked] = 0;
  27842. HouseInfo[houseid][hPosX] = x;
  27843. HouseInfo[houseid][hPosY] = y;
  27844. HouseInfo[houseid][hPosZ] = z;
  27845. HouseInfo[houseid][hPosA] = angle;
  27846. HouseInfo[houseid][hIntX] = houseInteriors[type][intX];
  27847. HouseInfo[houseid][hIntY] = houseInteriors[type][intY];
  27848. HouseInfo[houseid][hIntZ] = houseInteriors[type][intZ];
  27849. HouseInfo[houseid][hIntA] = houseInteriors[type][intA];
  27850. HouseInfo[houseid][hInterior] = houseInteriors[type][intID];
  27851. HouseInfo[houseid][hWorld] = HouseInfo[houseid][hID] + 1000000;
  27852. HouseInfo[houseid][hOutsideInt] = GetPlayerInterior(playerid);
  27853. HouseInfo[houseid][hOutsideVW] = GetPlayerVirtualWorld(playerid);
  27854. HouseInfo[houseid][hCash] = 0;
  27855. HouseInfo[houseid][hMaterials] = 0;
  27856. HouseInfo[houseid][hWeed] = 0;
  27857. HouseInfo[houseid][hCocaine] = 0;
  27858. HouseInfo[houseid][hMeth] = 0;
  27859. HouseInfo[houseid][hPainkillers] = 0;
  27860. HouseInfo[houseid][hLabels] = 0;
  27861. HouseInfo[houseid][hText] = Text3D:INVALID_3DTEXT_ID;
  27862. HouseInfo[houseid][hPickup] = -1;
  27863. HouseInfo[houseid][hDelivery] = 1;
  27864. HouseInfo[houseid][hLights] = 1;
  27865. Iter_Add(House, houseid);
  27866. for(new i = 0; i < 10; i ++)
  27867. {
  27868. HouseInfo[houseid][hWeapons][i] = 0;
  27869. }
  27870. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET world = %i WHERE id = %i", HouseInfo[houseid][hWorld], HouseInfo[houseid][hID]);
  27871. mysql_tquery(connectionID, queryBuffer);
  27872. ReloadHouse(houseid);
  27873. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s %s has created house id %i, type %i.",GetAdmCmdRank(playerid), GetRPName(playerid), houseid, HouseInfo[houseid][hType]);
  27874. SendClientMessageEx(playerid, COLOR_GREEN, "* House %i created successfully.", houseid);
  27875. }
  27876. forward OnAdminDeleteAccount(playerid, username[]);
  27877. public OnAdminDeleteAccount(playerid, username[])
  27878. {
  27879. if(!cache_get_row_count(connectionID))
  27880. {
  27881. SendClientMessage(playerid, COLOR_GREY, "The player specified doesn't exist.");
  27882. }
  27883. else if(cache_get_row_int(0, 0) > PlayerData[playerid][pAdmin])
  27884. {
  27885. SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. You cannot delete them.");
  27886. }
  27887. else
  27888. {
  27889. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM "#TABLE_USERS" WHERE username = '%e'", username);
  27890. mysql_tquery(connectionID, queryBuffer);
  27891. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s %s has deleted %s's account.", GetAdmCmdRank(playerid), GetPlayerNameEx(playerid), username);
  27892. }
  27893. }
  27894. forward OnAdminListKills(playerid, targetid);
  27895. public OnAdminListKills(playerid, targetid)
  27896. {
  27897. new rows = cache_get_row_count(connectionID);
  27898. if(!rows)
  27899. {
  27900. SendClientMessage(playerid, COLOR_GREY, "That player hasn't killed, or has been killed, by anyone since they registered.");
  27901. }
  27902. else
  27903. {
  27904. new date[24], killer[24], target[24], reason[24];
  27905. SendClientMessage(playerid, COLOR_NAVYBLUE, "________ Kills & Deaths ________");
  27906. for(new i = 0; i < rows; i ++)
  27907. {
  27908. cache_get_field_content(i, "date", date);
  27909. cache_get_field_content(i, "killer", killer);
  27910. cache_get_field_content(i, "target", target);
  27911. cache_get_field_content(i, "reason", reason);
  27912. if(cache_get_field_content_int(i, "killer_uid") == PlayerData[targetid][pID])
  27913. {
  27914. SendClientMessageEx(playerid, COLOR_YELLOW, "[%s] %s killed %s (%s)", date, killer, target, reason);
  27915. }
  27916. else if(cache_get_field_content_int(i, "target_uid") == PlayerData[targetid][pID])
  27917. {
  27918. SendClientMessageEx(playerid, COLOR_YELLOW, "[%s] %s was killed by %s (%s)", date, target, killer, reason);
  27919. }
  27920. }
  27921. }
  27922. }
  27923. forward OnAdminListDamages(playerid, targetid);
  27924. public OnAdminListDamages(playerid, targetid)
  27925. {
  27926. new rows = cache_get_row_count(connectionID);
  27927. if(!rows)
  27928. {
  27929. SendClientMessage(playerid, COLOR_GREY, "That player hasn't been damaged by anyone since they connected.");
  27930. }
  27931. else
  27932. {
  27933. SendClientMessage(playerid, COLOR_NAVYBLUE, "___________ Damage Received ___________");
  27934. for(new i = 0; i < rows; i ++)
  27935. {
  27936. SendClientMessageEx(playerid, COLOR_YELLOW, "[%i seconds ago] %s was shot by %s with a %s", gettime() - cache_get_row_int(i, 2), GetRPName(targetid), GetRPName(cache_get_row_int(i, 1)), GetWeaponNameEx(cache_get_row_int(i, 0)));
  27937. //SendClientMessageEx(playerid, COLOR_GREY2, "(Weapon: %s) - (From: %s) - (Time: %i seconds ago)", GetWeaponNameEx(cache_get_row_int(i, 0)), GetRPName(cache_get_row_int(i, 1)), gettime() - cache_get_row_int(i, 2));
  27938. }
  27939. }
  27940. }
  27941. forward OnAdminListShots(playerid, targetid);
  27942. public OnAdminListShots(playerid, targetid)
  27943. {
  27944. new rows = cache_get_row_count(connectionID);
  27945. if(!rows)
  27946. {
  27947. SendClientMessage(playerid, COLOR_GREY, "That player hasn't registered any shots since they connected.");
  27948. }
  27949. else
  27950. {
  27951. new weaponid, hittype, timestamp, hit[48];
  27952. SendClientMessageEx(playerid, COLOR_NAVYBLUE, "___________ %i Last Shots ___________", rows);
  27953. for(new i = 0; i < rows; i ++)
  27954. {
  27955. weaponid = cache_get_field_content_int(i, "weaponid");
  27956. hittype = cache_get_field_content_int(i, "hittype");
  27957. timestamp = cache_get_field_content_int(i, "timestamp");
  27958. switch(hittype)
  27959. {
  27960. case BULLET_HIT_TYPE_PLAYER:
  27961. cache_get_field_content(i, "hitplayer", hit);
  27962. case BULLET_HIT_TYPE_VEHICLE:
  27963. format(hit, sizeof(hit), "Vehicle (ID %i)", cache_get_field_content_int(i, "hitid"));
  27964. default:
  27965. hit = "Missed";
  27966. }
  27967. SendClientMessageEx(playerid, COLOR_YELLOW, "[%i seconds ago] %s shot a %s and hit: %s", gettime() - timestamp, GetRPName(targetid), GetWeaponNameEx(weaponid), hit);
  27968. }
  27969. }
  27970. }
  27971. forward OnAdminBanIP(playerid, ip[], reason[]);
  27972. public OnAdminBanIP(playerid, ip[], reason[])
  27973. {
  27974. if(cache_get_row_count(connectionID))
  27975. {
  27976. SendClientMessage(playerid, COLOR_GREY, "This IP address is already banned.");
  27977. }
  27978. else
  27979. {
  27980. foreach(new i : Player)
  27981. {
  27982. if(!strcmp(GetPlayerIP(i), ip))
  27983. {
  27984. SendClientMessageEx(i, COLOR_YELLOW, "Your IP address has been banned by %s, reason: %s", GetRPName(playerid), reason);
  27985. KickPlayer(i);
  27986. }
  27987. }
  27988. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO bans VALUES(null, 'n/a', '%s', '%s', NOW(), '%s', 0)", ip, GetPlayerNameEx(playerid), reason);
  27989. mysql_tquery(connectionID, queryBuffer);
  27990. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s %s has banned IP '%s', reason: %s", GetAdmCmdRank(playerid), GetRPName(playerid), ip, reason);
  27991. Log_Write("log_punishments", "%s (uid: %i) has banned IP: %s, reason: %s", GetPlayerNameEx(playerid), PlayerData[playerid][pID], ip, reason);
  27992. }
  27993. }
  27994. forward OnAdminCheckBan(playerid, string[]);
  27995. public OnAdminCheckBan(playerid, string[])
  27996. {
  27997. new bannedby[MAX_PLAYER_NAME], username[MAX_PLAYER_NAME], ip[16], date[24], reason[128];
  27998. if(!cache_get_row_count(connectionID))
  27999. {
  28000. SendClientMessage(playerid, COLOR_GREY, "There are no bans that match your criteria.");
  28001. }
  28002. else
  28003. {
  28004. cache_get_field_content(0, "bannedby", bannedby);
  28005. cache_get_field_content(0, "username", username);
  28006. cache_get_field_content(0, "ip", ip);
  28007. cache_get_field_content(0, "date", date);
  28008. cache_get_field_content(0, "reason", reason);
  28009. if(!strcmp(username, "n/a", true)) {
  28010. if(strfind(ip, "*", true) != -1) {
  28011. SendClientMessageEx(playerid, COLOR_LIGHTRED, "[%s] IP address '%s' was rangebanned by %s, reason: %s", date, ip, bannedby, reason);
  28012. } else {
  28013. SendClientMessageEx(playerid, COLOR_LIGHTRED, "[%s] IP address '%s' was banned by %s, reason: %s", date, ip, bannedby, reason);
  28014. }
  28015. }
  28016. else {
  28017. if(strfind(ip, "*", true) != -1) {
  28018. SendClientMessageEx(playerid, COLOR_LIGHTRED, "[%s] %s (IP: %s) was rangebanned by %s, reason: %s", date, username, ip, bannedby, reason);
  28019. } else if(cache_get_field_content_int(0, "permanent")) {
  28020. SendClientMessageEx(playerid, COLOR_LIGHTRED, "[%s] %s (IP: %s) was permanently banned by %s, reason: %s", date, username, ip, bannedby, reason);
  28021. } else {
  28022. SendClientMessageEx(playerid, COLOR_LIGHTRED, "[%s] %s (IP: %s) was banned by %s, reason: %s", date, username, ip, bannedby, reason);
  28023. }
  28024. }
  28025. }
  28026. }
  28027. forward OnAdminUnbanUser(playerid, username[]);
  28028. public OnAdminUnbanUser(playerid, username[])
  28029. {
  28030. if(cache_get_row_count(connectionID))
  28031. {
  28032. if(cache_get_row_int(0, 1) && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  28033. {
  28034. return SendClientMessage(playerid, COLOR_GREY, "This player is permanently banned. Permabans may only be lifted by management.");
  28035. }
  28036. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM bans WHERE id = %i", cache_get_row_int(0, 0));
  28037. mysql_tquery(connectionID, queryBuffer);
  28038. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s %s has unbanned %s.",GetAdmCmdRank(playerid), GetRPName(playerid), username);
  28039. Log_Write("log_punishments", "%s (uid: %i) has unbanned %s.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], username);
  28040. }
  28041. else
  28042. {
  28043. SendClientMessage(playerid, COLOR_GREY, "There is no banned player known by that name.");
  28044. }
  28045. return 1;
  28046. }
  28047. forward OnAdminLockAccount(playerid, username[]);
  28048. public OnAdminLockAccount(playerid, username[])
  28049. {
  28050. if(!cache_get_row_count(connectionID))
  28051. {
  28052. SendClientMessage(playerid, COLOR_GREY, "The player specified doesn't exist.");
  28053. }
  28054. else if(cache_get_row_int(0, 0))
  28055. {
  28056. SendClientMessage(playerid, COLOR_GREY, "This player's account is already locked. /unlockaccount to unlock it.");
  28057. }
  28058. else if(cache_get_row_int(0, 1) > PlayerData[playerid][pAdmin])
  28059. {
  28060. SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be locked.");
  28061. }
  28062. else
  28063. {
  28064. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET locked = 1 WHERE username = '%e'", username);
  28065. mysql_tquery(connectionID, queryBuffer);
  28066. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s %s has locked %s's account.",GetAdmCmdRank(playerid), GetRPName(playerid), username);
  28067. Log_Write("log_admin", "%s (uid: %i) locked %s's account.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], username);
  28068. }
  28069. }
  28070. forward OnAdminUnlockAccount(playerid, username[]);
  28071. public OnAdminUnlockAccount(playerid, username[])
  28072. {
  28073. if(!cache_get_row_count(connectionID))
  28074. {
  28075. SendClientMessage(playerid, COLOR_GREY, "The player specified doesn't exist, or their account is not locked.");
  28076. }
  28077. else
  28078. {
  28079. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET locked = 0 WHERE username = '%e'", username);
  28080. mysql_tquery(connectionID, queryBuffer);
  28081. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s %s has unlocked %s's account.",GetAdmCmdRank(playerid), GetRPName(playerid), username);
  28082. Log_Write("log_admin", "%s (uid: %i) unlocked %s's account.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], username);
  28083. }
  28084. }
  28085. forward OnAdminChangeName(playerid, targetid, name[]);
  28086. public OnAdminChangeName(playerid, targetid, name[])
  28087. {
  28088. if(cache_get_row_count(connectionID))
  28089. {
  28090. SendClientMessage(playerid, COLOR_GREY, "The name specified is taken already.");
  28091. }
  28092. else
  28093. {
  28094. Log_Write("log_admin", "%s (uid: %i) changed %s's (uid: %i) name to %s.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], name);
  28095. Log_Write("log_namechanges", "%s (uid: %i) changed %s's (uid: %i) name to %s.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], name);
  28096. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO log_namehistory VALUES(null, %i, '%s', '%s', '%s', NOW())", PlayerData[targetid][pID], GetPlayerNameEx(targetid), name, GetPlayerNameEx(playerid));
  28097. mysql_tquery(connectionID, queryBuffer);
  28098. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s %s has changed %s's name to %s.", GetAdmCmdRank(playerid),GetRPName(playerid), GetRPName(targetid), name);
  28099. SendClientMessageEx(targetid, COLOR_WHITE, "%s changed your name from %s to %s.", GetRPName(playerid), GetRPName(targetid), name);
  28100. Namechange(targetid, GetPlayerNameEx(targetid), name);
  28101. }
  28102. }
  28103. forward OnAdminOfflineBan(playerid, username[], reason[]);
  28104. public OnAdminOfflineBan(playerid, username[], reason[])
  28105. {
  28106. if(cache_get_row_count(connectionID))
  28107. {
  28108. if(cache_get_row_int(0, 0) > PlayerData[playerid][pAdmin])
  28109. {
  28110. return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be banned.");
  28111. }
  28112. new
  28113. ip[16];
  28114. cache_get_row(0, 1, ip);
  28115. AddBan(username, ip, GetPlayerNameEx(playerid), reason);
  28116. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO log_bans VALUES(null, %i, NOW(), '%s (IP: %s) was banned by %s, reason: %e')", cache_get_field_content_int(0, "uid"), username, ip, GetPlayerNameEx(playerid), reason);
  28117. mysql_tquery(connectionID, queryBuffer);
  28118. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s was offline banned by %s %s, reason: %s", username, GetAdmCmdRank(playerid), GetPlayerNameEx(playerid), reason);
  28119. Log_Write("log_punishments", "%s (uid: %i) offline banned %s, reason: %s", GetPlayerNameEx(playerid), PlayerData[playerid][pID], username, reason);
  28120. }
  28121. else
  28122. {
  28123. SendClientMessage(playerid, COLOR_GREY, "That player is not registered.");
  28124. }
  28125. return 1;
  28126. }
  28127. forward OnAdminOfflinePrison(playerid, username[], minutes, reason[]);
  28128. public OnAdminOfflinePrison(playerid, username[], minutes, reason[])
  28129. {
  28130. if(cache_get_row_count(connectionID))
  28131. {
  28132. if(cache_get_row_int(0, 0) > PlayerData[playerid][pAdmin])
  28133. {
  28134. return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be prisoned.");
  28135. }
  28136. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET jailtype = 2, jailtime = %i, prisonedby = '%e', prisonreason = '%e' WHERE username = '%e'", minutes * 60, GetPlayerNameEx(playerid), reason, username);
  28137. mysql_tquery(connectionID, queryBuffer);
  28138. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s was offline prisoned for %i minutes by %s %s, reason: %s", username, minutes, GetAdmCmdRank(playerid), GetRPName(playerid), reason);
  28139. Log_Write("log_punishments", "%s (uid: %i) offline prisoned %s for %i minutes, reason: %s", GetPlayerNameEx(playerid), PlayerData[playerid][pID], username, minutes, reason);
  28140. }
  28141. else
  28142. {
  28143. SendClientMessage(playerid, COLOR_GREY, "That player is not registered.");
  28144. }
  28145. return 1;
  28146. }
  28147. forward OnAdminOfflineFine(playerid, username[], amount, reason[]);
  28148. public OnAdminOfflineFine(playerid, username[], amount, reason[])
  28149. {
  28150. if(cache_get_row_count(connectionID))
  28151. {
  28152. if(cache_get_row_int(0, 0) > PlayerData[playerid][pAdmin])
  28153. {
  28154. return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be fined.");
  28155. }
  28156. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET cash = cash - %i WHERE username = '%e'", amount, username);
  28157. mysql_tquery(connectionID, queryBuffer);
  28158. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s was offline fined for %s by %s %s, reason: %s", username, FormatNumber(amount), GetAdmCmdRank(playerid),GetRPName(playerid), reason);
  28159. Log_Write("log_admin", "%s (uid: %i) offline fined %s for $%i, reason: %s", GetPlayerNameEx(playerid), PlayerData[playerid][pID], username, amount, reason);
  28160. }
  28161. else
  28162. {
  28163. SendClientMessage(playerid, COLOR_GREY, "That player is not registered.");
  28164. }
  28165. return 1;
  28166. }
  28167. public OnQueryError(errorid, error[], callback[], query[], connectionHandle)
  28168. {
  28169. new
  28170. File:file = fopen("mysql_error.txt", io_append);
  28171. if(file)
  28172. {
  28173. new
  28174. string[2048];
  28175. format(string, sizeof(string), "[%s]\r\nError ID: %i\r\nCallback: %s\r\nQuery: %s\r\nError: %s\r\n\r\n", GetDate(), errorid, callback, query, error);
  28176. fwrite(file, string);
  28177. printf(string);
  28178. fclose(file);
  28179. }
  28180. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: A MySQL error occurred (error %i). Details written to mysql_error.txt.", errorid);
  28181. return 1;
  28182. }
  28183. forward OnQueryFinished(threadid, extraid);
  28184. public OnQueryFinished(threadid, extraid)
  28185. {
  28186. new rows = cache_get_row_count(connectionID);
  28187. switch(threadid)
  28188. {
  28189. case THREAD_LOOKUP_BANS:
  28190. {
  28191. if(rows)
  28192. {
  28193. new bannedby[24], date[24], reason[128];
  28194. cache_get_field_content(0, "bannedby", bannedby);
  28195. cache_get_field_content(0, "date", date);
  28196. cache_get_field_content(0, "reason", reason);
  28197. GameTextForPlayer(extraid, "~r~You are banned!", 999999, 3);
  28198. TextDrawHideForPlayer(extraid, welcomenew);
  28199. if(cache_get_field_content_int(0, "permanent"))
  28200. SendClientMessageEx(extraid, COLOR_YELLOW, "You are permanently banned from this server.");
  28201. else
  28202. SendClientMessageEx(extraid, COLOR_YELLOW, "You are banned from this server. You can appeal your ban at os-rp.net.");
  28203. SendClientMessageEx(extraid, COLOR_LIGHTRED, "Admin: %s", bannedby);
  28204. SendClientMessageEx(extraid, COLOR_LIGHTRED, "Date: %s", date);
  28205. SendClientMessageEx(extraid, COLOR_LIGHTRED, "Reason: %s", reason);
  28206. KickPlayer(extraid);
  28207. }
  28208. else
  28209. {
  28210. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid FROM "#TABLE_USERS" WHERE username = '%s'", GetPlayerNameEx(extraid));
  28211. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LOOKUP_ACCOUNT, extraid);
  28212. }
  28213. }
  28214. case THREAD_LOOKUP_ACCOUNT:
  28215. {
  28216. if(rows)
  28217. {
  28218. ShowDialogToPlayer(extraid, DIALOG_LOGIN);
  28219. }
  28220. else
  28221. {
  28222. if(strfind(GetPlayerNameEx(extraid), "_") == -1)
  28223. {
  28224. Dialog_Show(extraid, DIALOG_FREENAMECHANGE, DIALOG_STYLE_INPUT, "Non-RP Name", "An administrator has came to the conclusion that your name is non-RP.\nTherefore you have been given this free namechange in order to correct it.\n\nEnter a name in the Firstname_Lastname format in the box below:", "Submit", "");
  28225. }
  28226. else
  28227. {
  28228. ShowDialogToPlayer(extraid, DIALOG_REGISTER);
  28229. }
  28230. }
  28231. }
  28232. case THREAD_ACCOUNT_REGISTER:
  28233. {
  28234. new
  28235. id = cache_insert_id(connectionID);
  28236. //if(id)
  28237. //{
  28238. /*mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM "#TABLE_USERS" WHERE uid = %i", id);
  28239. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_PROCESS_LOGIN, extraid);*/
  28240. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM "#TABLE_USERS" WHERE uid = %i", id);
  28241. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_PROCESS_LOGIN, extraid);
  28242. //ShowDialogToPlayer(extraid, DIALOG_RULES);
  28243. //}
  28244. }
  28245. case THREAD_PROCESS_LOGIN:
  28246. {
  28247. if(!rows)
  28248. {
  28249. PlayerData[extraid][pLoginTries]++;
  28250. if(PlayerData[extraid][pLoginTries] < 3)
  28251. {
  28252. ShowDialogToPlayer(extraid, DIALOG_LOGIN);
  28253. SendClientMessageEx(extraid, COLOR_ORANGE, "[WARNING]{ffffff} Submited password is incorrect, you have %i attempts left.", 3 - PlayerData[extraid][pLoginTries]);
  28254. }
  28255. else
  28256. {
  28257. Dialog_Show(extraid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "{00aa00}OS:RP{FFFFFF} | Unable to Login", "{FFFFFF}It seems like you've forgotten your password.\n\nYou can reset you can reset your password using your pin code at the User Control Panel.", "Cancel", "");
  28258. KickPlayer(extraid);
  28259. }
  28260. }
  28261. else if(cache_get_field_content_int(0, "locked"))
  28262. {
  28263. SendClientMessage(extraid, COLOR_LIGHTRED, "* This account is currently locked. Post an administrative request to have it lifted.");
  28264. Dialog_Show(extraid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "{00aa00}OS:RP{FFFFFF} | Unable to Login", "{FFFFFF}This account is currently locked.\n\nYou can post an administrative request on {00aa00}os-rp.net{FFFFFF} to have it lifted.", "Cancel", "");
  28265. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s tried to login with a locked account.", GetRPName(extraid));
  28266. KickPlayer(extraid);
  28267. }
  28268. else
  28269. {
  28270. if(PlayerData[extraid][pAdminDuty])
  28271. {
  28272. ResetPlayerWeaponsEx(extraid);
  28273. }
  28274. new date[64], string[128];
  28275. cache_get_field_content(0, "login_date", date);
  28276. cache_get_field_content(0, "accent", PlayerData[extraid][pAccent], connectionID, 16);
  28277. cache_get_field_content(0, "adminname", PlayerData[extraid][pAdminName], connectionID, MAX_PLAYER_NAME);
  28278. cache_get_field_content(0, "contractby", PlayerData[extraid][pContractBy], connectionID, MAX_PLAYER_NAME);
  28279. cache_get_field_content(0, "prisonedby", PlayerData[extraid][pPrisonedBy], connectionID, MAX_PLAYER_NAME);
  28280. cache_get_field_content(0, "prisonreason", PlayerData[extraid][pPrisonReason], connectionID, 128);
  28281. cache_get_field_content(0, "passportname", PlayerData[extraid][pPassportName], connectionID, MAX_PLAYER_NAME);
  28282. cache_get_field_content(0, "customtitle", PlayerData[extraid][pCustomTitle], connectionID, 64);
  28283. PlayerData[extraid][pCustomTColor] = cache_get_field_content_int(0, "customcolor");
  28284. PlayerData[extraid][pID] = cache_get_field_content_int(0, "uid");
  28285. PlayerData[extraid][pSetup] = cache_get_field_content_int(0, "setup");
  28286. PlayerData[extraid][pGender] = cache_get_field_content_int(0, "gender");
  28287. PlayerData[extraid][pAge] = cache_get_field_content_int(0, "age");
  28288. PlayerData[extraid][pSkin] = cache_get_field_content_int(0, "skin");
  28289. PlayerData[extraid][pCameraX] = cache_get_field_content_float(0, "camera_x");
  28290. PlayerData[extraid][pCameraY] = cache_get_field_content_float(0, "camera_y");
  28291. PlayerData[extraid][pCameraZ] = cache_get_field_content_float(0, "camera_z");
  28292. PlayerData[extraid][pPosX] = cache_get_field_content_float(0, "pos_x");
  28293. PlayerData[extraid][pPosY] = cache_get_field_content_float(0, "pos_y");
  28294. PlayerData[extraid][pPosZ] = cache_get_field_content_float(0, "pos_z");
  28295. PlayerData[extraid][pPosA] = cache_get_field_content_float(0, "pos_a");
  28296. PlayerData[extraid][pInterior] = cache_get_field_content_int(0, "interior");
  28297. PlayerData[extraid][pWorld] = cache_get_field_content_int(0, "world");
  28298. PlayerData[extraid][pCash] = cache_get_field_content_int(0, "cash");
  28299. PlayerData[extraid][pBank] = cache_get_field_content_int(0, "bank");
  28300. PlayerData[extraid][pPaycheck] = cache_get_field_content_int(0, "paycheck");
  28301. PlayerData[extraid][pLevel] = cache_get_field_content_int(0, "level");
  28302. PlayerData[extraid][pChatstyle] = cache_get_field_content_int(0, "chatstyle");
  28303. PlayerData[extraid][pTruckingXP] = cache_get_field_content_int(0, "truckingxp");
  28304. PlayerData[extraid][pTruckingLevel] = cache_get_field_content_int(0, "truckinglevel");
  28305. PlayerData[extraid][pVehicleCMD] = cache_get_field_content_int(0, "vehiclecmd");//pVehicleCMD
  28306. PlayerData[extraid][pCrowbar] = cache_get_field_content_int(0, "crowbar");
  28307. PlayerData[extraid][pAdminStrike] = cache_get_field_content_int(0, "adminstrike");
  28308. PlayerData[extraid][pDJ] = cache_get_field_content_int(0, "dj");
  28309. PlayerData[extraid][pHouseAlarm] = cache_get_field_content_int(0, "housealarm");
  28310. PlayerData[extraid][pvLock] = cache_get_field_content_int(0, "vehlock");
  28311. PlayerData[extraid][pGraphic] = cache_get_field_content_int(0, "graphic");
  28312. PlayerData[extraid][pGunLicense] = cache_get_field_content_int(0, "gunlicense");
  28313. PlayerData[extraid][pEXP] = cache_get_field_content_int(0, "exp");
  28314. PlayerData[extraid][pMinutes] = cache_get_field_content_int(0, "minutes");
  28315. PlayerData[extraid][pHours] = cache_get_field_content_int(0, "hours");
  28316. PlayerData[extraid][pHelmet] = cache_get_field_content_int(0, "helmet");
  28317. PlayerData[extraid][pAdmin] = cache_get_field_content_int(0, "adminlevel");
  28318. PlayerData[extraid][pHelper] = cache_get_field_content_int(0, "helperlevel");
  28319. PlayerData[extraid][pHealth] = cache_get_field_content_float(0, "health");
  28320. PlayerData[extraid][pArmor] = cache_get_field_content_float(0, "armor");
  28321. PlayerData[extraid][pUpgradePoints] = cache_get_field_content_int(0, "upgradepoints");
  28322. PlayerData[extraid][pWarnings] = cache_get_field_content_int(0, "warnings");
  28323. PlayerData[extraid][pInjured] = cache_get_field_content_int(0, "injured");
  28324. PlayerData[extraid][pHospital] = cache_get_field_content_int(0, "hospital");
  28325. PlayerData[extraid][pSpawnHealth] = cache_get_field_content_float(0, "spawnhealth");
  28326. PlayerData[extraid][pSpawnArmor] = cache_get_field_content_float(0, "spawnarmor");
  28327. PlayerData[extraid][pJailType] = cache_get_field_content_int(0, "jailtype");
  28328. PlayerData[extraid][pJailTime] = cache_get_field_content_int(0, "jailtime");
  28329. PlayerData[extraid][pNewbieMuted] = cache_get_field_content_int(0, "newbiemuted");
  28330. PlayerData[extraid][pHelpMuted] = cache_get_field_content_int(0, "helpmuted");
  28331. PlayerData[extraid][pAdMuted] = cache_get_field_content_int(0, "admuted");
  28332. PlayerData[extraid][pLiveMuted] = cache_get_field_content_int(0, "livemuted");
  28333. PlayerData[extraid][pToggleVehCam] = cache_get_field_content_int(0, "togglevehicle");
  28334. PlayerData[extraid][pGlobalMuted] = cache_get_field_content_int(0, "globalmuted");
  28335. PlayerData[extraid][pReportMuted] = cache_get_field_content_int(0, "reportmuted");
  28336. PlayerData[extraid][pReportWarns] = cache_get_field_content_int(0, "reportwarns");
  28337. PlayerData[extraid][pFightStyle] = cache_get_field_content_int(0, "fightstyle");
  28338. PlayerData[extraid][pCookies] = cache_get_field_content_int(0, "cookies");
  28339. PlayerData[extraid][pPhone] = cache_get_field_content_int(0, "phone");
  28340. PlayerData[extraid][pJob] = cache_get_field_content_int(0, "job");
  28341. PlayerData[extraid][pSecondJob] = cache_get_field_content_int(0, "secondjob");
  28342. PlayerData[extraid][pCrimes] = cache_get_field_content_int(0, "crimes");
  28343. PlayerData[extraid][pArrested] = cache_get_field_content_int(0, "arrested");
  28344. PlayerData[extraid][pWantedLevel] = cache_get_field_content_int(0, "wantedlevel");
  28345. PlayerData[extraid][pMaterials] = cache_get_field_content_int(0, "materials");
  28346. PlayerData[extraid][pWeed] = cache_get_field_content_int(0, "weed");
  28347. PlayerData[extraid][pCocaine] = cache_get_field_content_int(0, "cocaine");
  28348. PlayerData[extraid][pMeth] = cache_get_field_content_int(0, "meth");
  28349. PlayerData[extraid][pPainkillers] = cache_get_field_content_int(0, "painkillers");
  28350. PlayerData[extraid][pSeeds] = cache_get_field_content_int(0, "seeds");
  28351. PlayerData[extraid][pEphedrine] = cache_get_field_content_int(0, "ephedrine");
  28352. PlayerData[extraid][pMuriaticAcid] = cache_get_field_content_int(0, "muriaticacid");
  28353. PlayerData[extraid][pBakingSoda] = cache_get_field_content_int(0, "bakingsoda");
  28354. PlayerData[extraid][pCigars] = cache_get_field_content_int(0, "cigars");
  28355. PlayerData[extraid][pWalkieTalkie] = cache_get_field_content_int(0, "walkietalkie");
  28356. PlayerData[extraid][pChannel] = cache_get_field_content_int(0, "channel");
  28357. PlayerData[extraid][pRentingHouse] = cache_get_field_content_int(0, "rentinghouse");
  28358. PlayerData[extraid][pSpraycans] = cache_get_field_content_int(0, "spraycans");
  28359. PlayerData[extraid][pBoombox] = cache_get_field_content_int(0, "boombox");
  28360. PlayerData[extraid][pMP3Player] = cache_get_field_content_int(0, "mp3player");
  28361. PlayerData[extraid][pPhonebook] = cache_get_field_content_int(0, "phonebook");
  28362. PlayerData[extraid][pFishingRod] = cache_get_field_content_int(0, "fishingrod");
  28363. PlayerData[extraid][pFishingBait] = cache_get_field_content_int(0, "fishingbait");
  28364. PlayerData[extraid][pFishWeight] = cache_get_field_content_int(0, "fishweight");
  28365. PlayerData[extraid][pComponents] = cache_get_field_content_int(0, "components");
  28366. PlayerData[extraid][pCourierSkill] = cache_get_field_content_int(0, "courierskill");
  28367. PlayerData[extraid][pFishingSkill] = cache_get_field_content_int(0, "fishingskill");
  28368. PlayerData[extraid][pGuardSkill] = cache_get_field_content_int(0, "guardskill");
  28369. PlayerData[extraid][pWeaponSkill] = cache_get_field_content_int(0, "weaponskill");
  28370. PlayerData[extraid][pMechanicSkill] = cache_get_field_content_int(0, "mechanicskill");
  28371. PlayerData[extraid][pLawyerSkill] = cache_get_field_content_int(0, "lawyerskill");
  28372. PlayerData[extraid][pSmugglerSkill] = cache_get_field_content_int(0, "smugglerskill");
  28373. PlayerData[extraid][pDetectiveSkill] = cache_get_field_content_int(0, "detectiveskill");
  28374. PlayerData[extraid][pThiefSkill] = cache_get_field_content_int(0, "thiefskill");
  28375. PlayerData[extraid][pToggleTextdraws] = cache_get_field_content_int(0, "toggletextdraws");
  28376. PlayerData[extraid][pToggleOOC] = cache_get_field_content_int(0, "toggleooc");
  28377. PlayerData[extraid][pTogglePhone] = cache_get_field_content_int(0, "togglephone");
  28378. PlayerData[extraid][pToggleAdmin] = cache_get_field_content_int(0, "toggleadmin");
  28379. PlayerData[extraid][pToggleHelper] = cache_get_field_content_int(0, "togglehelper");
  28380. PlayerData[extraid][pTogglePoints] = cache_get_field_content_int(0, "togglepoints");
  28381. PlayerData[extraid][pToggleTurfs] = cache_get_field_content_int(0, "toggleturfs");
  28382. PlayerData[extraid][pToggleNewbie] = cache_get_field_content_int(0, "togglenewbie");
  28383. PlayerData[extraid][pToggleWT] = cache_get_field_content_int(0, "togglewt");
  28384. PlayerData[extraid][pToggleRadio] = cache_get_field_content_int(0, "toggleradio");
  28385. PlayerData[extraid][pToggleVIP] = cache_get_field_content_int(0, "togglevip");
  28386. PlayerData[extraid][pToggleMusic] = cache_get_field_content_int(0, "togglemusic");
  28387. PlayerData[extraid][pToggleFaction] = cache_get_field_content_int(0, "togglefaction");
  28388. PlayerData[extraid][pToggleNews] = cache_get_field_content_int(0, "togglenews");
  28389. PlayerData[extraid][pToggleGlobal] = cache_get_field_content_int(0, "toggleglobal");
  28390. PlayerData[extraid][pToggleCam] = cache_get_field_content_int(0, "togglecam");
  28391. PlayerData[extraid][pToggleHUD] = cache_get_field_content_int(0, "togglehud");
  28392. PlayerData[extraid][pToggleReports] = cache_get_field_content_int(0, "togglereports");
  28393. PlayerData[extraid][pToggleWhisper] = cache_get_field_content_int(0, "togglewhisper");
  28394. PlayerData[extraid][pToggleBug] = cache_get_field_content_int(0, "togglebug");
  28395. PlayerData[extraid][pCarLicense] = cache_get_field_content_int(0, "carlicense");
  28396. PlayerData[extraid][pDonator] = cache_get_field_content_int(0, "vippackage");
  28397. PlayerData[extraid][pVIPTime] = cache_get_field_content_int(0, "viptime");
  28398. PlayerData[extraid][pVIPCooldown] = cache_get_field_content_int(0, "vipcooldown");
  28399. PlayerData[extraid][pSpawnSelect] = cache_get_field_content_int(0, "spawntype");
  28400. PlayerData[extraid][pSpawnHouse] = cache_get_field_content_int(0, "spawnhouse");
  28401. for(new i, wepid[64]; i < 13; i++)
  28402. {
  28403. format(wepid, sizeof(wepid), "weapon_%d", i);
  28404. PlayerData[extraid][pWeapons][i] = cache_get_field_content_int(0, wepid);
  28405. }
  28406. for(new i, ammoid[64]; i < 13; i++)
  28407. {
  28408. format(ammoid, sizeof(ammoid), "ammo_%d", i);
  28409. PlayerData[extraid][pAmmo][i] = cache_get_field_content_int(0, ammoid);
  28410. }
  28411. PlayerData[extraid][pFaction] = cache_get_field_content_int(0, "faction");
  28412. PlayerData[extraid][pFactionRank] = cache_get_field_content_int(0, "factionrank");
  28413. PlayerData[extraid][pFactionLeader] = cache_get_field_content_int(0, "factionleader");
  28414. PlayerData[extraid][pGang] = cache_get_field_content_int(0, "gang");
  28415. PlayerData[extraid][pGangRank] = cache_get_field_content_int(0, "gangrank");
  28416. PlayerData[extraid][pDivision] = cache_get_field_content_int(0, "division");
  28417. PlayerData[extraid][pCrew] = cache_get_field_content_int(0, "crew");
  28418. PlayerData[extraid][pContracted] = cache_get_field_content_int(0, "contracted");
  28419. PlayerData[extraid][pBombs] = cache_get_field_content_int(0, "bombs");
  28420. PlayerData[extraid][pCompletedHits] = cache_get_field_content_int(0, "completedhits");
  28421. PlayerData[extraid][pFailedHits] = cache_get_field_content_int(0, "failedhits");
  28422. PlayerData[extraid][pReports] = cache_get_field_content_int(0, "reports");
  28423. PlayerData[extraid][pNewbies] = cache_get_field_content_int(0, "newbies");
  28424. PlayerData[extraid][pHelpRequests] = cache_get_field_content_int(0, "helprequests");
  28425. PlayerData[extraid][pSpeedometer] = cache_get_field_content_int(0, "speedometer");
  28426. PlayerData[extraid][pWebDev] = cache_get_field_content_int(0, "webdev");
  28427. PlayerData[extraid][pFactionMod] = cache_get_field_content_int(0, "factionmod");
  28428. PlayerData[extraid][pGangMod] = cache_get_field_content_int(0, "gangmod");
  28429. PlayerData[extraid][pBanAppealer] = cache_get_field_content_int(0, "banappealer");
  28430. PlayerData[extraid][pFormerAdmin] = cache_get_field_content_int(0, "FormerAdmin");
  28431. PlayerData[extraid][pDeveloper] = cache_get_field_content_int(0, "scripter");
  28432. PlayerData[extraid][pHelperManager] = cache_get_field_content_int(0, "helpermanager");
  28433. PlayerData[extraid][pDynamicAdmin] = cache_get_field_content_int(0, "dynamicadmin");
  28434. PlayerData[extraid][pAdminPersonnel] = cache_get_field_content_int(0, "adminpersonnel");
  28435. PlayerData[extraid][pHumanResources] = cache_get_field_content_int(0, "humanresources");
  28436. PlayerData[extraid][pComplaintMod] = cache_get_field_content_int(0, "complaintmod");
  28437. PlayerData[extraid][pWeedPlanted] = cache_get_field_content_int(0, "weedplanted");
  28438. PlayerData[extraid][pWeedTime] = cache_get_field_content_int(0, "weedtime");
  28439. PlayerData[extraid][pWeedGrams] = cache_get_field_content_int(0, "weedgrams");
  28440. PlayerData[extraid][pWeedX] = cache_get_field_content_float(0, "weed_x");
  28441. PlayerData[extraid][pWeedY] = cache_get_field_content_float(0, "weed_y");
  28442. PlayerData[extraid][pWeedZ] = cache_get_field_content_float(0, "weed_z");
  28443. PlayerData[extraid][pWeedA] = cache_get_field_content_float(0, "weed_a");
  28444. PlayerData[extraid][pInventoryUpgrade] = cache_get_field_content_int(0, "inventoryupgrade");
  28445. PlayerData[extraid][pAddictUpgrade] = cache_get_field_content_int(0, "addictupgrade");
  28446. PlayerData[extraid][pTraderUpgrade] = cache_get_field_content_int(0, "traderupgrade");
  28447. PlayerData[extraid][pAssetUpgrade] = cache_get_field_content_int(0, "assetupgrade");
  28448. PlayerData[extraid][pLaborUpgrade] = cache_get_field_content_int(0, "laborupgrade");
  28449. PlayerData[extraid][pDMWarnings] = cache_get_field_content_int(0, "dmwarnings");
  28450. PlayerData[extraid][pWeaponRestricted] = cache_get_field_content_int(0, "weaponrestricted");
  28451. PlayerData[extraid][pReferralUID] = cache_get_field_content_int(0, "referral_uid");
  28452. PlayerData[extraid][pWatch] = cache_get_field_content_int(0, "watch");
  28453. PlayerData[extraid][pGPS] = cache_get_field_content_int(0, "gps");
  28454. PlayerData[extraid][pClothes] = cache_get_field_content_int(0, "clothes");
  28455. PlayerData[extraid][pShowLands] = cache_get_field_content_int(0, "showlands");
  28456. PlayerData[extraid][pShowTurfs] = cache_get_field_content_int(0, "showturfs");
  28457. PlayerData[extraid][pWatchOn] = cache_get_field_content_int(0, "watchon");
  28458. PlayerData[extraid][pGPSOn] = cache_get_field_content_int(0, "gpson");
  28459. PlayerData[extraid][pDoubleXP] = cache_get_field_content_int(0, "doublexp");
  28460. PlayerData[extraid][pCourierCooldown] = cache_get_field_content_int(0, "couriercooldown");
  28461. PlayerData[extraid][pPizzaCooldown] = cache_get_field_content_int(0, "pizzacooldown");
  28462. PlayerData[extraid][pDetectiveCooldown] = cache_get_field_content_int(0, "detectivecooldown");
  28463. PlayerData[extraid][pThiefCooldown] = cache_get_field_content_int(0, "thiefcooldown");
  28464. PlayerData[extraid][pCocaineCooldown] = cache_get_field_content_int(0, "crackcooldown");
  28465. PlayerData[extraid][pGasCan] = cache_get_field_content_int(0, "gascan");
  28466. PlayerData[extraid][pDuty] = cache_get_field_content_int(0, "duty");
  28467. PlayerData[extraid][pBandana] = cache_get_field_content_int(0, "bandana");
  28468. PlayerData[extraid][pPassport] = cache_get_field_content_int(0, "passport");
  28469. PlayerData[extraid][pPassportLevel] = cache_get_field_content_int(0, "passportlevel");
  28470. PlayerData[extraid][pPassportSkin] = cache_get_field_content_int(0, "passportskin");
  28471. PlayerData[extraid][pPassportPhone] = cache_get_field_content_int(0, "passportphone");
  28472. PlayerData[extraid][pNewbieMuteTime] = cache_get_field_content_int(0, "newbiemutetime");
  28473. PlayerData[extraid][pReportMuteTime] = cache_get_field_content_int(0, "reportmutetime");
  28474. PlayerData[extraid][pGlobalMuteTime] = cache_get_field_content_int(0, "globalmutetime");
  28475. PlayerData[extraid][pAdminHide] = cache_get_field_content_int(0, "adminhide");
  28476. PlayerData[extraid][pInsurance] = cache_get_field_content_int(0, "insurance");
  28477. PlayerData[extraid][pRope] = cache_get_field_content_int(0, "rope");
  28478. PlayerData[extraid][pTotalPatients] = cache_get_field_content_int(0, "totalpatients");
  28479. PlayerData[extraid][pTotalFires] = cache_get_field_content_int(0, "totalfires");
  28480. PlayerData[extraid][pPasswordChanged] = cache_get_field_content_int(0, "passwordchanged");
  28481. PlayerData[extraid][pFirstAid] = cache_get_field_content_int(0, "firstaid");
  28482. PlayerData[extraid][pPoliceScanner] = cache_get_field_content_int(0, "policescanner");
  28483. PlayerData[extraid][pBodykits] = cache_get_field_content_int(0, "bodykits");
  28484. PlayerData[extraid][pRimkits] = cache_get_field_content_int(0, "rimkits");
  28485. PlayerData[extraid][pScannerOn] = cache_get_field_content_int(0, "scanneron");
  28486. PlayerData[extraid][pBlindfold] = cache_get_field_content_int(0, "blindfold");
  28487. new tempkey = cache_get_field_content_int(0, "landkeys");
  28488. for(new i = 0; i < MAX_LANDS; i++)
  28489. {
  28490. if(LandInfo[i][lExists])
  28491. {
  28492. if(LandInfo[i][lID] == tempkey)
  28493. {
  28494. PlayerData[extraid][pLandPerms] = i;
  28495. break;
  28496. }
  28497. }
  28498. }
  28499. PlayerData[extraid][pBugged] = cache_get_field_content_int(0, "bugged");
  28500. PlayerData[extraid][pRareTime] = cache_get_field_content_int(0, "rarecooldown");
  28501. PlayerData[extraid][pDiamonds] = cache_get_field_content_int(0, "diamonds");
  28502. PlayerData[extraid][pSkates] = cache_get_field_content_int(0, "rollerskates");
  28503. PlayerData[extraid][pMarriedTo] = cache_get_field_content_int(0, "marriedto");
  28504. if(PlayerData[extraid][pMarriedTo] != -1)
  28505. {
  28506. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT username FROM "#TABLE_USERS" WHERE uid = %i", PlayerData[extraid][pMarriedTo]);
  28507. mysql_tquery(connectionID, queryBuffer, "OnUpdatePartner", "i", extraid);
  28508. }
  28509. else
  28510. {
  28511. strcpy(PlayerData[extraid][pMarriedName], "Nobody", MAX_PLAYER_NAME);
  28512. }
  28513. PlayerData[extraid][pLogged] = 1;
  28514. PlayerData[extraid][pACTime] = gettime() + 5;
  28515. if(!PlayerData[extraid][pAdminDuty])
  28516. {
  28517. ClearChat(extraid);
  28518. }
  28519. if(!PlayerData[extraid][pToggleTextdraws])
  28520. {
  28521. RefreshPlayerTextdraws(extraid);
  28522. }
  28523. if(cache_get_field_content_int(extraid, "refercount") > 0)
  28524. {
  28525. new
  28526. count = cache_get_field_content_int(0, "refercount");
  28527. SendClientMessageEx(extraid, COLOR_GREEN, "%i players who you've referred reached level 3. Therefore you received %i cookies!", count, count * 10);
  28528. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET refercount = 0 WHERE uid = %i", PlayerData[extraid][pID]);
  28529. mysql_tquery(connectionID, queryBuffer);
  28530. }
  28531. if(!PlayerData[extraid][pSetup])
  28532. {
  28533. if(!PlayerData[extraid][pAdminDuty] && !PlayerData[extraid][pToggleCam])
  28534. {
  28535. PlayerData[extraid][pLoginCamera] = 1;
  28536. }
  28537. else
  28538. {
  28539. PlayerData[extraid][pLoginCamera] = 0;
  28540. }
  28541. if(PlayerData[extraid][pWeedPlanted] && PlayerData[extraid][pWeedObject] == INVALID_OBJECT_ID)
  28542. {
  28543. PlayerData[extraid][pWeedObject] = CreateDynamicObject(3409, PlayerData[extraid][pWeedX], PlayerData[extraid][pWeedY], PlayerData[extraid][pWeedZ] - 1.8, 0.0, 0.0, PlayerData[extraid][pWeedA]);
  28544. }
  28545. if(PlayerData[extraid][pShowTurfs])
  28546. {
  28547. ShowTurfsOnMap(extraid, true);
  28548. }
  28549. if(PlayerData[extraid][pShowLands])
  28550. {
  28551. ShowLandsOnMap(extraid, true);
  28552. }
  28553. if(!PlayerData[extraid][pAdminDuty])
  28554. {
  28555. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET lastlogin = NOW(), ip = '%s' WHERE uid = %i", GetPlayerIP(extraid), PlayerData[extraid][pID]);
  28556. mysql_tquery(connectionID, queryBuffer);
  28557. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT id FROM flags WHERE uid = %i", PlayerData[extraid][pID]);
  28558. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_COUNT_FLAGS, extraid);
  28559. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM clothing WHERE uid = %i", PlayerData[extraid][pID]);
  28560. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LOAD_CLOTHING, extraid);
  28561. if(!PlayerData[extraid][pTogglePhone])
  28562. {
  28563. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT COUNT(*) FROM texts WHERE recipient_number = %i", PlayerData[extraid][pPhone]);
  28564. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_COUNT_TEXTS, extraid);
  28565. }
  28566. }
  28567. foreach(new i: Vehicle)
  28568. {
  28569. if(IsVehicleOwner(extraid, i) && VehicleInfo[i][vTimer] >= 0)
  28570. {
  28571. KillTimer(VehicleInfo[i][vTimer]);
  28572. VehicleInfo[i][vTimer] = -1;
  28573. }
  28574. }
  28575. if(PlayerData[extraid][pAdminDuty])
  28576. {
  28577. PlayerData[extraid][pAdminDuty] = 0;
  28578. SetPlayerName(extraid, PlayerData[extraid][pUsername]);
  28579. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s %s is no longer on admin duty.", GetAdmCmdRank(extraid),GetRPName(extraid));
  28580. SendClientMessage(extraid, COLOR_WHITE, "You are no longer on admin duty. Your account's statistics have been preserved.");
  28581. }
  28582. else
  28583. {
  28584. SendClientMessageEx(extraid, COLOR_WHITE, "SERVER: Welcome %s", GetPlayerNameEx(extraid));
  28585. if(!isnull(adminMOTD) && PlayerData[extraid][pAdmin] > 0)
  28586. {
  28587. SendClientMessageEx(extraid, 0xE65A5AAA, "Admin Motd: %s", adminMOTD);
  28588. }
  28589. if(!isnull(helperMOTD) && PlayerData[extraid][pHelper] > 0)
  28590. {
  28591. SendClientMessageEx(extraid, COLOR_AQUA, "Helper Motd: %s", helperMOTD);
  28592. }
  28593. if(PlayerData[extraid][pFaction] >= 0 && strcmp(FactionInfo[PlayerData[extraid][pFaction]][fMOTD], "None", true) != 0)
  28594. {
  28595. SendClientMessageEx(extraid, COLOR_YELLOW, "Faction Motd: %s", FactionInfo[PlayerData[extraid][pFaction]][fMOTD]);
  28596. }
  28597. if(PlayerData[extraid][pGang] >= 0 && strcmp(GangInfo[PlayerData[extraid][pGang]][gMOTD], "None", true) != 0)
  28598. {
  28599. SendClientMessageEx(extraid, COLOR_YELLOW, "Gang MOTD: %s", GangInfo[PlayerData[extraid][pGang]][gMOTD]);
  28600. }
  28601. if(!isnull(gServerMOTD))
  28602. {
  28603. SendClientMessageEx(extraid, COLOR_WHITE, "Global Motd: %s", gServerMOTD);
  28604. }
  28605. format(string, sizeof(string), "~w~Welcome ~n~~y~ %s", GetPlayerNameEx(extraid));
  28606. GameTextForPlayer(extraid, string, 5000, 1);
  28607. /*if(PlayerData[extraid][pAdmin] && !PlayerData[extraid][pAdminHide])
  28608. {
  28609. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s %s has logged in.", GetAdmCmdRank(extraid), GetRPName(extraid));
  28610. }
  28611. if(PlayerData[extraid][pGang] >= 0)
  28612. {
  28613. SendGangMessage(PlayerData[extraid][pGang], COLOR_AQUA, "(( %s %s has logged in. ))", GangRanks[PlayerData[extraid][pGang]][PlayerData[extraid][pGangRank]], GetRPName(extraid));
  28614. }
  28615. if(PlayerData[extraid][pFaction] >= 0)
  28616. {
  28617. SendFactionMessage(PlayerData[extraid][pFaction], COLOR_FACTIONCHAT, "(( %s %s has logged in. ))", FactionRanks[PlayerData[extraid][pFaction]][PlayerData[extraid][pFactionRank]], GetRPName(extraid));
  28618. }
  28619. if(PlayerData[extraid][pAdmin] > 0) {
  28620. SendClientMessageEx(extraid, COLOR_WHITE, "Old School Roleplay: You have logged in as a {FF6347}level %i %s{FFFFFF}.", PlayerData[extraid][pAdmin], GetAdminRank(extraid));
  28621. } else if(PlayerData[extraid][pHelper] > 0) {
  28622. SendClientMessageEx(extraid, COLOR_WHITE, "Old School Roleplay: You have logged in as a {33CCFF}%s{FFFFFF}.", GetHelperRank(extraid));
  28623. } else if(PlayerData[extraid][pDonator] > 0) {
  28624. SendClientMessageEx(extraid, COLOR_WHITE, "Old School Roleplay: You have logged in as a {D909D9}%s VIP{FFFFFF}.", GetVIPRank(PlayerData[extraid][pDonator]));
  28625. } else if(PlayerData[extraid][pLevel] >= 2) {
  28626. SendClientMessageEx(extraid, COLOR_WHITE, "Old School Roleplay: You have logged in as a {AFAFAF}level %i player{FFFFFF}.", PlayerData[extraid][pLevel]);
  28627. } else {
  28628. SendClientMessage(extraid, COLOR_WHITE, "Old School Roleplay: You have logged in as a {AFAFAF}level 1 newbie{FFFFFF}.");
  28629. }
  28630. SendClientMessageEx(extraid, COLOR_NAVYBLUE, "Your last login was on the %s (server time).", GetDate());
  28631. */
  28632. StopAudioStreamForPlayer(extraid);
  28633. }
  28634. if(PlayerData[extraid][pFaction] >= 0 && FactionInfo[PlayerData[extraid][pFaction]][fType] == FACTION_NONE)
  28635. {
  28636. SetPlayerFaction(extraid, -1);
  28637. SendClientMessageEx(extraid, COLOR_LIGHTRED, "You were either kicked from the faction while offline or it was deleted.");
  28638. }
  28639. if(PlayerData[extraid][pGang] >= 0 && !GangInfo[PlayerData[extraid][pGang]][gSetup])
  28640. {
  28641. SendClientMessage(extraid, COLOR_LIGHTRED, "You have either been kicked from the gang while offline or it was deleted.");
  28642. PlayerData[extraid][pGang] = -1;
  28643. PlayerData[extraid][pGangRank] = 0;
  28644. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET gang = -1, gangrank = 0 WHERE uid = %i", PlayerData[extraid][pID]);
  28645. mysql_tquery(connectionID, queryBuffer);
  28646. }
  28647. if(PlayerData[extraid][pPasswordChanged] == 0)
  28648. {
  28649. Dialog_Show(extraid, DIALOG_CHANGEPASS, DIALOG_STYLE_INPUT, "{00aa00}Old School Roleplay{FFFFFF} | Change password", "Please change your password for security purposes\nEnter your new password below:", "Submit", "Cancel");
  28650. }
  28651. }
  28652. SetPlayerToSpawn(extraid);
  28653. }
  28654. }
  28655. case THREAD_COUNT_FLAGS:
  28656. {
  28657. if(rows)
  28658. {
  28659. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] has %i pending flags. (/listflags %i)", GetRPName(extraid), extraid, rows, extraid);
  28660. }
  28661. }
  28662. case THREAD_TRACE_IP:
  28663. {
  28664. if(rows)
  28665. {
  28666. new username[24], date[24];
  28667. SendClientMessageEx(extraid, COLOR_NAVYBLUE, "___________ %i Results Found ___________", rows);
  28668. for(new i = 0; i < rows; i ++)
  28669. {
  28670. cache_get_field_content(i, "username", username);
  28671. cache_get_field_content(i, "lastlogin", date);
  28672. SendClientMessageEx(extraid, COLOR_GREY2, "Name: %s - Last Seen: %s", username, date);
  28673. }
  28674. }
  28675. else
  28676. {
  28677. SendClientMessage(extraid, COLOR_GREY, "This IP address is not associated with any accounts.");
  28678. }
  28679. }
  28680. case THREAD_LOGIN_UPDATE:
  28681. {
  28682. /* new string[1028];
  28683. if(extraid == 1) // Changes
  28684. {
  28685. new text[128];
  28686. if(!rows)
  28687. {
  28688. strcat(string, "~n~- n/a");
  28689. }
  28690. else
  28691. {
  28692. for(new i = 0; i < rows; i ++)
  28693. {
  28694. cache_get_field_content(i, "text", text);
  28695. format(string, sizeof(string), "%s- %s~n~", string, text);
  28696. }
  28697. }
  28698. TextDrawSetString(LoginScreen[6], string);
  28699. }
  28700. else if(extraid == 2) // Top ten players
  28701. {
  28702. new username[MAX_PLAYER_NAME];
  28703. if(!rows)
  28704. {
  28705. strcat(string, "~n~- n/a");
  28706. }
  28707. else
  28708. {
  28709. for(new i = 0; i < rows; i ++)
  28710. {
  28711. cache_get_field_content(i, "username", username);
  28712. format(string, sizeof(string), "%s - %s (%i hrs)~n~", string, username, cache_get_field_content_int(i, "hours"));
  28713. }
  28714. }
  28715. TextDrawSetString(LoginScreen[7], string);
  28716. }*/
  28717. }
  28718. case THREAD_LIST_CHANGES:
  28719. {
  28720. new text[128];
  28721. SendClientMessage(extraid, COLOR_NAVYBLUE, "________ Changes List ________");
  28722. for(new i = 0; i < rows; i ++)
  28723. {
  28724. cache_get_field_content(i, "text", text);
  28725. SendClientMessageEx(extraid, COLOR_GREY1, "Slot %i -> %s", cache_get_field_content_int(i, "slot"), text);
  28726. }
  28727. }
  28728. case THREAD_LIST_HELPERS:
  28729. {
  28730. new username[MAX_PLAYER_NAME], lastlogin[24];
  28731. SendClientMessage(extraid, COLOR_NAVYBLUE, "_______ Helper Roster _______");
  28732. for(new i = 0; i < rows; i ++)
  28733. {
  28734. cache_get_field_content(i, "username", username);
  28735. cache_get_field_content(i, "lastlogin", lastlogin);
  28736. switch(cache_get_field_content_int(i, "helperlevel"))
  28737. {
  28738. case 1: SendClientMessageEx(extraid, COLOR_GREY2, "Junior Helper %s - Last Seen: %s", username, lastlogin);
  28739. case 2: SendClientMessageEx(extraid, COLOR_GREY2, "Senior Helper %s - Last Seen: %s", username, lastlogin);
  28740. case 3: SendClientMessageEx(extraid, COLOR_GREY2, "Ast. Head Helper %s - Last Seen: %s", username, lastlogin);
  28741. case 4: SendClientMessageEx(extraid, COLOR_GREY2, "Head Helper %s - Last Seen: %s", username, lastlogin);
  28742. }
  28743. }
  28744. }
  28745. case THREAD_LOAD_HOUSES:
  28746. {
  28747. for(new i = 0; i < rows && i < MAX_HOUSES; i ++)
  28748. {
  28749. cache_get_field_content(i, "owner", HouseInfo[i][hOwner], connectionID, MAX_PLAYER_NAME);
  28750. HouseInfo[i][hID] = cache_get_field_content_int(i, "id");
  28751. HouseInfo[i][hOwnerID] = cache_get_field_content_int(i, "ownerid");
  28752. HouseInfo[i][hType] = cache_get_field_content_int(i, "type");
  28753. HouseInfo[i][hPrice] = cache_get_field_content_int(i, "price");
  28754. HouseInfo[i][hRentPrice] = cache_get_field_content_int(i, "rentprice");
  28755. HouseInfo[i][hLevel] = cache_get_field_content_int(i, "level");
  28756. HouseInfo[i][hLocked] = cache_get_field_content_int(i, "locked");
  28757. HouseInfo[i][hTimestamp] = cache_get_field_content_int(i, "timestamp");
  28758. HouseInfo[i][hPosX] = cache_get_field_content_float(i, "pos_x");
  28759. HouseInfo[i][hPosY] = cache_get_field_content_float(i, "pos_y");
  28760. HouseInfo[i][hPosZ] = cache_get_field_content_float(i, "pos_z");
  28761. HouseInfo[i][hPosA] = cache_get_field_content_float(i, "pos_a");
  28762. HouseInfo[i][hIntX] = cache_get_field_content_float(i, "int_x");
  28763. HouseInfo[i][hIntY] = cache_get_field_content_float(i, "int_y");
  28764. HouseInfo[i][hIntZ] = cache_get_field_content_float(i, "int_z");
  28765. HouseInfo[i][hIntA] = cache_get_field_content_float(i, "int_a");
  28766. HouseInfo[i][hInterior] = cache_get_field_content_int(i, "interior");
  28767. HouseInfo[i][hWorld] = cache_get_field_content_int(i, "world");
  28768. HouseInfo[i][hOutsideInt] = cache_get_field_content_int(i, "outsideint");
  28769. HouseInfo[i][hOutsideVW] = cache_get_field_content_int(i, "outsidevw");
  28770. HouseInfo[i][hCash] = cache_get_field_content_int(i, "cash");
  28771. HouseInfo[i][hMaterials] = cache_get_field_content_int(i, "materials");
  28772. HouseInfo[i][hWeed] = cache_get_field_content_int(i, "weed");
  28773. HouseInfo[i][hCocaine] = cache_get_field_content_int(i, "cocaine");
  28774. HouseInfo[i][hMeth] = cache_get_field_content_int(i, "meth");
  28775. HouseInfo[i][hPainkillers] = cache_get_field_content_int(i, "painkillers");
  28776. HouseInfo[i][hWeapons][0] = cache_get_field_content_int(i, "weapon_1");
  28777. HouseInfo[i][hWeapons][1] = cache_get_field_content_int(i, "weapon_2");
  28778. HouseInfo[i][hWeapons][2] = cache_get_field_content_int(i, "weapon_3");
  28779. HouseInfo[i][hWeapons][3] = cache_get_field_content_int(i, "weapon_4");
  28780. HouseInfo[i][hWeapons][4] = cache_get_field_content_int(i, "weapon_5");
  28781. HouseInfo[i][hWeapons][5] = cache_get_field_content_int(i, "weapon_6");
  28782. HouseInfo[i][hWeapons][6] = cache_get_field_content_int(i, "weapon_7");
  28783. HouseInfo[i][hWeapons][7] = cache_get_field_content_int(i, "weapon_8");
  28784. HouseInfo[i][hWeapons][8] = cache_get_field_content_int(i, "weapon_9");
  28785. HouseInfo[i][hWeapons][9] = cache_get_field_content_int(i, "weapon_10");
  28786. HouseInfo[i][hDelivery] = cache_get_field_content_int(i, "delivery");
  28787. HouseInfo[i][hLights] = cache_get_field_content_int(i, "lights");
  28788. HouseInfo[i][hAlarm] = cache_get_field_content_int(i, "alarm");
  28789. HouseInfo[i][hText] = Text3D:INVALID_3DTEXT_ID;
  28790. HouseInfo[i][hPickup] = -1;
  28791. HouseInfo[i][hLabels] = 0;
  28792. HouseInfo[i][hExists] = 1;
  28793. Iter_Add(House, i);
  28794. ReloadHouse(i);
  28795. }
  28796. printf("[Script] %i houses loaded.", rows);
  28797. }
  28798. case THREAD_LIST_TENANTS:
  28799. {
  28800. if(!rows)
  28801. {
  28802. SendClientMessage(extraid, COLOR_GREY, "There is nobody currently renting at your home.");
  28803. }
  28804. else
  28805. {
  28806. new username[MAX_PLAYER_NAME], date[24];
  28807. SendClientMessage(extraid, COLOR_NAVYBLUE, "_______ List of Tenants _______");
  28808. for(new i = 0; i < rows; i ++)
  28809. {
  28810. cache_get_field_content(i, "username", username);
  28811. cache_get_field_content(i, "lastlogin", date);
  28812. SendClientMessageEx(extraid, COLOR_GREY2, "Name: %s - Last Seen: %s", username, date);
  28813. }
  28814. }
  28815. }
  28816. case THREAD_LOAD_FURNITURE:
  28817. {
  28818. }
  28819. case THREAD_LOAD_GARAGES:
  28820. {
  28821. for(new i = 0; i < rows && i < MAX_GARAGES; i ++)
  28822. {
  28823. cache_get_field_content(i, "owner", GarageInfo[i][gOwner], connectionID, MAX_PLAYER_NAME);
  28824. GarageInfo[i][gID] = cache_get_field_content_int(i, "id");
  28825. GarageInfo[i][gOwnerID] = cache_get_field_content_int(i, "ownerid");
  28826. GarageInfo[i][gType] = cache_get_field_content_int(i, "type");
  28827. GarageInfo[i][gPrice] = cache_get_field_content_int(i, "price");
  28828. GarageInfo[i][gLocked] = cache_get_field_content_int(i, "locked");
  28829. GarageInfo[i][gTimestamp] = cache_get_field_content_int(i, "timestamp");
  28830. GarageInfo[i][gPosX] = cache_get_field_content_float(i, "pos_x");
  28831. GarageInfo[i][gPosY] = cache_get_field_content_float(i, "pos_y");
  28832. GarageInfo[i][gPosZ] = cache_get_field_content_float(i, "pos_z");
  28833. GarageInfo[i][gPosA] = cache_get_field_content_float(i, "pos_a");
  28834. GarageInfo[i][gExitX] = cache_get_field_content_float(i, "exit_x");
  28835. GarageInfo[i][gExitY] = cache_get_field_content_float(i, "exit_y");
  28836. GarageInfo[i][gExitZ] = cache_get_field_content_float(i, "exit_z");
  28837. GarageInfo[i][gExitA] = cache_get_field_content_float(i, "exit_a");
  28838. GarageInfo[i][gWorld] = cache_get_field_content_int(i, "world");
  28839. GarageInfo[i][gText] = Text3D:INVALID_3DTEXT_ID;
  28840. GarageInfo[i][gPickup] = -1;
  28841. GarageInfo[i][gExists] = 1;
  28842. Iter_Add(Garage, i);
  28843. ReloadGarage(i);
  28844. }
  28845. printf("[Script] %i garages loaded.", rows);
  28846. }
  28847. case THREAD_LOAD_BUSINESSES:
  28848. {
  28849. for(new i = 0; i < rows && i < MAX_BUSINESSES; i ++)
  28850. {
  28851. cache_get_field_content(i, "owner", BusinessInfo[i][bOwner], connectionID, MAX_PLAYER_NAME);
  28852. BusinessInfo[i][bID] = cache_get_field_content_int(i, "id");
  28853. BusinessInfo[i][bOwnerID] = cache_get_field_content_int(i, "ownerid");
  28854. BusinessInfo[i][bType] = cache_get_field_content_int(i, "type");
  28855. BusinessInfo[i][bPrice] = cache_get_field_content_int(i, "price");
  28856. BusinessInfo[i][bEntryFee] = cache_get_field_content_int(i, "entryfee");
  28857. BusinessInfo[i][bLocked] = cache_get_field_content_int(i, "locked");
  28858. BusinessInfo[i][bTimestamp] = cache_get_field_content_int(i, "timestamp");
  28859. BusinessInfo[i][bPosX] = cache_get_field_content_float(i, "pos_x");
  28860. BusinessInfo[i][bPosY] = cache_get_field_content_float(i, "pos_y");
  28861. BusinessInfo[i][bPosZ] = cache_get_field_content_float(i, "pos_z");
  28862. BusinessInfo[i][bPosA] = cache_get_field_content_float(i, "pos_a");
  28863. BusinessInfo[i][bIntX] = cache_get_field_content_float(i, "int_x");
  28864. BusinessInfo[i][bIntY] = cache_get_field_content_float(i, "int_y");
  28865. BusinessInfo[i][bIntZ] = cache_get_field_content_float(i, "int_z");
  28866. BusinessInfo[i][bIntA] = cache_get_field_content_float(i, "int_a");
  28867. BusinessInfo[i][cVehicle][0] = cache_get_field_content_float(i, "cVehicleX");
  28868. BusinessInfo[i][cVehicle][1] = cache_get_field_content_float(i, "cVehicleY");
  28869. BusinessInfo[i][cVehicle][2] = cache_get_field_content_float(i, "cVehicleZ");
  28870. BusinessInfo[i][cVehicle][3] = cache_get_field_content_float(i, "cVehicleA");
  28871. BusinessInfo[i][bInterior] = cache_get_field_content_int(i, "interior");
  28872. BusinessInfo[i][bWorld] = cache_get_field_content_int(i, "world");
  28873. BusinessInfo[i][bOutsideInt] = cache_get_field_content_int(i, "outsideint");
  28874. BusinessInfo[i][bOutsideVW] = cache_get_field_content_int(i, "outsidevw");
  28875. BusinessInfo[i][bCash] = cache_get_field_content_int(i, "cash");
  28876. BusinessInfo[i][bProducts] = cache_get_field_content_int(i, "products");
  28877. BusinessInfo[i][bMaterials] = cache_get_field_content_int(i, "materials");
  28878. BusinessInfo[i][bText] = Text3D:INVALID_3DTEXT_ID;
  28879. BusinessInfo[i][bPickup] = -1;
  28880. //BusinessInfo[i][bMapIcon] = -1;
  28881. BusinessInfo[i][bExists] = 1;
  28882. Iter_Add(Business, i);
  28883. ReloadBusiness(i);
  28884. }
  28885. printf("[Script] %i businesses loaded.", rows);
  28886. }
  28887. case THREAD_LOAD_ENTRANCES:
  28888. {
  28889. for(new i = 0; i < rows && i < MAX_ENTRANCES; i ++)
  28890. {
  28891. cache_get_field_content(i, "owner", EntranceInfo[i][eOwner], connectionID, MAX_PLAYER_NAME);
  28892. cache_get_field_content(i, "name", EntranceInfo[i][eName], connectionID, 40);
  28893. cache_get_field_content(i, "password", EntranceInfo[i][ePassword], connectionID, 64);
  28894. EntranceInfo[i][eID] = cache_get_field_content_int(i, "id");
  28895. EntranceInfo[i][eOwnerID] = cache_get_field_content_int(i, "ownerid");
  28896. EntranceInfo[i][eIcon] = cache_get_field_content_int(i, "iconid");
  28897. EntranceInfo[i][eLocked] = cache_get_field_content_int(i, "locked");
  28898. EntranceInfo[i][eRadius] = cache_get_field_content_float(i, "radius");
  28899. EntranceInfo[i][ePosX] = cache_get_field_content_float(i, "pos_x");
  28900. EntranceInfo[i][ePosY] = cache_get_field_content_float(i, "pos_y");
  28901. EntranceInfo[i][ePosZ] = cache_get_field_content_float(i, "pos_z");
  28902. EntranceInfo[i][ePosA] = cache_get_field_content_float(i, "pos_a");
  28903. EntranceInfo[i][eIntX] = cache_get_field_content_float(i, "int_x");
  28904. EntranceInfo[i][eIntY] = cache_get_field_content_float(i, "int_y");
  28905. EntranceInfo[i][eIntZ] = cache_get_field_content_float(i, "int_z");
  28906. EntranceInfo[i][eIntA] = cache_get_field_content_float(i, "int_a");
  28907. EntranceInfo[i][eInterior] = cache_get_field_content_int(i, "interior");
  28908. EntranceInfo[i][eWorld] = cache_get_field_content_int(i, "world");
  28909. EntranceInfo[i][eOutsideInt] = cache_get_field_content_int(i, "outsideint");
  28910. EntranceInfo[i][eOutsideVW] = cache_get_field_content_int(i, "outsidevw");
  28911. EntranceInfo[i][eAdminLevel] = cache_get_field_content_int(i, "adminlevel");
  28912. EntranceInfo[i][eFactionType] = cache_get_field_content_int(i, "factiontype");
  28913. EntranceInfo[i][eGang] = cache_get_field_content_int(i, "gang");
  28914. EntranceInfo[i][eVIP] = cache_get_field_content_int(i, "vip");
  28915. EntranceInfo[i][eVehicles] = cache_get_field_content_int(i, "vehicles");
  28916. EntranceInfo[i][eFreeze] = cache_get_field_content_int(i, "freeze");
  28917. EntranceInfo[i][eLabel] = cache_get_field_content_int(i, "label");
  28918. EntranceInfo[i][eType] = cache_get_field_content_int(i, "type");
  28919. EntranceInfo[i][eMapIcon] = cache_get_field_content_int(i, "mapicon");
  28920. EntranceInfo[i][eColor] = cache_get_field_content_int(i, "color");
  28921. EntranceInfo[i][eText] = Text3D:INVALID_3DTEXT_ID;
  28922. EntranceInfo[i][ePickup] = -1;
  28923. EntranceInfo[i][eMapIconID] = -1;
  28924. EntranceInfo[i][eExists] = 1;
  28925. Iter_Add(Entrance, i);
  28926. ReloadEntrance(i);
  28927. }
  28928. printf("[Script] %i entrances loaded.", rows);
  28929. }
  28930. case THREAD_LOAD_FACTIONS:
  28931. {
  28932. for(new i = 0; i < rows && i < MAX_FACTIONS; i ++)
  28933. {
  28934. new factionid = cache_get_field_content_int(i, "id");
  28935. cache_get_field_content(i, "name", FactionInfo[factionid][fName], connectionID, 48);
  28936. cache_get_field_content(i, "shortname", FactionInfo[factionid][fShortName], connectionID, 24);
  28937. cache_get_field_content(i, "motd", FactionInfo[factionid][fMOTD], connectionID, 128);
  28938. cache_get_field_content(i, "leader", FactionInfo[factionid][fLeader], connectionID, MAX_PLAYER_NAME);
  28939. FactionInfo[factionid][fType] = cache_get_field_content_int(i, "type");
  28940. FactionInfo[factionid][fColor] = cache_get_field_content_int(i, "color");
  28941. FactionInfo[factionid][fRankCount] = cache_get_field_content_int(i, "rankcount");
  28942. FactionInfo[factionid][fTurfTokens] = cache_get_field_content_int(i, "turftokens");
  28943. FactionInfo[factionid][fBudget] = cache_get_field_content_int(i, "budget");
  28944. FactionInfo[factionid][fText] = Text3D:INVALID_3DTEXT_ID;
  28945. FactionInfo[factionid][fPickup] = -1;
  28946. }
  28947. printf("[Script] %i factions loaded.", rows);
  28948. }
  28949. case THREAD_LOAD_FACTIONRANKS:
  28950. {
  28951. for(new i = 0; i < MAX_FACTIONS; i ++)
  28952. {
  28953. for(new r = 0; r < MAX_FACTION_RANKS; r ++)
  28954. {
  28955. strcpy(FactionRanks[i][r], "Unspecified", 32);
  28956. }
  28957. }
  28958. for(new i = 0; i < rows; i ++)
  28959. {
  28960. cache_get_field_content(i, "name", FactionRanks[cache_get_field_content_int(i, "id")][cache_get_field_content_int(i, "rank")], connectionID, 32);
  28961. }
  28962. }
  28963. case THREAD_LOAD_FACTIONSKINS:
  28964. {
  28965. for(new i = 0; i < rows; i ++)
  28966. {
  28967. FactionInfo[cache_get_field_content_int(i, "id")][fSkins][cache_get_field_content_int(i, "slot")] = cache_get_field_content_int(i, "skinid");
  28968. }
  28969. }
  28970. case THREAD_LOAD_FACTIONPAY:
  28971. {
  28972. for(new i = 0; i < rows; i ++)
  28973. {
  28974. FactionInfo[cache_get_field_content_int(i, "id")][fPaycheck][cache_get_field_content_int(i, "rank")] = cache_get_field_content_int(i, "amount");
  28975. }
  28976. }
  28977. case THREAD_LOAD_DIVISIONS:
  28978. {
  28979. for(new i = 0; i < MAX_FACTIONS; i ++)
  28980. {
  28981. for(new r = 0; r < MAX_FACTION_DIVISIONS; r ++)
  28982. {
  28983. FactionDivisions[i][r][0] = 0;
  28984. }
  28985. }
  28986. for(new i = 0; i < rows; i ++)
  28987. {
  28988. cache_get_field_content(i, "name", FactionDivisions[cache_get_field_content_int(i, "id")][cache_get_field_content_int(i, "divisionid")], connectionID, 32);
  28989. }
  28990. }
  28991. case THREAD_LOAD_LANDS:
  28992. {
  28993. for(new i = 0; i < rows && i < MAX_LANDS; i ++)
  28994. {
  28995. cache_get_field_content(i, "owner", LandInfo[i][lOwner], connectionID, MAX_PLAYER_NAME);
  28996. LandInfo[i][lID] = cache_get_field_content_int(i, "id");
  28997. LandInfo[i][lOwnerID] = cache_get_field_content_int(i, "ownerid");
  28998. LandInfo[i][lLevel] = cache_get_field_content_int(i, "level");
  28999. LandInfo[i][lPrice] = cache_get_field_content_int(i, "price");
  29000. LandInfo[i][lMinX] = cache_get_field_content_float(i, "min_x");
  29001. LandInfo[i][lMinY] = cache_get_field_content_float(i, "min_y");
  29002. LandInfo[i][lMaxX] = cache_get_field_content_float(i, "max_x");
  29003. LandInfo[i][lMaxY] = cache_get_field_content_float(i, "max_y");
  29004. LandInfo[i][lHeightX] = cache_get_field_content_float(i, "heightx");
  29005. LandInfo[i][lHeightY] = cache_get_field_content_float(i, "heighty");
  29006. LandInfo[i][lHeightZ] = cache_get_field_content_float(i, "heightz");
  29007. LandInfo[i][lGangZone] = -1;
  29008. LandInfo[i][lArea] = -1;
  29009. LandInfo[i][lLabels] = 0;
  29010. //LandInfo[i][lTextdraw];
  29011. LandInfo[i][lExists] = 1;
  29012. Iter_Add(Land, i);
  29013. ReloadLand(i);
  29014. }
  29015. printf("[Script] %i lands loaded.", rows);
  29016. }
  29017. case THREAD_LOAD_LANDOBJECTS:
  29018. {
  29019. for(new i = 0; i < rows; i ++)
  29020. {
  29021. new objectid = CreateDynamicObject(cache_get_field_content_int(i, "modelid"), cache_get_field_content_float(i, "pos_x"), cache_get_field_content_float(i, "pos_y"), cache_get_field_content_float(i, "pos_z"), cache_get_field_content_float(i, "rot_x"), cache_get_field_content_float(i, "rot_y"), cache_get_field_content_float(i, "rot_z"));
  29022. Streamer_SetExtraInt(objectid, E_OBJECT_TYPE, E_OBJECT_LAND);
  29023. Streamer_SetExtraInt(objectid, E_OBJECT_INDEX_ID, cache_get_field_content_int(i, "id"));
  29024. Streamer_SetExtraInt(objectid, E_OBJECT_EXTRA_ID, cache_get_field_content_int(i, "landid"));
  29025. Streamer_SetExtraFloat(objectid, E_OBJECT_X, cache_get_field_content_float(i, "pos_x"));
  29026. Streamer_SetExtraFloat(objectid, E_OBJECT_Y, cache_get_field_content_float(i, "pos_y"));
  29027. Streamer_SetExtraFloat(objectid, E_OBJECT_Z, cache_get_field_content_float(i, "pos_z"));
  29028. if(extraid)
  29029. {
  29030. new
  29031. string[48];
  29032. cache_get_field_content(i, "name", string);
  29033. format(string, sizeof(string), "[%i] - %s", objectid, string);
  29034. Streamer_SetExtraInt(objectid, E_OBJECT_3DTEXT_ID, _:CreateDynamic3DTextLabel(string, COLOR_GREY2, cache_get_field_content_float(i, "pos_x"), cache_get_field_content_float(i, "pos_y"), cache_get_field_content_float(i, "pos_z"), 10.0));
  29035. }
  29036. }
  29037. }
  29038. case THREAD_LOAD_GANGS:
  29039. {
  29040. for(new i = 0; i < rows && i < MAX_GANGS; i ++)
  29041. {
  29042. new gangid = cache_get_field_content_int(i, "id");
  29043. cache_get_field_content(i, "name", GangInfo[gangid][gName], connectionID, 32);
  29044. cache_get_field_content(i, "motd", GangInfo[gangid][gMOTD], connectionID, 128);
  29045. cache_get_field_content(i, "leader", GangInfo[gangid][gLeader], connectionID, MAX_PLAYER_NAME);
  29046. GangInfo[gangid][gColor] = cache_get_field_content_int(i, "color");
  29047. GangInfo[gangid][gStrikes] = cache_get_field_content_int(i, "strikes");
  29048. GangInfo[gangid][gLevel] = cache_get_field_content_int(i, "level");
  29049. GangInfo[gangid][gPoints] = cache_get_field_content_int(i, "points");
  29050. GangInfo[gangid][gTurfTokens] = cache_get_field_content_int(i, "turftokens");
  29051. GangInfo[gangid][gStashX] = cache_get_field_content_float(i, "stash_x");
  29052. GangInfo[gangid][gStashY] = cache_get_field_content_float(i, "stash_y");
  29053. GangInfo[gangid][gStashZ] = cache_get_field_content_float(i, "stash_z");
  29054. GangInfo[gangid][gStashInterior] = cache_get_field_content_int(i, "stashinterior");
  29055. GangInfo[gangid][gStashWorld] = cache_get_field_content_int(i, "stashworld");
  29056. GangInfo[gangid][gCash] = cache_get_field_content_int(i, "cash");
  29057. GangInfo[gangid][gMaterials] = cache_get_field_content_int(i, "materials");
  29058. GangInfo[gangid][gWeed] = cache_get_field_content_int(i, "weed");
  29059. GangInfo[gangid][gCocaine] = cache_get_field_content_int(i, "cocaine");
  29060. GangInfo[gangid][gMeth] = cache_get_field_content_int(i, "meth");
  29061. GangInfo[gangid][gPainkillers] = cache_get_field_content_int(i, "painkillers");
  29062. GangInfo[gangid][gAlliance] = cache_get_field_content_int (i, "alliance");
  29063. GangInfo[gangid][gMatLevel] = cache_get_field_content_int (i, "matlevel");
  29064. GangInfo[gangid][gGunLevel] = cache_get_field_content_int (i, "gunlevel");
  29065. // Gang stash weapons
  29066. GangInfo[gangid][gWeapons][GANGWEAPON_9MM] = cache_get_field_content_int(i, "weapon_9mm");
  29067. GangInfo[gangid][gWeapons][GANGWEAPON_SDPISTOL] = cache_get_field_content_int(i, "weapon_sdpistol");
  29068. GangInfo[gangid][gWeapons][GANGWEAPON_DEAGLE] = cache_get_field_content_int(i, "weapon_deagle");
  29069. GangInfo[gangid][gWeapons][GANGWEAPON_SHOTGUN] = cache_get_field_content_int(i, "weapon_shotgun");
  29070. // GangInfo[gangid][gWeapons][GANGWEAPON_SPAS12] = cache_get_field_content_int(i, "weapon_spas12");
  29071. // GangInfo[gangid][gWeapons][GANGWEAPON_SAWNOFF] = cache_get_field_content_int(i, "weapon_sawnoff");
  29072. GangInfo[gangid][gWeapons][GANGWEAPON_TEC9] = cache_get_field_content_int(i, "weapon_tec9");
  29073. GangInfo[gangid][gWeapons][GANGWEAPON_UZI] = cache_get_field_content_int(i, "weapon_uzi");
  29074. GangInfo[gangid][gWeapons][GANGWEAPON_MP5] = cache_get_field_content_int(i, "weapon_mp5");
  29075. GangInfo[gangid][gWeapons][GANGWEAPON_AK47] = cache_get_field_content_int(i, "weapon_ak47");
  29076. // GangInfo[gangid][gWeapons][GANGWEAPON_M4] = cache_get_field_content_int(i, "weapon_m4");
  29077. GangInfo[gangid][gWeapons][GANGWEAPON_RIFLE] = cache_get_field_content_int(i, "weapon_rifle");
  29078. // GangInfo[gangid][gWeapons][GANGWEAPON_SNIPER] = cache_get_field_content_int(i, "weapon_sniper");
  29079. // GangInfo[gangid][gWeapons][GANGWEAPON_MOLOTOV] = cache_get_field_content_int(i, "weapon_molotov");
  29080. // Gang stash weapon ranks (01/07/2017)
  29081. GangInfo[gangid][gWeaponRanks][GANGWEAPON_9MM] = cache_get_field_content_int(i, "rank_9mm");
  29082. GangInfo[gangid][gWeaponRanks][GANGWEAPON_SDPISTOL] = cache_get_field_content_int(i, "rank_sdpistol");
  29083. GangInfo[gangid][gWeaponRanks][GANGWEAPON_DEAGLE] = cache_get_field_content_int(i, "rank_deagle");
  29084. GangInfo[gangid][gWeaponRanks][GANGWEAPON_SHOTGUN] = cache_get_field_content_int(i, "rank_shotgun");
  29085. // GangInfo[gangid][gWeaponRanks][GANGWEAPON_SPAS12] = cache_get_field_content_int(i, "rank_spas12");
  29086. // GangInfo[gangid][gWeaponRanks][GANGWEAPON_SAWNOFF] = cache_get_field_content_int(i, "rank_sawnoff");
  29087. GangInfo[gangid][gWeaponRanks][GANGWEAPON_TEC9] = cache_get_field_content_int(i, "rank_tec9");
  29088. GangInfo[gangid][gWeaponRanks][GANGWEAPON_UZI] = cache_get_field_content_int(i, "rank_uzi");
  29089. GangInfo[gangid][gWeaponRanks][GANGWEAPON_MP5] = cache_get_field_content_int(i, "rank_mp5");
  29090. GangInfo[gangid][gWeaponRanks][GANGWEAPON_AK47] = cache_get_field_content_int(i, "rank_ak47");
  29091. // GangInfo[gangid][gWeaponRanks][GANGWEAPON_M4] = cache_get_field_content_int(i, "rank_m4");
  29092. GangInfo[gangid][gWeaponRanks][GANGWEAPON_RIFLE] = cache_get_field_content_int(i, "rank_rifle");
  29093. // // GangInfo[gangid][gWeaponRanks][GANGWEAPON_SNIPER] = cache_get_field_content_int(i, "rank_sniper");
  29094. // GangInfo[gangid][gWeaponRanks][GANGWEAPON_MOLOTOV] = cache_get_field_content_int(i, "rank_molotov");
  29095. GangInfo[gangid][gVestRank] = cache_get_field_content_int(i, "rank_vest");
  29096. // Gang arms & drug dealer
  29097. GangInfo[gangid][gArmsDealer] = cache_get_field_content_int(i, "armsdealer");
  29098. GangInfo[gangid][gDrugDealer] = cache_get_field_content_int(i, "drugdealer");
  29099. GangInfo[gangid][gArmsX] = cache_get_field_content_float(i, "arms_x");
  29100. GangInfo[gangid][gArmsY] = cache_get_field_content_float(i, "arms_y");
  29101. GangInfo[gangid][gArmsZ] = cache_get_field_content_float(i, "arms_z");
  29102. GangInfo[gangid][gArmsA] = cache_get_field_content_float(i, "arms_a");
  29103. GangInfo[gangid][gDrugX] = cache_get_field_content_float(i, "drug_x");
  29104. GangInfo[gangid][gDrugY] = cache_get_field_content_float(i, "drug_y");
  29105. GangInfo[gangid][gDrugZ] = cache_get_field_content_float(i, "drug_z");
  29106. GangInfo[gangid][gDrugA] = cache_get_field_content_float(i, "drug_a");
  29107. GangInfo[gangid][gArmsWorld] = cache_get_field_content_int(i, "armsworld");
  29108. GangInfo[gangid][gDrugWorld] = cache_get_field_content_int(i, "drugworld");
  29109. GangInfo[gangid][gDrugWeed] = cache_get_field_content_int(i, "drugweed");
  29110. GangInfo[gangid][gDrugCocaine] = cache_get_field_content_int(i, "drugcocaine");
  29111. GangInfo[gangid][gDrugMeth] = cache_get_field_content_int(i, "drugmeth");
  29112. GangInfo[gangid][gArmsMaterials] = cache_get_field_content_int(i, "armsmaterials");
  29113. GangInfo[gangid][gArmsPrices][0] = cache_get_field_content_int(i, "armsprice_1");
  29114. GangInfo[gangid][gArmsPrices][1] = cache_get_field_content_int(i, "armsprice_2");
  29115. GangInfo[gangid][gArmsPrices][2] = cache_get_field_content_int(i, "armsprice_3");
  29116. GangInfo[gangid][gArmsPrices][3] = cache_get_field_content_int(i, "armsprice_4");
  29117. GangInfo[gangid][gArmsPrices][4] = cache_get_field_content_int(i, "armsprice_5");
  29118. GangInfo[gangid][gArmsPrices][5] = cache_get_field_content_int(i, "armsprice_6");
  29119. GangInfo[gangid][gArmsPrices][6] = cache_get_field_content_int(i, "armsprice_7");
  29120. GangInfo[gangid][gArmsPrices][7] = cache_get_field_content_int(i, "armsprice_8");
  29121. GangInfo[gangid][gArmsPrices][8] = cache_get_field_content_int(i, "armsprice_9");
  29122. GangInfo[gangid][gArmsPrices][9] = cache_get_field_content_int(i, "armsprice_10");
  29123. GangInfo[gangid][gArmsPrices][10] = cache_get_field_content_int(i, "armsprice_11");
  29124. GangInfo[gangid][gArmsPrices][11] = cache_get_field_content_int(i, "armsprice_12");
  29125. GangInfo[gangid][gDrugPrices][0] = cache_get_field_content_int(i, "weed_price");
  29126. GangInfo[gangid][gDrugPrices][1] = cache_get_field_content_int(i, "cocaine_price");
  29127. GangInfo[gangid][gDrugPrices][2] = cache_get_field_content_int(i, "meth_price");
  29128. GangInfo[gangid][gText][0] = Text3D:INVALID_3DTEXT_ID;
  29129. GangInfo[gangid][gText][1] = Text3D:INVALID_3DTEXT_ID;
  29130. GangInfo[gangid][gText][2] = Text3D:INVALID_3DTEXT_ID;
  29131. GangInfo[gangid][gActors][0] = INVALID_ACTOR_ID;
  29132. GangInfo[gangid][gActors][1] = INVALID_ACTOR_ID;
  29133. GangInfo[gangid][gPickup] = -1;
  29134. GangInfo[gangid][gSetup] = 1;
  29135. ReloadGang(gangid);
  29136. }
  29137. printf("[Script] %i gangs loaded.", rows);
  29138. }
  29139. case THREAD_LOAD_GANGRANKS:
  29140. {
  29141. for(new i = 0; i < MAX_GANGS; i ++)
  29142. {
  29143. for(new r = 0; r < 7; r ++)
  29144. {
  29145. strcpy(GangRanks[i][r], "Unspecified", 32);
  29146. }
  29147. }
  29148. for(new i = 0; i < rows; i ++)
  29149. {
  29150. cache_get_field_content(i, "name", GangRanks[cache_get_field_content_int(i, "id")][cache_get_field_content_int(i, "rank")], connectionID, 32);
  29151. }
  29152. }
  29153. case THREAD_LOAD_GANGSKINS:
  29154. {
  29155. for(new i = 0; i < rows; i ++)
  29156. {
  29157. GangInfo[cache_get_field_content_int(i, "id")][gSkins][cache_get_field_content_int(i, "slot")] = cache_get_field_content_int(i, "skinid");
  29158. }
  29159. }
  29160. case THREAD_LOAD_POINTS:
  29161. {
  29162. for(new i = 0; i < rows && i < MAX_POINTS; i ++)
  29163. {
  29164. new pointid = cache_get_field_content_int(i, "id");
  29165. cache_get_field_content(i, "name", PointInfo[pointid][pName], connectionID, 32);
  29166. cache_get_field_content(i, "capturedby", PointInfo[pointid][pCapturedBy], connectionID, MAX_PLAYER_NAME);
  29167. PointInfo[pointid][pCapturedGang] = cache_get_field_content_int(i, "capturedgang");
  29168. PointInfo[pointid][pType] = cache_get_field_content_int(i, "type");
  29169. PointInfo[pointid][pProfits] = cache_get_field_content_int(i, "profits");
  29170. PointInfo[pointid][pTime] = cache_get_field_content_int(i, "time");
  29171. PointInfo[pointid][pPointX] = cache_get_field_content_float(i, "point_x");
  29172. PointInfo[pointid][pPointY] = cache_get_field_content_float(i, "point_y");
  29173. PointInfo[pointid][pPointZ] = cache_get_field_content_float(i, "point_z");
  29174. PointInfo[pointid][pPointInterior] = cache_get_field_content_int(i, "pointinterior");
  29175. PointInfo[pointid][pPointWorld] = cache_get_field_content_int(i, "pointworld");
  29176. PointInfo[pointid][pCaptureTime] = 0;
  29177. PointInfo[pointid][pCapturer] = INVALID_PLAYER_ID;
  29178. PointInfo[pointid][pText] = Text3D:INVALID_3DTEXT_ID;
  29179. PointInfo[pointid][pPickup] = -1;
  29180. PointInfo[pointid][pExists] = 1;
  29181. if(PointInfo[pointid][pCapturedGang] >= 0 && !GangInfo[PointInfo[pointid][pCapturedGang]][gSetup])
  29182. {
  29183. PointInfo[pointid][pCapturedGang] = -1;
  29184. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE points SET capturedgang = -1 WHERE id = %i", pointid);
  29185. mysql_tquery(connectionID, queryBuffer);
  29186. }
  29187. ReloadPoint(pointid);
  29188. }
  29189. printf("[Script] %i points loaded.", rows);
  29190. }
  29191. case THREAD_LOAD_TURFS:
  29192. {
  29193. for(new i = 0; i < rows && i < MAX_TURFS; i ++)
  29194. {
  29195. new turfid = cache_get_field_content_int(i, "id");
  29196. cache_get_field_content(i, "name", TurfInfo[turfid][tName], connectionID, 32);
  29197. cache_get_field_content(i, "capturedby", TurfInfo[turfid][tCapturedBy], connectionID, MAX_PLAYER_NAME);
  29198. TurfInfo[turfid][tCapturedGang] = cache_get_field_content_int(i, "capturedgang");
  29199. TurfInfo[turfid][tType] = cache_get_field_content_int(i, "type");
  29200. TurfInfo[turfid][tTime] = cache_get_field_content_int(i, "time");
  29201. TurfInfo[turfid][tMinX] = cache_get_field_content_float(i, "min_x");
  29202. TurfInfo[turfid][tMinY] = cache_get_field_content_float(i, "min_y");
  29203. TurfInfo[turfid][tMaxX] = cache_get_field_content_float(i, "max_x");
  29204. TurfInfo[turfid][tMaxY] = cache_get_field_content_float(i, "max_y");
  29205. TurfInfo[turfid][tHeight] = cache_get_field_content_float(i, "height");
  29206. TurfInfo[turfid][tCount] = cache_get_field_content_int(i, "count");
  29207. TurfInfo[turfid][tGangZone] = -1;
  29208. TurfInfo[turfid][tArea] = -1;
  29209. TurfInfo[turfid][tCaptureTime] = 0;
  29210. TurfInfo[turfid][tCapturer] = INVALID_PLAYER_ID;
  29211. TurfInfo[turfid][tExists] = 1;
  29212. Iter_Add(Turf, turfid);
  29213. ReloadTurf(turfid);
  29214. }
  29215. printf("[Script] %i turfs loaded.", rows);
  29216. }
  29217. case THREAD_LOAD_LOCKERS:
  29218. {
  29219. for(new i = 0; i < rows && i < MAX_LOCKERS; i ++)
  29220. {
  29221. LockerInfo[i][lID] = cache_get_field_content_int(i, "id");
  29222. LockerInfo[i][lFaction] = cache_get_field_content_int(i, "factionid");
  29223. LockerInfo[i][lPosX] = cache_get_field_content_float(i, "pos_x");
  29224. LockerInfo[i][lPosY] = cache_get_field_content_float(i, "pos_y");
  29225. LockerInfo[i][lPosZ] = cache_get_field_content_float(i, "pos_z");
  29226. LockerInfo[i][lInterior] = cache_get_field_content_int(i, "interior");
  29227. LockerInfo[i][lWorld] = cache_get_field_content_int(i, "world");
  29228. LockerInfo[i][lIcon] = cache_get_field_content_int(i, "iconid");
  29229. LockerInfo[i][lLabel] = cache_get_field_content_int(i, "label");
  29230. LockerInfo[i][locKevlar][0] = cache_get_field_content_int(i, "weapon_kevlar");
  29231. LockerInfo[i][locMedKit][0] = cache_get_field_content_int(i, "weapon_medkit");
  29232. LockerInfo[i][locNitestick][0] = cache_get_field_content_int(i, "weapon_nitestick");
  29233. LockerInfo[i][locMace][0] = cache_get_field_content_int(i, "weapon_mace");
  29234. LockerInfo[i][locDeagle][0] = cache_get_field_content_int(i, "weapon_deagle");
  29235. LockerInfo[i][locShotgun][0] = cache_get_field_content_int(i, "weapon_shotgun");
  29236. LockerInfo[i][locMP5][0] = cache_get_field_content_int(i, "weapon_mp5");
  29237. LockerInfo[i][locM4][0] = cache_get_field_content_int(i, "weapon_m4");
  29238. LockerInfo[i][locSpas12][0] = cache_get_field_content_int(i, "weapon_spas12");
  29239. LockerInfo[i][locSniper][0] = cache_get_field_content_int(i, "weapon_sniper");
  29240. LockerInfo[i][locCamera][0] = cache_get_field_content_int(i, "weapon_camera");
  29241. LockerInfo[i][locFireExt][0] = cache_get_field_content_int(i, "weapon_fire_extinguisher");
  29242. LockerInfo[i][locPainKillers][0] = cache_get_field_content_int(i, "weapon_painkillers");
  29243. LockerInfo[i][locKevlar][1] = cache_get_field_content_int(i, "price_kevlar");
  29244. LockerInfo[i][locMedKit][1] = cache_get_field_content_int(i, "price_medkit");
  29245. LockerInfo[i][locNitestick][1] = cache_get_field_content_int(i, "price_nitestick");
  29246. LockerInfo[i][locMace][1] = cache_get_field_content_int(i, "price_mace");
  29247. LockerInfo[i][locDeagle][1] = cache_get_field_content_int(i, "price_deagle");
  29248. LockerInfo[i][locShotgun][1] = cache_get_field_content_int(i, "price_shotgun");
  29249. LockerInfo[i][locMP5][1] = cache_get_field_content_int(i, "price_mp5");
  29250. LockerInfo[i][locM4][1] = cache_get_field_content_int(i, "price_m4");
  29251. LockerInfo[i][locSpas12][1] = cache_get_field_content_int(i, "price_spas12");
  29252. LockerInfo[i][locSniper][1] = cache_get_field_content_int(i, "price_sniper");
  29253. LockerInfo[i][locCamera][1] = cache_get_field_content_int(i, "price_camera");
  29254. LockerInfo[i][locFireExt][1] = cache_get_field_content_int(i, "price_fire_extinguisher");
  29255. LockerInfo[i][locPainKillers][1] = cache_get_field_content_int(i, "price_painkillers");
  29256. LockerInfo[i][lText] = Text3D:INVALID_3DTEXT_ID;
  29257. LockerInfo[i][lPickup] = -1;
  29258. LockerInfo[i][lExists] = 1;
  29259. ReloadLocker(i);
  29260. }
  29261. }
  29262. case THREAD_LOAD_CLOTHING:
  29263. {
  29264. for(new i = 0; i < rows; i ++)
  29265. {
  29266. cache_get_field_content(i, "name", ClothingInfo[extraid][i][cName], connectionID, 32);
  29267. ClothingInfo[extraid][i][cID] = cache_get_field_content_int(i, "id");
  29268. ClothingInfo[extraid][i][cModel] = cache_get_field_content_int(i, "modelid");
  29269. ClothingInfo[extraid][i][cBone] = cache_get_field_content_int(i, "boneid");
  29270. ClothingInfo[extraid][i][cAttached] = cache_get_field_content_int(i, "attached");
  29271. ClothingInfo[extraid][i][cPosX] = cache_get_field_content_float(i, "pos_x");
  29272. ClothingInfo[extraid][i][cPosY] = cache_get_field_content_float(i, "pos_y");
  29273. ClothingInfo[extraid][i][cPosZ] = cache_get_field_content_float(i, "pos_z");
  29274. ClothingInfo[extraid][i][cRotX] = cache_get_field_content_float(i, "rot_x");
  29275. ClothingInfo[extraid][i][cRotY] = cache_get_field_content_float(i, "rot_y");
  29276. ClothingInfo[extraid][i][cRotZ] = cache_get_field_content_float(i, "rot_z");
  29277. ClothingInfo[extraid][i][cScaleX] = cache_get_field_content_float(i, "scale_x");
  29278. ClothingInfo[extraid][i][cScaleY] = cache_get_field_content_float(i, "scale_y");
  29279. ClothingInfo[extraid][i][cScaleZ] = cache_get_field_content_float(i, "scale_z");
  29280. ClothingInfo[extraid][i][cMatColor1] = cache_get_field_content_int(i, "matcolor1");
  29281. ClothingInfo[extraid][i][cMatColor2] = cache_get_field_content_int(i, "matcolor2");
  29282. ClothingInfo[extraid][i][cExists] = 1;
  29283. ClothingInfo[extraid][i][cAttachedIndex] = -1;
  29284. }
  29285. PlayerData[extraid][pAwaitingClothing] = 1;
  29286. }
  29287. case THREAD_HOUSE_INFORMATION:
  29288. {
  29289. new type[16], houseid = GetNearbyHouseEx(extraid);
  29290. if(HouseInfo[houseid][hType] == -1)
  29291. {
  29292. type = "Other";
  29293. }
  29294. else
  29295. {
  29296. strcpy(type, houseInteriors[HouseInfo[houseid][hType]][intClass]);
  29297. }
  29298. SendClientMessageEx(extraid, COLOR_NAVYBLUE, "_______ House ID %i _______", houseid);
  29299. SendClientMessageEx(extraid, COLOR_GREY2, "Value: %s - Rent Price: %s - Level: %i/5 - Active: %s - Locked: %s", FormatNumber(HouseInfo[houseid][hPrice]), FormatNumber(HouseInfo[houseid][hRentPrice]), HouseInfo[houseid][hLevel], (gettime() - HouseInfo[houseid][hTimestamp] > 2592000) ? ("{FF6347}No{C8C8C8}") : ("Yes"), (HouseInfo[houseid][hLocked]) ? ("Yes") : ("No"));
  29300. SendClientMessageEx(extraid, COLOR_GREY2, "Class: %s - Location: %s - Furniture: %i/%i - Tenants: %i/%i", type, GetZoneName(HouseInfo[houseid][hPosX], HouseInfo[houseid][hPosY], HouseInfo[houseid][hPosZ]), cache_get_row_int(0, 0), GetHouseFurnitureCapacity(houseid), cache_get_row_int(0, 1), GetHouseTenantCapacity(houseid));
  29301. }
  29302. case THREAD_COUNT_FURNITURE:
  29303. {
  29304. }
  29305. case THREAD_SELL_FURNITURE:
  29306. {
  29307. }
  29308. case THREAD_CLEAR_FURNITURE:
  29309. {
  29310. }
  29311. case THREAD_DUPLICATE_FURNITURE:
  29312. {
  29313. }
  29314. case THREAD_DUPLICATED_FURNITURE:
  29315. {
  29316. }
  29317. case THREAD_COUNT_TEXTS:
  29318. {
  29319. rows = cache_get_row_int(0, 0);
  29320. if(rows)
  29321. {
  29322. SendClientMessageEx(extraid, COLOR_YELLOW, "* You have %i unread text messages. (/texts)", rows);
  29323. }
  29324. }
  29325. case THREAD_VIEW_TEXTS:
  29326. {
  29327. if(!rows)
  29328. {
  29329. SendClientMessage(extraid, COLOR_GREY, "You have no more unread text messages to read.");
  29330. }
  29331. else
  29332. {
  29333. static listString[4096], sender[MAX_PLAYER_NAME], date[24], message[128];
  29334. listString = "Texts sent to you while offline (recent first):\n";
  29335. for(new i = 0; i < min(rows, 25); i ++)
  29336. {
  29337. cache_get_field_content(i, "sender", sender);
  29338. cache_get_field_content(i, "date", date);
  29339. cache_get_field_content(i, "message", message);
  29340. format(listString, sizeof(listString), "%s\n[%s] SMS from %s (%i): %s", listString, date, sender, cache_get_field_content_int(i, "sender_number"), message);
  29341. }
  29342. if(rows > 25)
  29343. {
  29344. Dialog_Show(extraid, DIALOG_UNREADTEXTS, DIALOG_STYLE_MSGBOX, "Unread Texts", listString, "Next", "OK");
  29345. }
  29346. else
  29347. {
  29348. Dialog_Show(extraid, DIALOG_UNREADTEXTS, DIALOG_STYLE_MSGBOX, "Unread Texts", listString, "OK", "");
  29349. }
  29350. }
  29351. }
  29352. case THREAD_LIST_VEHICLES:
  29353. {
  29354. if(!rows)
  29355. {
  29356. SendClientMessage(extraid, COLOR_GREY, "You own no vehicles which you can spawn.");
  29357. }
  29358. else
  29359. {
  29360. static string[1024];
  29361. string = "#\tModel\tLocation";
  29362. for(new i = 0; i < rows; i ++)
  29363. {
  29364. format(string, sizeof(string), "%s\n%i\t%s\t%s", string, i + 1, vehicleNames[cache_get_field_content_int(i, "modelid") - 400], (cache_get_field_content_int(i, "world")) ? ("Garage") : (GetZoneName(cache_get_field_content_float(i, "pos_x"), cache_get_field_content_float(i, "pos_y"), cache_get_field_content_float(i, "pos_z"))));
  29365. }
  29366. Dialog_Show(extraid, DIALOG_SPAWNCAR, DIALOG_STYLE_TABLIST_HEADERS, "Choose a vehicle to spawn.", string, "Select", "Cancel");
  29367. }
  29368. }
  29369. case THREAD_CAR_STORAGE:
  29370. {
  29371. if(!rows)
  29372. {
  29373. SendClientMessage(extraid, COLOR_GREY, "You own no vehicles which you can spawn.");
  29374. }
  29375. else
  29376. {
  29377. new string[1024], vehicleid;
  29378. string = "#\tModel\tStatus\tLocation\tTickets";
  29379. for(new i = 0; i < rows; i ++)
  29380. {
  29381. if(VehicleInfo[i][carImpounded] == 1) {
  29382. format(string, sizeof(string), "%s\n%i\t%s\t{FF6347}Impounded{FFFFFF}\t%s\t%s", string, i + 1, vehicleNames[cache_get_field_content_int(i, "modelid") - 400], (cache_get_field_content_int(i, "world")) ? ("Garage") : (GetZoneName(cache_get_field_content_float(i, "pos_x"), cache_get_field_content_float(i, "pos_y"), cache_get_field_content_float(i, "pos_z"))), cache_get_field_content_int(i, "tickets"));
  29383. }
  29384. if((vehicleid = GetVehicleLinkedID(cache_get_field_content_int(i, "id"))) != INVALID_VEHICLE_ID)
  29385. format(string, sizeof(string), "%s\n%i\t%s\t{00AA00}Spawned{FFFFFF}\t%s\t%s", string, i + 1, vehicleNames[GetVehicleModel(vehicleid) - 400], GetVehicleZoneName(vehicleid), cache_get_field_content_int(i, "tickets"));
  29386. else
  29387. format(string, sizeof(string), "%s\n%i\t%s\t{FF6347}Despawned{FFFFFF}\t%s\t%s", string, i + 1, vehicleNames[cache_get_field_content_int(i, "modelid") - 400], (cache_get_field_content_int(i, "world")) ? ("Garage") : (GetZoneName(cache_get_field_content_float(i, "pos_x"), cache_get_field_content_float(i, "pos_y"), cache_get_field_content_float(i, "pos_z"))), cache_get_field_content_int(i, "tickets"));
  29388. }
  29389. Dialog_Show(extraid, DIALOG_CARSTORAGE, DIALOG_STYLE_TABLIST_HEADERS, "Choose a vehicle to (de)spawn.", string, "Select", "Cancel");
  29390. }
  29391. }
  29392. case THREAD_FACTION_ROSTER:
  29393. {
  29394. new username[MAX_PLAYER_NAME], date[24];
  29395. SendClientMessage(extraid, COLOR_NAVYBLUE, "_____ Faction Roster _____");
  29396. for(new i = 0; i < rows; i ++)
  29397. {
  29398. cache_get_field_content(i, "username", username);
  29399. cache_get_field_content(i, "lastlogin", date);
  29400. SendClientMessageEx(extraid, COLOR_GREY2, "%s %s - Last Seen: %s", FactionRanks[PlayerData[extraid][pFaction]][cache_get_field_content_int(i, "factionrank")], username, date);
  29401. }
  29402. }
  29403. case THREAD_GANG_ROSTER:
  29404. {
  29405. new username[MAX_PLAYER_NAME], date[24];
  29406. SendClientMessage(extraid, COLOR_NAVYBLUE, "_____ Gang Roster _____");
  29407. for(new i = 0; i < rows; i ++)
  29408. {
  29409. cache_get_field_content(i, "username", username);
  29410. cache_get_field_content(i, "lastlogin", date);
  29411. SendClientMessageEx(extraid, COLOR_GREY2, "[%i] %s %s - Last Seen: %s", cache_get_field_content_int(i, "gangrank"), GangRanks[PlayerData[extraid][pGang]][cache_get_field_content_int(i, "gangrank")], username, date);
  29412. }
  29413. }
  29414. case THREAD_VIEW_PHONEBOOK:
  29415. {
  29416. if((!rows) && PlayerData[extraid][pPage] == 1)
  29417. {
  29418. SendClientMessage(extraid, COLOR_GREY, "The phonebook directory is currently empty.");
  29419. }
  29420. else
  29421. {
  29422. static string[MAX_LISTED_NUMBERS * 32], name[MAX_PLAYER_NAME];
  29423. string = "#\tName\tNumber";
  29424. for(new i = 0; i < rows; i ++)
  29425. {
  29426. cache_get_field_content(i, "name", name);
  29427. format(string, sizeof(string), "%s\n%i\t%s\t%i", string, ((PlayerData[extraid][pPage] - 1) * MAX_LISTED_NUMBERS) + (i + 1), name, cache_get_field_content_int(i, "number"));
  29428. }
  29429. if(PlayerData[extraid][pPage] > 1)
  29430. {
  29431. strcat(string, "\n{FF6347}<< Go back{FFFFFF}");
  29432. }
  29433. if(rows == MAX_LISTED_NUMBERS)
  29434. {
  29435. strcat(string, "\n{00AA00}>> Next page{FFFFFF}");
  29436. }
  29437. Dialog_Show(extraid, DIALOG_PHONEBOOK, DIALOG_STYLE_TABLIST_HEADERS, "Phonebook directory", string, "Select", "Close");
  29438. }
  29439. }
  29440. case THREAD_COUNT_LANDOBJECTS:
  29441. {
  29442. new landid = GetNearbyLand(extraid);
  29443. if(cache_get_row_int(0, 0) >= GetLandObjectCapacity(LandInfo[landid][lLevel]))
  29444. {
  29445. SendClientMessageEx(extraid, COLOR_GREY, "You are only only allowed up to %i objects for your land.", GetLandObjectCapacity(LandInfo[landid][lLevel]));
  29446. }
  29447. else
  29448. {
  29449. ShowDialogToPlayer(extraid, DIALOG_LANDBUILDTYPE);
  29450. //ShowDialogToPlayer(extraid, DIALOG_LANDBUILD1);
  29451. }
  29452. }
  29453. case THREAD_SELL_LANDOBJECT:
  29454. {
  29455. if(cache_get_row_count(connectionID))
  29456. {
  29457. new name[32], price = percent(cache_get_field_content_int(0, "price"), 75);
  29458. cache_get_field_content(0, "name", name);
  29459. GivePlayerCash(extraid, price);
  29460. SendClientMessageEx(extraid, COLOR_AQUA, "You have sold {FF6347}%s{33CCFF} and received a 75 percent refund of {00AA00}$%i{33CCFF}.", name, price);
  29461. RemoveLandObject(PlayerData[extraid][pSelected]);
  29462. }
  29463. }
  29464. case THREAD_DUPLICATE_LANDOBJECT:
  29465. {
  29466. //name, modelid, price, pos_x, pos_y, pos_z, rot_x, rot_y, rot_z
  29467. if(cache_get_row_count(connectionID))
  29468. {
  29469. new string[20], name[32], landid = GetNearbyLand(extraid);
  29470. new modelid = cache_get_field_content_int(0, "modelid");
  29471. new price = cache_get_field_content_int(0, "price");
  29472. new Float:x = cache_get_field_content_float(0, "pos_x");
  29473. new Float:y = cache_get_field_content_float(0, "pos_y");
  29474. new Float:z = cache_get_field_content_float(0, "pos_z");
  29475. new Float:rx = cache_get_field_content_float(0, "rot_x");
  29476. new Float:ry = cache_get_field_content_float(0, "rot_y");
  29477. new Float:rz = cache_get_field_content_float(0, "rot_z");
  29478. if(PlayerData[extraid][pCash] < price)
  29479. {
  29480. SendClientMessage(extraid, COLOR_GREY, "You can't afford to duplicate this object.");
  29481. }
  29482. else
  29483. {
  29484. PlayerData[extraid][pObjectLand] = landid;
  29485. cache_get_field_content(0, "name", name);
  29486. GivePlayerCash(extraid, -price);
  29487. SendClientMessageEx(extraid, COLOR_GREEN, "%s duplicated for $%i. You will now edit this object.", name, price);
  29488. format(string, sizeof(string), "~r~-$%i", price);
  29489. GameTextForPlayer(extraid, string, 5000, 1);
  29490. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO landobjects VALUES(null, %i, %i, '%e', %i, '%f', '%f', '%f', '%f', '%f', '%f', 0, 0, '0.0', '0.0', '0.0', '-1000.0', '-1000.0', '-1000.0')", LandInfo[landid][lID], modelid, name, price, x, y, z, rx, ry, rz);
  29491. mysql_tquery(connectionID, queryBuffer);
  29492. mysql_tquery(connectionID, "SELECT * FROM landobjects WHERE id = LAST_INSERT_ID()", "OnQueryFinished", "ii", THREAD_LOAD_LANDOBJECTS, LandInfo[landid][lLabels]);
  29493. mysql_tquery(connectionID, "SELECT LAST_INSERT_ID() FROM landobjects LIMIT 1", "OnQueryFinished", "ii", THREAD_DUPLICATED_OBJECT, extraid);
  29494. }
  29495. }
  29496. }
  29497. case THREAD_DUPLICATED_OBJECT:
  29498. {
  29499. if(cache_get_row_count(connectionID))
  29500. {
  29501. new id = cache_get_row_int(0, 0);
  29502. for(new i = 0, j = Streamer_GetUpperBound(STREAMER_TYPE_OBJECT); i <= j; i ++)
  29503. {
  29504. if(IsValidDynamicObject(i) && Streamer_GetExtraInt(i, E_OBJECT_TYPE) == E_OBJECT_LAND && Streamer_GetExtraInt(i, E_OBJECT_INDEX_ID) == id)
  29505. {
  29506. PlayerData[extraid][pEditType] = EDIT_LAND_OBJECT;
  29507. PlayerData[extraid][pEditObject] = i;
  29508. EditDynamicObject(extraid, i);
  29509. GameTextForPlayer(extraid, "~w~Editing Mode~n~~g~Click disk to save~n~~r~Press ESC to cancel", 5000, 1);
  29510. //PlayerData[extraid][pSelected] = i;
  29511. //ShowDialogToPlayer(extraid, DIALOG_LANDOBJECTMENU);
  29512. break;
  29513. }
  29514. }
  29515. }
  29516. }
  29517. case THREAD_CLEAR_LANDOBJECTS:
  29518. {
  29519. if(!rows)
  29520. {
  29521. SendClientMessage(extraid, COLOR_GREY, "Your land contains no furniture which can be sold.");
  29522. }
  29523. else
  29524. {
  29525. new price, landid = GetNearbyLand(extraid);
  29526. for(new i = 0; i < rows; i ++)
  29527. {
  29528. price += percent(cache_get_field_content_int(i, "price"), 75);
  29529. }
  29530. RemoveAllLandObjects(landid);
  29531. GivePlayerCash(extraid, price);
  29532. SendClientMessageEx(extraid, COLOR_AQUA, "You have sold a total of %i items and received {00AA00}$%i{33CCFF} back.", rows, price);
  29533. }
  29534. }
  29535. case THREAD_LIST_LANDOBJECTS:
  29536. {
  29537. if((!rows) && PlayerData[extraid][pPage] == 1)
  29538. {
  29539. SendClientMessage(extraid, COLOR_GREY, "Your land contains no objects which can be listed.");
  29540. }
  29541. else
  29542. {
  29543. static string[MAX_LISTED_OBJECTS * 48], name[32];
  29544. string = "#\tName\tCost\tDistance";
  29545. for(new i = 0; i < rows; i ++)
  29546. {
  29547. cache_get_field_content(i, "name", name);
  29548. format(string, sizeof(string), "%s\n%i\t%s\t{00AA00}$%i{FFFFFF}\t%.1fm", string, GetLandObjectID(cache_get_field_content_int(i, "id")), name, cache_get_field_content_int(i, "price"), GetPlayerDistanceFromPoint(extraid, cache_get_field_content_float(i, "pos_x"), cache_get_field_content_float(i, "pos_y"), cache_get_field_content_float(i, "pos_z")));
  29549. }
  29550. if(PlayerData[extraid][pPage] > 1)
  29551. {
  29552. strcat(string, "\n{FF6347}<< Go back{FFFFFF}");
  29553. }
  29554. if(rows == MAX_LISTED_OBJECTS)
  29555. {
  29556. strcat(string, "\n{00AA00}>> Next page{FFFFFF}");
  29557. }
  29558. Dialog_Show(extraid, DIALOG_LANDOBJECTS, DIALOG_STYLE_TABLIST_HEADERS, "List of objects", string, "Select", "Back");
  29559. }
  29560. }
  29561. case THREAD_LAND_MAINMENU:
  29562. {
  29563. new
  29564. landid = GetNearbyLand(extraid),
  29565. string[64];
  29566. format(string, sizeof(string), "Land menu {FFD700}(Level: %i/5) (%i/%i objects)", LandInfo[landid][lLevel], cache_get_row_int(0, 0), GetLandObjectCapacity(LandInfo[landid][lLevel]));
  29567. Dialog_Show(extraid, DIALOG_LANDMENU, DIALOG_STYLE_LIST, string, "Build object\nEdit object\nToggle labels\nList all objects\nSell all objects\nUpgrade land\nPermissions", "Select", "Cancel");
  29568. }
  29569. case THREAD_LAND_INFORMATION:
  29570. {
  29571. new landid = GetNearbyLand(extraid);
  29572. //SendClientMessage(extraid, COLOR_NAVYBLUE, "_______ My Land _______");
  29573. //SendClientMessageEx(extraid, COLOR_GREY2, "(ID: %i) - (Value: $%i) - (Objects: %i/%i) - (Location: %s)", landid, LandInfo[landid][lPrice], cache_get_row_int(0, 0), GetLandObjectCapacity(landid), GetZoneName(LandInfo[landid][lMinX], LandInfo[landid][lMinY], LandInfo[landid][lHeight]));
  29574. SendClientMessageEx(extraid, COLOR_WHITE, "* Your level %i/3 land in %s is worth {00AA00}%s{FFFFFF} and contains %i/%i objects.", LandInfo[landid][lLevel], GetZoneName(LandInfo[landid][lHeightX], LandInfo[landid][lHeightY], LandInfo[landid][lHeightZ]), FormatNumber(LandInfo[landid][lPrice]), cache_get_row_int(0, 0), GetLandObjectCapacity(LandInfo[landid][lLevel]));
  29575. }
  29576. case THREAD_LOAD_VEHICLES:
  29577. {
  29578. new modelid, Float:pos_x, Float:pos_y, Float:pos_z, Float:pos_a, color1, color2, respawndelay, siren, vehicleid;
  29579. for(new i = 0; i < rows; i ++)
  29580. {
  29581. modelid = cache_get_field_content_int(i, "modelid"),
  29582. pos_x = cache_get_field_content_float(i, "pos_x"),
  29583. pos_y = cache_get_field_content_float(i, "pos_y"),
  29584. pos_z = cache_get_field_content_float(i, "pos_z"),
  29585. pos_a = cache_get_field_content_float(i, "pos_a"),
  29586. color1 = cache_get_field_content_int(i, "color1"),
  29587. color2 = cache_get_field_content_int(i, "color2"),
  29588. respawndelay = cache_get_field_content_int(i, "respawndelay");
  29589. siren = cache_get_field_content_int(i, "siren");
  29590. vehicleid = CreateVehicle(modelid, pos_x, pos_y, pos_z, pos_a, color1, color2, respawndelay, siren);
  29591. if(vehicleid != INVALID_VEHICLE_ID)
  29592. {
  29593. ResetVehicle(vehicleid); // Forgot this!
  29594. cache_get_field_content(0, "plate", VehicleInfo[vehicleid][vPlate], connectionID, 32);
  29595. VehicleInfo[vehicleid][vID] = cache_get_field_content_int(i, "id");
  29596. VehicleInfo[vehicleid][vGang] = cache_get_field_content_int(i, "gangid");
  29597. VehicleInfo[vehicleid][vFactionType] = cache_get_field_content_int(i, "factiontype");
  29598. VehicleInfo[vehicleid][vRank] = cache_get_field_content_int(i, "rank");
  29599. VehicleInfo[vehicleid][vVIP] = cache_get_field_content_int(i, "vippackage");
  29600. VehicleInfo[vehicleid][vJob] = cache_get_field_content_int(i, "job");
  29601. VehicleInfo[vehicleid][vHealth] = cache_get_field_content_int(i, "health");
  29602. VehicleInfo[vehicleid][carImpounded] = cache_get_field_content_int(i, "carImpounded");
  29603. VehicleInfo[vehicleid][carImpoundPrice] = cache_get_field_content_int(i, "carImpoundPrice");
  29604. VehicleInfo[vehicleid][vMileage] = cache_get_field_content_float(i, "mileage");
  29605. if(VehicleInfo[vehicleid][vGang] >= 0)
  29606. {
  29607. VehicleInfo[vehicleid][vPrice] = cache_get_field_content_int(i, "price");
  29608. VehicleInfo[vehicleid][vLocked] = cache_get_field_content_int(i, "locked");
  29609. VehicleInfo[vehicleid][vPaintjob] = cache_get_field_content_int(i, "paintjob");
  29610. VehicleInfo[vehicleid][vInterior] = cache_get_field_content_int(i, "interior");
  29611. VehicleInfo[vehicleid][vWorld] = cache_get_field_content_int(i, "world");
  29612. VehicleInfo[vehicleid][vMods][0] = cache_get_field_content_int(i, "mod_1");
  29613. VehicleInfo[vehicleid][vMods][1] = cache_get_field_content_int(i, "mod_2");
  29614. VehicleInfo[vehicleid][vMods][2] = cache_get_field_content_int(i, "mod_3");
  29615. VehicleInfo[vehicleid][vMods][3] = cache_get_field_content_int(i, "mod_4");
  29616. VehicleInfo[vehicleid][vMods][4] = cache_get_field_content_int(i, "mod_5");
  29617. VehicleInfo[vehicleid][vMods][5] = cache_get_field_content_int(i, "mod_6");
  29618. VehicleInfo[vehicleid][vMods][6] = cache_get_field_content_int(i, "mod_7");
  29619. VehicleInfo[vehicleid][vMods][7] = cache_get_field_content_int(i, "mod_8");
  29620. VehicleInfo[vehicleid][vMods][8] = cache_get_field_content_int(i, "mod_9");
  29621. VehicleInfo[vehicleid][vMods][9] = cache_get_field_content_int(i, "mod_10");
  29622. VehicleInfo[vehicleid][vMods][10] = cache_get_field_content_int(i, "mod_11");
  29623. VehicleInfo[vehicleid][vMods][11] = cache_get_field_content_int(i, "mod_12");
  29624. VehicleInfo[vehicleid][vMods][12] = cache_get_field_content_int(i, "mod_13");
  29625. VehicleInfo[vehicleid][vMods][13] = cache_get_field_content_int(i, "mod_14");
  29626. ReloadVehicle(vehicleid);
  29627. }
  29628. VehicleInfo[vehicleid][vModel] = modelid;
  29629. VehicleInfo[vehicleid][vPosX] = pos_x;
  29630. VehicleInfo[vehicleid][vPosY] = pos_y;
  29631. VehicleInfo[vehicleid][vPosZ] = pos_z;
  29632. VehicleInfo[vehicleid][vPosA] = pos_a;
  29633. VehicleInfo[vehicleid][vColor1] = color1;
  29634. VehicleInfo[vehicleid][vColor2] = color2;
  29635. VehicleInfo[vehicleid][vRespawnDelay] = respawndelay;
  29636. VehicleInfo[vehicleid][vObjects][0] = INVALID_OBJECT_ID;
  29637. VehicleInfo[vehicleid][vObjects][1] = INVALID_OBJECT_ID;
  29638. VehicleInfo[vehicleid][vTimer] = -1;
  29639. vehicleFuel[vehicleid] = 100;
  29640. SetVehicleNumberPlate(vehicleid, VehicleInfo[vehicleid][vPlate]);
  29641. SetVehicleHealth(vehicleid, VehicleInfo[vehicleid][vHealth]);
  29642. }
  29643. }
  29644. }
  29645. case THREAD_GANG_INFORMATION:
  29646. {
  29647. if(rows)
  29648. {
  29649. new count, total;
  29650. foreach(new i : Turf)
  29651. {
  29652. if(TurfInfo[i][tExists])
  29653. {
  29654. if(TurfInfo[i][tCapturedGang] == PlayerData[extraid][pGang])
  29655. count++;
  29656. else if(TurfInfo[i][tType] != 8)
  29657. total++;
  29658. }
  29659. }
  29660. SendClientMessageEx(extraid, COLOR_NAVYBLUE, "______ %s ______", GangInfo[PlayerData[extraid][pGang]][gName]);
  29661. SendClientMessageEx(extraid, COLOR_GREY2, "Leader: %s - Level: %i/3 - Strikes: %i/3 - Members: %i/%i - Vehicles: %i/%i", GangInfo[PlayerData[extraid][pGang]][gLeader], GangInfo[PlayerData[extraid][pGang]][gLevel], GangInfo[PlayerData[extraid][pGang]][gStrikes], cache_get_row_int(0, 0), GetGangMemberLimit(PlayerData[extraid][pGang]), GetGangVehicles(PlayerData[extraid][pGang]), GetGangVehicleLimit(PlayerData[extraid][pGang]));
  29662. SendClientMessageEx(extraid, COLOR_GREY2, "Gang Points: %s GP - Turf Tokens: %s - Cash: $%s/$%s - Materials: %s/%s", FormatNumber(GangInfo[PlayerData[extraid][pGang]][gPoints], 0), FormatNumber(GangInfo[PlayerData[extraid][pGang]][gTurfTokens], 0), FormatNumber(GangInfo[PlayerData[extraid][pGang]][gCash], 0), FormatNumber(GetGangStashCapacity(PlayerData[extraid][pGang], STASH_CAPACITY_CASH), 0),
  29663. FormatNumber(GangInfo[PlayerData[extraid][pGang]][gMaterials], 0), FormatNumber(GetGangStashCapacity(PlayerData[extraid][pGang], STASH_CAPACITY_MATERIALS), 0));
  29664. SendClientMessageEx(extraid, COLOR_GREY2, "Turfs: %i/%i - Weed: %i/%ig - Cocaine: %i/%ig - Meth: %i/%ig - Painkillers: %i/%i", count, total, GangInfo[PlayerData[extraid][pGang]][gWeed], GetGangStashCapacity(PlayerData[extraid][pGang], STASH_CAPACITY_WEED), GangInfo[PlayerData[extraid][pGang]][gCocaine], GetGangStashCapacity(PlayerData[extraid][pGang], STASH_CAPACITY_COCAINE), GangInfo[PlayerData[extraid][pGang]][gMeth], GetGangStashCapacity(PlayerData[extraid][pGang], STASH_CAPACITY_METH),
  29665. GangInfo[PlayerData[extraid][pGang]][gPainkillers], GetGangStashCapacity(PlayerData[extraid][pGang], STASH_CAPACITY_PAINKILLERS));
  29666. }
  29667. }
  29668. case THREAD_OFFLINE_IP:
  29669. {
  29670. if(!rows)
  29671. {
  29672. SendClientMessage(extraid, COLOR_GREY, "The username specified is not registered.");
  29673. }
  29674. else
  29675. {
  29676. new username[MAX_PLAYER_NAME], ip[16];
  29677. cache_get_field_content(0, "username", username);
  29678. cache_get_field_content(0, "ip", ip);
  29679. if((cache_get_field_content_int(0, "adminlevel") > 2) && (PlayerData[extraid][pAdmin]))
  29680. {
  29681. SendClientMessage(extraid, COLOR_GREY, "You cannot check the IP of another admin");
  29682. }
  29683. else
  29684. {
  29685. SendClientMessageEx(extraid, COLOR_WHITE, "* %s's IP: %s *", username, ip);
  29686. }
  29687. }
  29688. }
  29689. case THREAD_CHECK_REFERRAL:
  29690. {
  29691. if(!rows)
  29692. {
  29693. SendClientMessage(extraid, COLOR_GREY, "The player specified doesn't exist.");
  29694. ShowDialogToPlayer(extraid, DIALOG_REFERRAL);
  29695. }
  29696. else
  29697. {
  29698. new username[MAX_PLAYER_NAME], ip[16];
  29699. cache_get_field_content(0, "username", username);
  29700. cache_get_field_content(0, "ip", ip);
  29701. if(!strcmp(GetPlayerIP(extraid), ip))
  29702. {
  29703. SendClientMessage(extraid, COLOR_GREY, "This account is listed under your own IP address. You can't refer yourself.");
  29704. ShowDialogToPlayer(extraid, DIALOG_REFERRAL);
  29705. }
  29706. else
  29707. {
  29708. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET referral_uid = %i WHERE uid = %i", cache_get_field_content_int(0, "uid"), PlayerData[extraid][pID]);
  29709. mysql_tquery(connectionID, queryBuffer);
  29710. PlayerData[extraid][pTutorial] = 0;
  29711. PlayerData[extraid][pSetup] = 0;
  29712. HideTutorialTextDraws(extraid);
  29713. SetPlayerSkin(extraid, PlayerData[extraid][pSkin]);
  29714. SetPlayerPos(extraid, 1585.4670,-2332.8362,13.5890);
  29715. SetPlayerFacingAngle(extraid, 87.7721);
  29716. print("Spawned player on spawn 1");
  29717. SetPlayerVirtualWorld(extraid, 0);
  29718. SetCameraBehindPlayer(extraid);
  29719. StopAudioStreamForPlayer(extraid);
  29720. TogglePlayerControllable(extraid, 1);
  29721. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET setup = 0, gender = %i, age = %i, skin = %i WHERE uid = %i", PlayerData[extraid][pGender], PlayerData[extraid][pAge], PlayerData[extraid][pSkin], PlayerData[extraid][pID]);
  29722. mysql_tquery(connectionID, queryBuffer);
  29723. SendClientMessage(extraid, COLOR_WHITE, "Welcome to {00aa00}Old School Roleplay{FFFFFF}. Make sure to visit os-rp.net for news and updates.");
  29724. SendClientMessage(extraid, COLOR_WHITE, "Use the {FFFF90}/locate{FFFFFF} command to point to locations of jobs, businesses, and common places.");
  29725. SendStaffMessage(COLOR_YELLOW, "OnPlayerSpawn: %s[%d] has just spawned on Old School Roleplay for the first time!", GetRPName(extraid), extraid);
  29726. StopAudioStreamForPlayer(extraid);
  29727. PlayerData[extraid][pReferralUID] = cache_get_field_content_int(0, "uid");
  29728. DestroyDynamic3DTextLabel(fRepfamtext[extraid]);
  29729. fRepfamtext[extraid] = Text3D:INVALID_3DTEXT_ID;
  29730. SendClientMessageEx(extraid, COLOR_YELLOW, "You have chosen %s as your referral. This player will be rewarded once you reach level 3.", username);
  29731. //SendClientMessage(extraid, COLOR_YELLOW, "That's all the information we need right now. The tutorial will start in just a moment.");
  29732. SendClientMessage(extraid, COLOR_AQUA, "You need a driver's license, the DMV has been marked on your map. Navigate to the marker to begin your drivers test.");
  29733. PlayerData[extraid][pCP] = CHECKPOINT_MISC;
  29734. SetPlayerCheckpoint(extraid, 1219.2590, -1812.1093, 16.5938, 3.0);
  29735. }
  29736. }
  29737. }
  29738. case THREAD_REWARD_REFERRER:
  29739. {
  29740. if(rows)
  29741. {
  29742. new username[MAX_PLAYER_NAME], ip[16], referralid = INVALID_PLAYER_ID;
  29743. cache_get_field_content(0, "username", username);
  29744. cache_get_field_content(0, "ip", ip);
  29745. // Add a log entry for this referral.
  29746. Log_Write("log_referrals", "%s (uid: %i) (IP: %s) has received 10 cookies for referring %s (uid: %i) (IP: %s).", username, PlayerData[extraid][pReferralUID], ip, GetPlayerNameEx(extraid), PlayerData[extraid][pID], GetPlayerIP(extraid));
  29747. // Check to see if any of the players online match the player's referral UID.
  29748. foreach(new i : Player)
  29749. {
  29750. if(i != extraid && PlayerData[i][pLogged] && PlayerData[i][pID] == PlayerData[extraid][pReferralUID])
  29751. {
  29752. referralid = i;
  29753. break;
  29754. }
  29755. }
  29756. // Referrer is online.
  29757. if(referralid != INVALID_PLAYER_ID && strcmp(GetPlayerIP(referralid), GetPlayerIP(extraid)) != 0)
  29758. {
  29759. PlayerData[referralid][pCookies] += 10;
  29760. SendClientMessage(referralid, COLOR_GREEN, "A player who you've referred reached level 3. Therefore you received 10 cookies!");
  29761. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s (IP: %s) earned 10 cookies for referring %s (IP: %s).", GetRPName(referralid), GetPlayerIP(referralid), GetRPName(extraid), GetPlayerIP(extraid));
  29762. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET cookies = cookies + 10 WHERE uid = %i AND ip != '%s'", PlayerData[extraid][pReferralUID], GetPlayerIP(extraid));
  29763. mysql_tquery(connectionID, queryBuffer);
  29764. }
  29765. else
  29766. {
  29767. // Referrer is offline. Let's give them their cookies and increment refercount which sends them an alert on login!
  29768. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET cookies = cookies + 10, refercount = refercount + 1 WHERE uid = %i AND ip != '%s'", PlayerData[extraid][pReferralUID], GetPlayerIP(extraid));
  29769. mysql_tquery(connectionID, queryBuffer);
  29770. }
  29771. // Finally, remove the player's link to the referrer as the prize has been given.
  29772. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET referral_uid = 0 WHERE uid = %i", PlayerData[extraid][pID]);
  29773. mysql_tquery(connectionID, queryBuffer);
  29774. }
  29775. }
  29776. case THREAD_LIST_FLAGGED:
  29777. {
  29778. new
  29779. flags[MAX_PLAYERS],
  29780. username[MAX_PLAYER_NAME],
  29781. targetid;
  29782. SendClientMessage(extraid, COLOR_NAVYBLUE, "_____ Flagged Players _____");
  29783. for(new i = 0; i < rows; i ++)
  29784. {
  29785. cache_get_row(i, 0, username);
  29786. if(IsPlayerOnline(username, targetid))
  29787. {
  29788. flags[targetid]++;
  29789. }
  29790. }
  29791. foreach(new i : Player)
  29792. {
  29793. if(flags[i] > 0)
  29794. {
  29795. SendClientMessageEx(extraid, COLOR_GREY3, "* %s[%i] has %i active flags.", GetRPName(i), i, flags[i]);
  29796. }
  29797. }
  29798. }
  29799. case THREAD_LIST_ACHIEVEMENTS:
  29800. {
  29801. static string[2048];
  29802. new achieved[sizeof(achievementInfo)], achievement[32], title[64], count;
  29803. string = "Name\tDescription\tStatus";
  29804. for(new i = 0; i < rows; i ++)
  29805. {
  29806. cache_get_field_content(i, "achievement", achievement);
  29807. for(new x = 0; x < sizeof(achievementInfo); x ++)
  29808. {
  29809. if(!strcmp(achievementInfo[x][aName], achievement, true))
  29810. {
  29811. achieved[x] = true;
  29812. count++;
  29813. }
  29814. }
  29815. }
  29816. for(new i = 0; i < sizeof(achievementInfo); i ++)
  29817. {
  29818. if(achieved[i])
  29819. format(string, sizeof(string), "%s\n%s\t%s\t{00AA00}Unlocked{FFFFFF}", string, achievementInfo[i][aName], achievementInfo[i][aDescription]);
  29820. else
  29821. format(string, sizeof(string), "%s\n%s\t%s\t{ED6464}Locked{FFFFFF}", string, achievementInfo[i][aName], achievementInfo[i][aDescription]);
  29822. }
  29823. format(title, sizeof(title), "Achievements (%i/%i unlocked)", count, sizeof(achievementInfo));
  29824. Dialog_Show(extraid, 0, DIALOG_STYLE_TABLIST_HEADERS, title, string, "OK", "");
  29825. }
  29826. case THREAD_LIST_ADMINS:
  29827. {
  29828. new username[MAX_PLAYER_NAME], lastlogin[24];
  29829. // SendClientMessage(extraid, COLOR_GREEN, "---- Admin Team ----");
  29830. static strings[1024];
  29831. strings = "Name\t\tLast Login\tStrikes\tRank";
  29832. for(new i = 0; i < rows; i ++)
  29833. {
  29834. cache_get_field_content(i, "username", username);
  29835. cache_get_field_content(i, "lastlogin", lastlogin);
  29836. // cache_get_field_content_int(i, "adminstrikes", AdminStrikes);
  29837. // cache_get_field_content(i, "adminname", PlayerData[i][pAdminName], connectionID, MAX_PLAYER_NAME);
  29838. new adminstring[64];
  29839. switch(cache_get_field_content_int(i, "adminlevel"))
  29840. {
  29841. case 1: adminstring = "Secret Admin";
  29842. case 2: adminstring = "{00FF00}Trial Admin";
  29843. case 3: adminstring = "{00AA00}Junior Admin";
  29844. case 4: adminstring = "{00AA00}General Admin";
  29845. case 5: adminstring = "{FFA500}Senior Admin";
  29846. case 6: adminstring = "{FF0000}Head Admin";
  29847. case 7: adminstring = "{298EFF}Lead Head Admin";
  29848. case 8: adminstring = "{298EFF}Executive Admin";
  29849. case 9: adminstring = "{D909D9}Asst Management";
  29850. case 10: adminstring = "{D909D9}Management";
  29851. }
  29852. format(strings, sizeof(strings), "%s\n%s\t%s\t%d\t%s {ffffff}(%d)\n", strings, username, lastlogin, PlayerData[i][pAdminStrike], adminstring, cache_get_field_content_int(i, "adminlevel"));
  29853. if(strlen(strings) > 0)
  29854. {
  29855. Dialog_Show(extraid, DIALOG_NONE, DIALOG_STYLE_TABLIST_HEADERS, "Admin Team", strings, "Okay", "");
  29856. //else Dialog_Show(extraid, DIALOG_ADMINLIST, DIALOG_STYLE_TABLIST_HEADERS, "Admin Team", strings, "Okay", "");
  29857. }
  29858. // SendClientMessageEx(extraid, COLOR_GREY2, "Level %i Admin %s - Last Seen: %s", cache_get_field_content_int(i, "adminlevel"), username, lastlogin);
  29859. }
  29860. }
  29861. case THREAD_DUPLICATE_LANDOBJ:
  29862. {
  29863. if(cache_get_row_int(0, 0) >= GetLandObjectCapacity(LandInfo[PlayerData[extraid][pObjectLand]][lLevel]))
  29864. {
  29865. SendClientMessageEx(extraid, COLOR_GREY, "You are only only allowed up to %i objects for your land.", GetLandObjectCapacity(LandInfo[PlayerData[extraid][pObjectLand]][lLevel]));
  29866. }
  29867. else
  29868. {
  29869. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT name, modelid, price, pos_x, pos_y, pos_z, rot_x, rot_y, rot_z FROM landobjects WHERE id = %i", Streamer_GetExtraInt(PlayerData[extraid][pSelected], E_OBJECT_INDEX_ID));
  29870. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_DUPLICATE_LANDOBJECT, extraid);
  29871. }
  29872. }
  29873. case THREAD_CHECKDUPE_FURNITURE:
  29874. {
  29875. }
  29876. case THREAD_LOAD_LOCATIONS:
  29877. {
  29878. for(new i = 0; i < rows && i < MAX_LOCATIONS; i ++)
  29879. {
  29880. cache_get_field_content(i, "name", LocationInfo[i][locName], connectionID, 64);
  29881. LocationInfo[i][locID] = cache_get_field_content_int(i, "id");
  29882. LocationInfo[i][locPosX] = cache_get_field_content_float(i, "pos_x");
  29883. LocationInfo[i][locPosY] = cache_get_field_content_float(i, "pos_y");
  29884. LocationInfo[i][locPosZ] = cache_get_field_content_float(i, "pos_z");
  29885. LocationInfo[i][locExists] = true;
  29886. }
  29887. printf("[Script] %i locations loaded", (rows < MAX_LOCATIONS) ? (rows) : (MAX_LOCATIONS));
  29888. }
  29889. case THREAD_UPDATE_LANDLABELS:
  29890. {
  29891. new landid = extraid;
  29892. new string[128];
  29893. if(IsValidDynamic3DTextLabel(LandInfo[landid][lTextdraw]))
  29894. {
  29895. if(LandInfo[landid][lOwnerID] > 0)
  29896. {
  29897. format(string, sizeof(string), "This land is owned by %s\n{FFD700}Level: %i/5\n{FFFFFF}%i/%i Objects", LandInfo[landid][lOwner], LandInfo[landid][lLevel], cache_get_row_int(0, 0), GetLandObjectCapacity(LandInfo[landid][lLevel]));
  29898. UpdateDynamic3DTextLabelText(LandInfo[landid][lTextdraw], COLOR_GREY, string);
  29899. }
  29900. else
  29901. {
  29902. format(string, sizeof(string), "This land is for sale by the state\n{00AA00}Price: %s{FFFFFF}\n{FFD700}Level: %i/5\n{FFFFFF}%i/%i Objects", FormatNumber(LandInfo[landid][lPrice]), LandInfo[landid][lLevel], cache_get_row_int(0, 0), GetLandObjectCapacity(LandInfo[landid][lLevel]));
  29903. UpdateDynamic3DTextLabelText(LandInfo[landid][lTextdraw], COLOR_GREY, string);
  29904. }
  29905. }
  29906. }
  29907. case THREAD_LOAD_CREWS:
  29908. {
  29909. for(new i = 0; i < MAX_GANGS; i ++)
  29910. {
  29911. for(new r = 0; r < MAX_GANG_CREWS; r ++)
  29912. {
  29913. GangCrews[i][r][0] = 0;
  29914. }
  29915. }
  29916. for(new i = 0; i < rows; i ++)
  29917. {
  29918. cache_get_field_content(i, "name", GangCrews[cache_get_field_content_int(i, "id")][cache_get_field_content_int(i, "crewid")], connectionID, 32);
  29919. }
  29920. printf("[Script] %i crews loaded", rows);
  29921. }
  29922. case THREAD_LIST_VIPS:
  29923. {
  29924. new username[MAX_PLAYER_NAME], lastlogin[24], viplevel, viptime;
  29925. SendClientMessage(extraid, COLOR_VIP, "---- VIP List ----");
  29926. for(new i = 0; i < rows; i ++)
  29927. {
  29928. cache_get_field_content(i, "username", username);
  29929. cache_get_field_content(i, "lastlogin", lastlogin);
  29930. viplevel = cache_get_field_content_int(i, "vippackage");
  29931. viptime = cache_get_field_content_int(i, "viptime");
  29932. SendClientMessageEx(extraid, COLOR_GREY2, "[%i] {D909D9}%s VIP{C8C8C8} %s - Last Seen: %s - Expires: %s", viplevel, GetVIPRank(viplevel), username, lastlogin, GetDateFromTimestamp(viptime, 4));
  29933. }
  29934. }
  29935. case THREAD_LOAD_ATMS:
  29936. {
  29937. for(new i = 0; i < rows && i < MAX_ATMS; i ++)
  29938. {
  29939. ATM[i][atmExists] = 1;
  29940. ATM[i][atmID] = cache_get_field_content_int(i, "atmID");
  29941. ATM[i][atmSpawn][0] = cache_get_field_content_float(i, "atmX");
  29942. ATM[i][atmSpawn][1] = cache_get_field_content_float(i, "atmY");
  29943. ATM[i][atmSpawn][2] = cache_get_field_content_float(i, "atmZ");
  29944. ATM[i][atmSpawn][3] = cache_get_field_content_float(i, "atmA");
  29945. ATM[i][atmInterior] = cache_get_field_content_int(i, "atmInterior");
  29946. ATM[i][atmWorld] = cache_get_field_content_int(i, "atmWorld");
  29947. ATM[i][atmObject] = INVALID_OBJECT_ID;
  29948. ATM[i][atmText] = INVALID_3DTEXT_ID;
  29949. UpdateATM(i);
  29950. }
  29951. printf("[Script] %i atms loaded", (rows < MAX_ATMS) ? (rows) : (MAX_ATMS));
  29952. }
  29953. case THREAD_REMOVE_VIP:
  29954. {
  29955. printf("[Script] %i vips removed.", rows);
  29956. }
  29957. case LOADCRATE_THREAD:
  29958. {
  29959. }
  29960. case THREAD_LOAD_GATES:
  29961. {
  29962. }
  29963. case THREAD_RELEASECAR:
  29964. {
  29965. if(!rows)
  29966. {
  29967. SendClientMessage(extraid, COLOR_GREY, "You own no vehicles.");
  29968. }
  29969. else
  29970. {
  29971. new string[1024], vehicleid;
  29972. string = "ID\tName\tRelease Price";
  29973. for(new i = 0; i < rows; i ++)
  29974. {
  29975. if((vehicleid = GetVehicleLinkedID(cache_get_field_content_int(i, "id"))) != INVALID_VEHICLE_ID)
  29976. {
  29977. format(string, sizeof(string), "%s\n%d\t%s\t%s\n", string, i + 1, GetVehicleName(vehicleid), FormatNumber(cache_get_field_content_int(i, "impoundprice")));
  29978. ListedVehicles[extraid][i++] = vehicleid;
  29979. }
  29980. else
  29981. {
  29982. format(string, sizeof(string), "%s\n%d\t%s\t%s\n", string, i + 1, vehicleNames[cache_get_field_content_int(i, "modelid") - 400], FormatNumber(cache_get_field_content_int(i, "carImpoundPrice")));
  29983. ListedVehicles[extraid][i++] = vehicleid;
  29984. }
  29985. }
  29986. Dialog_Show(extraid, DIALOG_RELEASECAR, DIALOG_STYLE_TABLIST_HEADERS, "Release Vehicle", string, "Select", "Cancel");
  29987. }
  29988. }
  29989. case SENDDATA_THREAD:
  29990. {
  29991. if(cache_affected_rows(connectionID) > 0)
  29992. {
  29993. printf("saved");
  29994. }
  29995. else
  29996. {
  29997. printf("fucks");
  29998. }
  29999. }
  30000. case THREAD_GANGLOGS:
  30001. {
  30002. new ganglogs[250], date[24], strings[1040];
  30003. strings = "Date\tDescription";
  30004. for(new i = 0; i < rows; i ++)
  30005. {
  30006. cache_get_field_content(i, "description", ganglogs);
  30007. cache_get_field_content(i, "date", date);
  30008. format(strings, sizeof(strings), "%s\n%s\t%s\n",strings, date, ganglogs);
  30009. if(strlen(strings) > 0)
  30010. {
  30011. Dialog_Show(extraid, DIALOG_NONE, DIALOG_STYLE_TABLIST_HEADERS, "Testing Gang LOgs", strings, "Okay", "");
  30012. //else Dialog_Show(extraid, DIALOG_ADMINLIST, DIALOG_STYLE_TABLIST_HEADERS, "Admin Team", strings, "Okay", "");
  30013. }
  30014. }
  30015. }
  30016. }
  30017. }
  30018. forward OnLoadPayphones();
  30019. public OnLoadPayphones()
  30020. {
  30021. new
  30022. rows = cache_get_row_count(connectionID);
  30023. for (new i = 0; i < rows; i ++)
  30024. {
  30025. Payphones[i][phExists] = 1;
  30026. Payphones[i][phID] = cache_get_field_content_int(i, "phID");
  30027. Payphones[i][phNumber] = cache_get_field_content_int(i, "phNumber");
  30028. Payphones[i][phX] = cache_get_field_content_float(i, "phX");
  30029. Payphones[i][phY] = cache_get_field_content_float(i, "phY");
  30030. Payphones[i][phZ] = cache_get_field_content_float(i, "phZ");
  30031. Payphones[i][phA] = cache_get_field_content_float(i, "phA");
  30032. Payphones[i][phInterior] = cache_get_field_content_int(i, "phInterior");
  30033. Payphones[i][phWorld] = cache_get_field_content_int(i, "phWorld");
  30034. Payphones[i][phCaller] = INVALID_PLAYER_ID;
  30035. Payphones[i][phObject] = INVALID_OBJECT_ID;
  30036. Payphones[i][phText] = INVALID_3DTEXT_ID;
  30037. UpdatePayphone(i);
  30038. }
  30039. }
  30040. forward OnLoadFurniture();
  30041. public OnLoadFurniture()
  30042. {
  30043. new
  30044. rows = cache_get_row_count(connectionID);
  30045. for (new i = 0; i < rows; i ++)
  30046. {
  30047. Furniture[i][fExists] = 1;
  30048. Furniture[i][fID] = cache_get_field_content_int(i, "fID");
  30049. Furniture[i][fHouseID] = cache_get_field_content_int(i, "fHouseID");
  30050. Furniture[i][fModel] = cache_get_field_content_int(i, "fModel");
  30051. Furniture[i][fSpawn][0] = cache_get_field_content_float(i, "fX");
  30052. Furniture[i][fSpawn][1] = cache_get_field_content_float(i, "fY");
  30053. Furniture[i][fSpawn][2] = cache_get_field_content_float(i, "fZ");
  30054. Furniture[i][fSpawn][3] = cache_get_field_content_float(i, "fRX");
  30055. Furniture[i][fSpawn][4] = cache_get_field_content_float(i, "fRY");
  30056. Furniture[i][fSpawn][5] = cache_get_field_content_float(i, "fRZ");
  30057. Furniture[i][fInterior] = cache_get_field_content_int(i, "fInterior");
  30058. Furniture[i][fWorld] = cache_get_field_content_int(i, "fWorld");
  30059. Furniture[i][fCode] = cache_get_field_content_int(i, "fCode");
  30060. Furniture[i][fMoney] = cache_get_field_content_int(i, "fMoney");
  30061. Furniture[i][fMaterial][0] = cache_get_field_content_int(i, "Mat1");
  30062. Furniture[i][fMaterial][1] = cache_get_field_content_int(i, "Mat2");
  30063. Furniture[i][fMaterial][2] = cache_get_field_content_int(i, "Mat3");
  30064. Furniture[i][fMatColour][0] = cache_get_field_content_int(i, "MatColor1");
  30065. Furniture[i][fMatColour][1] = cache_get_field_content_int(i, "MatColor2");
  30066. Furniture[i][fMatColour][2] = cache_get_field_content_int(i, "MatColor3");
  30067. Furniture[i][fObject] = INVALID_OBJECT_ID;
  30068. Furniture[i][fText] = INVALID_3DTEXT_ID;
  30069. UpdateFurniture(i);
  30070. }
  30071. printf("(SQL) %i furniture loaded.", rows);
  30072. }
  30073. // ---------------------------------------
  30074. // ---- PRIVATE LS ELEVATOR FORWARDS -----
  30075. forward Elevator_Initialize();
  30076. forward Elevator_Destroy();
  30077. forward Elevator_OpenDoors();
  30078. forward Elevator_CloseDoors();
  30079. forward Floor_OpenDoors(floorid);
  30080. forward Floor_CloseDoors(floorid);
  30081. forward Elevator_MoveToFloor(floorid);
  30082. forward Elevator_Boost(floorid); // Increases the elevator speed until it reaches 'floorid'.
  30083. forward Elevator_TurnToIdle();
  30084. forward ReadNextFloorInQueue();
  30085. forward RemoveFirstQueueFloor();
  30086. forward AddFloorToQueue(floorid);
  30087. forward IsFloorInQueue(floorid);
  30088. forward ResetElevatorQueue();
  30089. forward DidPlayerRequestElevator(playerid);
  30090. forward Float:GetElevatorZCoordForFloor(floorid);
  30091. forward Float:GetDoorsZCoordForFloor(floorid);
  30092. func showmotd(playerid)
  30093. {
  30094. TextDrawShowForPlayer(playerid, Textdraw2);
  30095. TextDrawShowForPlayer(playerid, Textdraw3);
  30096. return 1;
  30097. }
  30098. func hidemotd(playerid)
  30099. {
  30100. TextDrawHideForPlayer(playerid, Textdraw2);
  30101. TextDrawHideForPlayer(playerid, Textdraw3);
  30102. return 1;
  30103. }
  30104. public OnGameModeInit()
  30105. {
  30106. // Default values, don't touch them - Pedro //
  30107. SetGameModeText("Loading...");
  30108. SendRconCommand("weburl www.os-rp.net");
  30109. print("Old School Roleplay is loading...");
  30110. connectionID = mysql_connect(MYSQL_HOSTNAME, MYSQL_USERNAME, MYSQL_DATABASE, MYSQL_PASSWORD);
  30111. if(mysql_errno(connectionID))
  30112. {
  30113. print("[ERROR] - Unable to establish a connection with the MySQL server...");
  30114. SendRconCommand("exit");
  30115. return 0;
  30116. }
  30117. else
  30118. {
  30119. //spawn vehicles
  30120. CreateVehicle(421, 1559.9244, -2338.5549, 13.3744, 89.7600, -1, -1, 100);
  30121. CreateVehicle(421, 1559.9818, -2331.9814, 13.3744, 89.7600, -1, -1, 100);
  30122. CreateVehicle(436, 1559.8101, -2335.2644, 13.2537, 89.5200, -1, -1, 100);
  30123. CreateVehicle(576, 1560.0779, -2328.6450, 13.1204, 89.7600, -1, -1, 100);
  30124. CreateVehicle(576, 1559.9822, -2325.3567, 13.1204, 90.1800, -1, -1, 100);
  30125. CreateVehicle(576, 1560.1245, -2321.9968, 13.1204, 90.1800, -1, -1, 100);
  30126. CreateVehicle(576, 1560.3719, -2318.7837, 13.1204, 90.1800, -1, -1, 100);
  30127. CreateVehicle(576, 1560.3429, -2315.4192, 13.1204, 90.1800, -1, -1, 100);
  30128. CreateVehicle(576, 1560.3474, -2312.2234, 13.1204, 90.1800, -1, -1, 100);
  30129. for(new i = 0; i < MAX_VEHICLES; i ++)
  30130. {
  30131. ResetVehicle(i);
  30132. }
  30133. mysql_tquery(connectionID, "TRUNCATE TABLE shots");
  30134. mysql_tquery(connectionID, "SELECT * FROM houses", "OnQueryFinished", "ii", THREAD_LOAD_HOUSES, 0);
  30135. mysql_tquery(connectionID, "SELECT * FROM rp_furniture", "OnLoadFurniture");
  30136. mysql_tquery(connectionID, "SELECT * FROM garages", "OnQueryFinished", "ii", THREAD_LOAD_GARAGES, 0);
  30137. mysql_tquery(connectionID, "SELECT * FROM businesses", "OnQueryFinished", "ii", THREAD_LOAD_BUSINESSES, 0);
  30138. mysql_tquery(connectionID, "SELECT * FROM entrances", "OnQueryFinished", "ii", THREAD_LOAD_ENTRANCES, 0);
  30139. mysql_tquery(connectionID, "SELECT * FROM factions", "OnQueryFinished", "ii", THREAD_LOAD_FACTIONS, 0);
  30140. mysql_tquery(connectionID, "SELECT * FROM factionranks", "OnQueryFinished", "ii", THREAD_LOAD_FACTIONRANKS, 0);
  30141. mysql_tquery(connectionID, "SELECT * FROM factionskins", "OnQueryFinished", "ii", THREAD_LOAD_FACTIONSKINS, 0);
  30142. mysql_tquery(connectionID, "SELECT * FROM factionpay", "OnQueryFinished", "ii", THREAD_LOAD_FACTIONPAY, 0);
  30143. mysql_tquery(connectionID, "SELECT * FROM divisions", "OnQueryFinished", "ii", THREAD_LOAD_DIVISIONS, 0);
  30144. mysql_tquery(connectionID, "SELECT * FROM lands", "OnQueryFinished", "ii", THREAD_LOAD_LANDS, 0);
  30145. mysql_tquery(connectionID, "SELECT * FROM landobjects", "OnQueryFinished", "ii", THREAD_LOAD_LANDOBJECTS, 0);
  30146. mysql_tquery(connectionID, "SELECT * FROM vehicles WHERE ownerid = 0", "OnQueryFinished", "ii", THREAD_LOAD_VEHICLES, 0);
  30147. mysql_tquery(connectionID, "SELECT * FROM gangs", "OnQueryFinished", "ii", THREAD_LOAD_GANGS, 0);
  30148. mysql_tquery(connectionID, "SELECT * FROM gangranks", "OnQueryFinished", "ii", THREAD_LOAD_GANGRANKS, 0);
  30149. mysql_tquery(connectionID, "SELECT * FROM gangskins", "OnQueryFinished", "ii", THREAD_LOAD_GANGSKINS, 0);
  30150. mysql_tquery(connectionID, "SELECT * FROM points", "OnQueryFinished", "ii", THREAD_LOAD_POINTS, 0);
  30151. mysql_tquery(connectionID, "SELECT * FROM turfs", "OnQueryFinished", "ii", THREAD_LOAD_TURFS, 0);
  30152. mysql_tquery(connectionID, "SELECT * FROM factionlockers", "OnQueryFinished", "ii", THREAD_LOAD_LOCKERS, 0);
  30153. mysql_tquery(connectionID, "SELECT * FROM locations", "OnQueryFinished", "ii", THREAD_LOAD_LOCATIONS, 0);
  30154. mysql_tquery(connectionID, "SELECT * FROM crews", "OnQueryFinished", "ii", THREAD_LOAD_CREWS, 0);
  30155. mysql_tquery(connectionID, "SELECT * FROM rp_atms", "OnQueryFinished", "ii", THREAD_LOAD_ATMS, 0);
  30156. mysql_tquery(connectionID, "SELECT * FROM `crates`", "OnQueryFinished", "ii", LOADCRATE_THREAD, 0);
  30157. mysql_tquery(connectionID, "SELECT * FROM `gates`", "OnQueryFinished", "ii", THREAD_LOAD_GATES, 0);
  30158. mysql_tquery(connectionID, "SELECT * FROM `graffiti`", "Graffiti_Load", "");
  30159. mysql_tquery(connectionID, "SELECT * FROM `impoundlots`", "Impound_Load", "");
  30160. mysql_tquery(connectionID, "SELECT * FROM `gunracks`", "Rack_Load", "");
  30161. mysql_tquery(connectionID, "SELECT * FROM rp_dealercars", "OnLoadDealershipCars");
  30162. mysql_tquery(connectionID, "SELECT * FROM rp_payphones", "OnLoadPayphones");
  30163. mysql_tquery(connectionID, "SELECT * FROM rp_gundamages", "OnLoadGunDamages");
  30164. mysql_tquery(connectionID, "UPDATE "#TABLE_USERS" SET vippackage = 0, viptime = 0 WHERE viptime < UNIX_TIMESTAMP()", "OnQueryFinished", "ii", THREAD_REMOVE_VIP, 0);
  30165. print("Saving server information on mysql...");
  30166. SaveMysqlInformation();
  30167. switch(random(4))
  30168. {
  30169. case 0: gWeather = 13;
  30170. case 1: gWeather = 10;
  30171. case 2: gWeather = 7;
  30172. case 3: gWeather = 12;
  30173. }
  30174. SetWeather(gWeather);
  30175. gettime(.hour = gHour);
  30176. gettime(.hour = gWorldTime);
  30177. SetWorldTime(gWorldTime);
  30178. // Timers
  30179. SetTimer("MinuteTimer", 60000, true);
  30180. SetTimer("SecondTimer", 1000, true);
  30181. SetTimer("FuelTimer", 30000, true);
  30182. SetTimer("InjuredTimer", 5000, true);
  30183. SetTimerEx("RandomFire", 5400000, true, "i", 1);
  30184. SetTimer("OnPlayerUpdateEx", 1000, true);
  30185. SetTimer("UpdateCarRadars", 300, true);
  30186. SetTimer("AntiNameTag", 500, true);
  30187. EnableStuntBonusForAll(0);
  30188. DisableInteriorEnterExits();
  30189. Streamer_SetVisibleItems(STREAMER_TYPE_OBJECT, 1000);
  30190. Streamer_TickRate(100);
  30191. SetNameTagDrawDistance(30.0);
  30192. AntiDeAMX();
  30193. ManualVehicleEngineAndLights();
  30194. LoadServerInfo();
  30195. LoadGeneralTextdraws();
  30196. RefreshTime();
  30197. ResetRobbery();
  30198. LoadPickupsAndText();
  30199. LoadObjects();
  30200. LoadJobs();
  30201. mdc_LoadTextdraws();
  30202. CreateLSPDMap();
  30203. ResetElevatorQueue();
  30204. Elevator_Initialize();
  30205. print("OOOOOOOOOOOOOOOOOOOOOOOOOO????SSSSSSSSSSSSSSSSSSSSSS");
  30206. print("OOOOOOOOOOOOOOOOOOOOOOOOOO????SSSSSSSSSSSSSSSSSSSSSS");
  30207. print("OOOOOOOOOOOOOOOOOOOOOOOOOO????SSSSSSSSSSSSSSSSSSSSSS");
  30208. print("OOOO??????????????????OOOO????SSSSSS ");
  30209. print("OOOO??????????????????OOOO????SSSSSS ");
  30210. print("OOOO????ooooooooo?????OOOO????SSSSSS ");
  30211. print("OOOO????o?????? o?????OOOO????SSSSSSSSSSSSSSSSSSSSSS");
  30212. print("OOOO????o?????? o?????OOOO????SSSSSSSSSSSSSSSSSSSSSS");
  30213. print("OOOO????o?????? o?????OOOO????SSSSSSSSSSSSSSSSSSSSSS");
  30214. print("OOOO????ooooooooo?????OOOO????????????????????SSSSSS");
  30215. print("OOOO??????????????????OOOO????????????????????SSSSSS");
  30216. print("OOOO??????????????????OOOO????????????????????SSSSSS");
  30217. print("OOOOOOOOOOOOOOOOOOOOOOOOOO????SSSSSSSSSSSSSSSSSSSSSS");
  30218. print("OOOOOOOOOOOOOOOOOOOOOOOOOO????SSSSSSSSSSSSSSSSSSSSSS");
  30219. print("OOOOOOOOOOOOOOOOOOOOOOOOOO????SSSSSSSSSSSSSSSSSSSSSS");
  30220. print("______________________________________________");
  30221. print("| Old School Roleplay by Pedro |");
  30222. print("| Gamemode loaded successfully. |");
  30223. print("______________________________________________");
  30224. for(new o; o < CountDynamicObjects(); o++)
  30225. {
  30226. if(IsValidDynamicObject(o))
  30227. {
  30228. Streamer_SetFloatData(STREAMER_TYPE_OBJECT, o, E_STREAMER_DRAW_DISTANCE, 900.0);
  30229. }
  30230. }
  30231. new count;
  30232. for(new i = 0; i < MAX_OBJECTS; i ++)
  30233. {
  30234. if(IsValidObject(i)) count++;
  30235. }
  30236. printf("%i objects loaded.", count);
  30237. SetGameModeText(SERVER_REVISION);
  30238. }
  30239. return 1;
  30240. }
  30241. public OnGameModeExit()
  30242. {
  30243. SaveMysqlInformation();
  30244. for(new i = 0; i < MAX_OBJECTS; i ++)
  30245. {
  30246. if(IsValidObject(i) && gScriptObject{i})
  30247. {
  30248. DestroyObject(i);
  30249. }
  30250. }
  30251. Elevator_Destroy();
  30252. mysql_close(connectionID);
  30253. if(gDoubleXP)
  30254. {
  30255. SetDoubleXP(false);
  30256. }
  30257. return 1;
  30258. }
  30259. PlayNearbySound(playerid, soundid)
  30260. {
  30261. new
  30262. Float:x,
  30263. Float:y,
  30264. Float:z;
  30265. GetPlayerPos(playerid, x, y, z);
  30266. foreach (new i : Player)
  30267. {
  30268. if (i == playerid || IsPlayerStreamedIn(playerid, i))
  30269. {
  30270. PlayerPlaySound(i, soundid, x, y, z);
  30271. }
  30272. }
  30273. }
  30274. forward HandlePhoneRing(playerid);
  30275. public HandlePhoneRing(playerid)
  30276. {
  30277. if (PlayerData[playerid][pCalling] != 1)
  30278. {
  30279. return 0;
  30280. }
  30281. PlayNearbySound(playerid, 20600);
  30282. SetTimerEx("HandlePhoneRing", 4000, false, "i", playerid);
  30283. return 1;
  30284. }
  30285. forward HandlePhoneDial(playerid);
  30286. public HandlePhoneDial(playerid)
  30287. {
  30288. if (PlayerData[playerid][pCalling] != 1)
  30289. {
  30290. return 0;
  30291. }
  30292. PlayerPlaySound(playerid, 16001, 0.0, 0.0, 0.0);
  30293. SetTimerEx("HandlePhoneDial", 4000, false, "i", playerid);
  30294. return 1;
  30295. }
  30296. forward OnPhoneResponse(playerid, number);
  30297. public OnPhoneResponse(playerid, number)
  30298. {
  30299. if ((PlayerData[playerid][pPayphone] != -1 && GetClosestPayphone(playerid) != PlayerData[playerid][pPayphone]) || PlayerData[playerid][pTogglePhone] || !PlayerData[playerid][pCalling])
  30300. {
  30301. return 0;
  30302. }
  30303. switch (number)
  30304. {
  30305. case 911:
  30306. {
  30307. PlayerData[playerid][pCalling] = 911;
  30308. ShowActionBubble(playerid, "* %s dials a number on their keypad and begins a call.", GetRPName(playerid));
  30309. SendClientMessage(playerid, COLOR_YELLOW, "Dispatch: 911, what is your emergency? Enter 'police' or 'medic'.");
  30310. }
  30311. case 8294:
  30312. {
  30313. SendClientMessage(playerid, COLOR_YELLOW, "(Phone) Taxi: Would you like to request a taxi? Say 'yes' or 'no'.");
  30314. PlayerData[playerid][pCalling] = 8294;
  30315. }
  30316. case 6324:
  30317. {
  30318. SendClientMessage(playerid, COLOR_LIGHTORANGE, "Dispatch: This is the mechanic hotline. Please explain your situation to us.");
  30319. PlayerData[playerid][pCalling] = 6324;
  30320. }
  30321. default:
  30322. {
  30323. new targetid = GetPhonePlayerID(number);
  30324. if (targetid == INVALID_PLAYER_ID)
  30325. {
  30326. SendClientMessage(playerid, COLOR_GREY, "* This cellphone number is currently not in service. *");
  30327. HangupCall(playerid);
  30328. }
  30329. else if (IsPhoneBusy(number))
  30330. {
  30331. SendClientMessage(playerid, COLOR_GREY, "* You would hear a busy tone. *");
  30332. HangupCall(playerid);
  30333. }
  30334. }
  30335. }
  30336. return 1;
  30337. }
  30338. public OnPlayerConnect(playerid)
  30339. {
  30340. // check whether or not the player is using a proxy
  30341. if(gDisabledVPN)
  30342. {
  30343. new formato[59];
  30344. format(formato, sizeof formato, "www.shroomery.org/ythan/proxycheck.php?ip=%s", GetPlayerIP(playerid));
  30345. HTTP(playerid, HTTP_GET, formato, "", "HTTP_ProxyCheck");
  30346. }
  30347. for(new i = 0; i < MAX_DAMAGES; i++)
  30348. {
  30349. DamageData[playerid][i][damageTaken] = 0;
  30350. DamageData[playerid][i][damageWeapon] = 0;
  30351. DamageData[playerid][i][damageBy] = 0;
  30352. }
  30353. PlayerData[playerid][pBars][0] = CreatePlayerProgressBar(playerid, 556.000000, 130.000000, 57.000000, 4.699999, COLOR_SAMP, 100.0000, 0);
  30354. PlayerData[playerid][pShowFooter] = 0;
  30355. PlayerData[playerid][pChatstyle] = 0;
  30356. mdc_LoadPlayerTextdraws(playerid);
  30357. PlayerData[playerid][pInTurf] = 0;
  30358. PlayerData[playerid][pCalling] = 0;
  30359. InsideShamal[playerid]= INVALID_VEHICLE_ID;
  30360. PlayerData[playerid][pBugFix] = 0;
  30361. PlayerTextDrawHide(playerid, LoadingObjects0[playerid]);
  30362. PlayerTextDrawHide(playerid, LoadingObjects1[playerid]);
  30363. PlayerTextDrawHide(playerid, LoadingObjects2[playerid]);
  30364. PlayerTextDrawHide(playerid, LoadingObjects3[playerid]);
  30365. PlayerTextDrawHide(playerid, LoadingObjects4[playerid]);
  30366. PlayerTextDrawHide(playerid, LoadingObjects5[playerid]);
  30367. totalDamages[playerid] = 0;
  30368. PlayerData[playerid][pSpeakerPhone] = 0;
  30369. PlayerData[playerid][pRepairShop] = -1;
  30370. PlayerData[playerid][pRepairTime] = 0;
  30371. PlayerData[playerid][pEditRack] = -1;
  30372. CarRadars[playerid] = 0;
  30373. PlayerData[playerid][pRangeBooth] = -1;
  30374. PlayerData[playerid][pTargets] = 0;
  30375. PlayerData[playerid][pTargetLevel] = 0;
  30376. //police
  30377. //Drek's house
  30378. RemoveBuildingForPlayer(playerid, 1261, 1715.7109, -780.3281, 68.3984, 0.25);
  30379. RemoveBuildingForPlayer(playerid, 1267, 1715.7109, -780.3281, 68.3984, 0.25);
  30380. RemoveBuildingForPlayer(playerid, 617, 1724.1172, -746.0234, 50.4922, 0.25);
  30381. //Demorgan - new doc
  30382. RemoveBuildingForPlayer(playerid, 3268, 276.6563, 2023.7578, 16.6328, 0.25);
  30383. RemoveBuildingForPlayer(playerid, 3268, 276.6563, 1989.5469, 16.6328, 0.25);
  30384. RemoveBuildingForPlayer(playerid, 3268, 276.6563, 1955.7656, 16.6328, 0.25);
  30385. RemoveBuildingForPlayer(playerid, 3366, 276.6563, 2023.7578, 16.6328, 0.25);
  30386. RemoveBuildingForPlayer(playerid, 3366, 276.6563, 1989.5469, 16.6328, 0.25);
  30387. RemoveBuildingForPlayer(playerid, 3366, 276.6563, 1955.7656, 16.6328, 0.25);
  30388. RemoveBuildingForPlayer(playerid, 3267, 188.2422, 2081.6484, 22.4453, 0.25);
  30389. RemoveBuildingForPlayer(playerid, 3277, 188.2422, 2081.6484, 22.4063, 0.25);
  30390. RemoveBuildingForPlayer(playerid, 16093, 211.6484, 1810.1563, 20.7344, 0.25);
  30391. RemoveBuildingForPlayer(playerid, 16638, 211.7266, 1809.1875, 18.9844, 0.25);
  30392. RemoveBuildingForPlayer(playerid, 1411, 347.1953, 1799.2656, 18.7578, 0.25);
  30393. RemoveBuildingForPlayer(playerid, 1411, 342.9375, 1796.2891, 18.7578, 0.25);
  30394. RemoveBuildingForPlayer(playerid, 16670, 330.7891, 1813.2188, 17.8281, 0.25);
  30395. RemoveBuildingForPlayer(playerid, 3279, 165.9531, 1849.9922, 16.8203, 0.25);
  30396. RemoveBuildingForPlayer(playerid, 16095, 279.1328, 1829.7813, 16.6328, 0.25);
  30397. RemoveBuildingForPlayer(playerid, 3260, 259.0234, 1861.9063, 8.7578, 0.25);
  30398. RemoveBuildingForPlayer(playerid, 3260, 259.9688, 1864.9375, 8.7578, 0.25);
  30399. RemoveBuildingForPlayer(playerid, 3260, 258.0781, 1862.9531, 8.7578, 0.25);
  30400. RemoveBuildingForPlayer(playerid, 16094, 191.1406, 1870.0391, 21.4766, 0.25);
  30401. RemoveBuildingForPlayer(playerid, 16322, 248.7266, 1869.9844, 11.8516, 0.25);
  30402. RemoveBuildingForPlayer(playerid, 3260, 259.9688, 1866.9219, 8.7578, 0.25);
  30403. RemoveBuildingForPlayer(playerid, 3260, 258.0781, 1866.9219, 8.7578, 0.25);
  30404. RemoveBuildingForPlayer(playerid, 16641, 251.4453, 1866.3047, 9.2891, 0.25);
  30405. RemoveBuildingForPlayer(playerid, 16096, 120.5078, 1934.0313, 19.8281, 0.25);
  30406. RemoveBuildingForPlayer(playerid, 16671, 193.9531, 2051.7969, 20.1797, 0.25);
  30407. RemoveBuildingForPlayer(playerid, 16668, 357.9375, 2049.4219, 16.8438, 0.25);
  30408. RemoveBuildingForPlayer(playerid, 16669, 380.2578, 1914.9609, 17.4297, 0.25);
  30409. //VAGOSI BY DZIBA
  30410. RemoveBuildingForPlayer(playerid, 5019, 1936.468, -2079.109, 15.726, 0.250);
  30411. RemoveBuildingForPlayer(playerid, 4984, 1880.710, -2112.632, 21.257, 0.250);
  30412. RemoveBuildingForPlayer(playerid, 5087, 1880.710, -2112.632, 21.257, 0.250);
  30413. RemoveBuildingForPlayer(playerid, 4982, 1892.539, -2012.828, 21.375, 0.250);
  30414. RemoveBuildingForPlayer(playerid, 5086, 1892.539, -2012.828, 21.375, 0.250);
  30415. RemoveBuildingForPlayer(playerid, 1372, 1920.484, -2088.171, 12.687, 0.250);
  30416. RemoveBuildingForPlayer(playerid, 5016, 1936.468, -2079.109, 15.726, 0.250);
  30417. RemoveBuildingForPlayer(playerid, 1413, 1935.132, -2074.867, 13.726, 0.250);
  30418. RemoveBuildingForPlayer(playerid, 1308, 1951.835, -2095.625, 12.750, 0.250);
  30419. RemoveBuildingForPlayer(playerid, 1226, 1957.546, -2082.171, 16.390, 0.250);
  30420. RemoveBuildingForPlayer(playerid, 1308, 1950.453, -2074.164, 12.554, 0.250);
  30421. RemoveBuildingForPlayer(playerid, 1226, 1944.804, -2077.703, 15.851, 0.250);
  30422. //============================= drug house ================================
  30423. RemoveBuildingForPlayer(playerid, 3662, 2142.7031, -1657.9297, 17.5547, 0.25);
  30424. RemoveBuildingForPlayer(playerid, 3662, 2164.9375, -1666.3047, 17.5547, 0.25);
  30425. RemoveBuildingForPlayer(playerid, 3662, 2141.8672, -1693.3516, 17.5547, 0.25);
  30426. RemoveBuildingForPlayer(playerid, 3662, 2154.3516, -1713.6641, 17.4844, 0.25);
  30427. RemoveBuildingForPlayer(playerid, 5633, 2089.3594, -1643.9297, 18.2188, 0.25);
  30428. RemoveBuildingForPlayer(playerid, 1501, 2138.3438, -1697.1094, 14.0703, 0.25);
  30429. RemoveBuildingForPlayer(playerid, 3661, 2141.8672, -1693.3516, 17.5547, 0.25);
  30430. RemoveBuildingForPlayer(playerid, 3661, 2154.3516, -1713.6641, 17.4844, 0.25);
  30431. RemoveBuildingForPlayer(playerid, 1501, 2150.8281, -1717.4297, 14.0703, 0.25);
  30432. RemoveBuildingForPlayer(playerid, 1308, 2138.8984, -1678.9688, 14.1797, 0.25);
  30433. RemoveBuildingForPlayer(playerid, 3661, 2142.7031, -1657.9297, 17.5547, 0.25);
  30434. RemoveBuildingForPlayer(playerid, 1501, 2142.8594, -1663.0859, 14.0703, 0.25);
  30435. RemoveBuildingForPlayer(playerid, 1501, 2165.1094, -1671.4531, 14.0703, 0.25);
  30436. RemoveBuildingForPlayer(playerid, 3661, 2164.9375, -1666.3047, 17.5547, 0.25);
  30437. //=========General Hospital map by johnson=========//
  30438. seatbelt[playerid] = 0;
  30439. isharvesting[playerid] = 0;
  30440. if(IsPlayerNPC(playerid)) return 1;
  30441. // Nametag
  30442. chosednumber[playerid] = -1;
  30443. TutStep[playerid] = 0;
  30444. InsideTut[playerid] = 0;
  30445. SetPVarInt(playerid, "Mobile", 501);
  30446. PlayerData[playerid][pRobHouse] = -1;
  30447. GetPlayerName(playerid, PlayerData[playerid][pUsername], MAX_PLAYER_NAME);
  30448. DestroyDynamic3DTextLabel(fRepfamtext[playerid]);
  30449. fRepfamtext[playerid] = Text3D:INVALID_3DTEXT_ID;
  30450. SendClientMessage(playerid, 0xA9C4E4FF, "Establishing connection to the {00aa00}Old School Roleplay{A9C4E4} please wait...");
  30451. /////////////aerodrom nikola tesla
  30452. RemoveBuildingForPlayer(playerid, 1215, 1586.210, -2325.562, 13.023, 0.250);
  30453. RemoveBuildingForPlayer(playerid, 4992, 1654.539, -2286.804, 13.320, 0.250);
  30454. RemoveBuildingForPlayer(playerid, 712, 1568.578, -2364.148, 21.648, 0.250);
  30455. RemoveBuildingForPlayer(playerid, 620, 1569.312, -2342.109, 11.296, 0.250);
  30456. RemoveBuildingForPlayer(playerid, 1226, 1570.679, -2323.421, 16.312, 0.250);
  30457. //speed cameras
  30458. _vhudFlash[playerid] = CreatePlayerTextDraw(playerid, -20.000000, 2.000000,"|");
  30459. PlayerTextDrawUseBox(playerid,_vhudFlash[playerid],1);
  30460. PlayerTextDrawBoxColor(playerid,_vhudFlash[playerid],0xffffff55);
  30461. PlayerTextDrawTextSize(playerid,_vhudFlash[playerid],660.000000,22.000000);
  30462. PlayerTextDrawAlignment(playerid,_vhudFlash[playerid],0);
  30463. PlayerTextDrawBackgroundColor(playerid,_vhudFlash[playerid],0x000000ff);
  30464. PlayerTextDrawFont(playerid,_vhudFlash[playerid],3);
  30465. PlayerTextDrawLetterSize(playerid,_vhudFlash[playerid],1.000000,52.200000);
  30466. PlayerTextDrawColor(playerid,_vhudFlash[playerid],0xffffffff);
  30467. PlayerTextDrawSetOutline(playerid,_vhudFlash[playerid], 1);
  30468. PlayerTextDrawSetProportional(playerid,_vhudFlash[playerid], 1);
  30469. PlayerTextDrawSetShadow(playerid, _vhudFlash[playerid], 1);
  30470. firstperson[playerid] = 0;
  30471. PlayerData[playerid][pCarryCrate] = -1;
  30472. CreatePlayerTextDraws(playerid);
  30473. // ----------------------------------------------------------------------- //
  30474. PlayerData[playerid][pGender] = -1; // shitty register dialog
  30475. PlayerData[playerid][pAge] = 0;
  30476. // ----------------------------------------------------------------------- //
  30477. // ---------------------------< Mechanic > ------------------------------ //
  30478. RemoveBuildingForPlayer(playerid, 5516, 1977.8359, -1569.0469, 19.0703, 0.25);
  30479. RemoveBuildingForPlayer(playerid, 5634, 1931.3125, -1574.8438, 16.4609, 0.25);
  30480. RemoveBuildingForPlayer(playerid, 1524, 1959.3984, -1577.7578, 13.7578, 0.25);
  30481. RemoveBuildingForPlayer(playerid, 714, 2007.6094, -1556.6563, 12.5938, 0.25);
  30482. RemoveBuildingForPlayer(playerid, 1308, 1943.8672, -1602.8047, 12.7813, 0.25);
  30483. RemoveBuildingForPlayer(playerid, 5630, 1928.4922, -1575.9688, 20.5547, 0.25);
  30484. RemoveBuildingForPlayer(playerid, 1307, 1931.7422, -1569.8828, 12.6641, 0.25);
  30485. RemoveBuildingForPlayer(playerid, 700, 1942.5625, -1599.2969, 12.9922, 0.25);
  30486. RemoveBuildingForPlayer(playerid, 620, 1954.3594, -1603.6406, 12.5000, 0.25);
  30487. RemoveBuildingForPlayer(playerid, 645, 1976.1719, -1600.1797, 12.1953, 0.25);
  30488. RemoveBuildingForPlayer(playerid, 5475, 1977.8359, -1569.0469, 19.0703, 0.25);
  30489. RemoveBuildingForPlayer(playerid, 620, 1987.1172, -1618.2578, 12.5000, 0.25);
  30490. RemoveBuildingForPlayer(playerid, 1307, 1983.3359, -1557.6797, 12.6641, 0.25);
  30491. RemoveBuildingForPlayer(playerid, 700, 2021.3359, -1599.2969, 12.9922, 0.25);
  30492. RemoveBuildingForPlayer(playerid, 1264, 2019.5313, -1597.0000, 13.0703, 0.25);
  30493. RemoveBuildingForPlayer(playerid, 5422, 2071.4766, -1831.4219, 14.5625, 0.25);
  30494. RemoveBuildingForPlayer(playerid, 11327, -2026.9141, 129.4063, 30.4531, 0.25);
  30495. RemoveBuildingForPlayer(playerid, 11319, -1904.5313, 277.8984, 42.9531, 0.25);
  30496. // House objects
  30497. RemoveBuildingForPlayer(playerid, 14862, 245.5547, 300.8594, 998.8359, 0.25); // int 1
  30498. RemoveBuildingForPlayer(playerid, 1740, 243.8828, 301.9766, 998.2344, 0.25);
  30499. RemoveBuildingForPlayer(playerid, 14861, 245.7578, 302.2344, 998.5469, 0.25);
  30500. RemoveBuildingForPlayer(playerid, 14860, 246.5156, 301.5859, 1000.0000, 0.25);
  30501. RemoveBuildingForPlayer(playerid, 14864, 246.1875, 303.1094, 998.2656, 0.25);
  30502. RemoveBuildingForPlayer(playerid, 1734, 246.7109, 303.8750, 1002.1172, 0.25);
  30503. RemoveBuildingForPlayer(playerid, 14863, 246.9844, 303.5781, 998.7500, 0.25);
  30504. RemoveBuildingForPlayer(playerid, 2103, 248.4063, 300.5625, 999.3047, 0.25);
  30505. RemoveBuildingForPlayer(playerid, 2088, 248.4922, 304.3516, 998.2266, 0.25);
  30506. RemoveBuildingForPlayer(playerid, 1741, 248.4844, 306.1250, 998.1406, 0.25);
  30507. RemoveBuildingForPlayer(playerid, 1741, 248.8672, 301.9609, 998.1406, 0.25);
  30508. RemoveBuildingForPlayer(playerid, 1744, 250.1016, 301.9609, 999.4531, 0.25);
  30509. RemoveBuildingForPlayer(playerid, 1744, 250.1016, 301.9609, 1000.1563, 0.25);
  30510. /*RemoveBuildingForPlayer(playerid, 2251, 266.4531, 303.3672, 998.9844, 0.25); // int 2
  30511. RemoveBuildingForPlayer(playerid, 14867, 270.2813, 302.5547, 999.6797, 0.25);
  30512. RemoveBuildingForPlayer(playerid, 1720, 272.9063, 304.7891, 998.1641, 0.25);
  30513. RemoveBuildingForPlayer(playerid, 14870, 273.1641, 303.1719, 1000.9141, 0.25);
  30514. RemoveBuildingForPlayer(playerid, 2251, 273.9922, 303.3672, 998.9844, 0.25);
  30515. RemoveBuildingForPlayer(playerid, 14868, 274.1328, 304.5078, 1001.1953, 0.25);
  30516. RemoveBuildingForPlayer(playerid, 948, 266.5703, 306.4453, 998.1406, 0.25);
  30517. RemoveBuildingForPlayer(playerid, 14866, 270.1172, 307.6094, 998.7578, 0.25);
  30518. RemoveBuildingForPlayer(playerid, 14869, 273.8125, 305.0156, 998.9531, 0.25);*/
  30519. RemoveBuildingForPlayer(playerid, 15039, 2232.3438, -1106.7422, 1049.7500, 0.25); //
  30520. RemoveBuildingForPlayer(playerid, 15038, 2235.2891, -1108.1328, 1051.2656, 0.25);
  30521. RemoveBuildingForPlayer(playerid, 15035, 2205.9375, -1073.9922, 1049.4844, 0.25);
  30522. RemoveBuildingForPlayer(playerid, 15028, 2263.1250, -1138.2422, 1049.8438, 0.25);
  30523. RemoveBuildingForPlayer(playerid, 15026, 2264.9063, -1137.7656, 1051.3594, 0.25);
  30524. RemoveBuildingForPlayer(playerid, 2123, 2312.9609, -1145.0703, 1050.3203, 0.25);
  30525. RemoveBuildingForPlayer(playerid, 2123, 2314.2969, -1146.3125, 1050.3203, 0.25);
  30526. RemoveBuildingForPlayer(playerid, 2123, 2315.4219, -1145.0703, 1050.3203, 0.25);
  30527. RemoveBuildingForPlayer(playerid, 2086, 2314.2734, -1144.8984, 1050.0859, 0.25);
  30528. RemoveBuildingForPlayer(playerid, 2123, 2314.2969, -1143.6250, 1050.3203, 0.25);
  30529. RemoveBuildingForPlayer(playerid, 2281, 2318.7813, -1145.4609, 1054.5938, 0.25);
  30530. RemoveBuildingForPlayer(playerid, 2138, 2331.3359, -1144.0859, 1049.6953, 0.25);
  30531. RemoveBuildingForPlayer(playerid, 2138, 2335.3594, -1144.0703, 1049.6719, 0.25);
  30532. RemoveBuildingForPlayer(playerid, 2135, 2336.3516, -1144.0781, 1049.6719, 0.25);
  30533. RemoveBuildingForPlayer(playerid, 2305, 2337.3203, -1144.0781, 1049.6719, 0.25);
  30534. RemoveBuildingForPlayer(playerid, 2138, 2331.3359, -1143.1016, 1049.6953, 0.25);
  30535. RemoveBuildingForPlayer(playerid, 2138, 2337.3203, -1143.0938, 1049.6719, 0.25);
  30536. RemoveBuildingForPlayer(playerid, 1703, 2322.2266, -1142.4766, 1049.4766, 0.25);
  30537. RemoveBuildingForPlayer(playerid, 1822, 2323.9297, -1142.2578, 1049.4844, 0.25);
  30538. RemoveBuildingForPlayer(playerid, 1741, 2312.6484, -1140.7891, 1053.3750, 0.25);
  30539. RemoveBuildingForPlayer(playerid, 2138, 2331.3359, -1142.1094, 1049.6953, 0.25);
  30540. RemoveBuildingForPlayer(playerid, 2138, 2331.3359, -1141.1172, 1049.6953, 0.25);
  30541. RemoveBuildingForPlayer(playerid, 2079, 2334.4219, -1140.9688, 1050.3359, 0.25);
  30542. RemoveBuildingForPlayer(playerid, 1703, 2326.5234, -1140.5703, 1049.4766, 0.25);
  30543. RemoveBuildingForPlayer(playerid, 2138, 2337.3203, -1142.1094, 1049.6719, 0.25);
  30544. RemoveBuildingForPlayer(playerid, 2139, 2337.3125, -1141.1094, 1049.6641, 0.25);
  30545. RemoveBuildingForPlayer(playerid, 2088, 2338.4531, -1141.3672, 1053.2734, 0.25);
  30546. RemoveBuildingForPlayer(playerid, 2270, 2340.2734, -1141.7109, 1054.5391, 0.25);
  30547. RemoveBuildingForPlayer(playerid, 2138, 2331.3359, -1140.1328, 1049.6953, 0.25);
  30548. RemoveBuildingForPlayer(playerid, 1703, 2323.4375, -1139.5469, 1049.4766, 0.25);
  30549. RemoveBuildingForPlayer(playerid, 2079, 2333.3281, -1139.8672, 1050.3359, 0.25);
  30550. RemoveBuildingForPlayer(playerid, 2115, 2334.4297, -1139.6250, 1049.7109, 0.25);
  30551. RemoveBuildingForPlayer(playerid, 2079, 2335.3672, -1139.8750, 1050.3359, 0.25);
  30552. RemoveBuildingForPlayer(playerid, 2303, 2337.3281, -1140.1172, 1049.6719, 0.25);
  30553. RemoveBuildingForPlayer(playerid, 2090, 2309.5156, -1139.3438, 1053.4219, 0.25);
  30554. RemoveBuildingForPlayer(playerid, 2138, 2331.3359, -1139.1406, 1049.6953, 0.25);
  30555. RemoveBuildingForPlayer(playerid, 2079, 2333.3281, -1138.8281, 1050.3359, 0.25);
  30556. RemoveBuildingForPlayer(playerid, 2079, 2335.3672, -1138.8359, 1050.3359, 0.25);
  30557. RemoveBuildingForPlayer(playerid, 2298, 2336.5391, -1138.7891, 1053.2813, 0.25);
  30558. RemoveBuildingForPlayer(playerid, 2138, 2331.3359, -1138.1563, 1049.6953, 0.25);
  30559. RemoveBuildingForPlayer(playerid, 2136, 2337.3281, -1138.1328, 1049.6719, 0.25);
  30560. RemoveBuildingForPlayer(playerid, 2240, 2319.2500, -1137.8750, 1050.0156, 0.25);
  30561. RemoveBuildingForPlayer(playerid, 2240, 2329.5000, -1137.8750, 1050.0156, 0.25);
  30562. RemoveBuildingForPlayer(playerid, 2138, 2331.3359, -1137.1641, 1049.6953, 0.25);
  30563. RemoveBuildingForPlayer(playerid, 2079, 2334.4219, -1137.5859, 1050.3359, 0.25);
  30564. RemoveBuildingForPlayer(playerid, 2139, 2337.3125, -1137.1484, 1049.6641, 0.25);
  30565. RemoveBuildingForPlayer(playerid, 2088, 2310.6641, -1136.3047, 1053.3672, 0.25);
  30566. RemoveBuildingForPlayer(playerid, 2257, 2320.4141, -1134.6328, 1053.8281, 0.25);
  30567. RemoveBuildingForPlayer(playerid, 2138, 2331.3359, -1136.1719, 1049.6953, 0.25);
  30568. RemoveBuildingForPlayer(playerid, 2138, 2331.3359, -1135.1875, 1049.6953, 0.25);
  30569. RemoveBuildingForPlayer(playerid, 2254, 2328.1484, -1134.6172, 1054.0625, 0.25);
  30570. RemoveBuildingForPlayer(playerid, 2281, 2335.2656, -1136.4063, 1054.7266, 0.25);
  30571. RemoveBuildingForPlayer(playerid, 2106, 2336.5156, -1135.0156, 1053.8047, 0.25);
  30572. RemoveBuildingForPlayer(playerid, 2271, 2337.8047, -1135.3516, 1054.7031, 0.25);
  30573. RemoveBuildingForPlayer(playerid, 2138, 2337.3203, -1136.1641, 1049.6719, 0.25);
  30574. RemoveBuildingForPlayer(playerid, 2138, 2337.3203, -1135.1797, 1049.6719, 0.25);
  30575. RemoveBuildingForPlayer(playerid, 2106, 2339.2031, -1135.0156, 1053.8047, 0.25);
  30576. RemoveBuildingForPlayer(playerid, 1741, 2261.6953, -1223.0781, 1048.0156, 0.25);
  30577. RemoveBuildingForPlayer(playerid, 2088, 2258.1406, -1220.5859, 1048.0078, 0.25);
  30578. RemoveBuildingForPlayer(playerid, 2090, 2258.5938, -1221.5469, 1048.0625, 0.25);
  30579. RemoveBuildingForPlayer(playerid, 2528, 2254.4063, -1218.2734, 1048.0234, 0.25);
  30580. RemoveBuildingForPlayer(playerid, 2138, 2247.5547, -1213.9219, 1048.0156, 0.25);
  30581. RemoveBuildingForPlayer(playerid, 2138, 2247.5547, -1212.9375, 1048.0156, 0.25);
  30582. RemoveBuildingForPlayer(playerid, 2121, 2250.3047, -1213.9375, 1048.5234, 0.25);
  30583. RemoveBuildingForPlayer(playerid, 2526, 2252.4297, -1215.4531, 1048.0391, 0.25);
  30584. RemoveBuildingForPlayer(playerid, 2523, 2254.1953, -1215.4531, 1048.0156, 0.25);
  30585. RemoveBuildingForPlayer(playerid, 2297, 2255.4219, -1213.5313, 1048.0156, 0.25);
  30586. RemoveBuildingForPlayer(playerid, 2248, 2262.3906, -1215.5469, 1048.6094, 0.25);
  30587. RemoveBuildingForPlayer(playerid, 1816, 2261.4141, -1213.4531, 1048.0078, 0.25);
  30588. RemoveBuildingForPlayer(playerid, 2249, 2247.2969, -1212.1641, 1049.6250, 0.25);
  30589. RemoveBuildingForPlayer(playerid, 2249, 2247.2969, -1208.8594, 1049.6250, 0.25);
  30590. RemoveBuildingForPlayer(playerid, 2139, 2247.5625, -1211.9531, 1048.0078, 0.25);
  30591. RemoveBuildingForPlayer(playerid, 2136, 2247.5469, -1210.9688, 1048.0156, 0.25);
  30592. RemoveBuildingForPlayer(playerid, 2303, 2247.5469, -1208.9844, 1048.0156, 0.25);
  30593. RemoveBuildingForPlayer(playerid, 2138, 2247.5547, -1207.9766, 1048.0156, 0.25);
  30594. RemoveBuildingForPlayer(playerid, 2305, 2247.5547, -1206.9922, 1048.0156, 0.25);
  30595. RemoveBuildingForPlayer(playerid, 2109, 2250.2813, -1212.2500, 1048.4141, 0.25);
  30596. RemoveBuildingForPlayer(playerid, 2121, 2249.2344, -1211.4531, 1048.5234, 0.25);
  30597. RemoveBuildingForPlayer(playerid, 2121, 2250.3047, -1210.8984, 1048.5234, 0.25);
  30598. RemoveBuildingForPlayer(playerid, 2135, 2248.5234, -1206.9922, 1048.0156, 0.25);
  30599. RemoveBuildingForPlayer(playerid, 2319, 2250.3438, -1206.9609, 1048.0078, 0.25);
  30600. RemoveBuildingForPlayer(playerid, 1760, 2261.4609, -1212.0625, 1048.0078, 0.25);
  30601. RemoveBuildingForPlayer(playerid, 2126, 2258.1094, -1210.3750, 1048.0156, 0.25);
  30602. RemoveBuildingForPlayer(playerid, 15044, 2255.0938, -1209.7813, 1048.0313, 0.25);
  30603. RemoveBuildingForPlayer(playerid, 2247, 2258.4766, -1209.7891, 1048.9922, 0.25);
  30604. RemoveBuildingForPlayer(playerid, 2099, 2262.8047, -1208.4922, 1048.0156, 0.25);
  30605. RemoveBuildingForPlayer(playerid, 2254, 2254.1172, -1206.5000, 1050.7578, 0.25);
  30606. RemoveBuildingForPlayer(playerid, 2240, 2254.6328, -1207.2734, 1048.5625, 0.25);
  30607. RemoveBuildingForPlayer(playerid, 2252, 2256.2109, -1206.1016, 1048.8281, 0.25);
  30608. RemoveBuildingForPlayer(playerid, 2235, 2256.2188, -1206.8594, 1048.0078, 0.25);
  30609. RemoveBuildingForPlayer(playerid, 1760, 2257.6172, -1207.7266, 1048.0078, 0.25);
  30610. RemoveBuildingForPlayer(playerid, 2235, 2261.4297, -1206.2031, 1048.0078, 0.25);
  30611. RemoveBuildingForPlayer(playerid, 2252, 2262.1172, -1206.1016, 1048.8281, 0.25);
  30612. /*RemoveBuildingForPlayer(playerid, 1734, 2452.0313, -1702.0234, 1015.9688, 0.25);
  30613. RemoveBuildingForPlayer(playerid, 14742, 2451.9063, -1701.1875, 1014.8594, 0.25);
  30614. RemoveBuildingForPlayer(playerid, 14741, 2447.4219, -1693.4531, 1012.4766, 0.25);
  30615. RemoveBuildingForPlayer(playerid, 14761, 2449.9609, -1690.8438, 1014.0547, 0.25);
  30616. RemoveBuildingForPlayer(playerid, 2241, 2459.3828, -1691.4766, 1013.0078, 0.25);
  30617. RemoveBuildingForPlayer(playerid, 14745, 2460.2422, -1695.1016, 1012.9453, 0.25);*/
  30618. RemoveBuildingForPlayer(playerid, 2249, 2251.3594, -1218.1797, 1048.6953, 0.25);
  30619. RemoveBuildingForPlayer(playerid, 15049, 2334.3281, -1139.5859, 1051.1953, 0.25);
  30620. RemoveBuildingForPlayer(playerid, 15045, 2324.4297, -1143.3125, 1049.6016, 0.25);
  30621. // Miner objects
  30622. RemoveBuildingForPlayer(playerid, 5967, 1259.4375, -1246.8125, 17.1094, 0.25);
  30623. RemoveBuildingForPlayer(playerid, 5857, 1259.4375, -1246.8125, 17.1094, 0.25);
  30624. // Default values are handled via MySQL. Don't assign default values here.
  30625. //(playerid);
  30626. PlayerData[playerid][pGraffiti] = -1;
  30627. PlayerData[playerid][pGraffitiTime] = 0;
  30628. PlayerData[playerid][pEditGraffiti] = -1;
  30629. PlayerData[playerid][pEditLandGraffiti] = -1;
  30630. PlayerData[playerid][pID] = 0;
  30631. PlayerData[playerid][pLogged] = 0;
  30632. PlayerData[playerid][pvLock] = 0;
  30633. PlayerData[playerid][pKicked] = 0;
  30634. PlayerData[playerid][pLoginTries] = 0;
  30635. PlayerData[playerid][pSetup] = 0;
  30636. PlayerData[playerid][pGender] = 0;
  30637. PlayerData[playerid][pAge] = 0;
  30638. PlayerData[playerid][pSkin] = 0;
  30639. PlayerData[playerid][pCameraX] = 0;
  30640. PlayerData[playerid][pCameraY] = 0;
  30641. PlayerData[playerid][pCameraZ] = 0;
  30642. PlayerData[playerid][pPosX] = 0;
  30643. PlayerData[playerid][pPosY] = 0;
  30644. PlayerData[playerid][pPosZ] = 0;
  30645. PlayerData[playerid][pPosA] = 0;
  30646. PlayerData[playerid][pInterior] = 0;
  30647. PlayerData[playerid][pWorld] = 0;
  30648. PlayerData[playerid][pCash] = 5000;
  30649. PlayerData[playerid][pBank] = 0;
  30650. PlayerData[playerid][pPaycheck] = 0;
  30651. PlayerData[playerid][pLevel] = 1;
  30652. PlayerData[playerid][pWeight] = 0;
  30653. PlayerData[playerid][pReps] = 0;
  30654. PlayerData[playerid][pSpeedLevel] = 0;
  30655. PlayerData[playerid][pDistanceRan] = 0;
  30656. PlayerData[playerid][pGraphic] = 0;
  30657. PlayerData[playerid][pPasswordChanged] = 0;
  30658. PlayerData[playerid][pEXP] = 0;
  30659. PlayerData[playerid][pMinutes] = 0;
  30660. PlayerData[playerid][pHours] = 0;
  30661. PlayerData[playerid][pAdmin] = 0;
  30662. PlayerData[playerid][pAdminName] = 0;
  30663. PlayerData[playerid][pHelper] = 0;
  30664. PlayerData[playerid][pHealth] = 100.0;
  30665. PlayerData[playerid][pArmor] = 0.0;
  30666. PlayerData[playerid][pUpgradePoints] = 0;
  30667. PlayerData[playerid][pWarnings] = 0;
  30668. PlayerData[playerid][pInjured] = 0;
  30669. PlayerData[playerid][pHospital] = 0;
  30670. PlayerData[playerid][pSpawnHealth] = 50.0;
  30671. PlayerData[playerid][pSpawnArmor] = 0;
  30672. PlayerData[playerid][pJailType] = 0;
  30673. PlayerData[playerid][pJailTime] = 0;
  30674. PlayerData[playerid][pNewbieMuted] = 0;
  30675. PlayerData[playerid][pHelpMuted] = 0;
  30676. PlayerData[playerid][pAdMuted] = 0;
  30677. PlayerData[playerid][pLiveMuted] = 0;
  30678. PlayerData[playerid][pGlobalMuted] = 0;
  30679. PlayerData[playerid][pReportMuted] = 0;
  30680. PlayerData[playerid][pReportWarns] = 0;
  30681. PlayerData[playerid][pFightStyle] = 0;
  30682. PlayerData[playerid][pAccent] = 0;
  30683. PlayerData[playerid][pCookies] = 0;
  30684. PlayerData[playerid][pPhone] = 0;
  30685. PlayerData[playerid][pJob] = JOB_NONE;
  30686. PlayerData[playerid][pSecondJob] = JOB_NONE;
  30687. PlayerData[playerid][pCrimes] = 0;
  30688. PlayerData[playerid][pArrested] = 0;
  30689. PlayerData[playerid][pWantedLevel] = 0;
  30690. PlayerData[playerid][pMaterials] = 0;
  30691. PlayerData[playerid][pWeed] = 0;
  30692. PlayerData[playerid][pCocaine] = 0;
  30693. PlayerData[playerid][pMeth] = 0;
  30694. PlayerData[playerid][pPainkillers] = 0;
  30695. PlayerData[playerid][pTicketTime] = 0;
  30696. PlayerData[playerid][pSeeds] = 0;
  30697. PlayerData[playerid][pEphedrine] = 0;
  30698. PlayerData[playerid][pMuriaticAcid] = 0;
  30699. PlayerData[playerid][pBakingSoda] = 0;
  30700. PlayerData[playerid][pCigars] = 0;
  30701. PlayerData[playerid][pWalkieTalkie] = 0;
  30702. PlayerData[playerid][pChannel] = 0;
  30703. PlayerData[playerid][pRentingHouse] = 0;
  30704. PlayerData[playerid][pSpraycans] = 0;
  30705. PlayerData[playerid][pBoombox] = 0;
  30706. PlayerData[playerid][pMP3Player] = 0;
  30707. PlayerData[playerid][pPhonebook] = 0;
  30708. PlayerData[playerid][pFishingRod] = 0;
  30709. PlayerData[playerid][pFishingBait] = 0;
  30710. PlayerData[playerid][pFishWeight] = 0;
  30711. PlayerData[playerid][pComponents] = 0;
  30712. PlayerData[playerid][pCourierSkill] = 0;
  30713. PlayerData[playerid][pFishingSkill] = 0;
  30714. PlayerData[playerid][pGuardSkill] = 0;
  30715. PlayerData[playerid][pWeaponSkill] = 0;
  30716. PlayerData[playerid][pMechanicSkill] = 0;
  30717. PlayerData[playerid][pLawyerSkill] = 0;
  30718. PlayerData[playerid][pSmugglerSkill] = 0;
  30719. PlayerData[playerid][pToggleTextdraws] = 0;
  30720. PlayerData[playerid][pToggleOOC] = 0;
  30721. PlayerData[playerid][pTogglePhone] = 0;
  30722. PlayerData[playerid][pToggleAdmin] = 0;
  30723. PlayerData[playerid][pToggleHelper] = 0;
  30724. PlayerData[playerid][pTogglePoints] = 0;
  30725. PlayerData[playerid][pToggleTurfs] = 0;
  30726. PlayerData[playerid][pToggleNewbie] = 0;
  30727. PlayerData[playerid][pToggleWT] = 0;
  30728. PlayerData[playerid][pToggleRadio] = 0;
  30729. PlayerData[playerid][pTogglePM] = 0;
  30730. PlayerData[playerid][pToggleVIP] = 0;
  30731. PlayerData[playerid][pToggleMusic] = 0;
  30732. PlayerData[playerid][pToggleFaction] = 0;
  30733. PlayerData[playerid][pToggleGang] = 0;
  30734. PlayerData[playerid][pToggleNews] = 0;
  30735. PlayerData[playerid][pToggleGlobal] = 1;
  30736. PlayerData[playerid][pToggleCam] = 0;
  30737. PlayerData[playerid][pCarLicense] = 0;
  30738. PlayerData[playerid][pDonator] = 0;
  30739. PlayerData[playerid][pVIPTime] = 0;
  30740. PlayerData[playerid][pVIPCooldown] = 0;
  30741. PlayerData[playerid][pWeapons] = 0;
  30742. PlayerData[playerid][pGunsAmmo] = 0;
  30743. PlayerData[playerid][pFaction] = 0;
  30744. PlayerData[playerid][pFactionRank] = 0;
  30745. PlayerData[playerid][pGang] = 0;
  30746. PlayerData[playerid][pGangRank] = 0;
  30747. PlayerData[playerid][pDivision] = 0;
  30748. PlayerData[playerid][pCrew] = 0;
  30749. PlayerData[playerid][pContracted] = 0;
  30750. PlayerData[playerid][pContractBy] = 0;
  30751. PlayerData[playerid][pBombs] = 0;
  30752. PlayerData[playerid][pCompletedHits] = 0;
  30753. PlayerData[playerid][pFailedHits] = 0;
  30754. PlayerData[playerid][pReports] = 0;
  30755. PlayerData[playerid][pNewbies] = 0;
  30756. PlayerData[playerid][pHelpRequests] = 0;
  30757. PlayerData[playerid][pSpeedometer] = 0;
  30758. PlayerData[playerid][pFactionMod] = 0;
  30759. PlayerData[playerid][pWebDev] = 0;
  30760. PlayerData[playerid][pGangMod] = 0;
  30761. PlayerData[playerid][pBanAppealer] = 0;
  30762. PlayerData[playerid][pHelperManager] = 0;
  30763. PlayerData[playerid][pAdminPersonnel] = 0;
  30764. PlayerData[playerid][pGameAffairs] = 0;
  30765. PlayerData[playerid][pWebDev] = 0;
  30766. PlayerData[playerid][pComplaintMod] = 0;
  30767. PlayerData[playerid][pHumanResources] = 0;
  30768. PlayerData[playerid][pHelperManager] = 0;
  30769. PlayerData[playerid][pDeveloper] = 0;
  30770. PlayerData[playerid][pWeedPlanted] = 0;
  30771. PlayerData[playerid][pWeedTime] = 0;
  30772. PlayerData[playerid][pWeedGrams] = 0;
  30773. PlayerData[playerid][pWeedX] = 0;
  30774. PlayerData[playerid][pWeedY] = 0;
  30775. PlayerData[playerid][pWeedZ] = 0;
  30776. PlayerData[playerid][pWeedA] = 0;
  30777. PlayerData[playerid][pInventoryUpgrade] = 0;
  30778. PlayerData[playerid][pAddictUpgrade] = 0;
  30779. PlayerData[playerid][pTraderUpgrade] = 0;
  30780. PlayerData[playerid][pAssetUpgrade] = 0;
  30781. PlayerData[playerid][pLastReport] = 0;
  30782. PlayerData[playerid][pLastNewbie] = 0;
  30783. PlayerData[playerid][pLastFare] = 0;
  30784. PlayerData[playerid][pLastRequest] = 0;
  30785. PlayerData[playerid][pLastPay] = 0;
  30786. PlayerData[playerid][pLastRepair] = 0;
  30787. PlayerData[playerid][pLastRefuel] = 0;
  30788. PlayerData[playerid][pLastDrug] = 0;
  30789. PlayerData[playerid][pLastSell] = 0;
  30790. PlayerData[playerid][pLastEnter] = 0;
  30791. PlayerData[playerid][pLastPress] = 0;
  30792. PlayerData[playerid][pLastDeath] = 0;
  30793. PlayerData[playerid][pLastDesync] = 0;
  30794. PlayerData[playerid][pLastGlobal] = 0;
  30795. PlayerData[playerid][pFPS] = 0;
  30796. PlayerData[playerid][pDrunkLevel] = 0;
  30797. PlayerData[playerid][pSpectating] = INVALID_PLAYER_ID;
  30798. PlayerData[playerid][pAdminDuty] = 0;
  30799. PlayerData[playerid][pActiveReport] = -1;
  30800. PlayerData[playerid][pHospitalTime] = 0;
  30801. PlayerData[playerid][pListen] = 0;
  30802. PlayerData[playerid][pJoinedEvent] = 0;
  30803. PlayerData[playerid][pPaintball] = 0;
  30804. PlayerData[playerid][pPaintballTeam] = -1;
  30805. PlayerData[playerid][pDueling] = INVALID_PLAYER_ID;
  30806. PlayerData[playerid][pEventTeam] = 0;
  30807. PlayerData[playerid][pAwaitingClothing] = 0;
  30808. PlayerData[playerid][pTutorial] = 0;
  30809. PlayerData[playerid][pFreezeTimer] = -1;
  30810. PlayerData[playerid][pNameChange][0] = 0;
  30811. PlayerData[playerid][pHelpRequest][0] = 0;
  30812. PlayerData[playerid][pAcceptedHelp] = 0;
  30813. PlayerData[playerid][pHouseOffer] = INVALID_PLAYER_ID;
  30814. PlayerData[playerid][pGarageOffer] = INVALID_PLAYER_ID;
  30815. PlayerData[playerid][pBizOffer] = INVALID_PLAYER_ID;
  30816. PlayerData[playerid][pVestOffer] = INVALID_PLAYER_ID;
  30817. PlayerData[playerid][pCarOffer] = INVALID_PLAYER_ID;
  30818. PlayerData[playerid][pFactionOffer] = INVALID_PLAYER_ID;
  30819. PlayerData[playerid][pGangOffer] = INVALID_PLAYER_ID;
  30820. PlayerData[playerid][pFriskOffer] = INVALID_PLAYER_ID;
  30821. PlayerData[playerid][pTicketOffer] = INVALID_PLAYER_ID;
  30822. PlayerData[playerid][pLiveOffer] = INVALID_PLAYER_ID;
  30823. PlayerData[playerid][pLiveBroadcast] = INVALID_PLAYER_ID;
  30824. PlayerData[playerid][pShakeOffer] = INVALID_PLAYER_ID;
  30825. PlayerData[playerid][pLandOffer] = INVALID_PLAYER_ID;
  30826. PlayerData[playerid][pSellOffer] = INVALID_PLAYER_ID;
  30827. PlayerData[playerid][pAllianceOffer] = INVALID_PLAYER_ID;
  30828. PlayerData[playerid][pWarOffer] = INVALID_PLAYER_ID;
  30829. PlayerData[playerid][pDefendOffer] = INVALID_PLAYER_ID;
  30830. PlayerData[playerid][pDiceOffer] = INVALID_PLAYER_ID;
  30831. PlayerData[playerid][pInviteOffer] = INVALID_PLAYER_ID;
  30832. PlayerData[playerid][pRobberyOffer] = INVALID_PLAYER_ID;
  30833. PlayerData[playerid][pDuelOffer] = INVALID_PLAYER_ID;
  30834. PlayerData[playerid][pMarriageOffer] = INVALID_PLAYER_ID;
  30835. PlayerData[playerid][pEditType] = 0;
  30836. PlayerData[playerid][pEditObject] = INVALID_OBJECT_ID;
  30837. PlayerData[playerid][pFurniturePerms] = -1;
  30838. PlayerData[playerid][pLandPerms] = -1;
  30839. PlayerData[playerid][pPizzas] = 0;
  30840. PlayerData[playerid][pLastPizza] = 0;
  30841. PlayerData[playerid][pLastStuck] = 0;
  30842. PlayerData[playerid][pLastUpdate] = 0;
  30843. PlayerData[playerid][pLastLoad] = 0;
  30844. PlayerData[playerid][pLastBet] = 0;
  30845. PlayerData[playerid][pLastShot] = 0;
  30846. PlayerData[playerid][pCBug] = 0;
  30847. PlayerData[playerid][pCP] = CHECKPOINT_NONE;
  30848. PlayerData[playerid][pShipment] = -1;
  30849. PlayerData[playerid][pFishTime] = 0;
  30850. PlayerData[playerid][pUsedBait] = 0;
  30851. PlayerData[playerid][pSmuggleMats] = 0;
  30852. PlayerData[playerid][pSmuggleTime] = 0;
  30853. PlayerData[playerid][pSmuggleDrugs] = 0;
  30854. PlayerData[playerid][pRefuel] = INVALID_VEHICLE_ID;
  30855. PlayerData[playerid][pCallLine] = INVALID_PLAYER_ID;
  30856. PlayerData[playerid][pAFK] = 0;
  30857. PlayerData[playerid][pAFKTime] = 0;
  30858. PlayerData[playerid][pLoopAnim] = 0;
  30859. PlayerData[playerid][pMiningTime] = 0;
  30860. PlayerData[playerid][pMiningRock] = 0;
  30861. PlayerData[playerid][pDrivingTest] = 0;
  30862. PlayerData[playerid][pSweeping] = 0;
  30863. PlayerData[playerid][pSpecialTag] = Text3D:INVALID_3DTEXT_ID;
  30864. PlayerData[playerid][pTagType] = TAG_NONE;
  30865. PlayerData[playerid][pVIPColor] = 0;
  30866. PlayerData[playerid][pTaxiFare] = 0;
  30867. PlayerData[playerid][pTaxiPassenger] = INVALID_PLAYER_ID;
  30868. PlayerData[playerid][pTaxiBill] = 0;
  30869. PlayerData[playerid][pTaxiTime] = 0;
  30870. PlayerData[playerid][pFaction] = -1;
  30871. PlayerData[playerid][pFactionRank] = 0;
  30872. PlayerData[playerid][pGang] = -1;
  30873. PlayerData[playerid][pGangRank] = 0;
  30874. PlayerData[playerid][pDuty] = 0;
  30875. PlayerData[playerid][pBackup] = 0;
  30876. PlayerData[playerid][pTazer] = 0;
  30877. PlayerData[playerid][pTazedTime] = 0;
  30878. PlayerData[playerid][pCuffed] = 0;
  30879. PlayerData[playerid][pTied] = 0;
  30880. PlayerData[playerid][pDraggedBy] = INVALID_PLAYER_ID;
  30881. PlayerData[playerid][pSkinSelected] = -1;
  30882. PlayerData[playerid][pReceivingAid] = 0;
  30883. PlayerData[playerid][pDelivered] = 0;
  30884. PlayerData[playerid][pPlantedBomb] = 0;
  30885. PlayerData[playerid][pBombObject] = INVALID_OBJECT_ID;
  30886. PlayerData[playerid][pContractTaken] = INVALID_PLAYER_ID;
  30887. PlayerData[playerid][pSpamTime] = 0;
  30888. PlayerData[playerid][pMuted] = 0;
  30889. PlayerData[playerid][pBoomboxPlaced] = 0;
  30890. PlayerData[playerid][pBoomboxObject] = INVALID_OBJECT_ID;
  30891. PlayerData[playerid][pBoomboxListen] = INVALID_PLAYER_ID;
  30892. PlayerData[playerid][pZonePickups][0] = -1;
  30893. PlayerData[playerid][pZonePickups][1] = -1;
  30894. PlayerData[playerid][pZonePickups][2] = -1;
  30895. PlayerData[playerid][pZonePickups][3] = -1;
  30896. PlayerData[playerid][pZoneID] = -1;
  30897. PlayerData[playerid][pZoneCreation] = 0;
  30898. PlayerData[playerid][pShowLands] = 0;
  30899. PlayerData[playerid][pShowTurfs] = 0;
  30900. PlayerData[playerid][pStreamType] = MUSIC_NONE;
  30901. PlayerData[playerid][pFreeNamechange] = 0;
  30902. PlayerData[playerid][pVehicleKeys] = INVALID_VEHICLE_ID;
  30903. PlayerData[playerid][pCurrentWeapon] = 0;
  30904. PlayerData[playerid][pCurrentAmmo] = 0;
  30905. PlayerData[playerid][pCurrentVehicle] = 0;
  30906. PlayerData[playerid][pVehicleCount] = 0;
  30907. PlayerData[playerid][pACWarns] = 0;
  30908. PlayerData[playerid][pACTime] = 0;
  30909. PlayerData[playerid][pArmorTime] = 0;
  30910. PlayerData[playerid][pACFired] = 0;
  30911. PlayerData[playerid][pWeedObject] = INVALID_OBJECT_ID;
  30912. PlayerData[playerid][pPickPlant] = INVALID_PLAYER_ID;
  30913. PlayerData[playerid][pPickTime] = 0;
  30914. PlayerData[playerid][pCookMeth] = 0;
  30915. PlayerData[playerid][pCookTime] = 0;
  30916. PlayerData[playerid][pCookGrams] = 0;
  30917. PlayerData[playerid][pDrugsUsed] = 0;
  30918. PlayerData[playerid][pDrugsTime] = 0;
  30919. PlayerData[playerid][pBandana] = 0;
  30920. PlayerData[playerid][pCapturingPoint] = -1;
  30921. PlayerData[playerid][pCaptureTime] = 0;
  30922. PlayerData[playerid][pWatchingIntro] = 0;
  30923. PlayerData[playerid][pLoginCamera] = 0;
  30924. PlayerData[playerid][pPoisonTime] = 0;
  30925. PlayerData[playerid][pJetpack] = 0;
  30926. PlayerData[playerid][pWatchOn] = 0;
  30927. PlayerData[playerid][pGPSOn] = 0;
  30928. PlayerData[playerid][pTextFrom] = INVALID_PLAYER_ID;
  30929. PlayerData[playerid][pWhisperFrom] = INVALID_PLAYER_ID;
  30930. PlayerData[playerid][pMechanicCall] = 0;
  30931. PlayerData[playerid][pTaxiCall] = 0;
  30932. PlayerData[playerid][pEmergencyCall] = 0;
  30933. PlayerData[playerid][pClip] = 0;
  30934. PlayerData[playerid][pReloading] = 0;
  30935. PlayerData[playerid][pFindTime] = 0;
  30936. PlayerData[playerid][pFindPlayer] = INVALID_PLAYER_ID;
  30937. PlayerData[playerid][pRobCash] = 0;
  30938. PlayerData[playerid][pLootTime] = 0;
  30939. PlayerData[playerid][pRemoveFrom] = INVALID_PLAYER_ID;
  30940. PlayerData[playerid][pSniper] = 0;
  30941. PlayerData[playerid][pLockBreak] = INVALID_VEHICLE_ID;
  30942. PlayerData[playerid][pLockTimer] = 0;
  30943. PlayerData[playerid][pLockText] = Text3D:INVALID_3DTEXT_ID;
  30944. PlayerData[playerid][pAnimation] = 0;
  30945. PlayerData[playerid][pDropTime] = 0;
  30946. PlayerData[playerid][pCocaineTrunk] = INVALID_VEHICLE_ID;
  30947. PlayerData[playerid][pCocaineTime] = 0;
  30948. PlayerData[playerid][pCocaineFrom] = INVALID_VEHICLE_ID;
  30949. PlayerData[playerid][pLastFire] = 0;
  30950. PlayerData[playerid][pRapidFire] = 0;
  30951. PlayerData[playerid][pGodmode] = 0;
  30952. PlayerData[playerid][pGodmodeHP] = 100.0;
  30953. PlayerData[playerid][pGodmodeAP] = 0.0;
  30954. PlayerData[playerid][pNOPTime] = 0;
  30955. PlayerData[playerid][pPreviewHouse] = -1;
  30956. PlayerData[playerid][pPreviewType] = 0;
  30957. PlayerData[playerid][pPreviewTime] = 0;
  30958. PlayerData[playerid][pDamageTimer] = -1;
  30959. PlayerData[playerid][pHHCheck] = 0;
  30960. PlayerData[playerid][pHHTime] = 0;
  30961. PlayerData[playerid][pHHRounded] = 0;
  30962. PlayerData[playerid][pHHCount] = 0;
  30963. PlayerData[playerid][pNoDamage] = 0;
  30964. PlayerData[playerid][pGovTimer] = 0;
  30965. PlayerData[playerid][pGodshand] = 0;
  30966. PlayerData[playerid][pUndercover][0] = 0;
  30967. PlayerData[playerid][pUndercover][1] = 0;
  30968. PlayerData[playerid][pUndercoverHP] = 0.0;
  30969. PlayerData[playerid][pUndercoverAR] = 0.0;
  30970. PlayerData[playerid][pHurt] = 0;
  30971. PlayerData[playerid][pBugged] = 0;
  30972. PlayerData[playerid][pSkates] = 0;
  30973. PlayerData[playerid][pSkateObj] = 0;
  30974. PlayerData[playerid][pSkating] = false;
  30975. PlayerData[playerid][pOil] = 0;
  30976. PlayerData[playerid][pCreatingPoll] = 0;
  30977. PlayerData[playerid][pAnsweredPoll] = 0;
  30978. PlayerData[playerid][pRareTime] = 0;
  30979. PlayerData[playerid][pAcceptedEMS] = INVALID_PLAYER_ID;
  30980. PlayerData[playerid][pHunted] = 0;
  30981. PlayerData[playerid][pHuntKilled] = 0;
  30982. PlayerData[playerid][pDiamonds] = 0;
  30983. PlayerData[playerid][pDeleteMode] = 0;
  30984. PlayerData[playerid][pAdvertWarnings] = 0;
  30985. PlayerData[playerid][pNoKnife] = 0;
  30986. PlayerData[playerid][pExecute] = 0;
  30987. PlayerData[playerid][pMarriedTo] = 0;
  30988. PlayerData[playerid][pStationEdit] = 0;
  30989. PlayerData[playerid][pRobbingBiz] = -1;
  30990. PlayerData[playerid][pBlindfold] = 0;
  30991. PlayerData[playerid][pBlinded] = 0;
  30992. aimWarnings[playerid] = 0;
  30993. PayCheckCode[playerid] = 0;
  30994. for(new i = 0; i < MAX_PLAYERS; i ++)
  30995. {
  30996. chattingWith[playerid]{i} = false;
  30997. }
  30998. for(new i = 0; i < 13; i ++)
  30999. {
  31000. PlayerData[playerid][pWeapons][i] = 0;
  31001. PlayerData[playerid][pTempWeapons][i] = 0;
  31002. PlayerData[playerid][pGunsAmmo][i] = 0;
  31003. }
  31004. for(new i = 0; i < 3; i ++)
  31005. {
  31006. MarkedPositions[playerid][i][mPosX] = 0.0;
  31007. MarkedPositions[playerid][i][mPosY] = 0.0;
  31008. MarkedPositions[playerid][i][mPosZ] = 0.0;
  31009. }
  31010. for(new i = 0; i < MAX_PLAYER_CLOTHING; i ++)
  31011. {
  31012. ClothingInfo[playerid][i][cExists] = 0;
  31013. ClothingInfo[playerid][i][cID] = 0;
  31014. ClothingInfo[playerid][i][cName] = 0;
  31015. ClothingInfo[playerid][i][cModel] = 0;
  31016. ClothingInfo[playerid][i][cBone] = 0;
  31017. ClothingInfo[playerid][i][cAttached] = 0;
  31018. ClothingInfo[playerid][i][cMatColor1] = 0;
  31019. ClothingInfo[playerid][i][cMatColor2] = 0;
  31020. ClothingInfo[playerid][i][cAttachedIndex] = -1;
  31021. }
  31022. // Reset the player's client attributes.
  31023. for(new i = 0; i < MAX_PLAYER_ATTACHED_OBJECTS; i ++)
  31024. {
  31025. if(IsPlayerAttachedObjectSlotUsed(playerid, i))
  31026. {
  31027. RemovePlayerAttachedObject(playerid, i);
  31028. }
  31029. }
  31030. /*if(!BobTheBuilder[playerid])
  31031. {
  31032. DestroyAllBuildings(playerid);
  31033. }
  31034. BobTheBuilder[playerid] = 0;
  31035. */
  31036. ResetPlayerWeapons(playerid);
  31037. StopAudioStreamForPlayer(playerid);
  31038. SetPlayerColor(playerid, 0xFFFFFF00);
  31039. // Paintball
  31040. // Deagle Float:minx, Float:miny, Float:maxx, Float:maxy)
  31041. zone_paintball[0] = GangZoneCreateEx(1287.0806, 2055.0513, 1487.7770, 2275.3984);
  31042. area_paintball[0] = CreateDynamicRectangle(1287.0806, 2055.0513, 1487.7770, 2275.3984);
  31043. // Sniper
  31044. zone_paintball[1] = GangZoneCreateEx(-2591.2288, -1814.2455, -2178.9082, -1394.5500);
  31045. area_paintball[1] = CreateDynamicRectangle(-2591.2288, -1814.2455, -2178.9082, -1394.5500);
  31046. // Miner objects
  31047. // GPS
  31048. PlayerData[playerid][pText][0] = CreatePlayerTextDraw(playerid, 88.000000, 323.000000, "Loading...");
  31049. PlayerTextDrawAlignment(playerid, PlayerData[playerid][pText][0], 2);
  31050. PlayerTextDrawBackgroundColor(playerid, PlayerData[playerid][pText][0], 255);
  31051. PlayerTextDrawFont(playerid, PlayerData[playerid][pText][0], 1);
  31052. PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pText][0], 0.260000, 1.300000);
  31053. PlayerTextDrawColor(playerid, PlayerData[playerid][pText][0], -1);
  31054. PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pText][0], 1);
  31055. PlayerTextDrawSetProportional(playerid, PlayerData[playerid][pText][0], 1);
  31056. /* Samp Version 0.3.DLL
  31057. Speedo - Prej 0 deri 9
  31058. Fuel - Prej 10 deri 18
  31059. Nos - Prej 19 deri 28
  31060. Miliage - 29
  31061. Lights - 30
  31062. Oil - 31
  31063. Engine Broken 32 deri 33
  31064. Locks 34 deri 35
  31065. Text Mileage 36
  31066. Text 0 KMH 37 */
  31067. SpeedoMeterTextDraw[playerid][0] = CreatePlayerTextDraw(playerid, 511.250000, 358.000518, "mdl-2001:speedo-0");
  31068. PlayerTextDrawTextSize(playerid, SpeedoMeterTextDraw[playerid][0], 84.000000, 74.000000);
  31069. PlayerTextDrawAlignment(playerid, SpeedoMeterTextDraw[playerid][0], 1);
  31070. PlayerTextDrawColor(playerid, SpeedoMeterTextDraw[playerid][0], -1);
  31071. PlayerTextDrawSetShadow(playerid, SpeedoMeterTextDraw[playerid][0], 0);
  31072. PlayerTextDrawBackgroundColor(playerid, SpeedoMeterTextDraw[playerid][0], 255);
  31073. PlayerTextDrawFont(playerid, SpeedoMeterTextDraw[playerid][0], 4);
  31074. PlayerTextDrawSetProportional(playerid, SpeedoMeterTextDraw[playerid][0], 0);
  31075. SpeedoMeterTextDraw[playerid][1] = CreatePlayerTextDraw(playerid, 511.250000, 358.000518, "mdl-2001:speedo-10");
  31076. PlayerTextDrawTextSize(playerid, SpeedoMeterTextDraw[playerid][1], 84.000000, 74.000000);
  31077. PlayerTextDrawAlignment(playerid, SpeedoMeterTextDraw[playerid][1], 1);
  31078. PlayerTextDrawColor(playerid, SpeedoMeterTextDraw[playerid][1], -1);
  31079. PlayerTextDrawSetShadow(playerid, SpeedoMeterTextDraw[playerid][1], 0);
  31080. PlayerTextDrawBackgroundColor(playerid, SpeedoMeterTextDraw[playerid][1], 255);
  31081. PlayerTextDrawFont(playerid, SpeedoMeterTextDraw[playerid][1], 4);
  31082. PlayerTextDrawSetProportional(playerid, SpeedoMeterTextDraw[playerid][1], 0);
  31083. SpeedoMeterTextDraw[playerid][2] = CreatePlayerTextDraw(playerid, 511.250000, 358.000518, "mdl-2001:speedo-20");
  31084. PlayerTextDrawTextSize(playerid, SpeedoMeterTextDraw[playerid][2], 84.000000, 74.000000);
  31085. PlayerTextDrawAlignment(playerid, SpeedoMeterTextDraw[playerid][2], 1);
  31086. PlayerTextDrawColor(playerid, SpeedoMeterTextDraw[playerid][2], -1);
  31087. PlayerTextDrawSetShadow(playerid, SpeedoMeterTextDraw[playerid][2], 0);
  31088. PlayerTextDrawBackgroundColor(playerid, SpeedoMeterTextDraw[playerid][2], 255);
  31089. PlayerTextDrawFont(playerid, SpeedoMeterTextDraw[playerid][2], 4);
  31090. PlayerTextDrawSetProportional(playerid, SpeedoMeterTextDraw[playerid][2], 0);
  31091. SpeedoMeterTextDraw[playerid][3] = CreatePlayerTextDraw(playerid, 511.250000, 358.000518, "mdl-2001:speedo-30");
  31092. PlayerTextDrawTextSize(playerid, SpeedoMeterTextDraw[playerid][3], 84.000000, 74.000000);
  31093. PlayerTextDrawAlignment(playerid, SpeedoMeterTextDraw[playerid][3], 1);
  31094. PlayerTextDrawColor(playerid, SpeedoMeterTextDraw[playerid][3], -1);
  31095. PlayerTextDrawSetShadow(playerid, SpeedoMeterTextDraw[playerid][3], 0);
  31096. PlayerTextDrawBackgroundColor(playerid, SpeedoMeterTextDraw[playerid][3], 255);
  31097. PlayerTextDrawFont(playerid, SpeedoMeterTextDraw[playerid][3], 4);
  31098. PlayerTextDrawSetProportional(playerid, SpeedoMeterTextDraw[playerid][3], 0);
  31099. SpeedoMeterTextDraw[playerid][4] = CreatePlayerTextDraw(playerid, 511.250000, 358.000518, "mdl-2001:speedo-40");
  31100. PlayerTextDrawTextSize(playerid, SpeedoMeterTextDraw[playerid][4], 84.000000, 74.000000);
  31101. PlayerTextDrawAlignment(playerid, SpeedoMeterTextDraw[playerid][4], 1);
  31102. PlayerTextDrawColor(playerid, SpeedoMeterTextDraw[playerid][4], -1);
  31103. PlayerTextDrawSetShadow(playerid, SpeedoMeterTextDraw[playerid][4], 0);
  31104. PlayerTextDrawBackgroundColor(playerid, SpeedoMeterTextDraw[playerid][4], 255);
  31105. PlayerTextDrawFont(playerid, SpeedoMeterTextDraw[playerid][4], 4);
  31106. PlayerTextDrawSetProportional(playerid, SpeedoMeterTextDraw[playerid][4], 0);
  31107. SpeedoMeterTextDraw[playerid][5] = CreatePlayerTextDraw(playerid, 511.250000, 358.000518, "mdl-2001:speedo-50");
  31108. PlayerTextDrawTextSize(playerid, SpeedoMeterTextDraw[playerid][5], 84.000000, 74.000000);
  31109. PlayerTextDrawAlignment(playerid, SpeedoMeterTextDraw[playerid][5], 1);
  31110. PlayerTextDrawColor(playerid, SpeedoMeterTextDraw[playerid][5], -1);
  31111. PlayerTextDrawSetShadow(playerid, SpeedoMeterTextDraw[playerid][5], 0);
  31112. PlayerTextDrawBackgroundColor(playerid, SpeedoMeterTextDraw[playerid][5], 255);
  31113. PlayerTextDrawFont(playerid, SpeedoMeterTextDraw[playerid][5], 4);
  31114. PlayerTextDrawSetProportional(playerid, SpeedoMeterTextDraw[playerid][5], 0);
  31115. SpeedoMeterTextDraw[playerid][6] = CreatePlayerTextDraw(playerid, 511.250000, 358.000518, "mdl-2001:speedo-60");
  31116. PlayerTextDrawTextSize(playerid, SpeedoMeterTextDraw[playerid][6], 84.000000, 74.000000);
  31117. PlayerTextDrawAlignment(playerid, SpeedoMeterTextDraw[playerid][6], 1);
  31118. PlayerTextDrawColor(playerid, SpeedoMeterTextDraw[playerid][6], -1);
  31119. PlayerTextDrawSetShadow(playerid, SpeedoMeterTextDraw[playerid][6], 0);
  31120. PlayerTextDrawBackgroundColor(playerid, SpeedoMeterTextDraw[playerid][6], 255);
  31121. PlayerTextDrawFont(playerid, SpeedoMeterTextDraw[playerid][6], 4);
  31122. PlayerTextDrawSetProportional(playerid, SpeedoMeterTextDraw[playerid][6], 0);
  31123. SpeedoMeterTextDraw[playerid][7] = CreatePlayerTextDraw(playerid, 511.250000, 358.000518, "mdl-2001:speedo-70");
  31124. PlayerTextDrawTextSize(playerid, SpeedoMeterTextDraw[playerid][7], 84.000000, 74.000000);
  31125. PlayerTextDrawAlignment(playerid, SpeedoMeterTextDraw[playerid][7], 1);
  31126. PlayerTextDrawColor(playerid, SpeedoMeterTextDraw[playerid][7], -1);
  31127. PlayerTextDrawSetShadow(playerid, SpeedoMeterTextDraw[playerid][7], 0);
  31128. PlayerTextDrawBackgroundColor(playerid, SpeedoMeterTextDraw[playerid][7], 255);
  31129. PlayerTextDrawFont(playerid, SpeedoMeterTextDraw[playerid][7], 4);
  31130. PlayerTextDrawSetProportional(playerid, SpeedoMeterTextDraw[playerid][7], 0);
  31131. SpeedoMeterTextDraw[playerid][8] = CreatePlayerTextDraw(playerid, 511.250000, 358.000518, "mdl-2001:speedo-80");
  31132. PlayerTextDrawTextSize(playerid, SpeedoMeterTextDraw[playerid][8], 84.000000, 74.000000);
  31133. PlayerTextDrawAlignment(playerid, SpeedoMeterTextDraw[playerid][8], 1);
  31134. PlayerTextDrawColor(playerid, SpeedoMeterTextDraw[playerid][8], -1);
  31135. PlayerTextDrawSetShadow(playerid, SpeedoMeterTextDraw[playerid][8], 0);
  31136. PlayerTextDrawBackgroundColor(playerid, SpeedoMeterTextDraw[playerid][8], 255);
  31137. PlayerTextDrawFont(playerid, SpeedoMeterTextDraw[playerid][8], 4);
  31138. PlayerTextDrawSetProportional(playerid, SpeedoMeterTextDraw[playerid][8], 0);
  31139. SpeedoMeterTextDraw[playerid][9] = CreatePlayerTextDraw(playerid, 511.250000, 358.000518, "mdl-2001:speedo-90");
  31140. PlayerTextDrawTextSize(playerid, SpeedoMeterTextDraw[playerid][9], 84.000000, 74.000000);
  31141. PlayerTextDrawAlignment(playerid, SpeedoMeterTextDraw[playerid][9], 1);
  31142. PlayerTextDrawColor(playerid, SpeedoMeterTextDraw[playerid][9], -1);
  31143. PlayerTextDrawSetShadow(playerid, SpeedoMeterTextDraw[playerid][9], 0);
  31144. PlayerTextDrawBackgroundColor(playerid, SpeedoMeterTextDraw[playerid][9], 255);
  31145. PlayerTextDrawFont(playerid, SpeedoMeterTextDraw[playerid][9], 4);
  31146. PlayerTextDrawSetProportional(playerid, SpeedoMeterTextDraw[playerid][9], 0);
  31147. SpeedoMeterTextDraw[playerid][10] = CreatePlayerTextDraw(playerid, 573.750000, 362.666442, "mdl-2001:fuel-0");
  31148. PlayerTextDrawTextSize(playerid, SpeedoMeterTextDraw[playerid][10], 76.000000, 67.000000);
  31149. PlayerTextDrawAlignment(playerid, SpeedoMeterTextDraw[playerid][10], 1);
  31150. PlayerTextDrawColor(playerid, SpeedoMeterTextDraw[playerid][10], -1);
  31151. PlayerTextDrawSetShadow(playerid, SpeedoMeterTextDraw[playerid][10], 0);
  31152. PlayerTextDrawBackgroundColor(playerid, SpeedoMeterTextDraw[playerid][10], 255);
  31153. PlayerTextDrawFont(playerid, SpeedoMeterTextDraw[playerid][10], 4);
  31154. PlayerTextDrawSetProportional(playerid, SpeedoMeterTextDraw[playerid][10], 0);
  31155. SpeedoMeterTextDraw[playerid][11] = CreatePlayerTextDraw(playerid, 573.750000, 362.666442, "mdl-2001:fuel-12");
  31156. PlayerTextDrawTextSize(playerid, SpeedoMeterTextDraw[playerid][11], 76.000000, 67.000000);
  31157. PlayerTextDrawAlignment(playerid, SpeedoMeterTextDraw[playerid][11], 1);
  31158. PlayerTextDrawColor(playerid, SpeedoMeterTextDraw[playerid][11], -1);
  31159. PlayerTextDrawSetShadow(playerid, SpeedoMeterTextDraw[playerid][11], 0);
  31160. PlayerTextDrawBackgroundColor(playerid, SpeedoMeterTextDraw[playerid][11], 255);
  31161. PlayerTextDrawFont(playerid, SpeedoMeterTextDraw[playerid][11], 4);
  31162. PlayerTextDrawSetProportional(playerid, SpeedoMeterTextDraw[playerid][11], 0);
  31163. SpeedoMeterTextDraw[playerid][12] = CreatePlayerTextDraw(playerid, 573.750000, 362.666442, "mdl-2001:fuel-25");
  31164. PlayerTextDrawTextSize(playerid, SpeedoMeterTextDraw[playerid][12], 76.000000, 67.000000);
  31165. PlayerTextDrawAlignment(playerid, SpeedoMeterTextDraw[playerid][12], 1);
  31166. PlayerTextDrawColor(playerid, SpeedoMeterTextDraw[playerid][12], -1);
  31167. PlayerTextDrawSetShadow(playerid, SpeedoMeterTextDraw[playerid][12], 0);
  31168. PlayerTextDrawBackgroundColor(playerid, SpeedoMeterTextDraw[playerid][12], 255);
  31169. PlayerTextDrawFont(playerid, SpeedoMeterTextDraw[playerid][12], 4);
  31170. PlayerTextDrawSetProportional(playerid, SpeedoMeterTextDraw[playerid][12], 0);
  31171. SpeedoMeterTextDraw[playerid][13] = CreatePlayerTextDraw(playerid, 573.750000, 362.666442, "mdl-2001:fuel-37");
  31172. PlayerTextDrawTextSize(playerid, SpeedoMeterTextDraw[playerid][13], 76.000000, 67.000000);
  31173. PlayerTextDrawAlignment(playerid, SpeedoMeterTextDraw[playerid][13], 1);
  31174. PlayerTextDrawColor(playerid, SpeedoMeterTextDraw[playerid][13], -1);
  31175. PlayerTextDrawSetShadow(playerid, SpeedoMeterTextDraw[playerid][13], 0);
  31176. PlayerTextDrawBackgroundColor(playerid, SpeedoMeterTextDraw[playerid][13], 255);
  31177. PlayerTextDrawFont(playerid, SpeedoMeterTextDraw[playerid][13], 4);
  31178. PlayerTextDrawSetProportional(playerid, SpeedoMeterTextDraw[playerid][13], 0);
  31179. SpeedoMeterTextDraw[playerid][14] = CreatePlayerTextDraw(playerid, 573.750000, 362.666442, "mdl-2001:fuel-50");
  31180. PlayerTextDrawTextSize(playerid, SpeedoMeterTextDraw[playerid][14], 76.000000, 67.000000);
  31181. PlayerTextDrawAlignment(playerid, SpeedoMeterTextDraw[playerid][14], 1);
  31182. PlayerTextDrawColor(playerid, SpeedoMeterTextDraw[playerid][14], -1);
  31183. PlayerTextDrawSetShadow(playerid, SpeedoMeterTextDraw[playerid][14], 0);
  31184. PlayerTextDrawBackgroundColor(playerid, SpeedoMeterTextDraw[playerid][14], 255);
  31185. PlayerTextDrawFont(playerid, SpeedoMeterTextDraw[playerid][14], 4);
  31186. PlayerTextDrawSetProportional(playerid, SpeedoMeterTextDraw[playerid][14], 0);
  31187. SpeedoMeterTextDraw[playerid][15] = CreatePlayerTextDraw(playerid, 573.750000, 362.666442, "mdl-2001:fuel-65");
  31188. PlayerTextDrawTextSize(playerid, SpeedoMeterTextDraw[playerid][15], 76.000000, 67.000000);
  31189. PlayerTextDrawAlignment(playerid, SpeedoMeterTextDraw[playerid][15], 1);
  31190. PlayerTextDrawColor(playerid, SpeedoMeterTextDraw[playerid][15], -1);
  31191. PlayerTextDrawSetShadow(playerid, SpeedoMeterTextDraw[playerid][15], 0);
  31192. PlayerTextDrawBackgroundColor(playerid, SpeedoMeterTextDraw[playerid][15], 255);
  31193. PlayerTextDrawFont(playerid, SpeedoMeterTextDraw[playerid][15], 4);
  31194. PlayerTextDrawSetProportional(playerid, SpeedoMeterTextDraw[playerid][15], 0);
  31195. SpeedoMeterTextDraw[playerid][16] = CreatePlayerTextDraw(playerid, 573.750000, 362.666442, "mdl-2001:fuel-75");
  31196. PlayerTextDrawTextSize(playerid, SpeedoMeterTextDraw[playerid][16], 76.000000, 67.000000);
  31197. PlayerTextDrawAlignment(playerid, SpeedoMeterTextDraw[playerid][16], 1);
  31198. PlayerTextDrawColor(playerid, SpeedoMeterTextDraw[playerid][16], -1);
  31199. PlayerTextDrawSetShadow(playerid, SpeedoMeterTextDraw[playerid][16], 0);
  31200. PlayerTextDrawBackgroundColor(playerid, SpeedoMeterTextDraw[playerid][16], 255);
  31201. PlayerTextDrawFont(playerid, SpeedoMeterTextDraw[playerid][16], 4);
  31202. PlayerTextDrawSetProportional(playerid, SpeedoMeterTextDraw[playerid][16], 0);
  31203. SpeedoMeterTextDraw[playerid][17] = CreatePlayerTextDraw(playerid, 573.750000, 362.666442, "mdl-2001:fuel-87");
  31204. PlayerTextDrawTextSize(playerid, SpeedoMeterTextDraw[playerid][17], 76.000000, 67.000000);
  31205. PlayerTextDrawAlignment(playerid, SpeedoMeterTextDraw[playerid][17], 1);
  31206. PlayerTextDrawColor(playerid, SpeedoMeterTextDraw[playerid][17], -1);
  31207. PlayerTextDrawSetShadow(playerid, SpeedoMeterTextDraw[playerid][17], 0);
  31208. PlayerTextDrawBackgroundColor(playerid, SpeedoMeterTextDraw[playerid][17], 255);
  31209. PlayerTextDrawFont(playerid, SpeedoMeterTextDraw[playerid][17], 4);
  31210. PlayerTextDrawSetProportional(playerid, SpeedoMeterTextDraw[playerid][17], 0);
  31211. SpeedoMeterTextDraw[playerid][18] = CreatePlayerTextDraw(playerid, 573.750000, 362.666442, "mdl-2001:fuel-100");
  31212. PlayerTextDrawTextSize(playerid, SpeedoMeterTextDraw[playerid][18], 76.000000, 67.000000);
  31213. PlayerTextDrawAlignment(playerid, SpeedoMeterTextDraw[playerid][18], 1);
  31214. PlayerTextDrawColor(playerid, SpeedoMeterTextDraw[playerid][18], -1);
  31215. PlayerTextDrawSetShadow(playerid, SpeedoMeterTextDraw[playerid][18], 0);
  31216. PlayerTextDrawBackgroundColor(playerid, SpeedoMeterTextDraw[playerid][18], 255);
  31217. PlayerTextDrawFont(playerid, SpeedoMeterTextDraw[playerid][18], 4);
  31218. PlayerTextDrawSetProportional(playerid, SpeedoMeterTextDraw[playerid][18], 0);
  31219. SpeedoMeterTextDraw[playerid][29] = CreatePlayerTextDraw(playerid, 559.375000, 314.250152, "mdl-2001:mileage");
  31220. PlayerTextDrawTextSize(playerid, SpeedoMeterTextDraw[playerid][29], 76.000000, 66.000000);
  31221. PlayerTextDrawAlignment(playerid, SpeedoMeterTextDraw[playerid][29], 1);
  31222. PlayerTextDrawColor(playerid, SpeedoMeterTextDraw[playerid][29], -1);
  31223. PlayerTextDrawSetShadow(playerid, SpeedoMeterTextDraw[playerid][29], 0);
  31224. PlayerTextDrawBackgroundColor(playerid, SpeedoMeterTextDraw[playerid][29], 255);
  31225. PlayerTextDrawFont(playerid, SpeedoMeterTextDraw[playerid][29], 4);
  31226. PlayerTextDrawSetProportional(playerid, SpeedoMeterTextDraw[playerid][29], 0);
  31227. SpeedoMeterTextDraw[playerid][30] = CreatePlayerTextDraw(playerid, 499.375000, 396.500061, "mdl-2001:lights");
  31228. PlayerTextDrawTextSize(playerid, SpeedoMeterTextDraw[playerid][30], 16.000000, 13.000000);
  31229. PlayerTextDrawAlignment(playerid, SpeedoMeterTextDraw[playerid][30], 1);
  31230. PlayerTextDrawColor(playerid, SpeedoMeterTextDraw[playerid][30], -1);
  31231. PlayerTextDrawSetShadow(playerid, SpeedoMeterTextDraw[playerid][30], 0);
  31232. PlayerTextDrawBackgroundColor(playerid, SpeedoMeterTextDraw[playerid][30], 255);
  31233. PlayerTextDrawFont(playerid, SpeedoMeterTextDraw[playerid][30], 4);
  31234. PlayerTextDrawSetProportional(playerid, SpeedoMeterTextDraw[playerid][30], 0);
  31235. SpeedoMeterTextDraw[playerid][31] = CreatePlayerTextDraw(playerid, 501.875000, 371.416839, "mdl-2001:oil");
  31236. PlayerTextDrawTextSize(playerid, SpeedoMeterTextDraw[playerid][31], 19.000000, 23.000000);
  31237. PlayerTextDrawAlignment(playerid, SpeedoMeterTextDraw[playerid][31], 1);
  31238. PlayerTextDrawColor(playerid, SpeedoMeterTextDraw[playerid][31], -1);
  31239. PlayerTextDrawSetShadow(playerid, SpeedoMeterTextDraw[playerid][31], 0);
  31240. PlayerTextDrawBackgroundColor(playerid, SpeedoMeterTextDraw[playerid][31], 255);
  31241. PlayerTextDrawFont(playerid, SpeedoMeterTextDraw[playerid][31], 4);
  31242. PlayerTextDrawSetProportional(playerid, SpeedoMeterTextDraw[playerid][31], 0);
  31243. SpeedoMeterTextDraw[playerid][32] = CreatePlayerTextDraw(playerid, 518.125000, 360.916839, "mdl-2001:Engine-Broken");
  31244. PlayerTextDrawTextSize(playerid, SpeedoMeterTextDraw[playerid][32], 17.000000, 14.000000);
  31245. PlayerTextDrawAlignment(playerid, SpeedoMeterTextDraw[playerid][32], 1);
  31246. PlayerTextDrawColor(playerid, SpeedoMeterTextDraw[playerid][32], -1);
  31247. PlayerTextDrawSetShadow(playerid, SpeedoMeterTextDraw[playerid][32], 0);
  31248. PlayerTextDrawBackgroundColor(playerid, SpeedoMeterTextDraw[playerid][32], 255);
  31249. PlayerTextDrawFont(playerid, SpeedoMeterTextDraw[playerid][32], 4);
  31250. PlayerTextDrawSetProportional(playerid, SpeedoMeterTextDraw[playerid][32], 0);
  31251. SpeedoMeterTextDraw[playerid][34] = CreatePlayerTextDraw(playerid, 542.500000, 355.666870, "mdl-2001:Locks-Locked");
  31252. PlayerTextDrawTextSize(playerid, SpeedoMeterTextDraw[playerid][34], 16.000000, 13.000000);
  31253. PlayerTextDrawAlignment(playerid, SpeedoMeterTextDraw[playerid][34], 1);
  31254. PlayerTextDrawColor(playerid, SpeedoMeterTextDraw[playerid][34], -1);
  31255. PlayerTextDrawSetShadow(playerid, SpeedoMeterTextDraw[playerid][34], 0);
  31256. PlayerTextDrawBackgroundColor(playerid, SpeedoMeterTextDraw[playerid][34], 255);
  31257. PlayerTextDrawFont(playerid, SpeedoMeterTextDraw[playerid][34], 4);
  31258. PlayerTextDrawSetProportional(playerid, SpeedoMeterTextDraw[playerid][34], 0);
  31259. SpeedoMeterTextDraw[playerid][35] = CreatePlayerTextDraw(playerid, 542.500000, 355.666870, "mdl-2001:Locks-Unlocked");
  31260. PlayerTextDrawTextSize(playerid, SpeedoMeterTextDraw[playerid][35], 16.000000, 13.000000);
  31261. PlayerTextDrawAlignment(playerid, SpeedoMeterTextDraw[playerid][35], 1);
  31262. PlayerTextDrawColor(playerid, SpeedoMeterTextDraw[playerid][35], -1);
  31263. PlayerTextDrawSetShadow(playerid, SpeedoMeterTextDraw[playerid][35], 0);
  31264. PlayerTextDrawBackgroundColor(playerid, SpeedoMeterTextDraw[playerid][35], 255);
  31265. PlayerTextDrawFont(playerid, SpeedoMeterTextDraw[playerid][35], 4);
  31266. PlayerTextDrawSetProportional(playerid, SpeedoMeterTextDraw[playerid][35], 0);
  31267. SpeedoMeterTextDraw[playerid][36] = CreatePlayerTextDraw(playerid, 598.125000, 338.749847, "300 KIL");
  31268. PlayerTextDrawLetterSize(playerid, SpeedoMeterTextDraw[playerid][36], 0.219999, 1.600000);
  31269. PlayerTextDrawTextSize(playerid, SpeedoMeterTextDraw[playerid][36], 0.000000, 427.000000);
  31270. PlayerTextDrawAlignment(playerid, SpeedoMeterTextDraw[playerid][36], 2);
  31271. PlayerTextDrawColor(playerid, SpeedoMeterTextDraw[playerid][36], -1);
  31272. PlayerTextDrawSetShadow(playerid, SpeedoMeterTextDraw[playerid][36], 0);
  31273. PlayerTextDrawSetOutline(playerid, SpeedoMeterTextDraw[playerid][36], 1);
  31274. PlayerTextDrawBackgroundColor(playerid, SpeedoMeterTextDraw[playerid][36], 255);
  31275. PlayerTextDrawFont(playerid, SpeedoMeterTextDraw[playerid][36], 2);
  31276. PlayerTextDrawSetProportional(playerid, SpeedoMeterTextDraw[playerid][36], 1);
  31277. SpeedoMeterTextDraw[playerid][37] = CreatePlayerTextDraw(playerid, 552.500000, 402.916534, "0 KMH");
  31278. PlayerTextDrawLetterSize(playerid, SpeedoMeterTextDraw[playerid][37], 0.356249, 1.891667);
  31279. PlayerTextDrawTextSize(playerid, SpeedoMeterTextDraw[playerid][37], 0.000000, 427.000000);
  31280. PlayerTextDrawAlignment(playerid, SpeedoMeterTextDraw[playerid][37], 2);
  31281. PlayerTextDrawColor(playerid, SpeedoMeterTextDraw[playerid][37], -1);
  31282. PlayerTextDrawSetShadow(playerid, SpeedoMeterTextDraw[playerid][37], 0);
  31283. PlayerTextDrawSetOutline(playerid, SpeedoMeterTextDraw[playerid][37], 1);
  31284. PlayerTextDrawBackgroundColor(playerid, SpeedoMeterTextDraw[playerid][37], 255);
  31285. PlayerTextDrawFont(playerid, SpeedoMeterTextDraw[playerid][37], 2);
  31286. PlayerTextDrawSetProportional(playerid, SpeedoMeterTextDraw[playerid][37], 1);
  31287. // HP & armor
  31288. PlayerData[playerid][pText][3] = CreatePlayerTextDraw(playerid, 577.000000, 43.500000, "100");
  31289. PlayerTextDrawAlignment(playerid, PlayerData[playerid][pText][3], 2);
  31290. PlayerTextDrawBackgroundColor(playerid, PlayerData[playerid][pText][3], 255);
  31291. PlayerTextDrawFont(playerid, PlayerData[playerid][pText][3], 2);
  31292. PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pText][3], 0.220000, 1.100000);
  31293. PlayerTextDrawColor(playerid, PlayerData[playerid][pText][3], -1);
  31294. PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pText][3], 1);
  31295. PlayerTextDrawSetProportional(playerid, PlayerData[playerid][pText][3], 1);
  31296. PlayerData[playerid][pText][4] = CreatePlayerTextDraw(playerid, 577.000000, 65.500000, "100");
  31297. PlayerTextDrawAlignment(playerid, PlayerData[playerid][pText][4], 2);
  31298. PlayerTextDrawBackgroundColor(playerid, PlayerData[playerid][pText][4], 255);
  31299. PlayerTextDrawFont(playerid, PlayerData[playerid][pText][4], 2);
  31300. PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pText][4], 0.220000, 1.100000);
  31301. PlayerTextDrawColor(playerid, PlayerData[playerid][pText][4], -1);
  31302. PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pText][4], 1);
  31303. PlayerTextDrawSetProportional(playerid, PlayerData[playerid][pText][4], 1);
  31304. // Achievements
  31305. PlayerData[playerid][pText][6] = CreatePlayerTextDraw(playerid, 502.000000, 110.000000, "_");
  31306. PlayerTextDrawBackgroundColor(playerid, PlayerData[playerid][pText][6], 255);
  31307. PlayerTextDrawFont(playerid, PlayerData[playerid][pText][6], 1);
  31308. PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pText][6], 0.500000, 4.500000);
  31309. PlayerTextDrawColor(playerid, PlayerData[playerid][pText][6], -1);
  31310. PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pText][6], 0);
  31311. PlayerTextDrawSetProportional(playerid, PlayerData[playerid][pText][6], 1);
  31312. PlayerTextDrawSetShadow(playerid, PlayerData[playerid][pText][6], 1);
  31313. PlayerTextDrawUseBox(playerid, PlayerData[playerid][pText][6], 1);
  31314. PlayerTextDrawBoxColor(playerid, PlayerData[playerid][pText][6], 102);
  31315. PlayerTextDrawTextSize(playerid, PlayerData[playerid][pText][6], 611.000000, 0.000000);
  31316. PlayerData[playerid][pText][7] = CreatePlayerTextDraw(playerid, 502.000000, 116.000000, "LD_DRV:gold");
  31317. PlayerTextDrawBackgroundColor(playerid, PlayerData[playerid][pText][7], 255);
  31318. PlayerTextDrawFont(playerid, PlayerData[playerid][pText][7], 4);
  31319. PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pText][7], 0.500000, 1.000000);
  31320. PlayerTextDrawColor(playerid, PlayerData[playerid][pText][7], -1);
  31321. PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pText][7], 0);
  31322. PlayerTextDrawSetProportional(playerid, PlayerData[playerid][pText][7], 1);
  31323. PlayerTextDrawSetShadow(playerid, PlayerData[playerid][pText][7], 1);
  31324. PlayerTextDrawUseBox(playerid, PlayerData[playerid][pText][7], 1);
  31325. PlayerTextDrawBoxColor(playerid, PlayerData[playerid][pText][7], 255);
  31326. PlayerTextDrawTextSize(playerid, PlayerData[playerid][pText][7], 31.000000, 33.000000);
  31327. PlayerData[playerid][pText][8] = CreatePlayerTextDraw(playerid, 499.000000, 99.000000, "Achievements");
  31328. PlayerTextDrawBackgroundColor(playerid, PlayerData[playerid][pText][8], 255);
  31329. PlayerTextDrawFont(playerid, PlayerData[playerid][pText][8], 0);
  31330. PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pText][8], 0.409999, 1.700000);
  31331. PlayerTextDrawColor(playerid, PlayerData[playerid][pText][8], -1);
  31332. PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pText][8], 1);
  31333. PlayerTextDrawSetProportional(playerid, PlayerData[playerid][pText][8], 1);
  31334. PlayerData[playerid][pText][9] = CreatePlayerTextDraw(playerid, 539.000000, 121.000000, "~g~~h~~h~First wheels");
  31335. PlayerTextDrawBackgroundColor(playerid, PlayerData[playerid][pText][9], 255);
  31336. PlayerTextDrawFont(playerid, PlayerData[playerid][pText][9], 1);
  31337. PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pText][9], 0.230000, 1.100000);
  31338. PlayerTextDrawColor(playerid, PlayerData[playerid][pText][9], -1);
  31339. PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pText][9], 1);
  31340. PlayerTextDrawSetProportional(playerid, PlayerData[playerid][pText][9], 1);
  31341. Streamer_ToggleIdleUpdate(playerid, true);
  31342. GetPlayerName(playerid, PlayerData[playerid][pUsername], MAX_PLAYER_NAME);
  31343. gConnections++;
  31344. SaveServerInfo();
  31345. return 1;
  31346. }
  31347. // LS ELEVATOR
  31348. public OnDynamicObjectMoved(objectid)
  31349. {
  31350. new Float:x, Float:y, Float:z;
  31351. for(new i; i < sizeof(Obj_FloorDoors); i ++)
  31352. {
  31353. if(objectid == Obj_FloorDoors[i][0])
  31354. {
  31355. GetDynamicObjectPos(Obj_FloorDoors[i][0], x, y, z);
  31356. if(x < X_DOOR_L_OPENED - 0.5) // Some floor doors have shut, move the elevator to next floor in queue:
  31357. {
  31358. Elevator_MoveToFloor(ElevatorQueue[0]);
  31359. RemoveFirstQueueFloor();
  31360. }
  31361. }
  31362. }
  31363. if(objectid == Obj_Elevator) // The elevator reached the specified floor.
  31364. {
  31365. KillTimer(ElevatorBoostTimer); // Kills the timer, in case the elevator reached the floor before boost.
  31366. FloorRequestedBy[ElevatorFloor] = INVALID_PLAYER_ID;
  31367. Elevator_OpenDoors();
  31368. Floor_OpenDoors(ElevatorFloor);
  31369. GetDynamicObjectPos(Obj_Elevator, x, y, z);
  31370. Label_Elevator = Create3DTextLabel("{CCCCCC}Press '{FFFFFF}~k~~CONVERSATION_YES~{CCCCCC}' to use elevator", 0xCCCCCCAA, 1784.9822, -1302.0426, z - 0.9, 4.0, 0, 1);
  31371. ElevatorState = ELEVATOR_STATE_WAITING;
  31372. SetTimer("Elevator_TurnToIdle", ELEVATOR_WAIT_TIME, 0);
  31373. }
  31374. return 1;
  31375. }
  31376. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  31377. {
  31378. new title[68], string[500], ip[32];
  31379. GetPlayerIp(playerid, ip, 32);
  31380. format(string, sizeof(string), "Report Player\nPrivate Message\n");
  31381. if(PlayerData[playerid][pAdmin] >= 1)
  31382. {
  31383. format(string, sizeof(string), "%sKick Player\nBan Player\nSpectate Player\nBring Player\nGoto Player\nNewbie Mute Player\nFreeze Player\nUnfreeze Player\nSlap Player\nRevive Player\nCheck Player\nNon-Roleplay Name\nShow Rules\nCheck Player's Gun\nCheck Player's Vehicles\n{33CCFF}IP Address: {FFFFFF}%s", string, ip);
  31384. }
  31385. SetPVarInt(playerid, "pClickedID", clickedplayerid);
  31386. format(title, sizeof(title), "{33CCFF}Player Control Panel {FFFFFF}(SELECTED: ID %d)", clickedplayerid);
  31387. Dialog_Show(playerid, DIALOG_PCP,DIALOG_STYLE_LIST,title,string,"Select","Cancel");
  31388. return 1;
  31389. }
  31390. // END LS ELEVATOR
  31391. public OnPlayerClickTextDraw(playerid, Text:clickedid) {
  31392. if(_:clickedid == INVALID_TEXT_DRAW) return 1; // block any invalid textdraws.
  31393. if(_:clickedid == INVALID_TEXT_DRAW) return 1; // block any invalid textdraws.
  31394. if(clickedid == td_mdc_Exit) {
  31395. mdc_Hide(playerid, true);
  31396. } else if(clickedid == td_mdc_SectionText[0]) {
  31397. Dialog_Show(playerid, SearchCitizem, DIALOG_STYLE_INPUT, "{3D62A8}Search Citizen", "Please enter the citizen's full name below:", "Search", "Cancel");
  31398. } else if(clickedid == td_mdc_SectionText[1]) {
  31399. Dialog_Show(playerid, DIALOG_MDC_SEARCH_SERIAL, DIALOG_STYLE_INPUT, "{3D62A8}Search Weapon Serial", "Please enter the weapons's serial number below:", "Search", "Cancel");
  31400. } else if(clickedid == td_mdc_SectionText[2]) {
  31401. Dialog_Show(playerid, SearchPhoneNumber, DIALOG_STYLE_INPUT, "{3D62A8}Search Phone Number", "Please enter the phone number below:", "Search", "Cancel");
  31402. } else if(clickedid == td_mdc_SectionText[3]) {
  31403. Dialog_Show(playerid, DIALOG_MDC_SEARCH_PLATE, DIALOG_STYLE_INPUT, "{3D62A8}Search License Plate", "Please enter the license plate below:", "Search", "Cancel");
  31404. } else if(clickedid == td_mdc_CriminalRecord || clickedid == td_mdc_CriminalRecordArrow) {
  31405. new name[MAX_PLAYER_NAME];
  31406. GetPVarString(playerid, "mdc_Citizen", name, sizeof(name));
  31407. mdc_ShowCriminalRecord(playerid, name);
  31408. } else if(clickedid == td_mdc_Cases || clickedid == td_mdc_CasesArrow) {
  31409. Dialog_Show(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "{3D62A8}Case Files", "{ffffff}The Los Santos Police Department's Mobile Data Computer is presently under \ndevelopment. We ask for your patience and understanding.\n\nSincerely,\n{a9c4e4}LSPD Tech. Department", "Close", "");
  31410. } else if(clickedid == td_mdc_Properties || clickedid == td_mdc_PropertiesArrow) {
  31411. Dialog_Show(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "{3D62A8}Property Data", "{ffffff}The Los Santos Police Department's Mobile Data Computer is presently under \ndevelopment. We ask for your patience and understanding.\n\nSincerely,\n{a9c4e4}LSPD Tech. Department", "Close", "");
  31412. } else if(clickedid == td_mdc_Vehicles || clickedid == td_mdc_VehiclesArrow) {
  31413. new name[MAX_PLAYER_NAME];
  31414. GetPVarString(playerid, "mdc_Citizen", name, sizeof(name));
  31415. mdc_ShowVehicles(playerid, name);
  31416. } else if(clickedid == td_mdc_cr_ArrowUp) {
  31417. new ScrollTop = GetPVarInt(playerid, "mdc_cr_ScrollTop");
  31418. if(ScrollTop > 0) {
  31419. ScrollTop -= 1;
  31420. SetPVarInt(playerid, "mdc_cr_ScrollTop", ScrollTop);
  31421. for(new i = 0; i < sizeof(td_mdc_cr_Info); i++) {
  31422. PlayerTextDrawHide(playerid, td_mdc_cr_Type[i]);
  31423. PlayerTextDrawHide(playerid, td_mdc_cr_Description[i]);
  31424. PlayerTextDrawHide(playerid, td_mdc_cr_Date[i]);
  31425. if(CriminalRecordData[playerid][i + ScrollTop][mdc_cr_type] == RECORD_CHARGE) {
  31426. PlayerTextDrawSetString(playerid, td_mdc_cr_Type[i], "Charge");
  31427. if(CriminalRecordData[playerid][i + ScrollTop][mdc_cr_served] == 0) {
  31428. PlayerTextDrawColor(playerid, td_mdc_cr_Type[i], COLOR_RED);
  31429. PlayerTextDrawColor(playerid, td_mdc_cr_Description[i], COLOR_RED);
  31430. PlayerTextDrawColor(playerid, td_mdc_cr_Date[i], COLOR_RED);
  31431. } else {
  31432. PlayerTextDrawColor(playerid, td_mdc_cr_Type[i], COLOR_WHITE);
  31433. PlayerTextDrawColor(playerid, td_mdc_cr_Description[i], COLOR_WHITE);
  31434. PlayerTextDrawColor(playerid, td_mdc_cr_Date[i], COLOR_WHITE);
  31435. }
  31436. } else {
  31437. PlayerTextDrawSetString(playerid, td_mdc_cr_Type[i], "Ticket");
  31438. if(CriminalRecordData[playerid][i + ScrollTop][mdc_cr_paid] == 0) {
  31439. PlayerTextDrawColor(playerid, td_mdc_cr_Type[i], COLOR_RED);
  31440. PlayerTextDrawColor(playerid, td_mdc_cr_Description[i], COLOR_RED);
  31441. PlayerTextDrawColor(playerid, td_mdc_cr_Date[i], COLOR_RED);
  31442. } else {
  31443. PlayerTextDrawColor(playerid, td_mdc_cr_Type[i], COLOR_WHITE);
  31444. PlayerTextDrawColor(playerid, td_mdc_cr_Description[i], COLOR_WHITE);
  31445. PlayerTextDrawColor(playerid, td_mdc_cr_Date[i], COLOR_WHITE);
  31446. }
  31447. }
  31448. PlayerTextDrawSetString(playerid, td_mdc_cr_Date[i], CriminalRecordData[playerid][i + ScrollTop][mdc_cr_date]);
  31449. if(strlen(CriminalRecordData[playerid][i + ScrollTop][mdc_cr_description]) < 20) {
  31450. PlayerTextDrawSetString(playerid, td_mdc_cr_Description[i], CriminalRecordData[playerid][i + ScrollTop][mdc_cr_description]);
  31451. } else {
  31452. new desc[25];
  31453. strmid(desc, CriminalRecordData[playerid][i + ScrollTop][mdc_cr_description], 0, 20, 200);
  31454. strins(desc, "...", strlen(desc), sizeof(desc));
  31455. PlayerTextDrawSetString(playerid, td_mdc_cr_Description[i], desc);
  31456. }
  31457. PlayerTextDrawShow(playerid, td_mdc_cr_Type[i]);
  31458. PlayerTextDrawShow(playerid, td_mdc_cr_Description[i]);
  31459. PlayerTextDrawShow(playerid, td_mdc_cr_Date[i]);
  31460. }
  31461. }
  31462. } else if(clickedid == td_mdc_cr_ArrowDown) {
  31463. new ScrollTop = GetPVarInt(playerid, "mdc_cr_ScrollTop");
  31464. if(Iter_Count(RecordIterator[playerid]) > ScrollTop + 7) {
  31465. ScrollTop += 1;
  31466. SetPVarInt(playerid, "mdc_cr_ScrollTop", ScrollTop);
  31467. for(new i = 0; i < sizeof(td_mdc_cr_Info); i++) {
  31468. PlayerTextDrawHide(playerid, td_mdc_cr_Type[i]);
  31469. PlayerTextDrawHide(playerid, td_mdc_cr_Description[i]);
  31470. PlayerTextDrawHide(playerid, td_mdc_cr_Date[i]);
  31471. if(CriminalRecordData[playerid][i + ScrollTop][mdc_cr_type] == RECORD_CHARGE) {
  31472. PlayerTextDrawSetString(playerid, td_mdc_cr_Type[i], "Charge");
  31473. if(CriminalRecordData[playerid][i + ScrollTop][mdc_cr_served] == 0) {
  31474. PlayerTextDrawColor(playerid, td_mdc_cr_Type[i], COLOR_RED);
  31475. PlayerTextDrawColor(playerid, td_mdc_cr_Description[i], COLOR_RED);
  31476. PlayerTextDrawColor(playerid, td_mdc_cr_Date[i], COLOR_RED);
  31477. } else {
  31478. PlayerTextDrawColor(playerid, td_mdc_cr_Type[i], COLOR_WHITE);
  31479. PlayerTextDrawColor(playerid, td_mdc_cr_Description[i], COLOR_WHITE);
  31480. PlayerTextDrawColor(playerid, td_mdc_cr_Date[i], COLOR_WHITE);
  31481. }
  31482. } else {
  31483. PlayerTextDrawSetString(playerid, td_mdc_cr_Type[i], "Ticket");
  31484. if(CriminalRecordData[playerid][i + ScrollTop][mdc_cr_paid] == 0) {
  31485. PlayerTextDrawColor(playerid, td_mdc_cr_Type[i], COLOR_RED);
  31486. PlayerTextDrawColor(playerid, td_mdc_cr_Description[i], COLOR_RED);
  31487. PlayerTextDrawColor(playerid, td_mdc_cr_Date[i], COLOR_RED);
  31488. } else {
  31489. PlayerTextDrawColor(playerid, td_mdc_cr_Type[i], COLOR_WHITE);
  31490. PlayerTextDrawColor(playerid, td_mdc_cr_Description[i], COLOR_WHITE);
  31491. PlayerTextDrawColor(playerid, td_mdc_cr_Date[i], COLOR_WHITE);
  31492. }
  31493. }
  31494. PlayerTextDrawSetString(playerid, td_mdc_cr_Date[i], CriminalRecordData[playerid][i + ScrollTop][mdc_cr_date]);
  31495. if(strlen(CriminalRecordData[playerid][i + ScrollTop][mdc_cr_description]) < 20) {
  31496. PlayerTextDrawSetString(playerid, td_mdc_cr_Description[i], CriminalRecordData[playerid][i + ScrollTop][mdc_cr_description]);
  31497. } else {
  31498. new desc[25];
  31499. strmid(desc, CriminalRecordData[playerid][i + ScrollTop][mdc_cr_description], 0, 20, 200);
  31500. strins(desc, "...", strlen(desc), sizeof(desc));
  31501. PlayerTextDrawSetString(playerid, td_mdc_cr_Description[i], desc);
  31502. }
  31503. PlayerTextDrawShow(playerid, td_mdc_cr_Type[i]);
  31504. PlayerTextDrawShow(playerid, td_mdc_cr_Description[i]);
  31505. PlayerTextDrawShow(playerid, td_mdc_cr_Date[i]);
  31506. }
  31507. }
  31508. } else if(clickedid == td_mdc_cr_Info[0]) {
  31509. mdc_ShowCriminalRecordDetails(playerid, GetPVarInt(playerid, "mdc_cr_ScrollTop"));
  31510. } else if(clickedid == td_mdc_cr_Info[1]) {
  31511. mdc_ShowCriminalRecordDetails(playerid, GetPVarInt(playerid, "mdc_cr_ScrollTop") + 1);
  31512. } else if(clickedid == td_mdc_cr_Info[2]) {
  31513. mdc_ShowCriminalRecordDetails(playerid, GetPVarInt(playerid, "mdc_cr_ScrollTop") + 2);
  31514. } else if(clickedid == td_mdc_cr_Info[3]) {
  31515. mdc_ShowCriminalRecordDetails(playerid, GetPVarInt(playerid, "mdc_cr_ScrollTop") + 3);
  31516. } else if(clickedid == td_mdc_cr_Info[4]) {
  31517. mdc_ShowCriminalRecordDetails(playerid, GetPVarInt(playerid, "mdc_cr_ScrollTop") + 4);
  31518. } else if(clickedid == td_mdc_cr_Info[5]) {
  31519. mdc_ShowCriminalRecordDetails(playerid, GetPVarInt(playerid, "mdc_cr_ScrollTop") + 5);
  31520. } else if(clickedid == td_mdc_cr_Info[6]) {
  31521. mdc_ShowCriminalRecordDetails(playerid, GetPVarInt(playerid, "mdc_cr_ScrollTop") + 6);
  31522. } else if(clickedid == td_mdc_veh_ArrowRight || clickedid == td_mdc_veh_Next) {
  31523. new name[MAX_PLAYER_NAME];
  31524. GetPVarString(playerid, "mdc_Citizen", name, sizeof(name));
  31525. SetPVarInt(playerid, "mdc_VehicleIndex", GetPVarInt(playerid, "mdc_VehicleIndex") + 1);
  31526. mdc_ShowVehicles(playerid, name);
  31527. }
  31528. return 1;
  31529. }
  31530. public OnPlayerDisconnect(playerid, reason)
  31531. {
  31532. if(IsPlayerNPC(playerid)) return 1;
  31533. if (PlayerData[playerid][pShowFooter])
  31534. KillTimer(PlayerData[playerid][pFooterTimer]);
  31535. InsideShamal[playerid] = INVALID_VEHICLE_ID;
  31536. chosednumber[playerid] = -1;
  31537. openedpaycheck[playerid] = 0;
  31538. isharvesting[playerid] = 0;
  31539. DestroyDynamic3DTextLabel(PlayerData[playerid][aMeID]);
  31540. PlayerData[playerid][aMeStatus] = 0;
  31541. if (PlayerData[playerid][pCalling] > 0)
  31542. {
  31543. HangupCall(playerid);
  31544. }
  31545. TextDrawHideForPlayer(playerid, welcomenew);
  31546. DestroyDynamic3DTextLabel(fRepfamtext[playerid]);
  31547. fRepfamtext[playerid] = Text3D:INVALID_3DTEXT_ID;
  31548. PlayerData[playerid][pCarryCrate] = -1;
  31549. PlayerData[playerid][pRobHouse] = -1;
  31550. SavePlayerVariables(playerid);
  31551. foreach(new i : Player)
  31552. {
  31553. if(PlayerData[i][pSpectating] == playerid)
  31554. {
  31555. SendClientMessageEx(i, COLOR_ORANGE, "You are no longer spectating %s (ID %i).", GetRPName(PlayerData[i][pSpectating]), PlayerData[i][pSpectating]);
  31556. PlayerData[i][pSpectating] = INVALID_PLAYER_ID;
  31557. SetPlayerToSpawn(i);
  31558. }
  31559. if(PlayerData[i][pHouseOffer] == playerid)
  31560. {
  31561. PlayerData[i][pHouseOffer] = INVALID_PLAYER_ID;
  31562. }
  31563. if(PlayerData[i][pGarageOffer] == playerid)
  31564. {
  31565. PlayerData[i][pGarageOffer] = INVALID_PLAYER_ID;
  31566. }
  31567. if(PlayerData[i][pBizOffer] == playerid)
  31568. {
  31569. PlayerData[i][pBizOffer] = INVALID_PLAYER_ID;
  31570. }
  31571. if(PlayerData[i][pVestOffer] == playerid)
  31572. {
  31573. PlayerData[i][pVestOffer] = INVALID_PLAYER_ID;
  31574. }
  31575. if(PlayerData[i][pCarOffer] == playerid)
  31576. {
  31577. PlayerData[i][pCarOffer] = INVALID_PLAYER_ID;
  31578. }
  31579. if(PlayerData[i][pFactionOffer] == playerid)
  31580. {
  31581. PlayerData[i][pFactionOffer] = INVALID_PLAYER_ID;
  31582. }
  31583. if(PlayerData[i][pGangOffer] == playerid)
  31584. {
  31585. PlayerData[i][pGangOffer] = INVALID_PLAYER_ID;
  31586. }
  31587. if(PlayerData[i][pFriskOffer] == playerid)
  31588. {
  31589. PlayerData[i][pFriskOffer] = INVALID_PLAYER_ID;
  31590. }
  31591. if(PlayerData[i][pTicketOffer] == playerid)
  31592. {
  31593. PlayerData[i][pTicketOffer] = INVALID_PLAYER_ID;
  31594. }
  31595. if(PlayerData[i][pLiveOffer] == playerid)
  31596. {
  31597. PlayerData[i][pLiveOffer] = INVALID_PLAYER_ID;
  31598. }
  31599. if(PlayerData[i][pLiveBroadcast] == playerid)
  31600. {
  31601. PlayerData[i][pLiveBroadcast] = INVALID_PLAYER_ID;
  31602. }
  31603. if(PlayerData[i][pShakeOffer] == playerid)
  31604. {
  31605. PlayerData[i][pShakeOffer] = INVALID_PLAYER_ID;
  31606. }
  31607. if(PlayerData[i][pLandOffer] == playerid)
  31608. {
  31609. PlayerData[i][pLandOffer] = INVALID_PLAYER_ID;
  31610. }
  31611. if(PlayerData[i][pSellOffer] == playerid)
  31612. {
  31613. PlayerData[i][pSellOffer] = INVALID_PLAYER_ID;
  31614. }
  31615. if(PlayerData[i][pAllianceOffer] == playerid)
  31616. {
  31617. PlayerData[i][pSellOffer] = INVALID_PLAYER_ID;
  31618. }
  31619. if(PlayerData[playerid][pGangOffer] == playerid)
  31620. {
  31621. PlayerData[playerid][pSellOffer] = INVALID_PLAYER_ID;
  31622. }
  31623. if(PlayerData[i][pDefendOffer] == playerid)
  31624. {
  31625. PlayerData[i][pDefendOffer] = INVALID_PLAYER_ID;
  31626. }
  31627. if(PlayerData[i][pDiceOffer] == playerid)
  31628. {
  31629. PlayerData[i][pDiceOffer] = INVALID_PLAYER_ID;
  31630. }
  31631. if(PlayerData[i][pInviteOffer] == playerid)
  31632. {
  31633. PlayerData[i][pInviteOffer] = INVALID_PLAYER_ID;
  31634. }
  31635. if(PlayerData[i][pRobberyOffer] == playerid)
  31636. {
  31637. PlayerData[i][pRobberyOffer] = INVALID_PLAYER_ID;
  31638. }
  31639. if(PlayerData[i][pDuelOffer] == playerid)
  31640. {
  31641. PlayerData[i][pDuelOffer] = INVALID_PLAYER_ID;
  31642. }
  31643. if(PlayerData[i][pMarriageOffer] == playerid)
  31644. {
  31645. PlayerData[i][pMarriageOffer] = INVALID_PLAYER_ID;
  31646. }
  31647. if(PlayerData[i][pTextFrom] == playerid)
  31648. {
  31649. PlayerData[i][pTextFrom] = INVALID_PLAYER_ID;
  31650. }
  31651. if(PlayerData[i][pWhisperFrom] == playerid)
  31652. {
  31653. PlayerData[i][pWhisperFrom] = INVALID_PLAYER_ID;
  31654. }
  31655. if(PlayerData[i][pFindPlayer] == playerid)
  31656. {
  31657. PlayerData[i][pFindPlayer] = INVALID_PLAYER_ID;
  31658. }
  31659. if(PlayerData[i][pRemoveFrom] == playerid)
  31660. {
  31661. PlayerData[i][pRemoveFrom] = INVALID_PLAYER_ID;
  31662. }
  31663. if(chattingWith[i]{playerid})
  31664. {
  31665. SendClientMessageEx(i, COLOR_YELLOW, "Your chat with %s (ID %i) has ended as they left the server.", GetRPName(playerid), playerid);
  31666. chattingWith[i]{playerid} = false;
  31667. }
  31668. if(PlayerData[i][pActiveReport] >= 0 && (ReportInfo[PlayerData[i][pActiveReport]][rHandledBy] == playerid || ReportInfo[PlayerData[i][pActiveReport]][rReporter] == playerid))
  31669. {
  31670. if(ReportInfo[PlayerData[i][pActiveReport]][rReporter] == playerid)
  31671. SendClientMessage(i, COLOR_GREEN, "The player who made the report has left the server.");
  31672. else if(ReportInfo[PlayerData[i][pActiveReport]][rHandledBy] == playerid)
  31673. SendClientMessage(i, COLOR_GREEN, "The admin who accepted the report has left the server.");
  31674. ReportInfo[PlayerData[i][pActiveReport]][rExists] = 0;
  31675. PlayerData[i][pActiveReport] = -1;
  31676. }
  31677. if(PlayerData[i][pDueling] == playerid)
  31678. {
  31679. SendClientMessage(i, COLOR_WHITE, "Your duel target has left the server.");
  31680. PlayerData[i][pDueling] = INVALID_PLAYER_ID;
  31681. SetPlayerToSpawn(i);
  31682. }
  31683. if(PlayerData[i][pContractTaken] == playerid)
  31684. {
  31685. SendClientMessage(i, COLOR_YELLOW, "Your contract target has disconnected from the server.");
  31686. PlayerData[i][pContractTaken] = INVALID_PLAYER_ID;
  31687. }
  31688. if(PlayerData[i][pDraggedBy] == playerid)
  31689. {
  31690. SendClientMessage(i, COLOR_AQUA, "The person dragging you has disconnected. You are free!");
  31691. PlayerData[i][pDraggedBy] = INVALID_PLAYER_ID;
  31692. }
  31693. if(PlayerData[i][pTaxiPassenger] == playerid)
  31694. {
  31695. CancelTaxiRide(i);
  31696. }
  31697. }
  31698. if(PlayerData[playerid][pLogged])
  31699. {
  31700. if(PlayerData[playerid][pUndercover][0])
  31701. {
  31702. OnUndercover(playerid, 0, "", 0, 0.0, 0.0);
  31703. }
  31704. if(PlayerData[playerid][pHurt])
  31705. {
  31706. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s possibly left the server while in a gunfight.", GetRPName(playerid));
  31707. PlayerData[playerid][pInjured] = 1;
  31708. }
  31709. SavePlayerVariables(playerid);
  31710. if(PlayerData[playerid][pTazedTime] > 0 || PlayerData[playerid][pCuffed] > 0)
  31711. {
  31712. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s left the server while tazed or cuffed.", GetRPName(playerid));
  31713. ResetPlayerWeaponsEx(playerid);
  31714. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET jailtype = 2, jailtime = 1200, prisonedby = 'Server', prisonreason = 'Logging to avoid arrest' WHERE uid = %i", PlayerData[playerid][pID]);
  31715. mysql_tquery(connectionID, queryBuffer);
  31716. }
  31717. }
  31718. if(PlayerData[playerid][pActiveReport] >= 0)
  31719. {
  31720. callcmd::cr(playerid, "\1");
  31721. }
  31722. if(PlayerData[playerid][pHunted])
  31723. {
  31724. SendClientMessageToAllEx(COLOR_LIGHTORANGE, "(( The hunted AIDS victim %s has left the server ))", GetRPName(playerid));
  31725. }
  31726. if(PlayerData[playerid][pAcceptedEMS] != INVALID_PLAYER_ID)
  31727. {
  31728. SendClientMessageEx(PlayerData[playerid][pAcceptedEMS], COLOR_YELLOW, "Your patient %s has left the server while injured.", GetRPName(playerid));
  31729. PlayerData[playerid][pAcceptedEMS] = INVALID_PLAYER_ID;
  31730. }
  31731. foreach(new i : Player)
  31732. {
  31733. if(PlayerData[i][pAcceptedEMS] == playerid)
  31734. {
  31735. SendClientMessage(i, COLOR_YELLOW, "Your medic has left the server while rescuing you. (you can now accept your fate)");
  31736. PlayerData[i][pAcceptedEMS] = INVALID_PLAYER_ID;
  31737. }
  31738. }
  31739. if(PlayerData[playerid][pTutorial])
  31740. {
  31741. KillTimer(PlayerData[playerid][pTutorialTimer]);
  31742. }
  31743. if(IsValidDynamicObject(PlayerData[playerid][pEditObject]))
  31744. {
  31745. DestroyDynamicObject(PlayerData[playerid][pEditObject]);
  31746. }
  31747. if(IsValidDynamic3DTextLabel(PlayerData[playerid][pSpecialTag]))
  31748. {
  31749. DestroyDynamic3DTextLabel(PlayerData[playerid][pSpecialTag]);
  31750. }
  31751. if(IsValidDynamicObject(PlayerData[playerid][pBombObject]))
  31752. {
  31753. DestroyDynamicObject(PlayerData[playerid][pBombObject]);
  31754. }
  31755. if(IsValidDynamicObject(PlayerData[playerid][pWeedObject]))
  31756. {
  31757. DestroyDynamicObject(PlayerData[playerid][pWeedObject]);
  31758. }
  31759. if(PlayerData[playerid][pLockBreak] != INVALID_VEHICLE_ID)
  31760. {
  31761. CancelBreakIn(playerid);
  31762. }
  31763. if(PlayerData[playerid][pAdminDuty])
  31764. {
  31765. SetPlayerName(playerid, PlayerData[playerid][pUsername]);
  31766. }
  31767. if(PlayerData[playerid][pBoomboxPlaced])
  31768. {
  31769. DestroyBoombox(playerid);
  31770. }
  31771. if(PlayerData[playerid][pZoneID] >= 0)
  31772. {
  31773. GangZoneDestroy(PlayerData[playerid][pZoneID]);
  31774. }
  31775. if(RobberyInfo[rPlanning] || RobberyInfo[rStarted])
  31776. {
  31777. RemoveFromBankRobbery(playerid);
  31778. }
  31779. for(new i = 0; i < 4; i ++)
  31780. {
  31781. if(IsValidDynamicPickup(PlayerData[playerid][pZonePickups][i]))
  31782. {
  31783. DestroyDynamicPickup(PlayerData[playerid][pZonePickups][i]);
  31784. }
  31785. }
  31786. if(PlayerData[playerid][pLogged])
  31787. {
  31788. foreach(new i: Vehicle)
  31789. {
  31790. if(IsVehicleOwner(playerid, i) && VehicleInfo[i][vTimer] == -1)
  31791. {
  31792. VehicleInfo[i][vTimer] = SetTimerEx("DespawnTimer", 600000, false, "i", i);
  31793. }
  31794. }
  31795. }
  31796. for(new i = 0; i < MAX_REPORTS; i ++)
  31797. {
  31798. if(ReportInfo[i][rExists] && ReportInfo[i][rReporter] == playerid)
  31799. {
  31800. ReportInfo[i][rExists] = 0;
  31801. }
  31802. }
  31803. for(new i = 0; i < MAX_POINTS; i ++)
  31804. {
  31805. if(PointInfo[i][pExists] && PointInfo[i][pCaptureTime] > 0 && PointInfo[i][pCapturer] == playerid)
  31806. {
  31807. SendProximityMessage(i, 20.0, COLOR_RED, "(( %s disconnected and therefore failed to capture the point. ))", GetRPName(playerid));
  31808. PointInfo[i][pCapturer] = INVALID_PLAYER_ID;
  31809. PointInfo[i][pCaptureTime] = 0;
  31810. }
  31811. }
  31812. foreach(new i : Turf)
  31813. {
  31814. if(TurfInfo[i][tExists] && TurfInfo[i][tCaptureTime] > 0 && TurfInfo[i][tCapturer] == playerid)
  31815. {
  31816. if(reason == 0)
  31817. {
  31818. if(PlayerData[playerid][pGang] >= 0)
  31819. {
  31820. GangInfo[PlayerData[playerid][pGang]][gTurfTokens]++;
  31821. SendGangMessage(PlayerData[playerid][pGang], COLOR_YELLOW, "%s crashed while attempting to capture a turf. 1 turf token was refunded to your gang.", GetRPName(playerid));
  31822. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET turftokens = turftokens + 1 WHERE id = %i", PlayerData[playerid][pGang]);
  31823. mysql_tquery(connectionID, queryBuffer);
  31824. }
  31825. else if(PlayerData[playerid][pFaction] >= 0)
  31826. {
  31827. FactionInfo[PlayerData[playerid][pFaction]][fTurfTokens]++;
  31828. SendFactionMessage(PlayerData[playerid][pFaction], COLOR_YELLOW, "%s crashed while attempting to capture a turf. 1 turf token was refunded to your faction.", GetRPName(playerid));
  31829. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_FACTIONS" SET turftokens = turftokens + 1 WHERE id = %i", PlayerData[playerid][pFaction]);
  31830. mysql_tquery(connectionID, queryBuffer);
  31831. }
  31832. }
  31833. SendTurfMessage(i, COLOR_RED, "(( %s disconnected and therefore failed to capture the turf. ))", GetRPName(playerid));
  31834. TurfInfo[i][tCapturer] = INVALID_PLAYER_ID;
  31835. TurfInfo[i][tCaptureTime] = 0;
  31836. ReloadTurf(i);
  31837. }
  31838. }
  31839. switch(reason)
  31840. {
  31841. case 0: SendProximityMessage(playerid, 20.0, COLOR_YELLOW, "%s has left the server. (Timeout)", GetRPName(playerid));
  31842. case 1: SendProximityMessage(playerid, 20.0, COLOR_YELLOW, "%s has left the server. (Leaving)", GetRPName(playerid));
  31843. case 2: SendProximityMessage(playerid, 20.0, COLOR_YELLOW, "%s has left the server. (Kicked)", GetRPName(playerid));
  31844. }
  31845. if(PlayerData[playerid][pGang] >= 0)
  31846. {
  31847. SendGangMessage(PlayerData[playerid][pGang], COLOR_AQUA, "(( %s has disconnected ))", GetRPName(playerid));
  31848. }
  31849. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM shots WHERE (playerid = %i) OR (hitid = %i AND hittype = 1)", playerid, playerid);
  31850. mysql_tquery(connectionID, queryBuffer);
  31851. return 1;
  31852. }
  31853. public OnPlayerRequestClass(playerid, classid)
  31854. {
  31855. if(PlayerData[playerid][pKicked]) return 0;
  31856. if(!PlayerData[playerid][pLogged])
  31857. {
  31858. ClearChat(playerid);
  31859. TogglePlayerSpectating(playerid, 1);
  31860. SetPlayerColor(playerid, 0xFFFFFF00);
  31861. SetPlayerTeam(playerid, NO_TEAM);
  31862. // Due to a SA-MP bug, you can't apply camera coordinates directly after enabling spectator mode (to hide HUD).
  31863. // In this case we'll use a timer to defer this action.
  31864. #if defined SERVER_INTRO
  31865. ShowMainMenuCamera(playerid, 1);
  31866. #else
  31867. SetTimerEx("ShowMainMenuCamera", 400, false, "i", playerid);
  31868. #endif
  31869. }
  31870. return 1;
  31871. }
  31872. public OnPlayerSpawn(playerid)
  31873. {
  31874. if(PlayerData[playerid][pKicked]) return 0;
  31875. if(PlayerData[playerid][pTruckingLevel] == 0)
  31876. {
  31877. PlayerData[playerid][pTruckingLevel] = 1;
  31878. }
  31879. if(InsideShamal[playerid] != INVALID_VEHICLE_ID)
  31880. {
  31881. SetPlayerPos(playerid, GetPVarFloat(playerid, "air_Xpos"), GetPVarFloat(playerid, "air_Ypos"), GetPVarFloat(playerid, "air_Zpos"));
  31882. SetPlayerFacingAngle(playerid, GetPVarFloat(playerid, "air_Rpos"));
  31883. DeletePVar(playerid, "air_Xpos");
  31884. DeletePVar(playerid, "air_Ypos");
  31885. DeletePVar(playerid, "air_Zpos");
  31886. DeletePVar(playerid, "air_Rpos");
  31887. DeletePVar(playerid, "air_HP");
  31888. DeletePVar(playerid, "air_Arm");
  31889. SetCameraBehindPlayer(playerid);
  31890. SetPlayerVirtualWorld(playerid, InsideShamal[playerid]);
  31891. return SetPlayerInterior(playerid, 1);
  31892. }
  31893. hidemotd(playerid);
  31894. foreach(new i : Player)
  31895. {
  31896. if(PlayerData[i][pSpectating] == playerid)
  31897. {
  31898. SetTimerEx("SpectateUpdate", 1000, false, "ii", i, playerid);
  31899. }
  31900. }
  31901. TextDrawHideForPlayer(playerid, welcomenew);
  31902. TextDrawHideForPlayer(playerid, Blind);
  31903. DestroyDynamic3DTextLabel(fRepfamtext[playerid]);
  31904. fRepfamtext[playerid] = Text3D:INVALID_3DTEXT_ID;
  31905. for( new i = 0; i < 14; i ++) {
  31906. PlayerTextDrawHide( playerid, LoginTD[ playerid ][ i ] );
  31907. }
  31908. //TextDrawHideForPlayer(playerid, loginwb);
  31909. TextDrawHideForPlayer(playerid, loginwb1);
  31910. TextDrawHideForPlayer(playerid, welcomepm);
  31911. TextDrawHideForPlayer(playerid, welcomepm1);
  31912. TextDrawHideForPlayer(playerid, welcomepm2);
  31913. TextDrawHideForPlayer(playerid, welcomepm3);
  31914. if(PlayerData[playerid][pSetup])
  31915. {
  31916. if(PlayerData[playerid][pTutorial])
  31917. {
  31918. KillTimer(PlayerData[playerid][pTutorialTimer]);
  31919. PlayerData[playerid][pTutorial] = 0;
  31920. }
  31921. // AnimationCameraView(playerid, 1,false);
  31922. InsideTut[playerid] = 1;
  31923. new tstr[1024];
  31924. strcat(tstr, "Welcome to Old School Roleplay!\n Thanks for choosing us as your Roleplay Destination, we hope you enjoy your stay!\n");
  31925. strcat(tstr, "This tutorial will guide you through the basic steps of the server.\n");
  31926. strcat(tstr, "Please enjoy this short introduction to get to know Old School Roleplay on a personal level.\n");
  31927. strcat(tstr, "{FF8000}Press next to continue.");
  31928. TutStep[playerid] = 1;
  31929. InterpolateCameraPos(playerid, -37.715755, -2101.054931, 121.661994, 3031.810302, -638.207458, 196.425064, 12000);
  31930. InterpolateCameraLookAt(playerid, -33.558185, -2098.420898, 120.781112, 3028.381103, -641.794555, 195.814514, 12000);
  31931. Dialog_Show(playerid,DIALOG_SHOW_TUTORIAL,DIALOG_STYLE_MSGBOX,"{33CCFF}Tutorial", tstr, "Next", "");
  31932. SetPlayerVirtualWorld(playerid, 0);
  31933. TogglePlayerControllable(playerid, 0);
  31934. // SendClientMessage(playerid, COLOR_WHITE, "Welcome to {00aa00}Old School Roleplay{FFFFFF}. You have successfully registered your account on our server.");
  31935. // SendClientMessage(playerid, COLOR_WHITE, "Before you can play, you are required to fill in some information then watch a brief tutorial.");
  31936. }
  31937. else if(PlayerData[playerid][pJailTime] > 0)
  31938. {
  31939. SetPlayerInJail(playerid);
  31940. if(PlayerData[playerid][pJailType] == 2)
  31941. {
  31942. SendClientMessageEx(playerid, COLOR_LIGHTRED, "* You were placed in admin prison by %s, reason: %s", PlayerData[playerid][pPrisonedBy], PlayerData[playerid][pPrisonReason]);
  31943. }
  31944. else
  31945. {
  31946. SendClientMessage(playerid, COLOR_LIGHTRED, "* You haven't completed your jail sentence yet.");
  31947. }
  31948. }
  31949. else if(PlayerData[playerid][pPaintball] > 0)
  31950. {
  31951. SetPlayerInPaintball(playerid, PlayerData[playerid][pPaintball]);
  31952. }
  31953. else
  31954. {
  31955. PlayerData[playerid][pJoinedEvent] = 0;
  31956. if(PlayerData[playerid][pInjured])
  31957. {
  31958. SetPlayerHealth(playerid, 100.0);
  31959. SetPlayerArmour(playerid, 0.0);
  31960. ApplyAnimation(playerid, "SWEET", "Sweet_injuredloop", 4.1, 0, 0, 0, 1, 0, 1);
  31961. if(GetPVarInt(playerid, "MASK_USED") == 1) {
  31962. foreach(new i: Player) {
  31963. ShowPlayerNameTagForPlayer(i, playerid, 0);
  31964. CallLocalFunction("OnPlayerStreamIn","ii",i,playerid);
  31965. }
  31966. }
  31967. GameTextForPlayer(playerid, "~r~Injured~n~~w~/phone or~n~/accept death", 5000, 3);
  31968. SendClientMessage(playerid, COLOR_DOCTOR, "You are injured and losing blood. /call 911 for medical attention.");
  31969. SendClientMessage(playerid, COLOR_DOCTOR, "If you wish to accept your death and go to hospital use /accept death.");
  31970. }
  31971. else if(PlayerData[playerid][pHospital])
  31972. {
  31973. if(PlayerData[playerid][pInsurance] == 0)
  31974. SetPlayerInHospital(playerid);
  31975. else
  31976. SetPlayerInHospital(playerid, .type = PlayerData[playerid][pInsurance]);
  31977. ResetPlayerWeaponsEx(playerid);
  31978. }
  31979. else
  31980. {
  31981. SetPlayerHealth(playerid, PlayerData[playerid][pHealth]);
  31982. SetScriptArmour(playerid, PlayerData[playerid][pArmor]);
  31983. }
  31984. if(!PlayerData[playerid][pHospital])
  31985. {
  31986. if(PlayerData[playerid][pDueling] != INVALID_PLAYER_ID)
  31987. {
  31988. PlayerData[PlayerData[playerid][pDueling]][pDueling] = INVALID_PLAYER_ID;
  31989. PlayerData[playerid][pDueling] = INVALID_PLAYER_ID;
  31990. }
  31991. if(PlayerData[playerid][pInjured])
  31992. {
  31993. if(PlayerData[playerid][pInterior] || PlayerData[playerid][pWorld])
  31994. {
  31995. SetTimerEx("StreamedCheck", 1000, false, "ifffii", playerid, PlayerData[playerid][pPosX], PlayerData[playerid][pPosY], PlayerData[playerid][pPosZ], PlayerData[playerid][pInterior], PlayerData[playerid][pWorld]);
  31996. }
  31997. SetPlayerPos(playerid, PlayerData[playerid][pPosX], PlayerData[playerid][pPosY], PlayerData[playerid][pPosZ]);
  31998. SetPlayerFacingAngle(playerid, PlayerData[playerid][pPosA]);
  31999. SetPlayerInterior(playerid, PlayerData[playerid][pInterior]);
  32000. SetPlayerVirtualWorld(playerid, PlayerData[playerid][pWorld]);
  32001. SetPlayerWeapons(playerid);
  32002. SetCameraBehindPlayer(playerid);
  32003. }
  32004. else
  32005. {
  32006. switch(PlayerData[playerid][pSpawnSelect])
  32007. {
  32008. case 0:
  32009. {
  32010. if(PlayerData[playerid][pInterior] || PlayerData[playerid][pWorld])
  32011. {
  32012. SetTimerEx("StreamedCheck", 1000, false, "ifffii", playerid, PlayerData[playerid][pPosX], PlayerData[playerid][pPosY], PlayerData[playerid][pPosZ], PlayerData[playerid][pInterior], PlayerData[playerid][pWorld]);
  32013. }
  32014. SetPlayerPos(playerid, PlayerData[playerid][pPosX], PlayerData[playerid][pPosY], PlayerData[playerid][pPosZ]);
  32015. SetPlayerFacingAngle(playerid, PlayerData[playerid][pPosA]);
  32016. SetPlayerInterior(playerid, PlayerData[playerid][pInterior]);
  32017. SetPlayerVirtualWorld(playerid, PlayerData[playerid][pWorld]);
  32018. SetPlayerWeapons(playerid);
  32019. SetCameraBehindPlayer(playerid);
  32020. }
  32021. case 1:
  32022. {
  32023. new houseid = PlayerData[playerid][pSpawnHouse];
  32024. if(HouseInfo[houseid][hExists] && IsHouseOwner(playerid, houseid))
  32025. {
  32026. SetPlayerPos(playerid, HouseInfo[houseid][hPosX], HouseInfo[houseid][hPosY], HouseInfo[houseid][hPosZ]);
  32027. SetPlayerFacingAngle(playerid, HouseInfo[houseid][hPosA]);
  32028. SetPlayerInterior(playerid, PlayerData[playerid][pInterior]);
  32029. SetPlayerVirtualWorld(playerid, PlayerData[playerid][pWorld]);
  32030. SetPlayerWeapons(playerid);
  32031. SetCameraBehindPlayer(playerid);
  32032. }
  32033. else
  32034. {
  32035. SetPlayerPos(playerid, PlayerData[playerid][pPosX], PlayerData[playerid][pPosY], PlayerData[playerid][pPosZ]);
  32036. SetPlayerFacingAngle(playerid, PlayerData[playerid][pPosA]);
  32037. SetPlayerInterior(playerid, PlayerData[playerid][pInterior]);
  32038. SetPlayerVirtualWorld(playerid, PlayerData[playerid][pWorld]);
  32039. SetPlayerWeapons(playerid);
  32040. SetCameraBehindPlayer(playerid);
  32041. }
  32042. }
  32043. case 2:
  32044. {
  32045. new factionid = PlayerData[playerid][pFaction];
  32046. if(factionid != -1)
  32047. {
  32048. for(new i = 0; i < MAX_LOCKERS; i ++)
  32049. {
  32050. if(LockerInfo[i][lExists] && LockerInfo[i][lFaction] == factionid)
  32051. {
  32052. SetPlayerPos(playerid, LockerInfo[i][lPosX], LockerInfo[i][lPosY], LockerInfo[i][lPosZ]);
  32053. SetPlayerFacingAngle(playerid, 90.0);
  32054. SetPlayerInterior(playerid, LockerInfo[playerid][lInterior]);
  32055. SetPlayerVirtualWorld(playerid, LockerInfo[playerid][lWorld]);
  32056. SetPlayerWeapons(playerid);
  32057. SetCameraBehindPlayer(playerid);
  32058. }
  32059. }
  32060. }
  32061. else
  32062. {
  32063. SetPlayerPos(playerid, PlayerData[playerid][pPosX], PlayerData[playerid][pPosY], PlayerData[playerid][pPosZ]);
  32064. SetPlayerFacingAngle(playerid, PlayerData[playerid][pPosA]);
  32065. SetPlayerInterior(playerid, PlayerData[playerid][pInterior]);
  32066. SetPlayerVirtualWorld(playerid, PlayerData[playerid][pWorld]);
  32067. SetPlayerWeapons(playerid);
  32068. SetCameraBehindPlayer(playerid);
  32069. }
  32070. }
  32071. }
  32072. }
  32073. }
  32074. }
  32075. SetPlayerSkin(playerid, PlayerData[playerid][pSkin]);
  32076. SetPlayerFightingStyle(playerid, PlayerData[playerid][pFightStyle]);
  32077. SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 998);
  32078. SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 998);
  32079. SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 998);
  32080. SetPlayerClothing(playerid);
  32081. PreloadPlayerAnims(playerid);
  32082. RefreshPlayerTextdraws(playerid);
  32083. return 1;
  32084. }
  32085. public OnPlayerDeath(playerid, killerid, reason)
  32086. {
  32087. if((gettime() - PlayerData[playerid][pLastDeath]) < 2)
  32088. {
  32089. return 1;
  32090. }
  32091. if (CarRadars[playerid] == 1)
  32092. {
  32093. CarRadars[playerid] = 0;
  32094. PlayerTextDrawHide(playerid, _crTextTarget[playerid]);
  32095. PlayerTextDrawHide(playerid, _crTextSpeed[playerid]);
  32096. PlayerTextDrawHide(playerid, _crTickets[playerid]);
  32097. DeletePVar(playerid, "_lastTicketWarning");
  32098. }
  32099. if(GetPVarInt(playerid, "Mobile") != 501)
  32100. {
  32101. if(IsPlayerConnected(GetPVarInt(playerid, "Mobile")) && GetPVarInt(GetPVarInt(playerid, "Mobile"), "Mobile") == playerid)
  32102. {
  32103. SendClientMessage(GetPVarInt(playerid, "Mobile"),COLOR_GREY,"The phone line went dead...");
  32104. if(GetPlayerSpecialAction(GetPVarInt(playerid, "Mobile")) == SPECIAL_ACTION_USECELLPHONE) SetPlayerSpecialAction(GetPVarInt(playerid, "Mobile"), SPECIAL_ACTION_STOPUSECELLPHONE);
  32105. SetPVarInt(GetPVarInt(playerid, "Mobile"), "Mobile", 501);
  32106. }
  32107. SetPVarInt(playerid, "Mobile", 501);
  32108. }
  32109. foreach(new i : Player)
  32110. {
  32111. if(PlayerData[i][pAdmin] >= 6 || PlayerData[i][pAdminDuty])
  32112. {
  32113. if(PlayerData[playerid][pInjured] == 0)
  32114. {
  32115. SendDeathMessageToPlayer(i, killerid, playerid, reason);
  32116. }
  32117. }
  32118. }
  32119. if(PlayerData[playerid][pLogged])
  32120. {
  32121. if(PlayerData[playerid][pJoinedEvent])
  32122. {
  32123. foreach(new i : Player)
  32124. {
  32125. if(PlayerData[i][pJoinedEvent] && !PlayerData[playerid][pHunted])
  32126. {
  32127. if(killerid == INVALID_PLAYER_ID)
  32128. {
  32129. SendClientMessageEx(i, COLOR_LIGHTORANGE, "(( %s died. ))", GetRPName(playerid));
  32130. }
  32131. else
  32132. {
  32133. SendClientMessageEx(i, COLOR_LIGHTORANGE, "(( %s was killed by %s. ))", GetRPName(playerid), GetRPName(killerid));
  32134. SetScriptArmour(killerid, 100);
  32135. }
  32136. }
  32137. }
  32138. if(PlayerData[playerid][pHunted])
  32139. {
  32140. if(killerid == INVALID_PLAYER_ID)
  32141. {
  32142. SendClientMessageToAllEx(COLOR_LIGHTORANGE, "(( Our dear friend %s has died of vicious AIDS, may he rest in piece. ))", GetRPName(playerid));
  32143. }
  32144. else
  32145. {
  32146. SendClientMessageToAllEx(COLOR_LIGHTORANGE, "(( Our dear friend %s was slain by %s, may he rest in piece. ))", GetRPName(playerid), GetRPName(killerid));
  32147. SendClientMessageEx(killerid, COLOR_AQUA, "You have slain the hunted %s, you have been flagged for a prize.", GetRPName(playerid));
  32148. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO flags VALUES(null, %i, 'Server', NOW(), 'Allhunt winner')", PlayerData[killerid][pID]);
  32149. mysql_tquery(connectionID, queryBuffer);
  32150. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: Server flagged %s's account for 'Allhunt winner'.", GetRPName(killerid));
  32151. }
  32152. PlayerData[playerid][pHunted] = 0;
  32153. }
  32154. }
  32155. else if(PlayerData[playerid][pPaintball] > 0)
  32156. {
  32157. foreach(new i : Player)
  32158. {
  32159. if(PlayerData[playerid][pPaintball] == PlayerData[i][pPaintball])
  32160. {
  32161. if(killerid == INVALID_PLAYER_ID)
  32162. SendClientMessageEx(i, COLOR_LIGHTORANGE, "(( %s died. ))", GetRPName(playerid));
  32163. else
  32164. SendClientMessageEx(i, COLOR_LIGHTORANGE, "(( %s was killed by %s. ))", GetRPName(playerid), GetRPName(killerid));
  32165. }
  32166. }
  32167. }
  32168. else if(PlayerData[playerid][pDueling] != INVALID_PLAYER_ID)
  32169. {
  32170. new entranceid = GetInsideEntrance(playerid);
  32171. SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "(( You lost your duel against %s! ))", GetRPName(PlayerData[playerid][pDueling]));
  32172. if(killerid != INVALID_PLAYER_ID)
  32173. {
  32174. SendClientMessageEx(killerid, COLOR_LIGHTORANGE, "(( You won the duel against %s! ))", GetRPName(playerid));
  32175. if(entranceid >= 0 && EntranceInfo[entranceid][eType] == 1)
  32176. {
  32177. foreach(new i : Player)
  32178. {
  32179. if(GetInsideEntrance(i) == entranceid)
  32180. {
  32181. SendClientMessageEx(i, COLOR_YELLOW, "Duel Arena: %s has won their duel against %s.", GetRPName(killerid), GetRPName(playerid));
  32182. }
  32183. }
  32184. }
  32185. else
  32186. {
  32187. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has won their duel against %s.", GetRPName(killerid), GetRPName(playerid));
  32188. }
  32189. SetPlayerWeapons(killerid);
  32190. SetPlayerToSpawn(killerid);
  32191. }
  32192. }
  32193. else
  32194. {
  32195. if(killerid != INVALID_PLAYER_ID)
  32196. {
  32197. HandleContract(playerid, killerid);
  32198. }
  32199. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pJailType] == 0 && PlayerData[playerid][pPreviewHouse] == -1)
  32200. {
  32201. if(PlayerData[playerid][pInjured] == 0)
  32202. {
  32203. ResetPlayer(playerid);
  32204. PlayerData[playerid][pInjured] = 1;
  32205. foreach(new i : Player)
  32206. {
  32207. if(GetFactionType(i) == FACTION_MEDIC)
  32208. {
  32209. SendClientMessageEx(i, COLOR_GREY, "Dispatch: Beacon %s (%i) is in need of immediate medical assistance.", GetRPName(playerid), playerid);
  32210. }
  32211. }
  32212. }
  32213. else
  32214. {
  32215. PlayerData[playerid][pInjured] = 0;
  32216. PlayerData[playerid][pHospital] = 1;
  32217. if(PlayerData[playerid][pAcceptedEMS] != INVALID_PLAYER_ID)
  32218. {
  32219. SendClientMessageEx(PlayerData[playerid][pAcceptedEMS], COLOR_YELLOW, "Your patient %s has bled out.", GetRPName(playerid));
  32220. PlayerData[playerid][pAcceptedEMS] = INVALID_PLAYER_ID;
  32221. }
  32222. }
  32223. }
  32224. else
  32225. {
  32226. PlayerData[playerid][pHealth] = 32767.0;
  32227. }
  32228. if(killerid != INVALID_PLAYER_ID)
  32229. {
  32230. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO kills VALUES(null, %i, %i, '%s', '%s', '%s', NOW())", PlayerData[killerid][pID], PlayerData[playerid][pID], GetPlayerNameEx(killerid), GetPlayerNameEx(playerid), GetDeathReason(reason));
  32231. mysql_tquery(connectionID, queryBuffer);
  32232. }
  32233. GetPlayerPos(playerid, PlayerData[playerid][pPosX], PlayerData[playerid][pPosY], PlayerData[playerid][pPosZ]);
  32234. GetPlayerFacingAngle(playerid, PlayerData[playerid][pPosA]);
  32235. PlayerData[playerid][pInterior] = GetPlayerInterior(playerid);
  32236. PlayerData[playerid][pWorld] = GetPlayerVirtualWorld(playerid);
  32237. }
  32238. }
  32239. if(reason == 50 && killerid != INVALID_PLAYER_ID)
  32240. {
  32241. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] was helibladed by %s[%i].", GetRPName(playerid), playerid, GetRPName(killerid), killerid);
  32242. }
  32243. if(killerid != INVALID_PLAYER_ID)
  32244. {
  32245. gTotalKills++;
  32246. }
  32247. gTotalDeaths++;
  32248. SaveServerInfo();
  32249. PlayerData[playerid][pLastDeath] = gettime();
  32250. return 1;
  32251. }
  32252. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  32253. {
  32254. IsPlayerSteppingInVehicle[playerid] = vehicleid;
  32255. if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CARRY)
  32256. {
  32257. new
  32258. Float:x,
  32259. Float:y,
  32260. Float:z;
  32261. GetPlayerPos(playerid, x, y, z);
  32262. SetPlayerPos(playerid, x, y, z + 0.5);
  32263. ClearAnimations(playerid);
  32264. }
  32265. if((!ispassenger) && (PlayerData[playerid][pCuffed] || PlayerData[playerid][pTied] || PlayerData[playerid][pInjured]))
  32266. {
  32267. new
  32268. Float:x,
  32269. Float:y,
  32270. Float:z;
  32271. GetPlayerPos(playerid, x, y, z);
  32272. SetPlayerPos(playerid, x, y, z + 0.5);
  32273. ClearAnimations(playerid);
  32274. }
  32275. if(!ispassenger)
  32276. {
  32277. if((pizzaVehicles[0] <= vehicleid <= pizzaVehicles[5]) && !PlayerHasJob(playerid, JOB_PIZZAMAN))
  32278. {
  32279. SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not a Pizzaman.");
  32280. ClearAnimations(playerid);
  32281. }
  32282. if((courierVehicles[0] <= vehicleid <= courierVehicles[6]) && !PlayerHasJob(playerid, JOB_COURIER))
  32283. {
  32284. SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not a Courier.");
  32285. ClearAnimations(playerid);
  32286. }
  32287. if((sweeperVehicles[0] <= vehicleid <= sweeperVehicles[3]) && !PlayerHasJob(playerid, JOB_SWEEPER))
  32288. {
  32289. SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not a Street Sweeper.");
  32290. ClearAnimations(playerid);
  32291. }
  32292. if((taxiVehicles[0] <= vehicleid <= taxiVehicles[3]) && !PlayerHasJob(playerid, JOB_TAXIDRIVER))
  32293. {
  32294. SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not a Taxi Driver.");
  32295. ClearAnimations(playerid);
  32296. }
  32297. if((garbageVehicles[0] <= vehicleid <= garbageVehicles[5]) && !PlayerHasJob(playerid, JOB_GARBAGEMAN))
  32298. {
  32299. SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not a Garbage Man.");
  32300. ClearAnimations(playerid);
  32301. }
  32302. if((testVehicles[0] <= vehicleid <= testVehicles[4]) && !PlayerData[playerid][pDrivingTest])
  32303. {
  32304. SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not taking your drivers test.");
  32305. ClearAnimations(playerid);
  32306. }
  32307. if(VehicleInfo[vehicleid][vFactionType] != FACTION_NONE && GetFactionType(playerid) != VehicleInfo[vehicleid][vFactionType])
  32308. {
  32309. SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as it doesn't belong to your faction.");
  32310. ClearAnimations(playerid);
  32311. }
  32312. else if(VehicleInfo[vehicleid][vFactionType] != FACTION_NONE && VehicleInfo[vehicleid][vRank] > PlayerData[playerid][pFactionRank])
  32313. {
  32314. SendClientMessageEx(playerid, COLOR_GREY, "You cannot operate this vehicle as you aren't a rank %i in your faction.", VehicleInfo[vehicleid][vRank]);
  32315. ClearAnimations(playerid);
  32316. }
  32317. if(VehicleInfo[vehicleid][vGang] >= 0 && PlayerData[playerid][pGang] != VehicleInfo[vehicleid][vGang])
  32318. {
  32319. SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as it doesn't belong to your gang.");
  32320. ClearAnimations(playerid);
  32321. }
  32322. else if(VehicleInfo[vehicleid][vGang] >= 0 && VehicleInfo[vehicleid][vRank] > PlayerData[playerid][pGangRank])
  32323. {
  32324. SendClientMessageEx(playerid, COLOR_GREY, "You cannot operate this vehicle as you aren't a rank %i in your gang.", VehicleInfo[vehicleid][vRank]);
  32325. ClearAnimations(playerid);
  32326. }
  32327. if(VehicleInfo[vehicleid][vJob] >= 0 && PlayerData[playerid][pJob] != VehicleInfo[vehicleid][vJob])
  32328. {
  32329. SendClientMessageEx(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not a %s.", GetJobName(VehicleInfo[vehicleid][vJob]));
  32330. ClearAnimations(playerid);
  32331. }
  32332. if(VehicleInfo[vehicleid][vVIP] > 0 && PlayerData[playerid][pDonator] < VehicleInfo[vehicleid][vVIP])
  32333. {
  32334. SendClientMessageEx(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not a %s VIP+.", GetVIPRank(VehicleInfo[vehicleid][vVIP]));
  32335. ClearAnimations(playerid);
  32336. }
  32337. }
  32338. seatbelt[playerid] = 0;
  32339. return 1;
  32340. }
  32341. public OnPlayerEnterCheckpoint(playerid)
  32342. {
  32343. switch(PlayerData[playerid][pCP])
  32344. {
  32345. case CHECKPOINT_PIZZA:
  32346. {
  32347. new string[32], amount = ((90 - PlayerData[playerid][pPizzaTime]) * 10) + random(200), tip = percent(amount, 5);
  32348. if(gettime() - PlayerData[playerid][pLastPizza] < 15 && PlayerData[playerid][pAdmin] < JUNIOR_ADMIN && !PlayerData[playerid][pKicked])
  32349. {
  32350. PlayerData[playerid][pACWarns]++;
  32351. if(PlayerData[playerid][pACWarns] < MAX_ANTICHEAT_WARNINGS)
  32352. {
  32353. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] is possibly teleport pizza delivering (time: %i).", GetRPName(playerid), playerid, gettime() - PlayerData[playerid][pLastPizza]);
  32354. }
  32355. else
  32356. {
  32357. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was autobanned by %s, reason: Teleport pizza runs", GetRPName(playerid), SERVER_ANTICHEAT);
  32358. BanPlayer(playerid, SERVER_ANTICHEAT, "Teleport pizza runs");
  32359. }
  32360. }
  32361. if(PlayerData[playerid][pLaborUpgrade] > 0)
  32362. {
  32363. amount += percent(amount, PlayerData[playerid][pLaborUpgrade]);
  32364. }
  32365. format(string, sizeof(string), "~g~+$%i", amount);
  32366. GameTextForPlayer(playerid, string, 5000, 1);
  32367. AddToPaycheck(playerid, amount);
  32368. GivePlayerCash(playerid, tip);
  32369. PlayerData[playerid][pPizzas] = 0;
  32370. PlayerData[playerid][pPizzaTime] = 0;
  32371. PlayerData[playerid][pCP] = CHECKPOINT_NONE;
  32372. SendClientMessageEx(playerid, COLOR_AQUA, "You received {00AA00}$%i{33CCFF} for this delivery. You also received a {00AA00}$%i{33CCFF} tip.", amount, tip);
  32373. DisablePlayerCheckpoint(playerid);
  32374. }
  32375. case CHECKPOINT_TEST:
  32376. {
  32377. PlayerData[playerid][pTestCP]++;
  32378. if(PlayerData[playerid][pTestCP] < sizeof(drivingTestCPs))
  32379. {
  32380. if(!(testVehicles[0] <= GetPlayerVehicleID(playerid) <= testVehicles[4]))
  32381. {
  32382. SendClientMessage(playerid, COLOR_LIGHTRED, "* You failed the test as you exited your vehicle.");
  32383. DisablePlayerCheckpoint(playerid);
  32384. SetVehicleToRespawn(PlayerData[playerid][pTestVehicle]);
  32385. PlayerData[playerid][pCP] = CHECKPOINT_NONE;
  32386. PlayerData[playerid][pDrivingTest] = 0;
  32387. }
  32388. else
  32389. {
  32390. SetPlayerCheckpoint(playerid, drivingTestCPs[PlayerData[playerid][pTestCP]][0], drivingTestCPs[PlayerData[playerid][pTestCP]][1], drivingTestCPs[PlayerData[playerid][pTestCP]][2], 3.0);
  32391. }
  32392. }
  32393. else
  32394. {
  32395. new
  32396. Float:health;
  32397. GetVehicleHealth(PlayerData[playerid][pTestVehicle], health);
  32398. if(health < 900.0)
  32399. {
  32400. GameTextForPlayer(playerid, "~r~Failed", 5000, 1);
  32401. SendClientMessage(playerid, COLOR_LIGHTRED, "* You brought back the vehicle damaged and therefore failed your test.");
  32402. }
  32403. else
  32404. {
  32405. AwardAchievement(playerid, "Legal driver");
  32406. GameTextForPlayer(playerid, "~w~Passed!~n~~r~-$500", 5000, 1);
  32407. SendClientMessage(playerid, COLOR_AQUA, "You successfully passed your drivers test and received your license!");
  32408. GivePlayerCash(playerid, -500);
  32409. PlayerData[playerid][pCarLicense] = 1;
  32410. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET carlicense = 1 WHERE uid = %i", PlayerData[playerid][pID]);
  32411. mysql_tquery(connectionID, queryBuffer);
  32412. }
  32413. DisablePlayerCheckpoint(playerid);
  32414. SetVehicleToRespawn(PlayerData[playerid][pTestVehicle]);
  32415. PlayerData[playerid][pCP] = CHECKPOINT_NONE;
  32416. PlayerData[playerid][pDrivingTest] = 0;
  32417. }
  32418. }
  32419. case CHECKPOINT_MINING:
  32420. {
  32421. new cost, string[20];
  32422. if(PlayerData[playerid][pMiningRock] == 1) {
  32423. cost = 500 + random(50);
  32424. } else if(PlayerData[playerid][pMiningRock] == 2) {
  32425. cost = 450 + random(50);
  32426. } else if(PlayerData[playerid][pMiningRock] == 3) {
  32427. new rock = random(552);
  32428. switch(rock)
  32429. {
  32430. case 0..250:
  32431. {
  32432. cost = 795 + random(50);
  32433. SendClientMessageEx(playerid, COLOR_WHITE, "Bam, a great stone indeed, the fact you can find stuff in this dump makes me wonder whether theres a diamond hidden in there somewhere.");
  32434. }
  32435. case 251..380:
  32436. {
  32437. cost = 4495 + random(200);
  32438. SendClientMessage(playerid, COLOR_WHITE, "Looks like a ruby, awesome. I'll be sending this Mining Enterprises immediately.");
  32439. }
  32440. case 381..400:
  32441. {
  32442. cost = 52595 + random(2000);
  32443. AwardAchievement(playerid, "Diamond!");
  32444. SendClientMessage(playerid, COLOR_WHITE, "BINGO!, It's a freakin' diamond, we're going to be damn rich!");
  32445. SendClientMessage(playerid, COLOR_WHITE, "Boss: You know what? since you found it, you should get to keep it.");
  32446. PlayerData[playerid][pDiamonds] ++;
  32447. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET diamonds = %i WHERE uid = %i", PlayerData[playerid][pDiamonds], PlayerData[playerid][pID]);
  32448. mysql_tquery(connectionID, queryBuffer);
  32449. }
  32450. case 401..552:
  32451. {
  32452. cost = 6575 + random(500);
  32453. SendClientMessage(playerid, COLOR_WHITE, "Looks like you've found a sapphire, damn good job. Let's go for that diamond!");
  32454. }
  32455. }
  32456. PlayerData[playerid][pRareTime] = 3600;
  32457. SendClientMessage(playerid, COLOR_GREY, "A cooldown for 60 minutes (of playtime) has been applied. Until then you can't find anymore rare stones.");
  32458. }
  32459. if(PlayerData[playerid][pLaborUpgrade] > 0)
  32460. {
  32461. cost += percent(cost, PlayerData[playerid][pLaborUpgrade]);
  32462. }
  32463. AddToPaycheck(playerid, cost);
  32464. SendClientMessageEx(playerid, COLOR_AQUA, "You have earned {00AA00}$%i{33CCFF} on your paycheck for your mined rock.", cost);
  32465. ApplyAnimation(playerid, "CARRY", "putdwn", 4.1, 0, 0, 0, 0, 0, 1);
  32466. format(string, sizeof(string), "~g~+$%i", cost);
  32467. GameTextForPlayer(playerid, string, 5000, 1);
  32468. PlayerData[playerid][pMiningRock] = 0;
  32469. PlayerData[playerid][pCP] = CHECKPOINT_NONE;
  32470. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
  32471. RemovePlayerAttachedObject(playerid, 9);
  32472. DisablePlayerCheckpoint(playerid);
  32473. }
  32474. case CHECKPOINT_MATS:
  32475. {
  32476. //if((PlayerData[playerid][pSmuggleMats] == 1 && IsPlayerInRangeOfPoint(playerid, 3.0, 2173.2129, -2264.1548, 13.3467)) || (PlayerData[playerid][pSmuggleMats] == 2 && IsPlayerInRangeOfPoint(playerid, 3.0, 2288.0918, -1105.6555, 37.9766)))
  32477. if((PlayerData[playerid][pSmuggleMats] == 1 && IsPlayerInRangeOfPoint(playerid, 3.0, 2173.2129, -2264.1548, 13.3467))
  32478. || (PlayerData[playerid][pSmuggleMats] == 2 && IsPlayerInRangeOfPoint(playerid, 3.0, 2288.0918, -1105.6555, 37.9766))
  32479. || (PlayerData[playerid][pSmuggleMats] == 3 && IsPlayerInRangeOfPoint(playerid, 20.0, 29.0318,-1399.3555,1.7680))
  32480. || (PlayerData[playerid][pSmuggleMats] == 4 && (IsPlayerInRangeOfPoint(playerid, 30.0, -1368.1206,-203.7393,14.1484) || IsPlayerInRangeOfPoint(playerid,30.0,310.8307,2033.6459,17.6406) || IsPlayerInRangeOfPoint(playerid,30.0,401.2192,2502.6482,16.4844) || IsPlayerInRangeOfPoint(playerid,30.0,1582.8756,1356.8186,10.8556) || IsPlayerInRangeOfPoint(playerid,30.0,1574.8552,1505.5690,10.8361))))
  32481. {
  32482. if(gettime() - PlayerData[playerid][pSmuggleTime] < 20 && PlayerData[playerid][pAdmin] < JUNIOR_ADMIN && !PlayerData[playerid][pKicked])
  32483. {
  32484. PlayerData[playerid][pACWarns]++;
  32485. if(PlayerData[playerid][pACWarns] < MAX_ANTICHEAT_WARNINGS)
  32486. {
  32487. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] is possibly teleport matrunning (time: %i).", GetRPName(playerid), playerid, gettime() - PlayerData[playerid][pSmuggleTime]);
  32488. }
  32489. else
  32490. {
  32491. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was autobanned by %s, reason: Teleport matrun", GetRPName(playerid), SERVER_ANTICHEAT);
  32492. BanPlayer(playerid, SERVER_ANTICHEAT, "Teleport matrun");
  32493. }
  32494. }
  32495. if(PlayerData[playerid][pMaterials] + 250 > GetPlayerCapacity(playerid, CAPACITY_MATERIALS))
  32496. {
  32497. return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i materials. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pMaterials], GetPlayerCapacity(playerid, CAPACITY_MATERIALS));
  32498. }
  32499. if(PlayerData[playerid][pSmuggleMats] == 1) {
  32500. AddPointMoney(POINT_MATFACTORY1, 75);
  32501. } else {
  32502. AddPointMoney(POINT_MATFACTORY2, 75);
  32503. }
  32504. if(PlayerData[playerid][pGang] >= 0)
  32505. {
  32506. GiveGangPoints(PlayerData[playerid][pGang], 1);
  32507. }
  32508. if(IsPlayerInAnyVehicle(playerid))
  32509. {
  32510. PlayerData[playerid][pDedication] = 0;
  32511. }
  32512. if(PlayerData[playerid][pDedication])
  32513. {
  32514. AwardAchievement(playerid, "Dedication");
  32515. }
  32516. if(PlayerData[playerid][pSmuggleMats] == 1) {
  32517. AddPointMoney(POINT_MATFACTORY1, 75);
  32518. PlayerData[playerid][pMaterials] += 250;
  32519. SendClientMessage(playerid, COLOR_AQUA, "You have dropped off your load and collected 250 materials from the depot.");
  32520. }else if (PlayerData[playerid][pSmuggleMats] == 2) {
  32521. AddPointMoney(POINT_MATFACTORY2, 75);
  32522. PlayerData[playerid][pMaterials] += 250;
  32523. SendClientMessage(playerid, COLOR_AQUA, "You have dropped off your load and collected 250 materials from the depot.");
  32524. } else if (PlayerData[playerid][pSmuggleMats] == 3) {
  32525. PlayerData[playerid][pMaterials] += 250;
  32526. SendClientMessage(playerid, COLOR_AQUA, "You have dropped off your load and collected 350 materials from the depot.");
  32527. } else if (PlayerData[playerid][pSmuggleMats] == 4) {
  32528. PlayerData[playerid][pMaterials] += 650;
  32529. SendClientMessage(playerid, COLOR_AQUA, "You have dropped off your load and collected 650 materials from the depot.");
  32530. }
  32531. if(PlayerData[playerid][pSmuggleMats] > 0 && PlayerData[playerid][pDonator] >= 3)
  32532. {
  32533. PlayerData[playerid][pMaterials] += 250;
  32534. SendClientMessage(playerid, COLOR_AQUA, "You've earned 250 more materials for being a {D909D9}Legendary VIP");
  32535. }
  32536. PlayerData[playerid][pSmuggleMats] = 0;
  32537. PlayerData[playerid][pCP] = CHECKPOINT_NONE;
  32538. //SendClientMessage(playerid, COLOR_AQUA, "You have dropped off your load and collected 250 materials from the depot.");
  32539. DisablePlayerCheckpoint(playerid);
  32540. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET materials = %i WHERE uid = %i", PlayerData[playerid][pMaterials], PlayerData[playerid][pID]);
  32541. mysql_tquery(connectionID, queryBuffer);
  32542. }
  32543. }
  32544. case CHECKPOINT_DRUGS:
  32545. {
  32546. new amount = 2500 + (GetJobLevel(playerid, JOB_DRUGDEALER) * 250);
  32547. switch(PlayerData[playerid][pSmuggleDrugs])
  32548. {
  32549. case 1:
  32550. {
  32551. if(!IsPlayerInRangeOfPoint(playerid, 5.0, 2167.7371, -1670.6298, 15.0804))
  32552. {
  32553. return SendClientMessage(playerid, COLOR_GREY, "You aren't at the correct dropoff spot.");
  32554. }
  32555. if(gSeedsStock >= 1000)
  32556. {
  32557. return SendClientMessage(playerid, COLOR_GREY, "The drug den does not need anymore seeds.");
  32558. }
  32559. gSeedsStock += 10;
  32560. IncreaseJobSkill(playerid, JOB_DRUGDEALER);
  32561. GivePlayerCash(playerid, amount);
  32562. SendClientMessageEx(playerid, COLOR_AQUA, "You have earned {00AA00}$%i{33CCFF} for your delivery of marijuana seeds.", amount);
  32563. }
  32564. case 2:
  32565. {
  32566. if(!IsPlayerInRangeOfPoint(playerid, 5.0, 2349.7727, -1169.6304, 28.0243))
  32567. {
  32568. return SendClientMessage(playerid, COLOR_GREY, "You aren't at the correct dropoff spot.");
  32569. }
  32570. if(gCocaineStock >= 500)
  32571. {
  32572. return SendClientMessage(playerid, COLOR_GREY, "The crack house does not need anymore cocaine.");
  32573. }
  32574. gCocaineStock += 10;
  32575. IncreaseJobSkill(playerid, JOB_DRUGDEALER);
  32576. GivePlayerCash(playerid, amount);
  32577. SendClientMessageEx(playerid, COLOR_AQUA, "You have earned {00AA00}$%i{33CCFF} for your delivery of cocaine.", amount);
  32578. }
  32579. case 3:
  32580. {
  32581. if(!IsPlayerInRangeOfPoint(playerid, 5.0, 2167.7371, -1670.6298, 15.0804))
  32582. {
  32583. return SendClientMessage(playerid, COLOR_GREY, "You aren't at the correct dropoff spot.");
  32584. }
  32585. if(gEphedrineStock >= 250)
  32586. {
  32587. return SendClientMessage(playerid, COLOR_GREY, "The drug den does not need anymore ephedrine.");
  32588. }
  32589. gEphedrineStock += 10;
  32590. IncreaseJobSkill(playerid, JOB_DRUGDEALER);
  32591. GivePlayerCash(playerid, amount);
  32592. SendClientMessageEx(playerid, COLOR_AQUA, "You have earned {00AA00}$%i{33CCFF} for your delivery of raw ephedrine.", amount);
  32593. }
  32594. }
  32595. if(gettime() - PlayerData[playerid][pSmuggleTime] < 60 && PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  32596. {
  32597. PlayerData[playerid][pACWarns]++;
  32598. if(PlayerData[playerid][pACWarns] < MAX_ANTICHEAT_WARNINGS)
  32599. {
  32600. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] is possibly teleport drug smuggling (time: %i).", GetRPName(playerid), playerid, gettime() - PlayerData[playerid][pSmuggleTime]);
  32601. }
  32602. else if(!PlayerData[playerid][pKicked])
  32603. {
  32604. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was autobanned by %s, reason: Teleport drug smuggling", GetRPName(playerid), SERVER_ANTICHEAT);
  32605. BanPlayer(playerid, SERVER_ANTICHEAT, "Teleport drug smuggling");
  32606. }
  32607. }
  32608. else
  32609. {
  32610. if(PlayerData[playerid][pGang] >= 0)
  32611. {
  32612. GiveGangPoints(PlayerData[playerid][pGang], 1);
  32613. }
  32614. }
  32615. PlayerData[playerid][pSmuggleDrugs] = 0;
  32616. PlayerData[playerid][pCP] = CHECKPOINT_NONE;
  32617. DisablePlayerCheckpoint(playerid);
  32618. }
  32619. case CHECKPOINT_HOUSE:
  32620. {
  32621. ShowActionBubble(playerid, "* %s has entered the house.", GetRPName(playerid));
  32622. SetPlayerPos(playerid, HouseInfo[PlayerData[playerid][pInviteHouse]][hIntX], HouseInfo[PlayerData[playerid][pInviteHouse]][hIntY], HouseInfo[PlayerData[playerid][pInviteHouse]][hIntZ]);
  32623. SetPlayerFacingAngle(playerid, HouseInfo[PlayerData[playerid][pInviteHouse]][hIntA]);
  32624. SetPlayerInterior(playerid, HouseInfo[PlayerData[playerid][pInviteHouse]][hInterior]);
  32625. SetPlayerVirtualWorld(playerid, HouseInfo[PlayerData[playerid][pInviteHouse]][hWorld]);
  32626. SetCameraBehindPlayer(playerid);
  32627. PlayerData[playerid][pCP] = CHECKPOINT_NONE;
  32628. DisablePlayerCheckpoint(playerid);
  32629. }
  32630. case CHECKPOINT_ROBBERY:
  32631. {
  32632. if(IsPlayerInBankRobbery(playerid) && PlayerData[playerid][pRobCash] > 0)
  32633. {
  32634. if(gettime() - PlayerData[playerid][pLastLoad] < 60 && PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  32635. {
  32636. SendClientMessage(playerid, COLOR_GREY, "Robbery failed. You arrived at the checkpoint too fast.");
  32637. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] arrived to the bank robbery checkpoint too fast.", GetRPName(playerid), playerid);
  32638. }
  32639. else
  32640. {
  32641. if(PlayerData[playerid][pGang] >= 0)
  32642. {
  32643. GiveGangPoints(PlayerData[playerid][pGang], 50);
  32644. }
  32645. RobberyInfo[rStolen] += PlayerData[playerid][pRobCash];
  32646. GivePlayerCash(playerid, PlayerData[playerid][pRobCash]);
  32647. SendClientMessageEx(playerid, COLOR_AQUA, "You have earned {00AA00}$%i{33CCFF} for successfully completing the bank robbery.", PlayerData[playerid][pRobCash]);
  32648. }
  32649. RemoveFromBankRobbery(playerid);
  32650. }
  32651. PlayerData[playerid][pCP] = CHECKPOINT_NONE;
  32652. DisablePlayerCheckpoint(playerid);
  32653. }
  32654. case CHECKPOINT_DROPCAR:
  32655. {
  32656. new vehicleid = GetPlayerVehicleID(playerid);
  32657. if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
  32658. {
  32659. return SendClientMessage(playerid, COLOR_GREY, "You are not driving any vehicle.");
  32660. }
  32661. if(IsVehicleOwner(playerid, vehicleid))
  32662. {
  32663. return SendClientMessage(playerid, COLOR_GREY, "You can't drop off your own vehicle.");
  32664. }
  32665. if(!GetVehicleCranePrice(vehicleid))
  32666. {
  32667. return SendClientMessage(playerid, COLOR_GREY, "This vehicle is not worth anything.");
  32668. }
  32669. if(VehicleInfo[vehicleid][vID] > 0 && IsPointInRangeOfPoint(VehicleInfo[vehicleid][vPosX], VehicleInfo[vehicleid][vPosY], VehicleInfo[vehicleid][vPosZ], 300.0, 2695.8010, -2226.6643, 13.5501))
  32670. {
  32671. return SendClientMessage(playerid, COLOR_GREY, "This vehicle is parked too close to the crane. You can't deliver it.");
  32672. }
  32673. if(gettime() - PlayerData[playerid][pDropTime] < 10 && PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  32674. {
  32675. PlayerData[playerid][pACWarns]++;
  32676. if(PlayerData[playerid][pACWarns] < MAX_ANTICHEAT_WARNINGS)
  32677. {
  32678. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] is possibly teleport car delivering (time: %i).", GetRPName(playerid), playerid, gettime() - PlayerData[playerid][pDropTime]);
  32679. }
  32680. else if(!PlayerData[playerid][pKicked])
  32681. {
  32682. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was autobanned by %s, reason: Teleport delivering", GetRPName(playerid), SERVER_ANTICHEAT);
  32683. BanPlayer(playerid, SERVER_ANTICHEAT, "Teleport delivering");
  32684. }
  32685. }
  32686. new money = GetVehicleCranePrice(vehicleid);
  32687. GivePlayerCash(playerid, money);
  32688. AddPointMoney(POINT_AUTOEXPORT, money / 3);
  32689. SetVehicleToRespawn(vehicleid);
  32690. PlayerData[playerid][pCP] = CHECKPOINT_NONE;
  32691. DisablePlayerCheckpoint(playerid);
  32692. }
  32693. case CHECKPOINT_GARBAGE:
  32694. {
  32695. if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 408 && GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
  32696. {
  32697. return SendClientMessage(playerid, COLOR_GREY, "You need to be driving a Trashmaster.");
  32698. }
  32699. if(PlayerData[playerid][pGarbage] == 1)
  32700. {
  32701. GameTextForPlayer(playerid, "Loading Garbage....~n~Please wait.", 5000, 3);
  32702. TogglePlayerControllable(playerid, 0);
  32703. SetTimerEx("garbagewait", 5000, false, "i", playerid);
  32704. DisablePlayerCheckpoint(playerid);
  32705. PlayerData[playerid][pGarbage] = 2;
  32706. SetPlayerCheckpoint(playerid, 1138.8413,-1333.5553,13.6871, 5.0);
  32707. }
  32708. if(PlayerData[playerid][pGarbage] == 2)
  32709. {
  32710. if(IsPlayerInRangeOfPoint(playerid, 5.0, 1138.8413,-1333.5553,13.6871))
  32711. {
  32712. GameTextForPlayer(playerid, "Loading Garbage....~n~Please wait.", 5000, 3);
  32713. TogglePlayerControllable(playerid, 0);
  32714. SetTimerEx("garbagewait", 5000, false, "i", playerid);
  32715. DisablePlayerCheckpoint(playerid);
  32716. PlayerData[playerid][pGarbage] = 3;
  32717. SetPlayerCheckpoint(playerid, 2121.7314,-1342.7231,23.9844, 5.0);
  32718. }
  32719. }
  32720. if(PlayerData[playerid][pGarbage] == 3)
  32721. {
  32722. if(IsPlayerInRangeOfPoint(playerid, 5.0, 2121.7314,-1342.7231,23.9844))
  32723. {
  32724. GameTextForPlayer(playerid, "Loading Garbage....~n~Please wait..", 5000, 3);
  32725. TogglePlayerControllable(playerid, 0);
  32726. SetTimerEx("garbagewait", 5000, false, "i", playerid);
  32727. DisablePlayerCheckpoint(playerid);
  32728. PlayerData[playerid][pGarbage] = 4;
  32729. SetPlayerCheckpoint(playerid, 1920.7303,-1791.3890,13.3828, 5.0);
  32730. }
  32731. }
  32732. if(PlayerData[playerid][pGarbage] == 4)
  32733. {
  32734. if(IsPlayerInRangeOfPoint(playerid, 5.0, 1920.7303,-1791.3890,13.3828))
  32735. {
  32736. GameTextForPlayer(playerid, "Loading Garbage....~n~Please wait.", 5000, 3);
  32737. TogglePlayerControllable(playerid, 0);
  32738. SetTimerEx("garbagewait", 5000, false, "i", playerid);
  32739. DisablePlayerCheckpoint(playerid);
  32740. PlayerData[playerid][pGarbage] = 5;
  32741. SetPlayerCheckpoint(playerid, 2444.9341,-2090.0244,13.5469, 5.0);
  32742. }
  32743. }
  32744. if(PlayerData[playerid][pGarbage] == 5)
  32745. {
  32746. if(IsPlayerInRangeOfPoint(playerid, 5.0, 2444.9341,-2090.0244,13.5469))
  32747. {
  32748. GameTextForPlayer(playerid, "Unloading Garbage....~n~Please wait.", 5000, 3);
  32749. PlayerData[playerid][pGarbage] = 0;
  32750. DisablePlayerCheckpoint(playerid);
  32751. new amount = 1000 + random(500);
  32752. PlayerData[playerid][pCash] = PlayerData[playerid][pCash] + amount;
  32753. SendClientMessageEx(playerid, COLOR_AQUA, "Paycheck: You've earned $%i for your time working as a garbage man.", amount);
  32754. PlayerData[playerid][pCP] = CHECKPOINT_NONE;
  32755. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET cash = %i WHERE uid = %i", PlayerData[playerid][pCash], PlayerData[playerid][pID]);
  32756. mysql_tquery(connectionID, queryBuffer);
  32757. }
  32758. }
  32759. }
  32760. case CHECKPOINT_FARMER:
  32761. {
  32762. isharvesting[playerid] = 1;
  32763. // created by someone else, unable to find original author.
  32764. if(IsPlayerInRangeOfPoint(playerid, 10, -309.0990,-1381.1797,10.7049))
  32765. {
  32766. DisablePlayerCheckpoint(playerid);
  32767. SetPlayerCheckpoint(playerid, -286.6838,-1366.6523,9.2448, 10);
  32768. }
  32769. if(IsPlayerInRangeOfPoint(playerid, 10, -286.6838,-1366.6523,9.2448))
  32770. {
  32771. DisablePlayerCheckpoint(playerid);
  32772. SetPlayerCheckpoint(playerid, -299.1016,-1345.1233,7.8737, 10);
  32773. }
  32774. if(IsPlayerInRangeOfPoint(playerid, 10, -299.1016,-1345.1233,7.8737))
  32775. {
  32776. DisablePlayerCheckpoint(playerid);
  32777. SetPlayerCheckpoint(playerid, -285.5391,-1314.0519,9.4996, 10);
  32778. }
  32779. if(IsPlayerInRangeOfPoint(playerid, 10, -285.5391,-1314.0519,9.4996))
  32780. {
  32781. DisablePlayerCheckpoint(playerid);
  32782. SetPlayerCheckpoint(playerid, -263.7585,-1322.7645,9.2727, 10);
  32783. }
  32784. if(IsPlayerInRangeOfPoint(playerid, 10, -263.7585,-1322.7645,9.2727))
  32785. {
  32786. DisablePlayerCheckpoint(playerid);
  32787. SetPlayerCheckpoint(playerid, -247.7353,-1312.8854,10.7708, 10);
  32788. }
  32789. if(IsPlayerInRangeOfPoint(playerid, 10, -247.7353,-1312.8854,10.7708))
  32790. {
  32791. DisablePlayerCheckpoint(playerid);
  32792. SetPlayerCheckpoint(playerid, -230.6390,-1326.7452,10.5278, 10);
  32793. }
  32794. if(IsPlayerInRangeOfPoint(playerid, 10, -230.6390,-1326.7452,10.5278))
  32795. {
  32796. DisablePlayerCheckpoint(playerid);
  32797. SetPlayerCheckpoint(playerid, -208.9200,-1312.6355,8.0123, 10);
  32798. }
  32799. if(IsPlayerInRangeOfPoint(playerid, 10, -208.9200,-1312.6355,8.0123))
  32800. {
  32801. DisablePlayerCheckpoint(playerid);
  32802. SetPlayerCheckpoint(playerid, -184.9501,-1314.5737,6.7411, 10);
  32803. }
  32804. if(IsPlayerInRangeOfPoint(playerid, 10, -184.9501,-1314.5737,6.7411))
  32805. {
  32806. DisablePlayerCheckpoint(playerid);
  32807. SendClientMessage(playerid, COLOR_GREY, "FARMER: Well done! You got 15 More checkpoints to go.");
  32808. SetPlayerCheckpoint(playerid, -165.0671,-1340.6115,3.1610, 10);
  32809. }
  32810. if(IsPlayerInRangeOfPoint(playerid, 10, -165.0671,-1340.6115,3.1610))
  32811. {
  32812. DisablePlayerCheckpoint(playerid);
  32813. SetPlayerCheckpoint(playerid, -182.6981,-1357.5033,4.1997, 10);
  32814. }
  32815. if(IsPlayerInRangeOfPoint(playerid, 10, -182.6981,-1357.5033,4.1997))
  32816. {
  32817. DisablePlayerCheckpoint(playerid);
  32818. SetPlayerCheckpoint(playerid, -166.5868,-1381.2855,3.2646, 10);
  32819. }
  32820. if(IsPlayerInRangeOfPoint(playerid, 10, -166.5868,-1381.2855,3.2646))
  32821. {
  32822. DisablePlayerCheckpoint(playerid);
  32823. SetPlayerCheckpoint(playerid, -169.7452,-1395.7577,3.3153, 10);
  32824. }
  32825. if(IsPlayerInRangeOfPoint(playerid, 10, -169.7452,-1395.7577,3.3153))
  32826. {
  32827. DisablePlayerCheckpoint(playerid);
  32828. SetPlayerCheckpoint(playerid, -162.0952,-1412.2350,3.0394, 10);
  32829. }
  32830. if(IsPlayerInRangeOfPoint(playerid, 10, -162.0952,-1412.2350,3.0394))
  32831. {
  32832. DisablePlayerCheckpoint(playerid);
  32833. SendClientMessage(playerid, COLOR_GREY, "FARMER: Well done! You got 10 More checkpoints to go.");
  32834. SetPlayerCheckpoint(playerid, -192.4460,-1407.2355,3.9017, 10);
  32835. }
  32836. if(IsPlayerInRangeOfPoint(playerid, 10, -192.4460,-1407.2355,3.9017))
  32837. {
  32838. DisablePlayerCheckpoint(playerid);
  32839. SetPlayerCheckpoint(playerid, -207.5008,-1421.8888,3.2155, 10);
  32840. }
  32841. if(IsPlayerInRangeOfPoint(playerid, 10, -207.5008,-1421.8888,3.2155))
  32842. {
  32843. DisablePlayerCheckpoint(playerid);
  32844. SetPlayerCheckpoint(playerid, -226.2545,-1411.9092,6.5599, 10);
  32845. }
  32846. if(IsPlayerInRangeOfPoint(playerid, 10, -226.2545,-1411.9092,6.5599))
  32847. {
  32848. DisablePlayerCheckpoint(playerid);
  32849. SetPlayerCheckpoint(playerid, -247.6317,-1427.6404,6.6805, 10);
  32850. }
  32851. if(IsPlayerInRangeOfPoint(playerid, 10, -247.6317,-1427.6404,6.6805))
  32852. {
  32853. DisablePlayerCheckpoint(playerid);
  32854. SetPlayerCheckpoint(playerid, -263.1941,-1420.1913,9.3854, 10);
  32855. }
  32856. if(IsPlayerInRangeOfPoint(playerid, 10, -263.1941,-1420.1913,9.3854))
  32857. {
  32858. DisablePlayerCheckpoint(playerid);
  32859. SendClientMessage(playerid, COLOR_GREY, "FARMER: Well done! You got 5 More checkpoints to go.");
  32860. SetPlayerCheckpoint(playerid, -284.1987,-1431.4486,12.0138, 10);
  32861. }
  32862. if(IsPlayerInRangeOfPoint(playerid, 10, -284.1987,-1431.4486,12.0138))
  32863. {
  32864. DisablePlayerCheckpoint(playerid);
  32865. SetPlayerCheckpoint(playerid, -300.6557,-1424.9337,14.0705, 10);
  32866. }
  32867. if(IsPlayerInRangeOfPoint(playerid, 10, -300.6557,-1424.9337,14.0705))
  32868. {
  32869. DisablePlayerCheckpoint(playerid);
  32870. SetPlayerCheckpoint(playerid, -320.6297,-1431.7501,15.1514, 10);
  32871. }
  32872. if(IsPlayerInRangeOfPoint(playerid, 10, -320.6297,-1431.7501,15.1514))
  32873. {
  32874. DisablePlayerCheckpoint(playerid);
  32875. SetPlayerCheckpoint(playerid, -330.9842,-1410.7192,14.1269, 10);
  32876. }
  32877. if(IsPlayerInRangeOfPoint(playerid, 10, -330.9842,-1410.7192,14.1269))
  32878. {
  32879. DisablePlayerCheckpoint(playerid);
  32880. SetPlayerCheckpoint(playerid, -343.0883,-1369.3920,14.4816, 10);
  32881. }
  32882. if(IsPlayerInRangeOfPoint(playerid, 10, -343.0883,-1369.3920,14.4816))
  32883. {
  32884. new vehicleid = GetPlayerVehicleID(playerid);
  32885. new amount = Random(200, 600);
  32886. DisablePlayerCheckpoint(playerid);
  32887. SendClientMessageEx(playerid, COLOR_AQUA,"FARM: You've harvested the field and made $%i from selling the crops.", amount);
  32888. PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  32889. SetVehicleToRespawn(vehicleid);
  32890. Harvesting[playerid] = 0;
  32891. PlayerData[playerid][pCP] = CHECKPOINT_NONE;
  32892. AddToPaycheck(playerid, amount);
  32893. }
  32894. //===FSHARE===//
  32895. /*if(IsPlayerInRangeOfPoint(playerid, 10, -335.1576,-1030.4205,59.1934))
  32896. {
  32897. DisablePlayerCheckpoint(playerid);
  32898. SendClientMessage(playerid, COLOR_GREY, "FARMER: Well done! You got 4 More checkpoints to go.");
  32899. SetPlayerCheckpoint(playerid, -1111.2207,-1619.7231,76.3672, 10);
  32900. }
  32901. if(IsPlayerInRangeOfPoint(playerid, 10, -1111.2207,-1619.7231,76.367))
  32902. {
  32903. DisablePlayerCheckpoint(playerid);
  32904. SendClientMessage(playerid, COLOR_GREY, "FARMER: Well done! You got 3 More checkpoints to go.");
  32905. SetPlayerCheckpoint(playerid, -414.3708,-1754.7161,6.4640, 10);
  32906. }
  32907. if(IsPlayerInRangeOfPoint(playerid, 10, -414.3708,-1754.7161,6.4640))
  32908. {
  32909. DisablePlayerCheckpoint(playerid);
  32910. SendClientMessage(playerid, COLOR_GREY, "FARMER: Well done! You got 2 More checkpoints to go.");
  32911. SetPlayerCheckpoint(playerid, -579.6287,-1468.8931,10.5009, 10);
  32912. }
  32913. if(IsPlayerInRangeOfPoint(playerid, 10, -579.6287,-1468.8931,10.5009))
  32914. {
  32915. DisablePlayerCheckpoint(playerid);
  32916. SendClientMessage(playerid, COLOR_GREY, "FARMER: Well done! You got 1 More checkpoints to go.");
  32917. SetPlayerCheckpoint(playerid, -382.5363,-1426.1783,26.2084, 10);
  32918. }
  32919. if(IsPlayerInRangeOfPoint(playerid, 10, -382.5363,-1426.1783,26.2084))
  32920. {
  32921. new vehicleid = GetPlayerVehicleID(playerid);
  32922. DisablePlayerCheckpoint(playerid);
  32923. SendClientMessage(playerid, COLOR_GREY, "FARMER: Well done farmer! Here is your reward. You deserve it.");
  32924. SendClientMessage(playerid, COLOR_PURPLE,"FARMER: You gained 2000$ from farm sharing.");
  32925. PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  32926. SetVehicleToRespawn(vehicleid);
  32927. GivePlayerMoney(playerid, 2000);// you can change the money.
  32928. }*/
  32929. }
  32930. case CHECKPOINT_HOUSEROB:
  32931. {
  32932. new rand1 = Random(1, 1000);
  32933. new rand = Random(1, 200);
  32934. if(PlayerData[playerid][pRobHouse] == 1)
  32935. {
  32936. GivePlayerCash(playerid, rand1);
  32937. SendClientMessageEx(playerid, COLOR_AQUA, "Congratulations, Mission complete, you have received $%d for the stolen safe", rand1);
  32938. }
  32939. else
  32940. {
  32941. GivePlayerCash(playerid, rand);
  32942. SendClientMessageEx(playerid, COLOR_AQUA, "Congratulations, Mission complete, you have received $%d for the stolen item", rand);
  32943. }
  32944. DisablePlayerCheckpoint(playerid);
  32945. PlayerData[playerid][pWantedLevel]++;
  32946. PlayerData[playerid][pCrimes]++;
  32947. PlayerData[playerid][pBugFix] = 0;
  32948. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET wantedlevel = %i, crimes = %i WHERE uid = %i", PlayerData[playerid][pWantedLevel], PlayerData[playerid][pCrimes], PlayerData[playerid][pID]);
  32949. mysql_tquery(connectionID, queryBuffer);
  32950. }
  32951. case CHECKPOINT_TRUCKDELIVERY:
  32952. {
  32953. if(PlayerTruckJob[playerid][pTDActive] == 1)
  32954. {
  32955. //SendClientMessageEx(playerid, COLOR_YELLOW, " * You have reached the delivery destination, type /unloadtrailer to unload your trailer!");
  32956. if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
  32957. {
  32958. if(PlayerTruckJob[playerid][pTDTrailer] == GetVehicleTrailer(GetPlayerVehicleID(playerid)))
  32959. {
  32960. new DestDepot = PlayerTruckJob[playerid][pTDDestDepot];
  32961. // new Float:posx, Float:posy, Float:posz;
  32962. // GetPlayerPos(playerid, posx, posy, posz);
  32963. if(IsPlayerInRangeOfPoint(playerid, 20.0, TruckDepotInfo[DestDepot][pTDPosX], TruckDepotInfo[DestDepot][pTDPosY], TruckDepotInfo[DestDepot][pTDPosZ]))
  32964. {
  32965. // Send to unload, wait 10 seconds, freeze them
  32966. SetTimerEx("UnloadTruckJob", 10000, 0, "i", playerid);
  32967. TogglePlayerControllable(playerid, 0);
  32968. // Give them the waiting message
  32969. GameTextForPlayer(playerid, "~w~Unloading Trailer, please wait...",10000,3);
  32970. }
  32971. else
  32972. {
  32973. SendClientMessageEx(playerid, COLOR_GREY, " You are not at the Delivery Unloading Point!");
  32974. }
  32975. }
  32976. else
  32977. {
  32978. SendClientMessageEx(playerid, COLOR_GREY, " This trailer is not your delivery trailer!");
  32979. }
  32980. }
  32981. else
  32982. {
  32983. SendClientMessageEx(playerid, COLOR_GREY, " There is no trailer attached to your truck!");
  32984. }
  32985. PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  32986. PlayerData[playerid][pCP] = CHECKPOINT_NONE;
  32987. DisablePlayerCheckpoint(playerid);
  32988. }
  32989. else return SendClientMessageEx(playerid, COLOR_GREY, " You are not on a truck delivery.");
  32990. }
  32991. default:
  32992. {
  32993. PlayerData[playerid][pCP] = CHECKPOINT_NONE;
  32994. DisablePlayerCheckpoint(playerid);
  32995. }
  32996. }
  32997. return 1;
  32998. }
  32999. public OnPlayerPickUpDynamicPickup(playerid, pickupid)
  33000. {
  33001. if(pickupid == gPaycheck && IsPlayerInRangeOfPoint(playerid, 5.0, 1667.4180, -972.4201, 683.6855))
  33002. {
  33003. if(PlayerData[playerid][pPaycheck] > 0)
  33004. {
  33005. new
  33006. string[20];
  33007. format(string, sizeof(string), "~g~+$%i", PlayerData[playerid][pPaycheck]);
  33008. GameTextForPlayer(playerid, string, 5000, 1);
  33009. GivePlayerCash(playerid, PlayerData[playerid][pPaycheck]);
  33010. PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
  33011. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET paycheck = 0 WHERE uid = %i", PlayerData[playerid][pID]);
  33012. mysql_tquery(connectionID, queryBuffer);
  33013. PlayerData[playerid][pPaycheck] = 0;
  33014. }
  33015. }
  33016. if(PlayerData[playerid][pDonator] == 3)
  33017. {
  33018. if(pickupid == gVIPHealth) {
  33019. SetPlayerHealth(playerid, 100.0);
  33020. } else if(pickupid == gVIPArmor) {
  33021. SetScriptArmour(playerid, 100.0);
  33022. }
  33023. }
  33024. if(gParachutes[0] <= pickupid <= gParachutes[1]) {
  33025. GivePlayerWeaponEx(playerid, 46);
  33026. }
  33027. return 1;
  33028. }
  33029. public OnPlayerStreamIn(playerid, forplayerid)
  33030. {
  33031. if(GetPVarInt(forplayerid, "MASK_USED") == 1) {
  33032. ShowPlayerNameTagForPlayer(playerid, forplayerid, 0);
  33033. }
  33034. else
  33035. {
  33036. ShowPlayerNameTagForPlayer(forplayerid, playerid, 1);
  33037. }
  33038. return 1;
  33039. }
  33040. public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart)
  33041. {
  33042. if((22 <= weaponid <= 36) && damagedid != INVALID_PLAYER_ID && !PlayerHasWeapon(playerid, weaponid, true) && PlayerData[playerid][pAdmin] < JUNIOR_ADMIN && !PlayerData[playerid][pKicked])
  33043. {
  33044. new
  33045. string[48];
  33046. format(string, sizeof(string), "Weapon hacks (%s)", GetWeaponNameEx(weaponid));
  33047. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was autobanned by %s, reason: %s", GetRPName(playerid), SERVER_ANTICHEAT, string);
  33048. BanPlayer(playerid, SERVER_ANTICHEAT, string);
  33049. return 0;
  33050. }
  33051. if((damagedid != INVALID_PLAYER_ID && weaponid == 23) && ((IsLawEnforcement(playerid) || GetFactionType(playerid) == FACTION_GOVERNMENT) && PlayerData[playerid][pTazer] && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) && amount > 5.0)
  33052. {
  33053. if(PlayerData[damagedid][pAdminDuty])
  33054. {
  33055. return SendClientMessage(playerid, COLOR_GREY, "You can't taze an administrator currently on duty.");
  33056. }
  33057. if(PlayerData[damagedid][pTazedTime])
  33058. {
  33059. return SendClientMessage(playerid, COLOR_GREY, "This player has already been tazed.");
  33060. }
  33061. if(!IsPlayerInRangeOfPlayer(playerid, damagedid, 10.0))
  33062. {
  33063. return SendClientMessage(playerid, COLOR_GREY, "You can't taze that player. They are too far from you.");
  33064. }
  33065. if((22 <= GetPlayerWeapon(damagedid) <= 38) && IsPlayerAiming(damagedid))
  33066. {
  33067. return SendClientMessage(playerid, COLOR_GREY, "Rush-tazing is forbidden. This means tazing a player who is aiming a gun at you.");
  33068. }
  33069. if(IsPlayerInAnyVehicle(damagedid))
  33070. {
  33071. return SendClientMessage(playerid, COLOR_GREY, "You can't taze a player who is in a vehicle.");
  33072. }
  33073. PlayerData[damagedid][pTazedTime] = 10;
  33074. TogglePlayerControllable(damagedid, 0);
  33075. ApplyAnimation(damagedid, "PED", "KO_skid_front", 4.1, 0, 0, 0, 1, 0);
  33076. GameTextForPlayer(damagedid, "~r~Tazed", 5000, 3);
  33077. ShowActionBubble(playerid, "* %s aims their tazer full of electricity at %s and stuns them.", GetRPName(playerid), GetRPName(damagedid));
  33078. SendClientMessageEx(damagedid, COLOR_AQUA, "You've been {FF6347}stunned{33CCFF} with electricity by %s's tazer.", GetRPName(playerid));
  33079. SendClientMessageEx(playerid, COLOR_AQUA, "You have stunned %s with electricity. They are disabled for 10 seconds.", GetRPName(damagedid));
  33080. return 0;
  33081. }
  33082. if(PlayerData[playerid][pToggleHUD] == 0 && IsPlayerConnected(playerid))
  33083. {
  33084. new string[50];
  33085. format(string, sizeof(string), "~g~%.0f damage.", amount);
  33086. TextDrawSetString(Damage[playerid], string);
  33087. TextDrawShowForPlayer(playerid, Damage[playerid]);
  33088. PlayerPlaySound(playerid, 17802, 0.0, 0.0, 15.0);
  33089. KillTimer(PlayerData[playerid][pDamageTimer]);
  33090. PlayerData[playerid][pDamageTimer] = SetTimerEx("DestroyDamageTD", 1500, false, "i", playerid);
  33091. }
  33092. if(damagedid != INVALID_PLAYER_ID && IsPlayerConnected(damagedid))
  33093. {
  33094. AddDamages(playerid, damagedid, weaponid, bodypart, amount);
  33095. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO shots VALUES(null, %i, %i, %i, %i, '%s', '0.0', '0.0', '0.0', %i)", playerid, weaponid, BULLET_HIT_TYPE_PLAYER, damagedid, GetPlayerNameEx(damagedid), gettime());
  33096. mysql_tquery(connectionID, queryBuffer);
  33097. }
  33098. return 1;
  33099. }
  33100. public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
  33101. {
  33102. new string[50];
  33103. if(gettime() - PlayerData[playerid][pLastUpdate] >= 3 && !PlayerData[playerid][pHurt])
  33104. {
  33105. GameTextForPlayer(issuerid, "That player is AFK!", 5000, 3);
  33106. return 0;
  33107. }
  33108. if(IsPlayerConnected(issuerid))
  33109. {
  33110. if(weaponid == 4 && PlayerHasWeapon(issuerid, 4) && IsPlayerInRangeOfPlayer(playerid, issuerid, 20.0) && amount > 100.0)
  33111. {
  33112. SetPlayerHealth(playerid, 0.0);
  33113. HandleContract(playerid, issuerid);
  33114. }
  33115. if(PlayerData[playerid][pToggleHUD] == 0)
  33116. {
  33117. format(string, sizeof(string), "~r~Damage: %s hit you for %.0f damage.", GetRPName(issuerid), amount);
  33118. TextDrawSetString(Damage[playerid], string);
  33119. TextDrawShowForPlayer(playerid, Damage[playerid]);
  33120. PlayerPlaySound(playerid, 17802, 0.0, 0.0, 15.0);
  33121. KillTimer(PlayerData[playerid][pDamageTimer]);
  33122. PlayerData[playerid][pDamageTimer] = SetTimerEx("DestroyDamageTD", 1500, false, "i", playerid);
  33123. }
  33124. if (IsValidDamageWeapon(weaponid) && WeaponDamages[weaponid] != 0.0 && PlayerData[issuerid][pTazer] == 0) {
  33125. ProcessDamage(playerid, weaponid);
  33126. }
  33127. }
  33128. return 1;
  33129. }
  33130. forward OnLoadGunDamages();
  33131. public OnLoadGunDamages()
  33132. {
  33133. new
  33134. rows = cache_get_row_count(connectionID),
  33135. weaponid
  33136. ;
  33137. for (new i = 0; i < rows; i ++)
  33138. {
  33139. weaponid = cache_get_field_content_int(i, "Weapon");
  33140. if (IsValidDamageWeapon(weaponid))
  33141. {
  33142. WeaponDamages[weaponid] = cache_get_field_content_float(i, "Damage");
  33143. }
  33144. }
  33145. }
  33146. public OnPlayerShootDynamicObject(playerid, weaponid, objectid, Float:x, Float:y, Float:z)
  33147. {
  33148. if(RobberyInfo[rPlanning] && objectid == RobberyInfo[rObjects][1])
  33149. {
  33150. new bank[32];
  33151. if(GetPlayerVirtualWorld(playerid) == GetStaticEntranceWorld("Mulholland Bank")) {
  33152. bank = "Mulholland Bank";
  33153. } else if(GetPlayerVirtualWorld(playerid) == GetStaticEntranceWorld("Rodeo Bank")) {
  33154. bank = "Rodeo Bank";
  33155. }
  33156. for(new i = 0; i < MAX_BANK_ROBBERS; i ++)
  33157. {
  33158. if(RobberyInfo[rRobbers][i] != INVALID_PLAYER_ID)
  33159. {
  33160. PlayerPlaySound(RobberyInfo[rRobbers][i], 3401, 0.0, 0.0, 0.0);
  33161. GameTextForPlayer(RobberyInfo[rRobbers][i], "~w~Heist started", 5000, 1);
  33162. SetPlayerAttachedObject(RobberyInfo[rRobbers][i], 8, 19801, 2, 0.091000, 0.012000, -0.000000, 0.099999, 87.799957, 179.500015, 1.345999, 1.523000, 1.270001, 0, 0);
  33163. SetPlayerAttachedObject(RobberyInfo[rRobbers][i], 9, 1550, 1, 0.116999, -0.170999, -0.016000, -3.099997, 87.800018, -179.400009, 0.602000, 0.640000, 0.625000, 0, 0);
  33164. ApplyAnimation(RobberyInfo[rRobbers][i], "GOGGLES", "goggles_put_on", 4.1, 0, 0, 0, 0, 0, 1);
  33165. PlayerData[RobberyInfo[rRobbers][i]][pWantedLevel] = 6;
  33166. PlayerData[RobberyInfo[rRobbers][i]][pCrimes]++;
  33167. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO charges VALUES(null, %i, 'The State', NOW(), 'Bank Robbery')", PlayerData[RobberyInfo[rRobbers][i]][pID]);
  33168. mysql_tquery(connectionID, queryBuffer);
  33169. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET wantedlevel = 6, crimes = crimes + 1 WHERE uid = %i", PlayerData[RobberyInfo[rRobbers][i]][pID]);
  33170. mysql_tquery(connectionID, queryBuffer);
  33171. }
  33172. }
  33173. foreach(new i : Player)
  33174. {
  33175. if(IsLawEnforcement(i))
  33176. {
  33177. SendClientMessageEx(i, COLOR_OLDSCHOOL, "* HQ: A robbery is occurring at the %s. There are %i confirmed robbers.", bank, GetBankRobbers());
  33178. }
  33179. }
  33180. GetDynamicObjectPos(RobberyInfo[rObjects][1], x, y, z);
  33181. MoveDynamicObject(RobberyInfo[rObjects][0], 1678.248901, -988.181152, 670.224853, 5.0, 90.000000, 0.000000, 0.000000);
  33182. DestroyDynamicObject(RobberyInfo[rObjects][1]);
  33183. CreateExplosion(x, y, z, 12, 6.0);
  33184. SendClientMessageToAllEx(COLOR_AQUA, "Breaking News: A bank robbery is currently taking place at the %s!", bank);
  33185. RobberyInfo[rText][0] = CreateDynamic3DTextLabel("/lootbox\nto loot deposit box.", COLOR_YELLOW, 1680.2344, -994.6146, 671.0032, 10.0);
  33186. RobberyInfo[rText][1] = CreateDynamic3DTextLabel("/lootbox\nto loot deposit box.", COLOR_YELLOW, 1680.2335, -998.6115, 671.0032, 10.0);
  33187. RobberyInfo[rText][2] = CreateDynamic3DTextLabel("/lootbox\nto loot deposit box.", COLOR_YELLOW, 1680.2344, -1002.5356, 671.0032, 10.0);
  33188. RobberyInfo[rText][3] = CreateDynamic3DTextLabel("/lootbox\nto loot deposit box.", COLOR_YELLOW, 1674.2708, -998.4954, 671.0032, 10.0);
  33189. RobberyInfo[rText][4] = CreateDynamic3DTextLabel("/lootbox\nto loot deposit box.", COLOR_YELLOW, 1674.2708, -994.5173, 671.0032, 10.0);
  33190. RobberyInfo[rStarted] = 1;
  33191. RobberyInfo[rStolen] = 0;
  33192. RobberyInfo[rPlanning] = 0;
  33193. }
  33194. if(PlayerData[playerid][pDeleteMode])
  33195. {
  33196. PlayerData[playerid][pSelected] = objectid;
  33197. ShowDialogToPlayer(playerid, DIALOG_DELETEOBJECT);
  33198. }
  33199. return 1;
  33200. }
  33201. forward RechargeTazer(playerid);
  33202. public RechargeTazer(playerid)
  33203. {
  33204. if (PlayerData[playerid][pTazer])
  33205. {
  33206. GivePlayerWeapon(playerid, 23, 1);
  33207. }
  33208. }
  33209. public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
  33210. {
  33211. if ((weaponid >= 22 && weaponid <= 38) && hittype == BULLET_HIT_TYPE_OBJECT && PlayerData[playerid][pRangeBooth] != -1 && hitid == g_BoothObject[PlayerData[playerid][pRangeBooth]])
  33212. {
  33213. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  33214. PlayerData[playerid][pTargets]++;
  33215. DestroyObject(g_BoothObject[PlayerData[playerid][pRangeBooth]]);
  33216. SendClientMessageEx(playerid, COLOR_GREEN, "~b~Targets:~w~ %d/10", PlayerData[playerid][pTargets]);
  33217. SetTimerEx("UpdateBooth", 3000, false, "dd", playerid, PlayerData[playerid][pRangeBooth]);
  33218. }
  33219. if (weaponid == 23 && PlayerData[playerid][pTazer] && GetFactionType(playerid) == FACTION_POLICE) {
  33220. PlayerPlaySoundEx(playerid, 6003);
  33221. SetTimerEx("RechargeTazer", 2000, false, "i", playerid);
  33222. ShowPlayerFooter(playerid, "Recharging tazer, please wait...", 2000);
  33223. }
  33224. if((PlayerData[playerid][pPaintball] > 0) && (GetPlayerVirtualWorld(playerid) != 1001 && GetPlayerVirtualWorld(playerid) != 1000))
  33225. {
  33226. if(gettime() - PlayerData[playerid][pLastShot] >= 3)
  33227. {
  33228. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] is using paintball weapons outside of paintball.", GetRPName(playerid), playerid);
  33229. PlayerData[playerid][pLastShot] = gettime();
  33230. ResetPlayerWeapons(playerid);
  33231. }
  33232. return 0;
  33233. }
  33234. new entranceid;
  33235. if(PlayerData[playerid][pDueling] != INVALID_PLAYER_ID && !IsPlayerInRangeOfPoint(playerid, 150.0, 1419.6472, 4.0132, 1002.3906) && (entranceid = GetInsideEntrance(playerid)) != -1 && EntranceInfo[entranceid][eType] != 1)
  33236. {
  33237. if(gettime() - PlayerData[playerid][pLastShot] >= 3)
  33238. {
  33239. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] is using duel weapons outside of the duel arena.", GetRPName(playerid), playerid);
  33240. PlayerData[playerid][pLastShot] = gettime();
  33241. ResetPlayerWeapons(playerid);
  33242. }
  33243. return 0;
  33244. }
  33245. if(!PlayerHasWeapon(playerid, weaponid, true) && PlayerData[playerid][pAdmin] < JUNIOR_ADMIN && !PlayerData[playerid][pKicked] && gettime() > PlayerData[playerid][pACTime])
  33246. {
  33247. new
  33248. string[48];
  33249. format(string, sizeof(string), "Weapon hacks (%s)", GetWeaponNameEx(weaponid));
  33250. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was autobanned by %s, reason: %s", GetRPName(playerid), SERVER_ANTICHEAT, string);
  33251. BanPlayer(playerid, SERVER_ANTICHEAT, string);
  33252. return 0;
  33253. }
  33254. if(hittype == BULLET_HIT_TYPE_PLAYER && hitid != INVALID_PLAYER_ID)
  33255. {
  33256. if(!PlayerData[hitid][pJoinedEvent] && !PlayerData[hitid][pPaintball] && PlayerData[hitid][pDueling] == INVALID_PLAYER_ID)
  33257. {
  33258. GetPlayerArmour(hitid, PlayerData[hitid][pArmor]);
  33259. }
  33260. }
  33261. if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
  33262. {
  33263. if(22 <= GetPlayerWeapon(playerid) <= 36)
  33264. {
  33265. if(PlayerData[playerid][pACAmmo] == GetPlayerAmmo(playerid))
  33266. {
  33267. PlayerData[playerid][pACFired]++;
  33268. }
  33269. if(!PlayerData[playerid][pReloading] && PlayerData[playerid][pACFired] >= 20)
  33270. {
  33271. if((gAnticheat) && PlayerData[playerid][pAdmin] < JUNIOR_ADMIN && !PlayerData[playerid][pKicked])
  33272. {
  33273. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s was automatically kicked for infinite ammo.", GetRPName(playerid));
  33274. Log_Write("log_cheat", "%s (uid: %i) was automatically kicked for infinite ammo.", GetPlayerNameEx(playerid), PlayerData[playerid][pID]);
  33275. KickPlayer(playerid);
  33276. }
  33277. }
  33278. PlayerData[playerid][pACAmmo] = GetPlayerAmmo(playerid);
  33279. }
  33280. }
  33281. // Anti CBug moved to WC_cbugpunishment
  33282. /*if((23 <= weaponid <= 25) && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
  33283. {
  33284. new interval, time = NetStats_GetConnectedTime(playerid);
  33285. switch(weaponid)
  33286. {
  33287. case 23: interval = 200;
  33288. case 24: interval = 600;
  33289. case 25: interval = 500;
  33290. }
  33291. if((time - PlayerData[playerid][pCBug]) < interval && PlayerData[playerid][pPaintball] == 0 && PlayerData[playerid][pDueling] == INVALID_PLAYER_ID && !(PlayerData[playerid][pJoinedEvent] && EventInfo[eCS]))
  33292. {
  33293. if((hittype == BULLET_HIT_TYPE_PLAYER && hitid != INVALID_PLAYER_ID) && !PlayerData[hitid][pAdminDuty])
  33294. {
  33295. //ApplyAnimation(playerid, "SWORD", "sword_block", 4.0, 0, 0, 0, 0, 0, 1);
  33296. //SetPlayerHealth(playerid, GetPlayerHealthEx(playerid) - 30.0);
  33297. //GameTextForPlayer(playerid, "~r~C-bug is not allowed", 3000, 3);
  33298. //SendClientMessage(playerid, COLOR_LIGHTRED, "* Please do not abuse the C-Bug glitch. This action has been reported to the admins.");
  33299. GameTextForPlayer(playerid, "~r~C-bug is not allowed", 3000, 3);
  33300. ApplyAnimation(playerid, "SWORD", "sword_block", 4.0, 0, 0, 0, 0, 0, 1);
  33301. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] is possibly abusing C-Bug with a %s.", GetRPName(playerid), playerid, GetWeaponNameEx(weaponid));
  33302. SetPlayerArmedWeapon(playerid, 0);
  33303. PlayerData[playerid][pCBug] = time;
  33304. return 0;
  33305. }
  33306. }
  33307. PlayerData[playerid][pCBug] = time;
  33308. }*/
  33309. // Rapid fire detection
  33310. if((22 <= weaponid <= 27) && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT && PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  33311. {
  33312. new time = NetStats_GetConnectedTime(playerid);
  33313. if((time - PlayerData[playerid][pLastFire]) < 25)
  33314. {
  33315. PlayerData[playerid][pRapidFire]++;
  33316. if(PlayerData[playerid][pRapidFire] >= 5)
  33317. {
  33318. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was autobanned by %s, reason: Rapid fire", GetRPName(playerid), SERVER_ANTICHEAT);
  33319. BanPlayer(playerid, SERVER_ANTICHEAT, "Rapid fire");
  33320. }
  33321. }
  33322. PlayerData[playerid][pLastFire] = time;
  33323. }
  33324. /*else
  33325. {
  33326. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO shots VALUES(null, %i, %i, %i, %i, null, '%f', '%f', '%f', %i)", playerid, weaponid, hittype, hitid, fX, fY, fZ, gettime());
  33327. }*/
  33328. return 1;
  33329. }
  33330. /*public WC_CbugPunishment(playerid, weapon)
  33331. {
  33332. if(!CanPlayerCbug(playerid))
  33333. {
  33334. if(!PlayerData[playerid][pAdminDuty])
  33335. {
  33336. //ApplyAnimation(playerid, "SWORD", "sword_block", 4.0, 0, 0, 0, 0, 0, 1);
  33337. //SetPlayerHealth(playerid, GetPlayerHealthEx(playerid) - 30.0);
  33338. //GameTextForPlayer(playerid, "~r~C-bug is not allowed", 3000, 3);
  33339. //SendClientMessage(playerid, COLOR_LIGHTRED, "* Please do not abuse the C-Bug glitch. This action has been reported to the admins.");
  33340. GameTextForPlayer(playerid, "~r~C-bug is not allowed", 3000, 3);
  33341. ApplyAnimation(playerid, "SWORD", "sword_block", 4.0, 0, 0, 0, 0, 0, 1);
  33342. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] is possibly abusing C-Bug with a %s.", GetRPName(playerid), playerid, GetWeaponNameEx(weapon));
  33343. SetPlayerArmedWeapon(playerid, 0);
  33344. FreezeSyncData(playerid, false);
  33345. //ClearAnimations(playerid, 1);
  33346. return 0;
  33347. }
  33348. }
  33349. return 1;
  33350. }*/
  33351. stock CheckAdmin(playerid, level)
  33352. {
  33353. if (PlayerData[playerid][pAdmin] >= level)
  33354. return true;
  33355. else
  33356. return false;
  33357. }
  33358. public OnPlayerTeleport(playerid, Float:distance)
  33359. {
  33360. if((gAnticheat) && PlayerData[playerid][pAdmin] < 2 && !PlayerData[playerid][pKicked])
  33361. {
  33362. if(!IsPlayerInRangeOfPoint(playerid, 3.0, PlayerData[playerid][pPosX], PlayerData[playerid][pPosY], PlayerData[playerid][pPosZ]))
  33363. {
  33364. PlayerData[playerid][pACWarns]++;
  33365. if(PlayerData[playerid][pACWarns] < MAX_ANTICHEAT_WARNINGS)
  33366. {
  33367. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] is possibly teleport hacking (distance: %.1f).", GetRPName(playerid), playerid, distance);
  33368. Log_Write("log_cheat", "%s (uid: %i) possibly teleport hacked (distance: %.1f)", GetPlayerNameEx(playerid), PlayerData[playerid][pID], distance);
  33369. }
  33370. else
  33371. {
  33372. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was autobanned by %s, reason: Teleport hacks", GetRPName(playerid), SERVER_ANTICHEAT);
  33373. BanPlayer(playerid, SERVER_ANTICHEAT, "Teleport hacks");
  33374. }
  33375. }
  33376. }
  33377. return 1;
  33378. }
  33379. public OnPlayerAirbreak(playerid)
  33380. {
  33381. if((gAnticheat) && PlayerData[playerid][pAdmin] < 2 && !PlayerData[playerid][pKicked])
  33382. {
  33383. PlayerData[playerid][pACWarns]++;
  33384. if(PlayerData[playerid][pACWarns] < MAX_ANTICHEAT_WARNINGS)
  33385. {
  33386. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] is possibly using airbreak.", GetRPName(playerid), playerid);
  33387. Log_Write("log_cheat", "%s (uid: %i) possibly used airbreak.", GetPlayerNameEx(playerid), PlayerData[playerid][pID]);
  33388. }
  33389. else
  33390. {
  33391. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was autobanned by %s, reason: Airbreak", GetRPName(playerid), SERVER_ANTICHEAT);
  33392. BanPlayer(playerid, SERVER_ANTICHEAT, "Airbreak");
  33393. }
  33394. }
  33395. return 1;
  33396. }
  33397. public OnPlayerSelectionMenuResponse(playerid, extraid, response, listitem, modelid)
  33398. {
  33399. switch(extraid)
  33400. {
  33401. case MODEL_SELECTION_CLOTHES:
  33402. {
  33403. if(response)
  33404. {
  33405. new
  33406. businessid = GetInsideBusiness(playerid);
  33407. if(businessid >= 0 && BusinessInfo[businessid][bType] == BUSINESS_CLOTHES)
  33408. {
  33409. if(BusinessInfo[businessid][bProducts] <= 0)
  33410. {
  33411. return SendClientMessage(playerid, COLOR_GREY, "This business is out of stock.");
  33412. }
  33413. if(PlayerData[playerid][pDonator] == 0 && PlayerData[playerid][pCash] < 1000)
  33414. {
  33415. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy new clothes.");
  33416. }
  33417. if((PlayerData[playerid][pDonator] == 0 && GetFactionType(playerid) != FACTION_POLICE && GetFactionType(playerid) != FACTION_MEDIC) && (!(0 <= modelid <= 311) || (265 <= modelid <= 267) || (274 <= modelid <= 288) || (300 <= modelid <= 302) || (306 <= modelid <= 311)))
  33418. {
  33419. return SendClientMessage(playerid, COLOR_GREY, "You are not allowed to use that skin as it is either invalid or faction reserved.");
  33420. }
  33421. if(PlayerData[playerid][pDonator] == 0)
  33422. {
  33423. new price = 1000;
  33424. if(PlayerData[playerid][pTraderUpgrade] > 0)
  33425. {
  33426. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  33427. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  33428. }
  33429. GivePlayerCash(playerid, -price);
  33430. BusinessInfo[businessid][bCash] += price;
  33431. BusinessInfo[businessid][bProducts]--;
  33432. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  33433. mysql_tquery(connectionID, queryBuffer);
  33434. ShowActionBubble(playerid, "* %s paid %s to the shopkeeper and received a new set of clothes.", GetRPName(playerid), FormatNumber(price));
  33435. SendClientMessageEx(playerid, COLOR_WHITE, "You've changed your clothes for $%i.", price);
  33436. }
  33437. else
  33438. {
  33439. SendClientMessage(playerid, COLOR_VIP, "VIP Perk: You changed your clothes free of charge.");
  33440. }
  33441. SetScriptSkin(playerid, modelid);
  33442. SendClientMessageEx(playerid, -1, "%d", modelid);
  33443. }
  33444. }
  33445. }
  33446. case MODEL_SELECTION_FURNITURE:
  33447. {
  33448. if(response)
  33449. {
  33450. new houseid = GetInsideHouse(playerid);
  33451. if(houseid == -1)
  33452. houseid = GetFurnitureHouse(playerid);
  33453. if(houseid >= 0 && HasFurniturePerms(playerid, houseid))
  33454. {
  33455. PreviewFurniture(playerid, listitem + PlayerData[playerid][pPreviewIndex]);
  33456. }
  33457. }
  33458. }
  33459. case MODEL_SELECTION_LANDOBJECTS:
  33460. {
  33461. if(response)
  33462. {
  33463. new landid = GetNearbyLand(playerid);
  33464. if(landid >= 0 && HasLandPerms(playerid, landid))
  33465. {
  33466. PurchaseLandObject(playerid, landid, listitem + PlayerData[playerid][pFurnitureIndex]);
  33467. }
  33468. }
  33469. else
  33470. {
  33471. ShowDialogToPlayer(playerid, DIALOG_LANDBUILD1);
  33472. }
  33473. }
  33474. case MODEL_SELECTION_CLOTHING:
  33475. {
  33476. if(response)
  33477. {
  33478. new businessid = GetInsideBusiness(playerid);
  33479. if(businessid >= 0 && BusinessInfo[businessid][bType] == BUSINESS_CLOTHES)
  33480. {
  33481. PreviewClothing(playerid, listitem + PlayerData[playerid][pClothingIndex]);
  33482. }
  33483. }
  33484. else
  33485. {
  33486. ShowDialogToPlayer(playerid, DIALOG_BUYCLOTHINGTYPE);
  33487. }
  33488. }
  33489. case MODEL_SELECTION_COPCLOTHING:
  33490. {
  33491. if((response) && IsLawEnforcement(playerid))
  33492. {
  33493. SetPlayerAttachedObject(playerid, 9, modelid, copClothing[listitem][cBone]);
  33494. PlayerData[playerid][pEditType] = EDIT_COP_CLOTHING;
  33495. PlayerData[playerid][pSelected] = listitem;
  33496. SendClientMessageEx(playerid, COLOR_AQUA, "You have selected {FF6347}%s{33CCFF}. Use the editor to arrange your clothing and click the disk icon to save.", copClothing[listitem][cName]);
  33497. EditAttachedObject(playerid, 9);
  33498. }
  33499. }
  33500. case MODEL_SELECTION_VIPCLOTHES:
  33501. {
  33502. if((response) && PlayerData[playerid][pDonator] > 0)
  33503. {
  33504. SetScriptSkin(playerid, modelid);
  33505. SendClientMessage(playerid, COLOR_VIP, "VIP Perk: You changed your clothes free of charge.");
  33506. }
  33507. }
  33508. case MODEL_SELECTION_VEHICLES:
  33509. {
  33510. if(response)
  33511. {
  33512. PlayerData[playerid][pSelected] = listitem;
  33513. PurchaseVehicle(playerid);
  33514. }
  33515. }
  33516. case MODEL_SELECTION_VIPVEHICLES:
  33517. {
  33518. if(response)
  33519. {
  33520. SCM(playerid, COLOR_GREY, "Nuffin happened");
  33521. }
  33522. }
  33523. case MODEL_SELECTION_SKIN_REGISTER:// Registraton clothes.
  33524. {
  33525. if(!response)
  33526. {
  33527. return ShowDialogToPlayer(playerid, ACCOUNT_CREATION);
  33528. }
  33529. if(response)
  33530. {
  33531. SetScriptSkin(playerid, modelid);
  33532. PlayerData[playerid][pSkin] = modelid;
  33533. ShowDialogToPlayer(playerid, ACCOUNT_CREATION);
  33534. }
  33535. }
  33536. }
  33537. return 1;
  33538. }
  33539. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  33540. {
  33541. // Finally... an end to that ANNOYING spectate bug!
  33542. foreach(new i : Player)
  33543. {
  33544. if(PlayerData[i][pSpectating] == playerid)
  33545. {
  33546. SetTimerEx("SpectateUpdate", 500, false, "ii", i, playerid);
  33547. }
  33548. }
  33549. if((newinteriorid == 0) && IsPlayerInBankRobbery(playerid))
  33550. {
  33551. PlayerPlaySound(playerid, 3402, 0.0, 0.0, 0.0);
  33552. }
  33553. /*if(PlayerData[playerid][pPreviewHouse] >= 0)
  33554. {
  33555. PlayerData[playerid][pPreviewHouse] = -1;
  33556. PlayerData[playerid][pPreviewType] = 0;
  33557. PlayerData[playerid][pPreviewTime] = 0;
  33558. SendClientMessage(playerid, COLOR_GREY, "Preview cancelled. You left your house interior.");
  33559. }*/
  33560. return 1;
  33561. }
  33562. bool:IsVehicleBajs(vehid)
  33563. {
  33564. switch(GetVehicleModel(vehid))
  33565. {
  33566. case 481, 509, 510: return true;
  33567. }
  33568. return false;
  33569. }
  33570. public OnPlayerUpdate(playerid) // every second <3 ty KYE!!
  33571. {
  33572. if(PlayerData[playerid][pKicked])
  33573. return 0;
  33574. if(!PlayerData[playerid][pLogged])
  33575. return 1;
  33576. new index = GetPlayerAnimationIndex(playerid);
  33577. if (PlayerData[playerid][pWorkout] != WORKOUT_NONE)
  33578. {
  33579. switch (PlayerData[playerid][pWorkout])
  33580. {
  33581. case WORKOUT_DUMBELLS:
  33582. {
  33583. if (index < 570 || index > 577)
  33584. {
  33585. ApplyAnimation(playerid, "Freeweights", "gym_free_loop", 4.1, 1, 0, 0, 0, 0, 1);
  33586. }
  33587. }
  33588. case WORKOUT_TREADMILL:
  33589. {
  33590. if (index < 662 || index > 665)
  33591. {
  33592. switch (PlayerData[playerid][pSpeedLevel])
  33593. {
  33594. case 1..3:
  33595. {
  33596. ApplyAnimation(playerid, "GYMNASIUM", "gym_tread_walk", 4.1, 1, 0, 0, 0, 0, 1);
  33597. }
  33598. case 4..6:
  33599. {
  33600. ApplyAnimation(playerid, "GYMNASIUM", "gym_tread_jog", 4.1, 1, 0, 0, 0, 0, 1);
  33601. }
  33602. case 7..10:
  33603. {
  33604. ApplyAnimation(playerid, "GYMNASIUM", "gym_tread_sprint", 4.1, 1, 0, 0, 0, 0, 1);
  33605. }
  33606. }
  33607. }
  33608. }
  33609. }
  33610. }
  33611. if(GetPlayerWeapon(playerid) == 38 ) // when they sync something which they should not!!!
  33612. {
  33613. RemovePlayerWeapon(playerid, 38);
  33614. }
  33615. new Float:CarHealth[MAX_PLAYERS];
  33616. if(IsPlayerInAnyVehicle(playerid) == 1 && seatbelt[playerid] == 0)
  33617. {
  33618. new Float:TempCarHealth;
  33619. GetVehicleHealth(GetPlayerVehicleID(playerid), TempCarHealth);
  33620. new Float:Difference = floatsub(CarHealth[playerid], TempCarHealth);
  33621. if((floatcmp(CarHealth[playerid], TempCarHealth) == 1) && (floatcmp(Difference,100.0) == 1))
  33622. {
  33623. Difference = floatdiv(Difference, 10.0);
  33624. new Float:OldHealth;
  33625. GetPlayerHealth(playerid, OldHealth);
  33626. SetPlayerHealth(playerid, floatsub(OldHealth, Difference));
  33627. }
  33628. CarHealth[playerid] = TempCarHealth;
  33629. }
  33630. else
  33631. {
  33632. CarHealth[playerid] = 0.0;
  33633. }
  33634. new vehicle = GetPlayerVehicleID(playerid);
  33635. if( IsPlayerInAnyVehicle( playerid ) && GetPlayerState( playerid ) == PLAYER_STATE_DRIVER ) {
  33636. if( !IsVehicleBajs( vehicle ) )
  33637. {
  33638. if(PlayerData[playerid][pSpeedometer] == 1)
  33639. {
  33640. }
  33641. else if(PlayerData[playerid][pSpeedometer] == 2)
  33642. {
  33643. }
  33644. }
  33645. }
  33646. new vehicleid = GetPlayerVehicleID(playerid), keys, string[128], drunkLevel = GetPlayerDrunkLevel(playerid);
  33647. if(PlayerData[playerid][pCurrentWeapon] != GetPlayerWeapon(playerid))
  33648. {
  33649. PlayerData[playerid][pCurrentWeapon] = GetPlayerWeapon(playerid);
  33650. PlayerData[playerid][pCurrentAmmo] = GetPlayerAmmo(playerid);
  33651. PlayerData[playerid][pACAmmo] = PlayerData[playerid][pCurrentAmmo];
  33652. PlayerData[playerid][pACFired] = 0;
  33653. PlayerData[playerid][pCBug] = 0;
  33654. PlayerData[playerid][pClip] = GetWeaponClipSize(PlayerData[playerid][pCurrentWeapon]);
  33655. // Weapon hacks
  33656. if((gAnticheat) && PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  33657. {
  33658. if(PlayerData[playerid][pCurrentWeapon] > 1 && !PlayerHasWeapon(playerid, PlayerData[playerid][pCurrentWeapon], true) && !PlayerData[playerid][pKicked])
  33659. {
  33660. PlayerData[playerid][pACWarns]++;
  33661. if(PlayerData[playerid][pACWarns] < MAX_ANTICHEAT_WARNINGS)
  33662. {
  33663. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] has a desynced %s.", GetRPName(playerid), playerid, GetWeaponNameEx(PlayerData[playerid][pCurrentWeapon]));
  33664. Log_Write("log_cheat", "%s (uid: %i) had a desynced %s with %i ammunition.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetWeaponNameEx(PlayerData[playerid][pCurrentWeapon]), GetPlayerAmmo(playerid));
  33665. }
  33666. else
  33667. {
  33668. format(string, sizeof(string), "Weapon hacks (%s)", GetWeaponNameEx(PlayerData[playerid][pCurrentWeapon]));
  33669. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was autobanned by %s, reason: %s", GetRPName(playerid), SERVER_ANTICHEAT, string);
  33670. BanPlayer(playerid, SERVER_ANTICHEAT, string);
  33671. }
  33672. }
  33673. }
  33674. }
  33675. if(GetPlayerWeaponState(playerid) == WEAPONSTATE_RELOADING)
  33676. {
  33677. if(GetPlayerWeapon(playerid) != 25 && GetPlayerWeapon(playerid) != 33 && GetPlayerWeapon(playerid) != 34)
  33678. {
  33679. PlayerData[playerid][pReloading] = 1;
  33680. }
  33681. PlayerData[playerid][pACFired] = 0;
  33682. }
  33683. if(PlayerData[playerid][pReloading] && GetPlayerWeaponState(playerid) != WEAPONSTATE_RELOADING)
  33684. {
  33685. PlayerData[playerid][pClip] = GetWeaponClipSize(GetPlayerWeapon(playerid));
  33686. PlayerData[playerid][pReloading] = 0;
  33687. }
  33688. if(PlayerData[playerid][pCurrentVehicle] != vehicleid)
  33689. {
  33690. PlayerData[playerid][pCurrentVehicle] = vehicleid;
  33691. PlayerData[playerid][pVehicleCount]++;
  33692. if((!IsABoat(vehicleid) && GetVehicleModel(vehicleid) != 539) && PlayerData[playerid][pVehicleCount] >= 4 && PlayerData[playerid][pAdmin] < JUNIOR_ADMIN && !PlayerData[playerid][pKicked])
  33693. {
  33694. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was autobanned by %s, reason: Car warping", GetRPName(playerid), SERVER_ANTICHEAT);
  33695. BanPlayer(playerid, SERVER_ANTICHEAT, "Car warping");
  33696. return 0;
  33697. }
  33698. }
  33699. if((44 <= GetPlayerWeapon(playerid) <= 45) && keys & KEY_FIRE)
  33700. {
  33701. return 0;
  33702. }
  33703. if(PlayerData[playerid][pCurrentAmmo] != GetPlayerAmmo(playerid))
  33704. {
  33705. if(PlayerData[playerid][pCurrentAmmo] > GetPlayerAmmo(playerid))
  33706. {
  33707. switch(GetPlayerWeapon(playerid))
  33708. {
  33709. case 22, 26, 28, 32:
  33710. {
  33711. PlayerData[playerid][pClip] -= PlayerData[playerid][pCurrentAmmo] - GetPlayerAmmo(playerid);
  33712. }
  33713. }
  33714. if(PlayerData[playerid][pClip] < 0)
  33715. {
  33716. PlayerData[playerid][pClip] = 0;
  33717. }
  33718. }
  33719. PlayerData[playerid][pCurrentAmmo] = GetPlayerAmmo(playerid);
  33720. }
  33721. if(GetPlayerWeaponState(playerid) == WEAPONSTATE_RELOADING)
  33722. {
  33723. if(GetPlayerWeapon(playerid) != 25 && GetPlayerWeapon(playerid) != 33 && GetPlayerWeapon(playerid) != 34)
  33724. {
  33725. PlayerData[playerid][pReloading] = 1;
  33726. }
  33727. PlayerData[playerid][pACFired] = 0;
  33728. }
  33729. if(PlayerData[playerid][pReloading] && GetPlayerWeaponState(playerid) != WEAPONSTATE_RELOADING)
  33730. {
  33731. PlayerData[playerid][pClip] = GetWeaponClipSize(GetPlayerWeapon(playerid));
  33732. PlayerData[playerid][pReloading] = 0;
  33733. }
  33734. if(!PlayerData[playerid][pToggleHUD] && !PlayerData[playerid][pToggleTextdraws] && GetPlayerState(playerid) != PLAYER_STATE_SPECTATING)
  33735. {
  33736. new
  33737. Float:health,
  33738. Float:armour;
  33739. GetPlayerHealth(playerid, health);
  33740. GetPlayerArmour(playerid, armour);
  33741. if(floatround(armour) > 0)
  33742. {
  33743. format(string, sizeof(string), "%.0f", armour);
  33744. PlayerTextDrawSetString(playerid, PlayerData[playerid][pText][3], string);
  33745. PlayerTextDrawShow(playerid, PlayerData[playerid][pText][3]);
  33746. }
  33747. else
  33748. {
  33749. PlayerTextDrawHide(playerid, PlayerData[playerid][pText][3]);
  33750. }
  33751. format(string, sizeof(string), "%.0f", health);
  33752. PlayerTextDrawSetString(playerid, PlayerData[playerid][pText][4], string);
  33753. PlayerTextDrawShow(playerid, PlayerData[playerid][pText][4]);
  33754. }
  33755. if(GetPlayerWeapon(playerid) > 1 && PlayerData[playerid][pInjured])
  33756. {
  33757. SetPlayerArmedWeapon(playerid, 0);
  33758. }
  33759. if(PlayerData[playerid][pInjured])
  33760. {
  33761. format(string, sizeof(string), "(( Has been injured %d times, /damages %d for more information. ))", totalDamages[playerid], playerid);
  33762. SetPlayerChatBubble(playerid, string, COLOR_ADM, 30.0, 2000);
  33763. }
  33764. if(!drunkLevel)
  33765. {
  33766. SetPlayerDrunkLevel(playerid, 1000);
  33767. }
  33768. if(PlayerData[playerid][pDrunkLevel] != drunkLevel)
  33769. {
  33770. new value = PlayerData[playerid][pDrunkLevel] - drunkLevel;
  33771. if(0 <= value <= 250)
  33772. {
  33773. PlayerData[playerid][pFPS] = value;
  33774. }
  33775. PlayerData[playerid][pDrunkLevel] = drunkLevel;
  33776. }
  33777. if(!GetPlayerInterior(playerid))
  33778. {
  33779. SetPlayerTime(playerid, gWorldTime, 0);
  33780. }
  33781. else
  33782. {
  33783. new garageid;
  33784. if((garageid = GetInsideGarage(playerid)) >= 0 && GarageInfo[garageid][gType] == 2)
  33785. SetPlayerTime(playerid, 0, 0);
  33786. else
  33787. SetPlayerTime(playerid, 12, 0);
  33788. }
  33789. if((keys & KEY_HANDBRAKE) && GetPlayerWeapon(playerid) == 34)
  33790. {
  33791. if(!PlayerData[playerid][pSniper])
  33792. {
  33793. for(new i = 0; i < MAX_PLAYER_CLOTHING; i ++)
  33794. {
  33795. if(ClothingInfo[playerid][i][cAttached]) RemovePlayerAttachedObject(playerid, i);
  33796. }
  33797. PlayerData[playerid][pSniper] = 1;
  33798. }
  33799. }
  33800. else if(PlayerData[playerid][pSniper])
  33801. {
  33802. SetPlayerClothing(playerid);
  33803. PlayerData[playerid][pSniper] = 0;
  33804. }
  33805. if(PlayerData[playerid][pNoKnife] && GetPlayerWeapon(playerid) == 4)
  33806. {
  33807. SetPlayerArmedWeapon(playerid, 0);
  33808. }
  33809. if(PlayerData[playerid][pAnimation] != index)
  33810. {
  33811. if(PlayerData[playerid][pLockBreak] != INVALID_VEHICLE_ID)
  33812. {
  33813. vehicleid = PlayerData[playerid][pLockBreak];
  33814. if(!IsValidVehicle(vehicleid) || VehicleInfo[vehicleid][vOwnerID] == 0)
  33815. {
  33816. SendClientMessage(playerid, COLOR_GREY, "You are no longer breaking into this vehicle as it despawned.");
  33817. CancelBreakIn(playerid);
  33818. }
  33819. else if(GetNearbyVehicle(playerid) != vehicleid)
  33820. {
  33821. SendClientMessage(playerid, COLOR_GREY, "You are no longer breaking into this vehicle as you left its location.");
  33822. CancelBreakIn(playerid);
  33823. }
  33824. else if(VehicleInfo[vehicleid][vLocked] == 0)
  33825. {
  33826. SendClientMessage(playerid, COLOR_GREY, "You are no longer breaking into this vehicle as it was unlocked.");
  33827. CancelBreakIn(playerid);
  33828. }
  33829. else if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT)
  33830. {
  33831. SendClientMessage(playerid, COLOR_GREY, "You are no longer breaking into this vehicle as you aren't onfoot.");
  33832. CancelBreakIn(playerid);
  33833. }
  33834. else
  33835. {
  33836. switch(index)
  33837. {
  33838. case 17..19, 1545..1547, 312..314, 1136..1138, 472..474, 482..484, 494..496, 504..505, 1165:
  33839. {
  33840. if(IsValidVehicle(vehicleid) && (IsPlayerAtVehicleDoor(playerid, vehicleid, DOOR_DRIVER) || IsPlayerAtVehicleDoor(playerid, vehicleid, DOOR_PASSENGER)))
  33841. {
  33842. new
  33843. damage[4];
  33844. GetVehicleDamageStatus(vehicleid, damage[0], damage[1], damage[2], damage[3]);
  33845. if(2 <= GetPlayerWeapon(playerid) <= 9)
  33846. PlayerData[playerid][pLockHealth] -= 20.0;
  33847. else
  33848. PlayerData[playerid][pLockHealth] -= 10.0;
  33849. if(PlayerData[playerid][pLockHealth] <= 0)
  33850. {
  33851. VehicleInfo[vehicleid][vLocked] = 0;
  33852. SetVehicleParams(vehicleid, VEHICLE_DOORS, false);
  33853. PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  33854. GameTextForPlayer(playerid, "~g~Vehicle unlocked!", 3000, 6);
  33855. ShowActionBubble(playerid, "* %s successfully kicked down the door of the %s.", GetRPName(playerid), GetVehicleName(vehicleid));
  33856. CancelBreakIn(playerid);
  33857. UpdateVehicleDamageStatus(vehicleid, damage[0], 262144, damage[2], damage[3]);
  33858. }
  33859. else
  33860. {
  33861. new
  33862. Float:x,
  33863. Float:y,
  33864. Float:z,
  33865. garageid = GetVehicleGarage(vehicleid);
  33866. if(!GetVehicleParams(vehicleid, VEHICLE_ALARM))
  33867. {
  33868. if(VehicleInfo[vehicleid][vAlarm] > 0)
  33869. {
  33870. foreach(new i : Player)
  33871. {
  33872. if(IsVehicleOwner(i, vehicleid))
  33873. {
  33874. SendClientMessageEx(i, COLOR_YELLOW, "* SMS from OnStar: The alarm was activated on your %s located in %s, Ph: 999 *", GetVehicleName(vehicleid), GetVehicleZoneName(vehicleid));
  33875. }
  33876. if(GetFactionType(i) == FACTION_POLICE)
  33877. {
  33878. if(VehicleInfo[vehicleid][vAlarm] == 2)
  33879. {
  33880. SendClientMessageEx(i, COLOR_OLDSCHOOL, "* HQ: The alarm was activated on %s's %s in %s. *", VehicleInfo[vehicleid][vOwner], GetVehicleName(vehicleid), GetVehicleZoneName(vehicleid));
  33881. }
  33882. else if(VehicleInfo[vehicleid][vAlarm] == 3)
  33883. {
  33884. if(PlayerData[playerid][pCP] == CHECKPOINT_NONE)
  33885. {
  33886. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  33887. if(garageid >= 0)
  33888. {
  33889. SetPlayerCheckpoint(playerid, GarageInfo[garageid][gPosX], GarageInfo[garageid][gPosY], GarageInfo[garageid][gPosZ], 3.0);
  33890. }
  33891. else
  33892. {
  33893. GetVehiclePos(vehicleid, x, y, z);
  33894. SetPlayerCheckpoint(playerid, x, y, z, 3.0);
  33895. }
  33896. }
  33897. SendClientMessageEx(i, COLOR_OLDSCHOOL, "* HQ: The alarm was activated on %s's %s in %s (marked on map). *", VehicleInfo[vehicleid][vOwner], GetVehicleName(vehicleid), GetVehicleZoneName(vehicleid));
  33898. }
  33899. }
  33900. }
  33901. }
  33902. SetVehicleParams(vehicleid, VEHICLE_ALARM, true);
  33903. }
  33904. GetVehicleModelInfo(GetVehicleModel(vehicleid), VEHICLE_MODEL_INFO_FRONTSEAT, x, y, z);
  33905. UpdateVehicleDamageStatus(vehicleid, damage[0], 131072, damage[2], damage[3]);
  33906. format(string, sizeof(string), "%.0f HP", PlayerData[playerid][pLockHealth]);
  33907. if(PlayerData[playerid][pLockText] == Text3D:INVALID_3DTEXT_ID)
  33908. {
  33909. if(IsPlayerAtVehicleDoor(playerid, PlayerData[playerid][pLockBreak], DOOR_DRIVER)) {
  33910. PlayerData[playerid][pLockText] = CreateDynamic3DTextLabel(string, COLOR_GREEN, -x * 2, y + 0.25, z, 5.0, .attachedvehicle = vehicleid);
  33911. } else if(IsPlayerAtVehicleDoor(playerid, PlayerData[playerid][pLockBreak], DOOR_PASSENGER)) {
  33912. PlayerData[playerid][pLockText] = CreateDynamic3DTextLabel(string, COLOR_GREEN, x * 2, y + 0.25, z, 5.0, .attachedvehicle = vehicleid);
  33913. }
  33914. }
  33915. else
  33916. {
  33917. UpdateDynamic3DTextLabelText(PlayerData[playerid][pLockText], COLOR_GREEN, string);
  33918. }
  33919. KillTimer(PlayerData[playerid][pLockTimer]);
  33920. PlayerData[playerid][pLockTimer] = SetTimerEx("DestroyLockText", 5000, false, "i", playerid);
  33921. }
  33922. }
  33923. }
  33924. }
  33925. }
  33926. }
  33927. PlayerData[playerid][pAnimation] = index;
  33928. }
  33929. PlayerData[playerid][pLastUpdate] = gettime();
  33930. return 1;
  33931. }
  33932. forward OnPlayerUpdateEx();
  33933. public OnPlayerUpdateEx()
  33934. {
  33935. foreach(new playerid : Player)
  33936. {
  33937. if(PlayerData[playerid][pKicked])
  33938. continue;
  33939. if(!PlayerData[playerid][pLogged])
  33940. continue;
  33941. new keys, ud, lr;
  33942. GetPlayerKeys(playerid, keys, ud, lr);
  33943. if(PlayerData[playerid][pHurt] > 0)
  33944. {
  33945. PlayerData[playerid][pHurt]--;
  33946. }
  33947. if(PlayerData[playerid][pGovTimer] > 0)
  33948. {
  33949. PlayerData[playerid][pGovTimer]--;
  33950. }
  33951. if(PlayerData[playerid][pRareTime] > 0)
  33952. {
  33953. PlayerData[playerid][pRareTime]--;
  33954. }
  33955. if(GetPlayerMoney(playerid) != PlayerData[playerid][pCash])
  33956. {
  33957. ResetPlayerMoney(playerid);
  33958. GivePlayerMoney(playerid, PlayerData[playerid][pCash]);
  33959. }
  33960. if(GetPlayerScore(playerid) != PlayerData[playerid][pLevel])
  33961. {
  33962. SetPlayerScore(playerid, PlayerData[playerid][pLevel]);
  33963. }
  33964. if(GetPlayerWantedLevel(playerid) != PlayerData[playerid][pWantedLevel])
  33965. {
  33966. SetPlayerWantedLevel(playerid, PlayerData[playerid][pWantedLevel]);
  33967. }
  33968. if((GetPlayerAnimationIndex(playerid) != 1209) && ((PlayerData[playerid][pInjured] && GetVehicleModel(GetPlayerVehicleID(playerid)) != 416) || (PlayerData[playerid][pTazedTime] > 0 && PlayerData[playerid][pDraggedBy] == INVALID_PLAYER_ID)))
  33969. {
  33970. ApplyAnimation(playerid, "SWEET", "Sweet_injuredloop", 4.1, 0, 0, 0, 1, 0, 1);
  33971. }
  33972. if((keys & KEY_FIRE) && IsFireActive() && GetFactionType(playerid) == FACTION_MEDIC)
  33973. {
  33974. new
  33975. Float:x,
  33976. Float:y,
  33977. Float:z,
  33978. Float:vx,
  33979. Float:vy,
  33980. Float:vz,
  33981. Float:cx,
  33982. Float:cy,
  33983. Float:cz;
  33984. if(GetPlayerWeapon(playerid) == 42 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
  33985. {
  33986. for(new i = 0; i < MAX_FIRES; i ++)
  33987. {
  33988. if(IsPlayerInRangeOfDynamicObject(playerid, gFireObjects[i], 4.0))
  33989. {
  33990. gFireHealth[i] = gFireHealth[i] - 10.0;
  33991. if(gFireHealth[i] <= 0.0)
  33992. {
  33993. PlayerData[playerid][pTotalFires]++;
  33994. GetDynamicObjectPos(gFireObjects[i], x, y, z);
  33995. GameTextForPlayer(playerid, "~r~Fire extinguished", 2000, 3);
  33996. SetTimerEx("DestroyWater", 2000, false, "i", CreateDynamicObject(18744, x, y, z - 0.2, 0.0, 0.0, 0.0));
  33997. DestroyDynamicObject(gFireObjects[i]);
  33998. gFireObjects[i] = INVALID_OBJECT_ID;
  33999. gFireHealth[i] = 0.0;
  34000. }
  34001. }
  34002. }
  34003. }
  34004. else if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && (GetVehicleModel(GetPlayerVehicleID(playerid)) == 407 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 544))
  34005. {
  34006. GetPlayerCameraFrontVector(playerid, vx, vy, vz);
  34007. GetPlayerCameraPos(playerid, cx, cy, cz);
  34008. for(new i = 0; i < MAX_FIRES; i ++)
  34009. {
  34010. if(IsPlayerInRangeOfDynamicObject(playerid, gFireObjects[i], 12.0))
  34011. {
  34012. GetDynamicObjectPos(gFireObjects[i], x, y, z);
  34013. if(DistanceCameraTargetToLocation(cx, cy, cz, x, y, z + 2.5, vx, vy, vz) < 12.0)
  34014. {
  34015. gFireHealth[i] = gFireHealth[i] - 5.0;
  34016. if(gFireHealth[i] <= 0.0)
  34017. {
  34018. GetDynamicObjectPos(gFireObjects[i], x, y, z);
  34019. GameTextForPlayer(playerid, "~r~Fire extinguished", 2000, 3);
  34020. SetTimerEx("DestroyWater", 2000, false, "i", CreateDynamicObject(18744, x, y, z - 0.2, 0.0, 0.0, 0.0));
  34021. DestroyDynamicObject(gFireObjects[i]);
  34022. gFireObjects[i] = INVALID_OBJECT_ID;
  34023. gFireHealth[i] = 0.0;
  34024. }
  34025. }
  34026. }
  34027. }
  34028. }
  34029. if(!IsFireActive())
  34030. {
  34031. new amount;
  34032. foreach(new i : Player)
  34033. {
  34034. if(GetFactionType(i) == FACTION_MEDIC && IsPlayerInRangeOfPoint(playerid, 20.0, x, y, z))
  34035. {
  34036. amount = gFires * 150;
  34037. if(PlayerData[i][pLaborUpgrade] > 0)
  34038. {
  34039. amount += percent(amount, PlayerData[i][pLaborUpgrade]);
  34040. }
  34041. SendClientMessageEx(i, COLOR_AQUA, "Well done! You helped put out the fire and received {00AA00}$%i{33CCFF}.", amount);
  34042. GivePlayerCash(i, amount);
  34043. }
  34044. }
  34045. gFires = 0;
  34046. }
  34047. }
  34048. }
  34049. return 1;
  34050. }
  34051. /*Float:GetPlayerDistanceFromPlayer(playerid, targetid)
  34052. {
  34053. new Float:Pos[3];
  34054. GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
  34055. return GetPlayerDistanceFromPoint(targetid, Pos[0], Pos[1], Pos[2]);
  34056. }
  34057. */
  34058. forward UpdateCarRadars();
  34059. public UpdateCarRadars()
  34060. {
  34061. foreach(new p : Player)
  34062. {
  34063. if (!IsPlayerConnected(p) || !IsPlayerInAnyVehicle(p) || CarRadars[p] == 0) continue;
  34064. new target = -1;
  34065. new Float:tempDist = 50.0;
  34066. if(CarRadars[p] == 1)
  34067. {
  34068. foreach(new t : Player)
  34069. {
  34070. if (!IsPlayerInAnyVehicle(t) || t == p || IsPlayerInVehicle(t, GetPlayerVehicleID(p))) continue;
  34071. new Float:distance = GetDistanceBetweenPlayers(p, t);
  34072. if (distance < tempDist)
  34073. {
  34074. target = t;
  34075. tempDist = distance;
  34076. }
  34077. }
  34078. if (target == -1)
  34079. {
  34080. // no target was found
  34081. PlayerTextDrawSetString(p, _crTextTarget[p], "Target Vehicle: ~r~N/A");
  34082. PlayerTextDrawSetString(p, _crTextSpeed[p], "Speed: ~r~N/A");
  34083. PlayerTextDrawSetString(p, _crTickets[p], "Tickets: ~r~N/A");
  34084. }
  34085. else
  34086. {
  34087. new targetVehicle = GetPlayerVehicleID(target);
  34088. new Float: speed = player_get_speed(target);
  34089. new str[60];
  34090. format(str, sizeof(str), "Target Vehicle: ~r~%s (%i)", GetVehicleName(targetVehicle), targetVehicle);
  34091. PlayerTextDrawSetString(p, _crTextTarget[p], str);
  34092. format(str, sizeof(str), "Speed: ~r~%d MPH", floatround(speed, floatround_round));
  34093. PlayerTextDrawSetString(p, _crTextSpeed[p], str);
  34094. foreach(new i : Player)
  34095. {
  34096. new veh = GetPlayerVehicle(i, targetVehicle);
  34097. if (veh != -1 && VehicleInfo[veh][vTickets] > 0)
  34098. {
  34099. format(str, sizeof(str), "Tickets: ~r~$%s", number_format(VehicleInfo[veh][vTickets]));
  34100. PlayerTextDrawSetString(p, _crTickets[p], str);
  34101. if (gettime() >= (GetPVarInt(p, "_lastTicketWarning") + 10))
  34102. {
  34103. SetPVarInt(p, "_lastTicketWarning", gettime());
  34104. PlayerPlaySound(p, 4202, 0.0, 0.0, 0.0);
  34105. }
  34106. }
  34107. }
  34108. }
  34109. }
  34110. }
  34111. }
  34112. forward UpdateBooth(playerid, id);
  34113. public UpdateBooth(playerid, id)
  34114. {
  34115. if (PlayerData[playerid][pRangeBooth] != id || !g_BoothUsed[id])
  34116. return 0;
  34117. if (PlayerData[playerid][pTargets] == 10)
  34118. {
  34119. PlayerData[playerid][pTargets] = 0;
  34120. switch (PlayerData[playerid][pTargetLevel]++)
  34121. {
  34122. case 0:
  34123. {
  34124. ResetPlayerWeapons(playerid);
  34125. GivePlayerWeapon(playerid, 25, 15000);
  34126. SendInfoMessage(playerid, "You have advanced to the next level (1/5).");
  34127. }
  34128. case 1:
  34129. {
  34130. ResetPlayerWeapons(playerid);
  34131. GivePlayerWeapon(playerid, 28, 15000);
  34132. SendInfoMessage(playerid, "You have advanced to the next level (2/5).");
  34133. }
  34134. case 2:
  34135. {
  34136. ResetPlayerWeapons(playerid);
  34137. GivePlayerWeapon(playerid, 29, 15000);
  34138. SendInfoMessage(playerid, "You have advanced to the next level (3/5).");
  34139. }
  34140. case 3:
  34141. {
  34142. ResetPlayerWeapons(playerid);
  34143. GivePlayerWeapon(playerid, 30, 15000);
  34144. SendInfoMessage(playerid, "You have advanced to the next level (4/5).");
  34145. }
  34146. case 4:
  34147. {
  34148. ResetPlayerWeapons(playerid);
  34149. GivePlayerWeapon(playerid, 27, 15000);
  34150. SendInfoMessage(playerid, "You have advanced to the next level (5/5).");
  34151. }
  34152. case 5:
  34153. {
  34154. Booth_Leave(playerid);
  34155. SendInfoMessage(playerid, "You have completed the shooting challenge!");
  34156. }
  34157. }
  34158. }
  34159. Booth_Refresh(playerid);
  34160. return 1;
  34161. }
  34162. forward UpdateSpeedo();
  34163. public UpdateSpeedo()
  34164. {
  34165. foreach(new playerid : Player)
  34166. {
  34167. new vehicleid = GetPlayerVehicleID(playerid), string[264];
  34168. if(IsPlayerInAnyVehicle(playerid))
  34169. {
  34170. if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && VehicleHasEngine(vehicleid))
  34171. {
  34172. new
  34173. Float:health,
  34174. Float:damage;
  34175. GetVehicleHealth(vehicleid, health);
  34176. if(health < 300.0)
  34177. {
  34178. SetVehicleHealth(vehicleid, 300.0);
  34179. SetVehicleParams(vehicleid, VEHICLE_ENGINE, 0);
  34180. GameTextForPlayer(playerid, "~r~Motorri u Prish", 3000, 3);
  34181. }
  34182. damage = (1000.0 - health) / 7.0;
  34183. if(damage > 100.0) damage = 100.0;
  34184. // Speed
  34185. new speed = GetVehicleSpeedKMH(vehicleid);
  34186. switch(speed)
  34187. {
  34188. case 0..15:
  34189. {
  34190. for(new i = 0; i < 11; i ++)
  34191. {
  34192. PlayerTextDrawHide(playerid, SpeedoMeterTextDraw[playerid][i]);
  34193. }
  34194. PlayerTextDrawShow(playerid, SpeedoMeterTextDraw[playerid][0]);
  34195. }
  34196. case 16..31:
  34197. {
  34198. for(new i = 0; i < 11; i ++)
  34199. {
  34200. PlayerTextDrawHide(playerid, SpeedoMeterTextDraw[playerid][i]);
  34201. }
  34202. PlayerTextDrawShow(playerid, SpeedoMeterTextDraw[playerid][1]);
  34203. }
  34204. case 32..47:
  34205. {
  34206. for(new i = 0; i < 11; i ++)
  34207. {
  34208. PlayerTextDrawHide(playerid, SpeedoMeterTextDraw[playerid][i]);
  34209. }
  34210. PlayerTextDrawShow(playerid, SpeedoMeterTextDraw[playerid][2]);
  34211. }
  34212. case 48..63:
  34213. {
  34214. for(new i = 0; i < 11; i ++)
  34215. {
  34216. PlayerTextDrawHide(playerid, SpeedoMeterTextDraw[playerid][i]);
  34217. }
  34218. PlayerTextDrawShow(playerid, SpeedoMeterTextDraw[playerid][3]);
  34219. }
  34220. case 64..79:
  34221. {
  34222. for(new i = 0; i < 11; i ++)
  34223. {
  34224. PlayerTextDrawHide(playerid, SpeedoMeterTextDraw[playerid][i]);
  34225. }
  34226. PlayerTextDrawShow(playerid, SpeedoMeterTextDraw[playerid][4]);
  34227. }
  34228. case 80..95:
  34229. {
  34230. for(new i = 0; i < 11; i ++)
  34231. {
  34232. PlayerTextDrawHide(playerid, SpeedoMeterTextDraw[playerid][i]);
  34233. }
  34234. PlayerTextDrawShow(playerid, SpeedoMeterTextDraw[playerid][5]);
  34235. }
  34236. case 96..111:
  34237. {
  34238. for(new i = 0; i < 11; i ++)
  34239. {
  34240. PlayerTextDrawHide(playerid, SpeedoMeterTextDraw[playerid][i]);
  34241. }
  34242. PlayerTextDrawShow(playerid, SpeedoMeterTextDraw[playerid][6]);
  34243. }
  34244. case 112..127:
  34245. {
  34246. for(new i = 0; i < 11; i ++)
  34247. {
  34248. PlayerTextDrawHide(playerid, SpeedoMeterTextDraw[playerid][i]);
  34249. }
  34250. PlayerTextDrawShow(playerid, SpeedoMeterTextDraw[playerid][7]);
  34251. }
  34252. case 128..149:
  34253. {
  34254. for(new i = 0; i < 11; i ++)
  34255. {
  34256. PlayerTextDrawHide(playerid, SpeedoMeterTextDraw[playerid][i]);
  34257. }
  34258. PlayerTextDrawShow(playerid, SpeedoMeterTextDraw[playerid][8]);
  34259. }
  34260. case 150:
  34261. {
  34262. for(new i = 0; i < 11; i ++)
  34263. {
  34264. PlayerTextDrawHide(playerid, SpeedoMeterTextDraw[playerid][i]);
  34265. }
  34266. PlayerTextDrawShow(playerid, SpeedoMeterTextDraw[playerid][9]);
  34267. }
  34268. }
  34269. format(string, sizeof(string), "%i KMH", speed);
  34270. PlayerTextDrawSetString(playerid, SpeedoMeterTextDraw[playerid][37], string);
  34271. PlayerTextDrawShow(playerid, SpeedoMeterTextDraw[playerid][37]);
  34272. // Fuel
  34273. switch(vehicleFuel[vehicleid])
  34274. {
  34275. case 0..11:
  34276. {
  34277. for(new i = 10; i < 19; i ++)
  34278. {
  34279. PlayerTextDrawHide(playerid, SpeedoMeterTextDraw[playerid][i]);
  34280. }
  34281. PlayerTextDrawShow(playerid, SpeedoMeterTextDraw[playerid][10]);
  34282. // Oil
  34283. PlayerTextDrawShow(playerid, SpeedoMeterTextDraw[playerid][31]);
  34284. }
  34285. case 12..24:
  34286. {
  34287. for(new i = 10; i < 19; i ++)
  34288. {
  34289. PlayerTextDrawHide(playerid, SpeedoMeterTextDraw[playerid][i]);
  34290. }
  34291. PlayerTextDrawShow(playerid, SpeedoMeterTextDraw[playerid][11]);
  34292. // Oil
  34293. PlayerTextDrawHide(playerid, SpeedoMeterTextDraw[playerid][31]);
  34294. }
  34295. case 25..36:
  34296. {
  34297. for(new i = 10; i < 19; i ++)
  34298. {
  34299. PlayerTextDrawHide(playerid, SpeedoMeterTextDraw[playerid][i]);
  34300. }
  34301. PlayerTextDrawShow(playerid, SpeedoMeterTextDraw[playerid][12]);
  34302. // Oil
  34303. PlayerTextDrawHide(playerid, SpeedoMeterTextDraw[playerid][31]);
  34304. }
  34305. case 37..49:
  34306. {
  34307. for(new i = 10; i < 19; i ++)
  34308. {
  34309. PlayerTextDrawHide(playerid, SpeedoMeterTextDraw[playerid][i]);
  34310. }
  34311. PlayerTextDrawShow(playerid, SpeedoMeterTextDraw[playerid][13]);
  34312. // Oil
  34313. PlayerTextDrawHide(playerid, SpeedoMeterTextDraw[playerid][31]);
  34314. }
  34315. case 50..64:
  34316. {
  34317. for(new i = 10; i < 19; i ++)
  34318. {
  34319. PlayerTextDrawHide(playerid, SpeedoMeterTextDraw[playerid][i]);
  34320. }
  34321. PlayerTextDrawShow(playerid, SpeedoMeterTextDraw[playerid][14]);
  34322. // Oil
  34323. PlayerTextDrawHide(playerid, SpeedoMeterTextDraw[playerid][31]);
  34324. }
  34325. case 65..74:
  34326. {
  34327. for(new i = 10; i < 19; i ++)
  34328. {
  34329. PlayerTextDrawHide(playerid, SpeedoMeterTextDraw[playerid][i]);
  34330. }
  34331. PlayerTextDrawShow(playerid, SpeedoMeterTextDraw[playerid][15]);
  34332. // Oil
  34333. PlayerTextDrawHide(playerid, SpeedoMeterTextDraw[playerid][31]);
  34334. }
  34335. case 75..86:
  34336. {
  34337. for(new i = 10; i < 19; i ++)
  34338. {
  34339. PlayerTextDrawHide(playerid, SpeedoMeterTextDraw[playerid][i]);
  34340. }
  34341. PlayerTextDrawShow(playerid, SpeedoMeterTextDraw[playerid][16]);
  34342. // Oil
  34343. PlayerTextDrawHide(playerid, SpeedoMeterTextDraw[playerid][31]);
  34344. }
  34345. case 87..94:
  34346. {
  34347. for(new i = 10; i < 19; i ++)
  34348. {
  34349. PlayerTextDrawHide(playerid, SpeedoMeterTextDraw[playerid][i]);
  34350. }
  34351. PlayerTextDrawShow(playerid, SpeedoMeterTextDraw[playerid][17]);
  34352. // Oil
  34353. PlayerTextDrawHide(playerid, SpeedoMeterTextDraw[playerid][31]);
  34354. }
  34355. case 95..100:
  34356. {
  34357. for(new i = 10; i < 19; i ++)
  34358. {
  34359. PlayerTextDrawHide(playerid, SpeedoMeterTextDraw[playerid][i]);
  34360. }
  34361. PlayerTextDrawShow(playerid, SpeedoMeterTextDraw[playerid][18]);
  34362. // Oil
  34363. PlayerTextDrawHide(playerid, SpeedoMeterTextDraw[playerid][31]);
  34364. }
  34365. }
  34366. PlayerTextDrawShow(playerid, SpeedoMeterTextDraw[playerid][29]);
  34367. format(string, sizeof(string), "%i MI", floatround(VehicleInfo[vehicleid][vMileage]));
  34368. PlayerTextDrawSetString(playerid, SpeedoMeterTextDraw[playerid][36], string);
  34369. PlayerTextDrawShow(playerid, SpeedoMeterTextDraw[playerid][36]);
  34370. // Lights
  34371. if(GetVehicleParams(vehicleid, VEHICLE_LIGHTS))
  34372. {
  34373. PlayerTextDrawShow(playerid, SpeedoMeterTextDraw[playerid][30]);
  34374. }
  34375. else
  34376. {
  34377. PlayerTextDrawHide(playerid, SpeedoMeterTextDraw[playerid][30]);
  34378. }
  34379. // Engine Check
  34380. if(health < 600.0)
  34381. {
  34382. PlayerTextDrawShow(playerid, SpeedoMeterTextDraw[playerid][32]);
  34383. }
  34384. else
  34385. {
  34386. PlayerTextDrawHide(playerid, SpeedoMeterTextDraw[playerid][32]);
  34387. }
  34388. // Vehicle Lock
  34389. if(VehicleInfo[vehicleid][vLocked])
  34390. {
  34391. PlayerTextDrawShow(playerid, SpeedoMeterTextDraw[playerid][34]);
  34392. PlayerTextDrawHide(playerid, SpeedoMeterTextDraw[playerid][35]);
  34393. }
  34394. else
  34395. {
  34396. PlayerTextDrawHide(playerid, SpeedoMeterTextDraw[playerid][34]);
  34397. PlayerTextDrawShow(playerid, SpeedoMeterTextDraw[playerid][35]);
  34398. }
  34399. }
  34400. for(new i = 0; i < MAX_DEPLOYABLES; i ++)
  34401. {
  34402. if(DeployInfo[i][dExists] && DeployInfo[i][dType] == DEPLOY_SPIKESTRIP && IsPlayerInRangeOfPoint(playerid, 3.0, DeployInfo[i][dPosX], DeployInfo[i][dPosY], DeployInfo[i][dPosZ]))
  34403. {
  34404. new
  34405. panels,
  34406. doors,
  34407. lights,
  34408. tires;
  34409. GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
  34410. if(tires != 15)
  34411. {
  34412. UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, 15);
  34413. GameTextForPlayer(playerid, "~r~Spiked", 3000, 3);
  34414. }
  34415. }
  34416. }
  34417. }
  34418. }
  34419. return 1;
  34420. }
  34421. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  34422. {
  34423. if(VehicleInfo[vehicleid][vOwnerID] > 0 || VehicleInfo[vehicleid][vGang] >= 0)
  34424. {
  34425. VehicleInfo[vehicleid][vColor1] = color1;
  34426. VehicleInfo[vehicleid][vColor2] = color2;
  34427. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET color1 = %i, color2 = %i WHERE id = %i", color1, color2, VehicleInfo[vehicleid][vID]);
  34428. mysql_tquery(connectionID, queryBuffer);
  34429. }
  34430. return 1;
  34431. }
  34432. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  34433. {
  34434. if(VehicleInfo[vehicleid][vOwnerID] > 0 || VehicleInfo[vehicleid][vGang] >= 0)
  34435. {
  34436. VehicleInfo[vehicleid][vPaintjob] = paintjobid;
  34437. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET paintjob = %i WHERE id = %i", paintjobid, VehicleInfo[vehicleid][vID]);
  34438. mysql_tquery(connectionID, queryBuffer);
  34439. }
  34440. return 1;
  34441. }
  34442. public OnVehicleMod(playerid, vehicleid, componentid)
  34443. {
  34444. if(!GetPlayerInterior(playerid) && PlayerData[playerid][pAdmin] < JUNIOR_ADMIN && !PlayerData[playerid][pKicked])
  34445. {
  34446. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was autobanned by %s, reason: Illegal modding", GetRPName(playerid), SERVER_ANTICHEAT);
  34447. BanPlayer(playerid, SERVER_ANTICHEAT, "Illegal modding");
  34448. return 0;
  34449. }
  34450. if(VehicleInfo[vehicleid][vOwnerID] > 0 || VehicleInfo[vehicleid][vGang] >= 0)
  34451. {
  34452. new slotid = GetVehicleComponentType(componentid);
  34453. VehicleInfo[vehicleid][vMods][slotid] = componentid;
  34454. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET mod_%i = %i WHERE id = %i", slotid + 1, componentid, VehicleInfo[vehicleid][vID]);
  34455. mysql_tquery(connectionID, queryBuffer);
  34456. }
  34457. return 1;
  34458. }
  34459. public OnVehicleSpawn(vehicleid)
  34460. {
  34461. if(IsValidDynamic3DTextLabel(DonatorCallSign[vehicleid]))
  34462. {
  34463. DestroyDynamic3DTextLabel(DonatorCallSign[vehicleid]);
  34464. DonatorCallSign[vehicleid] = Text3D:INVALID_3DTEXT_ID;
  34465. }
  34466. if(adminVehicle{vehicleid})
  34467. {
  34468. DestroyVehicleEx(vehicleid);
  34469. adminVehicle{vehicleid} = false;
  34470. }
  34471. if(IsValidDynamicObject(vehicleSiren[vehicleid]))
  34472. {
  34473. DestroyDynamicObject(vehicleSiren[vehicleid]);
  34474. vehicleSiren[vehicleid] = INVALID_OBJECT_ID;
  34475. }
  34476. if(IsValidDynamic3DTextLabel(vehicleCallsign[vehicleid]))
  34477. {
  34478. DestroyDynamic3DTextLabel(vehicleCallsign[vehicleid]);
  34479. vehicleCallsign[vehicleid] = Text3D:INVALID_3DTEXT_ID;
  34480. }
  34481. if((VehicleInfo[vehicleid][vID] > 0 && VehicleInfo[vehicleid][vOwnerID] > 0) || (VehicleInfo[vehicleid][vGang] >= 0))
  34482. {
  34483. ReloadVehicle(vehicleid);
  34484. if(VehicleInfo[vehicleid][vGang] >= 0)
  34485. {
  34486. vehicleFuel[vehicleid] = 100;
  34487. }
  34488. }
  34489. else
  34490. {
  34491. if(VehicleInfo[vehicleid][vID] > 0 && VehicleInfo[vehicleid][vHealth] > 300.0)
  34492. {
  34493. SetVehicleHealth(vehicleid, VehicleInfo[vehicleid][vHealth]);
  34494. }
  34495. vehicleFuel[vehicleid] = 100;
  34496. }
  34497. vehicleStream[vehicleid][0] = 0;
  34498. return 1;
  34499. }
  34500. public OnPlayerText(playerid, text[])
  34501. {
  34502. if(PlayerData[playerid][pLogged] && !PlayerData[playerid][pKicked])
  34503. {
  34504. text[0] = toupper(text[0]);
  34505. if(PlayerData[playerid][pTutorial])
  34506. {
  34507. SendClientMessage(playerid, COLOR_LIGHTRED, "* You are currently in the tutorial. Chatting is disabled.");
  34508. return 0;
  34509. }
  34510. else if(PlayerData[playerid][pHospital])
  34511. {
  34512. SendClientMessage(playerid, COLOR_LIGHTRED, "* You are currently in the hospital. Chatting is disabled.");
  34513. return 0;
  34514. }
  34515. else if(PlayerData[playerid][pMuted])
  34516. {
  34517. SendClientMessage(playerid, COLOR_LIGHTRED, "* You are currently muted. Chatting is disabled.");
  34518. return 0;
  34519. }
  34520. else if(++PlayerData[playerid][pSpamTime] >= 4 && PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  34521. {
  34522. PlayerData[playerid][pMuted] = 10;
  34523. SendClientMessage(playerid, COLOR_YELLOW, "You've been temporarily muted by the server for ten seconds for spamming.");
  34524. return 0;
  34525. }
  34526. else if(PlayerData[playerid][pAdmin] < GENERAL_MANAGER && CheckServerAd(text))
  34527. {
  34528. new string[128];
  34529. format(string,sizeof(string),"{00aa00}AdmWarning{FFFF00}: %s (ID: %d) may be server advertising: '{00aa00}%s{FFFF00}'.", GetPlayerNameEx(playerid), playerid, text);
  34530. SendAdminMessage(COLOR_YELLOW, string, 2);
  34531. SendClientMessage(playerid, COLOR_GREY, "Your chat was blocked, you have automatically reported for server advertising.");
  34532. if(++PlayerData[playerid][pAdvertWarnings] > MAX_ANTICHEAT_WARNINGS)
  34533. {
  34534. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was autobanned by %s, reason: Server advertisement", GetRPName(playerid), SERVER_ANTICHEAT);
  34535. BanPlayer(playerid, SERVER_ANTICHEAT, "Server advertisement");
  34536. }
  34537. return 0;
  34538. }
  34539. else if (PlayerData[playerid][pCalling] != 0 && PlayerData[playerid][pCalling] != 1)
  34540. {
  34541. SendDistanceMessage(playerid, 20.0, COLOR_WHITE, "(Phone) %s says: %s", GetRPName(playerid), text);
  34542. }
  34543. else
  34544. {
  34545. new
  34546. string[144];
  34547. if (PlayerData[playerid][pCalling] > 1)
  34548. {
  34549. if (PlayerData[playerid][pCaller] != INVALID_PLAYER_ID)
  34550. {
  34551. if (PlayerData[playerid][pPayphone] == -1)
  34552. {
  34553. SendSplitMessage(PlayerData[playerid][pCaller], COLOR_YELLOW, "(Phone) %s says: %s", GetRPName(playerid), text);
  34554. }
  34555. else
  34556. {
  34557. SendSplitMessage(PlayerData[playerid][pCaller], COLOR_YELLOW, "(Phone) Unknown says: %s", text);
  34558. }
  34559. }
  34560. else
  34561. {
  34562. switch (PlayerData[playerid][pCalling])
  34563. {
  34564. case 911:
  34565. {
  34566. if(!strcmp(text, "Police", true))
  34567. {
  34568. SendClientMessage(playerid, COLOR_OLDSCHOOL, "Dispatch: This is the Los Santos Police Department. What is your emergency?");
  34569. PlayerData[playerid][pCalling] = 912;
  34570. }
  34571. else if(!strcmp(text, "Medic", true))
  34572. {
  34573. SendClientMessage(playerid, COLOR_DOCTOR, "Dispatch: This is the Los Santos Fire & Medical Department. What is your emergency?");
  34574. PlayerData[playerid][pCalling] = 913;
  34575. }
  34576. else
  34577. {
  34578. SendClientMessage(playerid, COLOR_YELLOW, "Dispatch: Sorry? I don't know what you mean... Enter 'police' or 'medic'.");
  34579. }
  34580. }
  34581. case 912:
  34582. {
  34583. foreach(new i : Player)
  34584. {
  34585. if(IsLawEnforcement(i))
  34586. {
  34587. SendClientMessageEx(i, COLOR_OLDSCHOOL, "______ Emergency Hotline ______");
  34588. SendClientMessageEx(i, COLOR_GREY2, "Caller: %s, Number: %i", GetRPName(playerid), PlayerData[playerid][pPhone]);
  34589. SendClientMessageEx(i, COLOR_GREY2, "Location: %s", GetPlayerZoneName(playerid));
  34590. SendClientMessageEx(i, COLOR_GREY2, "Emergency: %s", text);
  34591. SendClientMessageEx(i, COLOR_WHITE, "* Use '/trackcall %i' to track the caller's location.", playerid);
  34592. }
  34593. }
  34594. strcpy(PlayerData[playerid][pEmergency], text, 128);
  34595. PlayerData[playerid][pEmergencyCall] = 120;
  34596. PlayerData[playerid][pEmergencyType] = FACTION_POLICE;
  34597. SendClientMessage(playerid, COLOR_OLDSCHOOL, "Dispatch: All units in the area have been notified. Thank you for your time.");
  34598. HangupCall(playerid);
  34599. }
  34600. case 913:
  34601. {
  34602. foreach(new i : Player)
  34603. {
  34604. if(GetFactionType(i) == FACTION_MEDIC)
  34605. {
  34606. SendClientMessageEx(i, COLOR_DOCTOR, "______ Emergency Hotline ______");
  34607. SendClientMessageEx(i, COLOR_GREY2, "Caller: %s, Number: %i", GetRPName(playerid), PlayerData[playerid][pPhone]);
  34608. SendClientMessageEx(i, COLOR_GREY2, "Location: %s", GetPlayerZoneName(playerid));
  34609. SendClientMessageEx(i, COLOR_GREY2, "Emergency: %s", text);
  34610. SendClientMessageEx(i, COLOR_WHITE, "* Use '/trackcall %i' to track the caller's location.", playerid);
  34611. }
  34612. }
  34613. strcpy(PlayerData[playerid][pEmergency], text, 128);
  34614. PlayerData[playerid][pEmergencyCall] = 120;
  34615. PlayerData[playerid][pEmergencyType] = FACTION_MEDIC;
  34616. SendClientMessage(playerid, COLOR_DOCTOR, "Dispatch: All units in the area have been notified. Thank you for your time.");
  34617. HangupCall(playerid);
  34618. }
  34619. case 6397:
  34620. {
  34621. foreach(new i : Player)
  34622. {
  34623. if(GetFactionType(i) == FACTION_NEWS)
  34624. {
  34625. SendClientMessageEx(i, COLOR_NAVYBLUE, "______ News Hotline ______");
  34626. SendClientMessageEx(i, COLOR_GREY2, "Caller: %s, Number: %i", GetRPName(playerid), PlayerData[playerid][pPhone]);
  34627. SendClientMessageEx(i, COLOR_GREY2, "Message: %s", text);
  34628. }
  34629. }
  34630. SendClientMessage(playerid, COLOR_NAVYBLUE, "News Team: Thank you. We will get back to you shortly!");
  34631. HangupCall(playerid);
  34632. }
  34633. case 6324:
  34634. {
  34635. foreach(new i : Player)
  34636. {
  34637. if(PlayerHasJob(i, JOB_MECHANIC))
  34638. {
  34639. SendClientMessageEx(i, COLOR_NAVYBLUE, "______ Mechanic Hotline ______");
  34640. SendClientMessageEx(i, COLOR_GREY2, "Caller: %s, Number: %i", GetRPName(playerid), PlayerData[playerid][pPhone]);
  34641. SendClientMessageEx(i, COLOR_GREY2, "Situation: %s", text);
  34642. SendClientMessageEx(i, COLOR_WHITE, "* Use '/takecall %i' in order to take this call.", playerid);
  34643. }
  34644. }
  34645. PlayerData[playerid][pMechanicCall] = 60;
  34646. SendClientMessage(playerid, COLOR_LIGHTORANGE, "Dispatch: Thank you. We will alert all mechanics on duty.");
  34647. HangupCall(playerid);
  34648. }
  34649. case 8294:
  34650. {
  34651. foreach(new i : Player)
  34652. {
  34653. if(PlayerHasJob(i, JOB_TAXIDRIVER))
  34654. {
  34655. SendClientMessageEx(i, COLOR_NAVYBLUE, "______ Taxi Hotline ______");
  34656. SendClientMessageEx(i, COLOR_GREY2, "Caller: %s, Number: %i", GetRPName(playerid), PlayerData[playerid][pPhone]);
  34657. SendClientMessageEx(i, COLOR_GREY2, "Location: %s", text);
  34658. SendClientMessageEx(i, COLOR_WHITE, "* Use '/takecall %i' in order to take this call.", playerid);
  34659. }
  34660. }
  34661. PlayerData[playerid][pTaxiCall] = 60;
  34662. SendClientMessage(playerid, COLOR_YELLOW, "Dispatch: Thank you. We will alert all taxi drivers on duty.");
  34663. HangupCall(playerid);
  34664. }
  34665. }
  34666. }
  34667. }
  34668. else if(PlayerData[playerid][pLiveBroadcast] != INVALID_PLAYER_ID)
  34669. {
  34670. foreach(new i : Player)
  34671. {
  34672. if(!PlayerData[i][pToggleNews])
  34673. {
  34674. if(GetFactionType(playerid) == FACTION_NEWS)
  34675. {
  34676. SendClientMessageEx(i, COLOR_LIGHTGREEN, "Live Reporter %s: %s", GetRPName(playerid), text);
  34677. }
  34678. else
  34679. {
  34680. SendClientMessageEx(i, COLOR_LIGHTGREEN, "Live Guest %s: %s", GetRPName(playerid), text);
  34681. }
  34682. }
  34683. }
  34684. }
  34685. else
  34686. {
  34687. if(IsPlayerInAnyVehicle(playerid) && !IsAMotorBike(GetPlayerVehicleID(playerid)) && CarWindows[GetPlayerVehicleID(playerid)] == 0)
  34688. {
  34689. foreach(new i : Player)
  34690. {
  34691. if(IsPlayerInAnyVehicle(i) && GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid) && !IsAMotorBike(GetPlayerVehicleID(playerid)))
  34692. {
  34693. SendClientMessageEx(i, COLOR_GREY1, "(Windows closed) %s says: %s", GetRPName(playerid), text);
  34694. }
  34695. }
  34696. }
  34697. else
  34698. {
  34699. if(!strcmp(PlayerData[playerid][pAccent], "None", true))
  34700. {
  34701. format(string, sizeof(string), "(%s) %s says: %s", PlayerData[playerid][pAccent], GetRPName(playerid), text);
  34702. }
  34703. else
  34704. {
  34705. format(string, sizeof(string), "%s says: %s", GetRPName(playerid), text);
  34706. }
  34707. SendProximityFadeMessage(playerid, 20.0, string, COLOR_GREY1, COLOR_GREY2, COLOR_GREY3, COLOR_GREY4, COLOR_GREY5);
  34708. }
  34709. ReturnChatAnimation(playerid, text);
  34710. }
  34711. }
  34712. }
  34713. PlayerData[playerid][pAFKPos][0] = 0.0;
  34714. PlayerData[playerid][pAFKPos][1] = 0.0;
  34715. PlayerData[playerid][pAFKPos][2] = 0.0;
  34716. return 0;
  34717. }
  34718. func StopTalking(playerid)
  34719. {
  34720. PlayerData[playerid][pLoopAnim] = 0;
  34721. ClearAnimations(playerid, 1);
  34722. TextDrawHideForPlayer(playerid, AnimationTD);
  34723. ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0, 1);
  34724. SendClientMessage(playerid, COLOR_GREY, "Animations cleared.");
  34725. return 1;
  34726. }
  34727. public OnPlayerCommandReceived(playerid, cmd[], params[], flags)
  34728. {
  34729. if(PlayerData[playerid][pKicked]) return 0;
  34730. if(!PlayerData[playerid][pLogged])
  34731. {
  34732. SendClientMessage(playerid, COLOR_RED, "You cannot use commands if you're not logged in.");
  34733. return 0;
  34734. }
  34735. if(isnull(params))
  34736. {
  34737. params[0] = EOS;
  34738. }
  34739. if(PlayerData[playerid][pTutorial])// && strcmp(cmd, "/report", true, 6))
  34740. {
  34741. SendClientMessage(playerid, COLOR_LIGHTRED, "* You are currently in the tutorial. Commands are disabled.");
  34742. return 0;
  34743. }
  34744. if(GetPlayerState(playerid) == PLAYER_STATE_WASTED)
  34745. {
  34746. SendClientMessage(playerid, COLOR_LIGHTRED, "* You are currently dead. Commands are disabled.");
  34747. return 0;
  34748. }
  34749. if(PlayerData[playerid][pMuted])
  34750. {
  34751. SendClientMessage(playerid, COLOR_LIGHTRED, "* You are currently muted. Commands are disabled.");
  34752. return 0;
  34753. }
  34754. if(++PlayerData[playerid][pSpamTime] >= 4 && PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  34755. {
  34756. PlayerData[playerid][pMuted] = 10;
  34757. SendClientMessage(playerid, COLOR_YELLOW, "You've been temporarily muted by the server for ten seconds due to flooding.");
  34758. return 0;
  34759. }
  34760. if(PlayerData[playerid][pAdmin] < GENERAL_MANAGER && CheckServerAd(params))
  34761. {
  34762. new string[128];
  34763. format(string,sizeof(string),"{00aa00}AdmWarning{FFFF00}: %s (ID: %d) may be server advertising: '{00aa00}/%s %s{FFFF00}'.", GetPlayerNameEx(playerid), playerid, cmd, params);
  34764. SendAdminMessage(COLOR_YELLOW, string, 2);
  34765. //Log_Write("logs/hack.log", string);
  34766. SendClientMessage(playerid, COLOR_GREY, "Your command was blocked, you have automatically reported for server advertising.");
  34767. PlayerData[playerid][pAdvertWarnings] ++;
  34768. return 0;
  34769. }
  34770. printf("[zcmd] [%s]:%s %s", GetPlayerNameEx(playerid), cmd, params);
  34771. Log_Write("log_command", "[zcmd] [%s](uid: %d):%s %s.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], cmd, params);
  34772. // Log_Write("log_chat", "[%s]:%s %s.", GetPlayerNameEx(playerid), cmd, params);
  34773. /*if((PlayerData[playerid][pAdmin] < GENERAL_MANAGER) && (!strcmp(cmd, "/ban", true, 3) || !strcmp(cmd, "/kick", true, 4) || !strcmp(cmd, "/sban", true, 4) || !strcmp(cmd, "/skick", true, 5) || !strcmp(cmd, "/permaban", true, 8) || !strcmp(cmd, "/rangeban", true, 8) || !strcmp(cmd, "/getip", true, 5) || !strcmp(cmd, "/traceip", true, 7)))
  34774. {
  34775. SendClientMessage(playerid, COLOR_LIGHTRED, "* These commands cannot be used during beta testing.");
  34776. return 0;
  34777. }
  34778. if((PlayerData[playerid][pAdmin] < HEAD_ADMIN) && (!strcmp(cmd, "/adminname")))
  34779. {
  34780. SendClientMessage(playerid, COLOR_LIGHTRED, "* These commands cannot be used during beta testing.");
  34781. return 0;
  34782. }*/
  34783. //PlayerData[playerid][pAFKPos][0] = 0.0;
  34784. //PlayerData[playerid][pAFKPos][1] = 0.0;
  34785. //PlayerData[playerid][pAFKPos][2] = 0.0;
  34786. return 1;
  34787. }
  34788. public OnPlayerCommandPerformed(playerid, cmd[], params[], result, flags)
  34789. {
  34790. if(result == -1)
  34791. {
  34792. //SendClientMessage(playerid, COLOR_LIGHTRED, "That command doesn't exist! Use /help for a list of commands.");
  34793. //SendClientMessage(playerid, 0x089DCEFF, "[U:RP] {AAAAAA}Sorry, that command doesn't exist! Use /help for a list of commands.");
  34794. SendClientMessageEx(playerid, 0x89DCEFFF, "[OS:RP]{C8C8C8} Sorry, but '/%s' does not appear to be working. Use {89DCEF}/help{C8C8C8} for a list of valid commands.", cmd);
  34795. }
  34796. /* if(result == -1)
  34797. {
  34798. TextDrawShowForPlayer(playerid, Textdraw0);
  34799. TextDrawShowForPlayer(playerid, Textdraw1);
  34800. TextDrawShowForPlayer(playerid, Textdraw2);
  34801. TextDrawShowForPlayer(playerid, Textdraw3);
  34802. TextDrawShowForPlayer(playerid, Textdraw4);
  34803. TextDrawShowForPlayer(playerid, Textdraw5);
  34804. TextDrawShowForPlayer(playerid, Textdraw6);
  34805. TextDrawShowForPlayer(playerid, Textdraw7);
  34806. TextDrawShowForPlayer(playerid, Textdraw8);
  34807. SetTimerEx("unkcmd", 5000, false, "i", playerid);
  34808. PlayerPlaySound(playerid,1150,0.0,0.0,0.0);
  34809. }
  34810. */
  34811. return 1;
  34812. }
  34813. public OnRconLoginAttempt(ip[], password[], success)
  34814. {
  34815. if(success)
  34816. {
  34817. foreach(new i : Player)
  34818. {
  34819. if(!strcmp(GetPlayerIP(i), ip) && PlayerData[i][pAdmin] < 6 && !PlayerData[i][pDeveloper])
  34820. {
  34821. BanPlayer(i, "Server", "Unauthorized RCON login");
  34822. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s was banned for an unauthorized RCON login.", GetRPName(i));
  34823. }
  34824. }
  34825. }
  34826. return 1;
  34827. }
  34828. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  34829. {
  34830. new time = NetStats_GetConnectedTime(playerid);
  34831. if(PlayerData[playerid][pSkating] && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
  34832. {
  34833. SetPlayerArmedWeapon(playerid, 0);
  34834. if(newkeys & KEY_HANDBRAKE)
  34835. {
  34836. ApplyAnimationEx(playerid, "SKATE","skate_sprint",4.1,1,1,1,1,1);
  34837. if(!PlayerData[playerid][pSkateAct])
  34838. {
  34839. PlayerData[playerid][pSkateAct] = true;
  34840. RemovePlayerAttachedObject(playerid, 5);
  34841. DestroyDynamicObject(PlayerData[playerid][pSkateObj]);
  34842. PlayerData[playerid][pSkateObj] = CreateDynamicObject(19878,0,0,0,0,0,0, .playerid = playerid);
  34843. AttachDynamicObjectToPlayer(PlayerData[playerid][pSkateObj], playerid, -0.2,0,-0.9,0,0,90);
  34844. }
  34845. }
  34846. if(oldkeys & KEY_HANDBRAKE)
  34847. {
  34848. ApplyAnimationEx(playerid, "CARRY","crry_prtial",4.0,0,0,0,0,0);
  34849. if(PlayerData[playerid][pSkateAct])
  34850. {
  34851. PlayerData[playerid][pSkateAct] = false;
  34852. DestroyDynamicObject(PlayerData[playerid][pSkateObj]);
  34853. RemovePlayerAttachedObject(playerid, 5);
  34854. SetPlayerAttachedObject(playerid, 5,19878,6,-0.055999,0.013000,0.000000,-84.099983,0.000000,-106.099998,1.000000,1.000000,1.000000);
  34855. }
  34856. }
  34857. }
  34858. if(newkeys & KEY_SPRINT)
  34859. {
  34860. if(PlayerData[playerid][pLoopAnim])
  34861. {
  34862. PlayerData[playerid][pLoopAnim] = 0;
  34863. ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0, 1);
  34864. TextDrawHideForPlayer(playerid, AnimationTD);
  34865. }
  34866. WorkoutUpdate(playerid);
  34867. }
  34868. if(newkeys & KEY_SECONDARY_ATTACK && GetPlayerState(playerid) == PLAYER_STATE_DRIVER && VehicleHasEngine(GetPlayerVehicleID(playerid)) && vehicleFuel[GetPlayerVehicleID(playerid)] <= 0)
  34869. {
  34870. RemovePlayerFromVehicle(playerid);
  34871. }
  34872. // LS ELEVATOR
  34873. if(!IsPlayerInAnyVehicle(playerid) && (newkeys & KEY_YES))
  34874. {
  34875. new Float:pos[3];
  34876. GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
  34877. if(pos[1] < -1301.4 && pos[1] > -1303.2417 && pos[0] < 1786.2131 && pos[0] > 1784.1555) // He is using the elevator button
  34878. ShowElevatorDialog(playerid);
  34879. else // Is he in a floor button?
  34880. {
  34881. if(pos[1] > -1301.4 && pos[1] < -1299.1447 && pos[0] < 1785.6147 && pos[0] > 1781.9902)
  34882. {
  34883. // He is most likely using it, check floor:
  34884. new i=20;
  34885. while(pos[2] < GetDoorsZCoordForFloor(i) + 3.5 && i > 0)
  34886. i --;
  34887. if(i == 0 && pos[2] < GetDoorsZCoordForFloor(0) + 2.0)
  34888. i = -1;
  34889. if(i <= 19)
  34890. {
  34891. CallElevator(playerid, i + 1);
  34892. GameTextForPlayer(playerid, "~r~Elevator called", 3500, 4);
  34893. }
  34894. }
  34895. }
  34896. }
  34897. // END LS ELEVATOR
  34898. if((time - PlayerData[playerid][pLastPress]) >= 400)
  34899. {
  34900. if(newkeys & KEY_YES)
  34901. {
  34902. new success;
  34903. if(PlayerData[playerid][pInjured] == 0 && PlayerData[playerid][pTazedTime] == 0 && PlayerData[playerid][pCuffed] == 0 && PlayerData[playerid][pDueling] == INVALID_PLAYER_ID)
  34904. {
  34905. if(PlayerData[playerid][pHurt] - 30 > 0)
  34906. return SendClientMessageEx(playerid, COLOR_GREY, "You are too hurt to operate/enter anything. Please wait %i seconds before trying again.", (PlayerData[playerid][pHurt] - 30));
  34907. if((success = EnterCheck(playerid)) == 0)
  34908. success = ExitCheck(playerid);
  34909. if(!success)
  34910. {
  34911. DoorCheck(playerid);
  34912. //GateCheck(playerid);
  34913. }
  34914. if (IsPlayerNearGymEquipment(playerid)) GymCheck(playerid);
  34915. }
  34916. PlayerData[playerid][pLastPress] = time; // Prevents spamming. Sometimes keys get messed up and register twice.
  34917. }
  34918. else if(newkeys & KEY_NO)
  34919. {
  34920. if(!GateCheck(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  34921. {
  34922. callcmd::engine(playerid, "\1");
  34923. }
  34924. PlayerData[playerid][pLastPress] = time; // Prevents spamming. Sometimes keys get messed up and register twice.
  34925. }
  34926. }
  34927. return 1;
  34928. }
  34929. public OnPlayerStateChange(playerid, newstate, oldstate)
  34930. {
  34931. if(PlayerData[playerid][pKicked]) return 0;
  34932. IsPlayerSteppingInVehicle[playerid] = -1;
  34933. if(newstate == PLAYER_STATE_DRIVER)
  34934. {
  34935. if(PlayerData[playerid][pToggleVehCam] == 1)
  34936. {
  34937. new p = GetPlayerVehicleID(playerid);
  34938. if(IsAMotorBike(p) || IsAHelicopter(p) || IsVehicleBajs(p) || IsAPlane(p) || IsABoat(p))
  34939. {
  34940. return 0;
  34941. }
  34942. else
  34943. {
  34944. pObj[playerid] = CreatePlayerObject(playerid,19300, 0.0000, -1282.9984, 10.1493, 0.0000, -1, -1, 100);
  34945. AttachPlayerObjectToVehicle(playerid,pObj[playerid],p,-0.314999, -0.195000, 0.510000, 0.000000, 0.000000, 0.000000);
  34946. AttachCameraToPlayerObject(playerid,pObj[playerid]);
  34947. SetPVarInt(playerid,"used",1);
  34948. }
  34949. }
  34950. new vehicleid = GetPlayerVehicleID(playerid);
  34951. if((pizzaVehicles[0] <= vehicleid <= pizzaVehicles[5]) && !PlayerHasJob(playerid, JOB_PIZZAMAN))
  34952. {
  34953. SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not a Pizzaman.");
  34954. RemovePlayerFromVehicle(playerid);
  34955. return 1;
  34956. }
  34957. if((rentcar[0] <= vehicleid <= rentcar[7] && Renting[playerid] == 0))
  34958. {
  34959. Dialog_Show(playerid, DIALOG_RENTCAR, DIALOG_STYLE_MSGBOX, "Rent a truck", "Are you sure you want to rent this truck for $1,000?", "Yes", "No");
  34960. }
  34961. if((courierVehicles[0] <= vehicleid <= courierVehicles[6]) && !PlayerHasJob(playerid, JOB_COURIER))
  34962. {
  34963. SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not a Courier.");
  34964. RemovePlayerFromVehicle(playerid);
  34965. return 1;
  34966. }
  34967. if((sweeperVehicles[0] <= vehicleid <= sweeperVehicles[3]) && !PlayerHasJob(playerid, JOB_SWEEPER))
  34968. {
  34969. SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not a Street Sweeper.");
  34970. RemovePlayerFromVehicle(playerid);
  34971. return 1;
  34972. }
  34973. if((taxiVehicles[0] <= vehicleid <= taxiVehicles[3]) && !PlayerHasJob(playerid, JOB_TAXIDRIVER))
  34974. {
  34975. SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not a Taxi Driver.");
  34976. RemovePlayerFromVehicle(playerid);
  34977. return 1;
  34978. }
  34979. if((testVehicles[0] <= vehicleid <= testVehicles[4]) && !PlayerData[playerid][pDrivingTest])
  34980. {
  34981. SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not taking your drivers test.");
  34982. RemovePlayerFromVehicle(playerid);
  34983. return 1;
  34984. }
  34985. if(VehicleInfo[vehicleid][vFactionType] != FACTION_NONE && GetFactionType(playerid) != VehicleInfo[vehicleid][vFactionType])
  34986. {
  34987. SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as it doesn't belong to your faction.");
  34988. RemovePlayerFromVehicle(playerid);
  34989. return 1;
  34990. }
  34991. else if(VehicleInfo[vehicleid][vFactionType] != FACTION_NONE && VehicleInfo[vehicleid][vRank] > PlayerData[playerid][pFactionRank])
  34992. {
  34993. SendClientMessageEx(playerid, COLOR_GREY, "You cannot operate this vehicle as you aren't a rank %i in your faction.", VehicleInfo[vehicleid][vRank]);
  34994. RemovePlayerFromVehicle(playerid);
  34995. return 1;
  34996. }
  34997. if(VehicleInfo[vehicleid][vGang] >= 0 && PlayerData[playerid][pGang] != VehicleInfo[vehicleid][vGang])
  34998. {
  34999. SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as it doesn't belong to your gang.");
  35000. RemovePlayerFromVehicle(playerid);
  35001. return 1;
  35002. }
  35003. else if(VehicleInfo[vehicleid][vGang] >= 0 && VehicleInfo[vehicleid][vRank] > PlayerData[playerid][pGangRank])
  35004. {
  35005. SendClientMessageEx(playerid, COLOR_GREY, "You cannot operate this vehicle as you aren't a rank %i in your gang.", VehicleInfo[vehicleid][vRank]);
  35006. RemovePlayerFromVehicle(playerid);
  35007. return 1;
  35008. }
  35009. if(VehicleInfo[vehicleid][vJob] >= 0 && PlayerData[playerid][pJob] != VehicleInfo[vehicleid][vJob])
  35010. {
  35011. SendClientMessageEx(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not a %s.", GetJobName(VehicleInfo[vehicleid][vJob]));
  35012. RemovePlayerFromVehicle(playerid);
  35013. return 1;
  35014. }
  35015. if(VehicleInfo[vehicleid][vVIP] > 0 && PlayerData[playerid][pDonator] < VehicleInfo[vehicleid][vVIP])
  35016. {
  35017. SendClientMessageEx(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not a %s VIP+.", GetVIPRank(VehicleInfo[vehicleid][vVIP]));
  35018. RemovePlayerFromVehicle(playerid);
  35019. return 1;
  35020. }
  35021. /*if(VehicleInfo[vehicleid][vLocked])
  35022. {
  35023. SendClientMessageEx(playerid, COLOR_GREY, "You cannot operate this vehicle as it is locked.");
  35024. RemovePlayerFromVehicle(playerid);
  35025. return 1;
  35026. }*/
  35027. if(!VehicleHasEngine(vehicleid))
  35028. {
  35029. SetVehicleParams(vehicleid, VEHICLE_ENGINE, true);
  35030. }
  35031. else if(!GetVehicleParams(vehicleid, VEHICLE_ENGINE) && !IsADickVehicle(vehicleid))
  35032. {
  35033. if(testVehicles[0] <= vehicleid <= testVehicles[4])
  35034. {
  35035. PlayerData[playerid][pCP] = CHECKPOINT_TEST;
  35036. PlayerData[playerid][pTestVehicle] = vehicleid;
  35037. PlayerData[playerid][pTestCP] = 0;
  35038. SetVehicleParams(vehicleid, VEHICLE_ENGINE, 1);
  35039. SetPlayerCheckpoint(playerid, drivingTestCPs[PlayerData[playerid][pTestCP]][0], drivingTestCPs[PlayerData[playerid][pTestCP]][1], drivingTestCPs[PlayerData[playerid][pTestCP]][2], 3.0);
  35040. SendClientMessage(playerid, COLOR_AQUA, "Drive through the checkpoints to proceed with the test. Try not to damage your vehicle.");
  35041. }
  35042. else
  35043. {
  35044. //SetVehicleParams(vehicleid, VEHICLE_ENGINE, 1);
  35045. GameTextForPlayer(playerid, "~r~Engine Off~n~~w~/engine", 3000, 3);
  35046. // SendClientMessage(playerid, COLOR_YELLOW,"(( Note: use /togglecam to turn-off the 1st-person-view. ))");
  35047. SendClientMessage(playerid, COLOR_AQUA, "Your vehicle's engine is turned on, you can use /engine or Press 'N' to turn it off/on.");
  35048. }
  35049. }
  35050. /*if(testVehicles[0] <= vehicleid <= testVehicles[4])
  35051. {
  35052. PlayerData[playerid][pCP] = CHECKPOINT_TEST;
  35053. PlayerData[playerid][pTestVehicle] = vehicleid;
  35054. PlayerData[playerid][pTestCP] = 0;
  35055. SetPlayerCheckpoint(playerid, drivingTestCPs[PlayerData[playerid][pTestCP]][0], drivingTestCPs[PlayerData[playerid][pTestCP]][1], drivingTestCPs[PlayerData[playerid][pTestCP]][2], 3.0);
  35056. SendClientMessage(playerid, COLOR_AQUA, "Drive through the checkpoints to proceed with the test. Try not to damage your vehicle.");
  35057. }*/
  35058. if(VehicleHasEngine(vehicleid) && vehicleFuel[vehicleid] <= 0)
  35059. {
  35060. GameTextForPlayer(playerid, "~r~Out of fuel", 5000, 3);
  35061. // TogglePlayerControllable(playerid, 0);
  35062. }
  35063. if(!PlayerData[playerid][pCarLicense] && !PlayerData[playerid][pDrivingTest] && !IsVehicleBajs(vehicleid))
  35064. {
  35065. SendClientMessage(playerid, COLOR_LIGHTRED, "You are operating this vehicle without a license. Watch out for the cops!");
  35066. }
  35067. if(IsVehicleOwner(playerid, vehicleid) && VehicleInfo[vehicleid][vTickets] > 0)
  35068. {
  35069. SendClientMessageEx(playerid, COLOR_AQUA, "This vehicle has %s in unpaid tickets. You can pay your tickets using /paytickets.", FormatNumber(VehicleInfo[vehicleid][vTickets]));
  35070. }
  35071. // if(!PlayerData[playerid][pToggleTextdraws] && VehicleHasEngine(vehicleid))
  35072. // {
  35073. // PlayerTextDrawShow(playerid, PlayerData[playerid][pText][1]);
  35074. // PlayerTextDrawShow(playerid, PlayerData[playerid][pText][2]);
  35075. // }
  35076. SetPlayerArmedWeapon(playerid, 0);
  35077. /*if(isnull(vehicleStream[vehicleid]))
  35078. {
  35079. SendClientMessage(playerid, COLOR_LIGHTORANGE, "Radio: Use {FFD700}/setradio{F7A763} to listen to a radio station.");
  35080. }*/
  35081. /*if(isnull(vehicleStream[vehicleid]))
  35082. {
  35083. SendClientMessage(playerid, COLOR_WHITE, "* Use {C8C8C8}/setradio{FFFFFF} to change the radio station in this vehicle.");
  35084. }*/
  35085. }
  35086. else if(oldstate == PLAYER_STATE_DRIVER)
  35087. {
  35088. if (CarRadars[playerid] == 1)
  35089. {
  35090. PlayerTextDrawShow(playerid, _crTextTarget[playerid]);
  35091. PlayerTextDrawShow(playerid, _crTextSpeed[playerid]);
  35092. PlayerTextDrawShow(playerid, _crTickets[playerid]);
  35093. DeletePVar(playerid, "_lastTicketWarning");
  35094. }
  35095. if(GetPVarInt(playerid,"used") == 1)
  35096. {
  35097. SetPVarInt(playerid,"used",0);
  35098. SetCameraBehindPlayer(playerid);
  35099. DestroyPlayerObject(playerid,pObj[playerid]);
  35100. }
  35101. if(PlayerData[playerid][pDrivingTest])
  35102. {
  35103. PlayerData[playerid][pDrivingTest] = 0;
  35104. SetVehicleToRespawn(PlayerData[playerid][pTestVehicle]);
  35105. SendClientMessage(playerid, COLOR_LIGHTRED, "* You have exited the vehicle and therefore failed the test.");
  35106. }
  35107. for(new i = 0; i < 38; i ++)
  35108. {
  35109. PlayerTextDrawHide(playerid, SpeedoMeterTextDraw[playerid][i]);
  35110. }
  35111. // PlayerTextDrawHide(playerid, PlayerData[playerid][pText][1]);
  35112. // PlayerTextDrawHide(playerid, PlayerData[playerid][pText][2]);
  35113. }
  35114. else if(newstate == PLAYER_STATE_PASSENGER)
  35115. {
  35116. new driverid = GetVehicleDriver(GetPlayerVehicleID(playerid));
  35117. if(PlayerData[playerid][pWeapons][4] > 0) SetPlayerArmedWeapon(playerid,PlayerData[playerid][pWeapons][4]);
  35118. else SetPlayerArmedWeapon(playerid,0);
  35119. if((driverid != INVALID_VEHICLE_ID && PlayerData[driverid][pTaxiFare] > 0 && PlayerData[driverid][pTaxiPassenger] == INVALID_PLAYER_ID) && (GetVehicleModel(GetPlayerVehicleID(playerid)) == 420 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 438))
  35120. {
  35121. if(PlayerData[playerid][pCash] < PlayerData[driverid][pTaxiFare])
  35122. {
  35123. SendClientMessage(playerid, COLOR_GREY, "You can't afford to pay the fare. Therefore you can't ride this taxi.");
  35124. RemovePlayerFromVehicle(playerid);
  35125. return 1;
  35126. }
  35127. PlayerData[driverid][pTaxiPassenger] = playerid;
  35128. PlayerData[driverid][pTaxiBill] = PlayerData[driverid][pTaxiFare];
  35129. PlayerData[driverid][pTaxiTime] = 0;
  35130. ShowActionBubble(playerid, "* %s enters %s's taxi cab.", GetRPName(playerid), GetRPName(driverid));
  35131. SendClientMessageEx(playerid, COLOR_YELLOW, "You will be charged the fare price of {FF6347}$%i{33CCFF} every 15 seconds during your ride.", PlayerData[driverid][pTaxiFare]);
  35132. SendClientMessageEx(driverid, COLOR_AQUA, "*%s has entered your taxi. You will earn {00AA00}$%i{33CCFF} every 15 seconds during the ride.", GetRPName(playerid), PlayerData[driverid][pTaxiFare]);
  35133. }
  35134. switch(GetPlayerWeapon(playerid))
  35135. {
  35136. case 22, 23, 25, 28..33:
  35137. SetPlayerArmedWeapon(playerid, GetScriptWeapon(playerid));
  35138. default:
  35139. SetPlayerArmedWeapon(playerid, 0);
  35140. }
  35141. }
  35142. if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
  35143. {
  35144. new vehicleid = GetPlayerVehicleID(playerid);
  35145. foreach(new i : Player)
  35146. {
  35147. if(GetPlayerState(i) == PLAYER_STATE_SPECTATING && PlayerData[i][pSpectating] == playerid)
  35148. {
  35149. PlayerSpectateVehicle(i, vehicleid);
  35150. }
  35151. }
  35152. if(!isnull(vehicleStream[vehicleid]) && PlayerData[playerid][pStreamType] == MUSIC_NONE && !PlayerData[playerid][pToggleMusic])
  35153. {
  35154. PlayerData[playerid][pStreamType] = MUSIC_VEHICLE;
  35155. PlayAudioStreamForPlayer(playerid, vehicleStream[vehicleid]);
  35156. SendClientMessage(playerid, COLOR_WHITE, "You are now tuned in to this vehicle's radio. /stopmusic to stop listening.");
  35157. }
  35158. PlayerData[playerid][pDedication] = 0;
  35159. }
  35160. else if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
  35161. {
  35162. foreach(new i : Player)
  35163. {
  35164. if(GetPlayerState(i) == PLAYER_STATE_SPECTATING && PlayerData[i][pSpectating] == playerid)
  35165. {
  35166. PlayerSpectatePlayer(i, playerid);
  35167. }
  35168. }
  35169. if(PlayerData[playerid][pStreamType] == MUSIC_VEHICLE)
  35170. {
  35171. StopAudioStreamForPlayer(playerid);
  35172. PlayerData[playerid][pStreamType] = MUSIC_NONE;
  35173. }
  35174. }
  35175. return 1;
  35176. }
  35177. public OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ)
  35178. {
  35179. if(!(-3.0 <= fScaleX <= 3.0)) fScaleX = fScaleX < -3.0 ? 0.0 : 3.0;
  35180. if(!(-3.0 <= fScaleY <= 3.0)) fScaleY = fScaleY < -3.0 ? 0.0 : 3.0;
  35181. if(!(-3.0 <= fScaleZ <= 3.0)) fScaleZ = fScaleZ < -3.0 ? 0.0 : 3.0;
  35182. switch(PlayerData[playerid][pEditType])
  35183. {
  35184. case EDIT_CLOTHING_PREVIEW:
  35185. {
  35186. RemovePlayerAttachedObject(playerid, 9);
  35187. if(response)
  35188. {
  35189. new businessid = GetInsideBusiness(playerid);
  35190. if(businessid >= 0 && BusinessInfo[businessid][bType] == BUSINESS_CLOTHES)
  35191. {
  35192. if(BusinessInfo[businessid][bProducts] <= 0)
  35193. {
  35194. return SendClientMessage(playerid, COLOR_GREY, "This business is out of stock now.");
  35195. }
  35196. if(PlayerData[playerid][pCash] < clothingArray[PlayerData[playerid][pSelected]][clothingPrice])
  35197. {
  35198. return SendClientMessage(playerid, COLOR_GREY, "You couldn't afford to purchase this item.");
  35199. }
  35200. for(new i = 0; i < MAX_PLAYER_CLOTHING; i ++)
  35201. {
  35202. if(!ClothingInfo[playerid][i][cExists])
  35203. {
  35204. ClothingInfo[playerid][i][cModel] = modelid;
  35205. ClothingInfo[playerid][i][cBone] = boneid;
  35206. ClothingInfo[playerid][i][cPosX] = fOffsetX;
  35207. ClothingInfo[playerid][i][cPosY] = fOffsetY;
  35208. ClothingInfo[playerid][i][cPosZ] = fOffsetZ;
  35209. ClothingInfo[playerid][i][cRotX] = fRotX;
  35210. ClothingInfo[playerid][i][cRotY] = fRotY;
  35211. ClothingInfo[playerid][i][cRotZ] = fRotZ;
  35212. ClothingInfo[playerid][i][cScaleX] = fScaleX;
  35213. ClothingInfo[playerid][i][cScaleY] = fScaleY;
  35214. ClothingInfo[playerid][i][cScaleZ] = fScaleZ;
  35215. ClothingInfo[playerid][i][cMatColor1] = 0;
  35216. ClothingInfo[playerid][i][cMatColor2] = 0;
  35217. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO clothing VALUES(null, %i, '%e', %i, %i, 0, '%f', '%f', '%f', '%f', '%f', '%f', '%f', '%f', '%f')", PlayerData[playerid][pID], clothingArray[PlayerData[playerid][pSelected]][clothingName], modelid, boneid, fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, fRotZ, fScaleX, fScaleY, fScaleZ);
  35218. mysql_tquery(connectionID, queryBuffer, "OnPlayerBuyClothingItem", "isiii", playerid, clothingArray[PlayerData[playerid][pSelected]][clothingName], clothingArray[PlayerData[playerid][pSelected]][clothingPrice], businessid, i);
  35219. return 1;
  35220. }
  35221. }
  35222. SendClientMessage(playerid, COLOR_GREY, "You have no more clothing slots available. Therefore you can't buy this.");
  35223. }
  35224. }
  35225. else
  35226. {
  35227. if(PlayerData[playerid][pMenuType] == 0)
  35228. ShowClothingSelectionMenu(playerid);
  35229. else
  35230. ShowDialogToPlayer(playerid, DIALOG_BUYCLOTHING);
  35231. }
  35232. }
  35233. case EDIT_CLOTHING:
  35234. {
  35235. new clothingid = PlayerData[playerid][pSelected];
  35236. if(response)
  35237. {
  35238. ClothingInfo[playerid][clothingid][cPosX] = fOffsetX;
  35239. ClothingInfo[playerid][clothingid][cPosY] = fOffsetY;
  35240. ClothingInfo[playerid][clothingid][cPosZ] = fOffsetZ;
  35241. ClothingInfo[playerid][clothingid][cRotX] = fRotX;
  35242. ClothingInfo[playerid][clothingid][cRotY] = fRotY;
  35243. ClothingInfo[playerid][clothingid][cRotZ] = fRotZ;
  35244. ClothingInfo[playerid][clothingid][cScaleX] = fScaleX;
  35245. ClothingInfo[playerid][clothingid][cScaleY] = fScaleY;
  35246. ClothingInfo[playerid][clothingid][cScaleZ] = fScaleZ;
  35247. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE clothing SET pos_x = '%f', pos_y = '%f', pos_z = '%f', rot_x = '%f', rot_y = '%f', rot_z = '%f', scale_x = '%f', scale_y = '%f', scale_z = '%f' WHERE id = %i", fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, fRotZ, fScaleX, fScaleY, fScaleZ, ClothingInfo[playerid][clothingid][cID]);
  35248. mysql_tquery(connectionID, queryBuffer);
  35249. SendClientMessageEx(playerid, COLOR_GREY, "Changes saved.");
  35250. }
  35251. if(!ClothingInfo[playerid][clothingid][cAttached])
  35252. {
  35253. RemovePlayerAttachedObject(playerid, 9);
  35254. }
  35255. else
  35256. {
  35257. RemovePlayerAttachedObject(playerid, ClothingInfo[playerid][clothingid][cAttachedIndex]);
  35258. SetPlayerAttachedObject(playerid, ClothingInfo[playerid][clothingid][cAttachedIndex], ClothingInfo[playerid][clothingid][cModel], ClothingInfo[playerid][clothingid][cBone], ClothingInfo[playerid][clothingid][cPosX], ClothingInfo[playerid][clothingid][cPosY], ClothingInfo[playerid][clothingid][cPosZ],
  35259. ClothingInfo[playerid][clothingid][cRotX], ClothingInfo[playerid][clothingid][cRotY], ClothingInfo[playerid][clothingid][cRotZ], ClothingInfo[playerid][clothingid][cScaleX], ClothingInfo[playerid][clothingid][cScaleY], ClothingInfo[playerid][clothingid][cScaleZ]);
  35260. }
  35261. }
  35262. case EDIT_COP_CLOTHING:
  35263. {
  35264. RemovePlayerAttachedObject(playerid, 9);
  35265. if(response)
  35266. {
  35267. for(new i = 0; i < MAX_PLAYER_CLOTHING; i ++)
  35268. {
  35269. if(!ClothingInfo[playerid][i][cExists])
  35270. {
  35271. ClothingInfo[playerid][i][cModel] = modelid;
  35272. ClothingInfo[playerid][i][cBone] = boneid;
  35273. ClothingInfo[playerid][i][cPosX] = fOffsetX;
  35274. ClothingInfo[playerid][i][cPosY] = fOffsetY;
  35275. ClothingInfo[playerid][i][cPosZ] = fOffsetZ;
  35276. ClothingInfo[playerid][i][cRotX] = fRotX;
  35277. ClothingInfo[playerid][i][cRotY] = fRotY;
  35278. ClothingInfo[playerid][i][cRotZ] = fRotZ;
  35279. ClothingInfo[playerid][i][cScaleX] = fScaleX;
  35280. ClothingInfo[playerid][i][cScaleY] = fScaleY;
  35281. ClothingInfo[playerid][i][cScaleZ] = fScaleZ;
  35282. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO clothing VALUES(null, %i, '%e', %i, %i, 0, '%f', '%f', '%f', '%f', '%f', '%f', '%f', '%f', '%f')", PlayerData[playerid][pID], copClothing[PlayerData[playerid][pSelected]][cName], modelid, boneid, fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, fRotZ, fScaleX, fScaleY, fScaleZ);
  35283. mysql_tquery(connectionID, queryBuffer, "OnPlayerAttachCopClothing", "isi", playerid, copClothing[PlayerData[playerid][pSelected]][cName], i);
  35284. return 1;
  35285. }
  35286. }
  35287. SendClientMessage(playerid, COLOR_GREY, "You have no more clothing slots available. Therefore you can't attach this.");
  35288. }
  35289. else
  35290. {
  35291. ShowCopClothingMenu(playerid);
  35292. }
  35293. }
  35294. }
  35295. return 1;
  35296. }
  35297. Dialog:FurnEditConfirm(playerid, response, listitem, inputtext[])
  35298. {
  35299. if(response)
  35300. {
  35301. switch(listitem)
  35302. {
  35303. case 0: EditDynamicObjectEx(playerid, EDIT_TYPE_FURNITURE, Furniture[GetPVarInt(playerid, "FurnID")][fObject], GetPVarInt(playerid, "FurnID"));
  35304. case 1: ListTexture(playerid);
  35305. case 2: PreviewFurniture(playerid, Furniture[GetPVarInt(playerid, "FurnID")][fObject]);
  35306. case 3: DeleteFurniture(GetPVarInt(playerid, "FurnID"));
  35307. }
  35308. }
  35309. return 1;
  35310. }
  35311. stock GetPlayerTurfZone(playerid)
  35312. {
  35313. for(new i = 0; i < MAX_TURFS; i++) if(IsPlayerInDynamicArea(playerid, TurfInfo[i][tArea])) return i;
  35314. return -1;
  35315. }
  35316. public OnPlayerEnterDynamicArea(playerid, areaid)
  35317. {
  35318. for(new i = 0; i < MAX_TURFS; i++)
  35319. {
  35320. if(areaid == TurfInfo[i][tArea])
  35321. {
  35322. if(PlayerData[playerid][pGang] != -1 || IsLawEnforcement(playerid))
  35323. {
  35324. if(TurfInfo[i][tTime])
  35325. {
  35326. if(GetPlayerTurfZone(TurfInfo[i][tCapturer]) == i)
  35327. {
  35328. SetPlayerMarkerForPlayer(playerid, TurfInfo[i][tCapturer], (GangInfo[PlayerData[playerid][pGang]][gColor] & ~0xff) + 0xFF);
  35329. }
  35330. }
  35331. }
  35332. }
  35333. }
  35334. return 1;
  35335. }
  35336. /*public OnPlayerLeaveDynamicArea(playerid, areaid)
  35337. {
  35338. if(InsideMainMenu{playerid}) return 1;
  35339. for(new i = 0; i < MAX_TURFS; i++)
  35340. {
  35341. if(areaid == TurfInfo[i][tAreaId])
  35342. {
  35343. if(PlayerData[playerid][pFMember] != INVALID_FAMILY_ID || IsACop(playerid))
  35344. {
  35345. if(TurfInfo[i][tTimeToClaim])
  35346. {
  35347. if(GetPlayerTurfZone(TurfInfo[i][tCapturer]) == i)
  35348. {
  35349. if(IsACop(TurfInfo[i][tCapturer]))
  35350. {
  35351. if(PlayerData[TurfInfo[i][tCapturer]][pDuty])
  35352. {
  35353. SetPlayerMarkerForPlayer(playerid, TurfInfo[i][tCapturer], arrGroupData[PlayerData[TurfInfo[i][tCapturer]][pMember]][g_hDutyColour] * 256 + 0);
  35354. }
  35355. else
  35356. {
  35357. SetPlayerMarkerForPlayer(playerid, TurfInfo[i][tCapturer], 0xFFFFFF00);
  35358. }
  35359. }
  35360. else
  35361. {
  35362. SetPlayerMarkerForPlayer(playerid, TurfInfo[i][tCapturer], 0xFFFFFF00);
  35363. }
  35364. }
  35365. }
  35366. }
  35367. }
  35368. }
  35369. return 1;
  35370. }*/
  35371. public OnPlayerEditDynamicObject(playerid, objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz)
  35372. {
  35373. if (response == EDIT_RESPONSE_CANCEL)
  35374. {
  35375. switch (PlayerData[playerid][pEdit])
  35376. {
  35377. case EDIT_TYPE_PREVIEW:
  35378. {
  35379. DestroyDynamicObject(gPreviewFurniture[playerid]);
  35380. gPreviewFurniture[playerid] = INVALID_OBJECT_ID;
  35381. }
  35382. case EDIT_TYPE_FURNITURE:
  35383. {
  35384. UpdateFurniture(PlayerData[playerid][pEditID]);
  35385. }
  35386. case EDIT_TYPE_PAYPHONE:
  35387. {
  35388. UpdatePayphone(PlayerData[playerid][pEditID]);
  35389. }
  35390. case EDIT_TYPE_ATM:
  35391. {
  35392. UpdateATM(PlayerData[playerid][pEditID]);
  35393. }
  35394. }
  35395. PlayerData[playerid][pEdit] = EDIT_TYPE_NONE;
  35396. }
  35397. else if (response == EDIT_RESPONSE_FINAL)
  35398. {
  35399. switch (PlayerData[playerid][pEdit])
  35400. {
  35401. case EDIT_TYPE_PREVIEW: // Furniture preview
  35402. {
  35403. //if (!IsPointInRangeOfPoint(20.0, x, y, z, HouseInfo[PlayerData[playerid][pHouse]][hSpawn][0], HouseInfo[PlayerData[playerid][pHouse]][hSpawn][1], HouseInfo[PlayerData[playerid][pHouse]][hSpawn][2]) && !IsPointInRangeOfPoint(100.0, x, y, z, HouseInfo[PlayerData[playerid][pHouse]][hInt][0], HouseInfo[PlayerData[playerid][pHouse]][hInt][1], HouseInfo[PlayerData[playerid][pHouse]][hInt][2]))
  35404. if (GetInsideHouse(playerid) != PlayerData[playerid][pHouse] && GetFurnitureHouse(playerid) != PlayerData[playerid][pHouse])
  35405. {
  35406. SendErrorMessage(playerid, "The object is out of range from your house.");
  35407. }
  35408. else if (!PlayerCanAfford(playerid, g_FurnitureList[PlayerData[playerid][pPreviewIndex]][e_ModelPrice]))
  35409. {
  35410. SendErrorMessage(playerid, "You don't have enough money.");
  35411. }
  35412. else
  35413. {
  35414. new id = AddFurniture(PlayerData[playerid][pHouse], g_FurnitureList[PlayerData[playerid][pPreviewIndex]][e_ModelID], x, y, z, rx, ry, rz, GetPlayerInterior(playerid), GetPlayerVirtualWorld(playerid));
  35415. if (id == -1)
  35416. {
  35417. SendErrorMessage(playerid, "There are no available furniture slots.");
  35418. SendAdminMessage(COLOR_RED, "Admin: %s has failed to add furniture! \"MAX_FURNITURE\" needs to be adjusted.", GetRPName(playerid));
  35419. }
  35420. else
  35421. {
  35422. GivePlayerCash(playerid, -g_FurnitureList[PlayerData[playerid][pPreviewIndex]][e_ModelPrice]);
  35423. ShowFurnitureCategories(playerid);
  35424. SendInfoMessage(playerid, "Furniture purchased for {33CC33}%s{FFFFFF}. Use /edit to manage your furniture.", FormatNumber(g_FurnitureList[PlayerData[playerid][pPreviewIndex]][e_ModelPrice]));
  35425. }
  35426. }
  35427. DestroyDynamicObject(gPreviewFurniture[playerid]);
  35428. gPreviewFurniture[playerid] = INVALID_OBJECT_ID;
  35429. }
  35430. case EDIT_TYPE_FURNITURE: // House furniture
  35431. {
  35432. Furniture[PlayerData[playerid][pEditID]][fSpawn][0] = x;
  35433. Furniture[PlayerData[playerid][pEditID]][fSpawn][1] = y;
  35434. Furniture[PlayerData[playerid][pEditID]][fSpawn][2] = z;
  35435. Furniture[PlayerData[playerid][pEditID]][fSpawn][3] = rx;
  35436. Furniture[PlayerData[playerid][pEditID]][fSpawn][4] = ry;
  35437. Furniture[PlayerData[playerid][pEditID]][fSpawn][5] = rz;
  35438. UpdateFurniture(PlayerData[playerid][pEditID]);
  35439. SaveFurniture(PlayerData[playerid][pEditID]);
  35440. SendInfoMessage(playerid, "You have edited furniture ID: %i.", PlayerData[playerid][pEditID]);
  35441. }
  35442. case EDIT_TYPE_PAYPHONE: // Payphones
  35443. {
  35444. Payphones[PlayerData[playerid][pEditID]][phX] = x;
  35445. Payphones[PlayerData[playerid][pEditID]][phY] = y;
  35446. Payphones[PlayerData[playerid][pEditID]][phZ] = z;
  35447. Payphones[PlayerData[playerid][pEditID]][phA] = rz;
  35448. UpdatePayphone(PlayerData[playerid][pEditID]);
  35449. SavePayphone(PlayerData[playerid][pEditID]);
  35450. SendInfoMessage(playerid, "You have edited payphone ID: %i.", PlayerData[playerid][pEditID]);
  35451. }
  35452. case EDIT_TYPE_ATM: // ATM machines
  35453. {
  35454. ATM[PlayerData[playerid][pEditID]][atmSpawn][0] = x;
  35455. ATM[PlayerData[playerid][pEditID]][atmSpawn][1] = y;
  35456. ATM[PlayerData[playerid][pEditID]][atmSpawn][2] = z;
  35457. ATM[PlayerData[playerid][pEditID]][atmSpawn][3] = rz;
  35458. UpdateATM(PlayerData[playerid][pEditID]);
  35459. SaveATM(PlayerData[playerid][pEditID]);
  35460. SendInfoMessage(playerid, "You have edited ATM machine ID: %i.", PlayerData[playerid][pEditID]);
  35461. }
  35462. }
  35463. PlayerData[playerid][pEdit] = EDIT_TYPE_NONE;
  35464. PlayerData[playerid][pEditID] = -1;
  35465. }
  35466. switch(PlayerData[playerid][pEditType])
  35467. {
  35468. case EDIT_LAND_OBJECT_PREVIEW:
  35469. {
  35470. if(response != EDIT_RESPONSE_UPDATE)
  35471. {
  35472. DestroyDynamicObject(PlayerData[playerid][pEditObject]);
  35473. PlayerData[playerid][pEditObject] = INVALID_OBJECT_ID;
  35474. PlayerData[playerid][pEditType] = 0;
  35475. if(response == EDIT_RESPONSE_FINAL)
  35476. {
  35477. new landid = PlayerData[playerid][pObjectLand];
  35478. if(landid >= 0 && HasLandPerms(playerid, landid))
  35479. {
  35480. if(PlayerData[playerid][pCash] < landArray[PlayerData[playerid][pSelected]][fPrice])
  35481. {
  35482. return SendClientMessage(playerid, COLOR_GREY, "You couldn't afford to purchase this item.");
  35483. }
  35484. if(!IsPointInLand(landid, x, y))
  35485. {
  35486. return SendClientMessage(playerid, COLOR_GREY, "The object has exceeded the boundaries for your land.");
  35487. }
  35488. new
  35489. string[16];
  35490. GivePlayerCash(playerid, -landArray[PlayerData[playerid][pSelected]][fPrice]);
  35491. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO landobjects VALUES(null, %i, %i, '%e', %i, '%f', '%f', '%f', '%f', '%f', '%f', 0, 0, '0.0', '0.0', '0.0', '-1000.0', '-1000.0', '-1000.0')", LandInfo[landid][lID], landArray[PlayerData[playerid][pSelected]][fModel], landArray[PlayerData[playerid][pSelected]][fName], landArray[PlayerData[playerid][pSelected]][fPrice], x, y, z, rx, ry, rz);
  35492. mysql_tquery(connectionID, queryBuffer);
  35493. mysql_tquery(connectionID, "SELECT * FROM landobjects WHERE id = LAST_INSERT_ID()", "OnQueryFinished", "ii", THREAD_LOAD_LANDOBJECTS, LandInfo[landid][lLabels]);
  35494. format(string, sizeof(string), "~r~-$%i", landArray[PlayerData[playerid][pSelected]][fPrice]);
  35495. GameTextForPlayer(playerid, string, 5000, 1);
  35496. if(!strcmp(landArray[PlayerData[playerid][pSelected]][fCategory], "Doors & Gates"))
  35497. {
  35498. if(IsGateModel(landArray[PlayerData[playerid][pSelected]][fModel]))
  35499. {
  35500. SendClientMessage(playerid, COLOR_WHITE, "You can use /gate to open and close your gate. To change the destination coordinates, use /land and choose 'Edit object'.");
  35501. }
  35502. else
  35503. {
  35504. SendClientMessage(playerid, COLOR_WHITE, "You can use /door to control your door and /lock to unlock or lock it.");
  35505. }
  35506. }
  35507. }
  35508. }
  35509. else if(response == EDIT_RESPONSE_CANCEL)
  35510. {
  35511. if(PlayerData[playerid][pMenuType] == 0)
  35512. ShowLandObjects(playerid, MODEL_SELECTION_LANDOBJECTS);
  35513. else
  35514. ShowDialogToPlayer(playerid, DIALOG_LANDBUILD2);
  35515. }
  35516. }
  35517. }
  35518. case EDIT_LAND_OBJECT:
  35519. {
  35520. if(response != EDIT_RESPONSE_UPDATE)
  35521. {
  35522. if(response == EDIT_RESPONSE_FINAL)
  35523. {
  35524. if(!IsPointInLand(PlayerData[playerid][pObjectLand], x, y))
  35525. {
  35526. SendClientMessage(playerid, COLOR_GREY, "The object has exceeded the boundaries for your land.");
  35527. }
  35528. else
  35529. {
  35530. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE landobjects SET pos_x = '%f', pos_y = '%f', pos_z = '%f', rot_x = '%f', rot_y = '%f', rot_z = '%f' WHERE id = %i", x, y, z, rx, ry, rz, Streamer_GetExtraInt(objectid, E_OBJECT_INDEX_ID));
  35531. mysql_tquery(connectionID, queryBuffer);
  35532. SendClientMessage(playerid, COLOR_GREY, "Changes saved.");
  35533. }
  35534. }
  35535. ReloadLandObject(objectid, LandInfo[PlayerData[playerid][pObjectLand]][lLabels]);
  35536. PlayerData[playerid][pEditType] = 0;
  35537. }
  35538. }
  35539. case EDIT_LAND_GATE_MOVE:
  35540. {
  35541. if(response != EDIT_RESPONSE_UPDATE)
  35542. {
  35543. if(response == EDIT_RESPONSE_FINAL)
  35544. {
  35545. if(!IsPointInLand(PlayerData[playerid][pObjectLand], x, y))
  35546. {
  35547. SendClientMessage(playerid, COLOR_GREY, "The object has exceeded the boundaries for your land.");
  35548. }
  35549. else
  35550. {
  35551. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE landobjects SET move_x = '%f', move_y = '%f', move_z = '%f', move_rx = '%f', move_ry = '%f', move_rz = '%f' WHERE id = %i", x, y, z, rx, ry, rz, Streamer_GetExtraInt(objectid, E_OBJECT_INDEX_ID));
  35552. mysql_tquery(connectionID, queryBuffer);
  35553. SendClientMessage(playerid, COLOR_GREY, "Changes saved.");
  35554. }
  35555. }
  35556. ReloadLandObject(objectid, LandInfo[PlayerData[playerid][pObjectLand]][lLabels]);
  35557. PlayerData[playerid][pEditType] = 0;
  35558. }
  35559. }
  35560. }
  35561. if(response == EDIT_RESPONSE_FINAL)
  35562. {
  35563. if (PlayerData[playerid][pEditGraffiti] != -1 && GraffitiData[PlayerData[playerid][pEditGraffiti]][graffitiExists])
  35564. {
  35565. GraffitiData[PlayerData[playerid][pEditGraffiti]][graffitiPos][0] = x;
  35566. GraffitiData[PlayerData[playerid][pEditGraffiti]][graffitiPos][1] = y;
  35567. GraffitiData[PlayerData[playerid][pEditGraffiti]][graffitiPos][2] = z;
  35568. GraffitiData[PlayerData[playerid][pEditGraffiti]][graffitiPos][3] = rz;
  35569. Graffiti_Refresh(PlayerData[playerid][pEditGraffiti]);
  35570. Graffiti_Save(PlayerData[playerid][pEditGraffiti]);
  35571. }
  35572. }
  35573. return 1;
  35574. }
  35575. Dialog:DealerList(playerid, response, listitem, inputtext[])
  35576. {
  35577. new
  35578. company = PlayerData[playerid][pCompany];
  35579. if (!IsValidCompanyID(company))
  35580. {
  35581. return 0;
  35582. }
  35583. if (response)
  35584. {
  35585. if (listitem == 0)
  35586. {
  35587. if (!IsVehicleSpawnSetup(company))
  35588. {
  35589. return SendErrorMessage(playerid, "The vehicle spawn point is not setup.");
  35590. }
  35591. else
  35592. {
  35593. Dialog_Show(playerid, DealerAdd, DIALOG_STYLE_INPUT, "{FFFFFF}Add Vehicle", "Please enter the model ID or name of the vehicle to add:", "Submit", "Back");
  35594. }
  35595. }
  35596. else
  35597. {
  35598. PlayerData[playerid][pSelected] = gListedItems[playerid][--listitem];
  35599. Dialog_Show(playerid, DealerEdit, DIALOG_STYLE_LIST, "{FFFFFF}Edit vehicle", "Price: %s\nDelete Vehicle", "Select", "Back", FormatNumber(DealershipCars[PlayerData[playerid][pSelected]][dcPrice]));
  35600. }
  35601. }
  35602. return 1;
  35603. }
  35604. Dialog:DealerEdit(playerid, response, listitem, inputtext[])
  35605. {
  35606. new
  35607. company = PlayerData[playerid][pCompany];
  35608. if (!IsValidCompanyID(company))
  35609. {
  35610. return 0;
  35611. }
  35612. if (response)
  35613. {
  35614. switch (listitem)
  35615. {
  35616. case 0:
  35617. {
  35618. Dialog_Show(playerid, DealerPrice, DIALOG_STYLE_INPUT, "{FFFFFF}Vehicle price", "The current price for this vehicle is %s.\n\nPlease input the new price for this vehicle below.", "Submit", "Cancel", FormatNumber(DealershipCars[PlayerData[playerid][pSelected]][dcPrice]));
  35619. }
  35620. case 1:
  35621. {
  35622. new
  35623. vehicle = PlayerData[playerid][pSelected];
  35624. format(queryBuffer, sizeof(queryBuffer), "DELETE FROM rp_dealercars WHERE ID = %i", DealershipCars[vehicle][dcID]);
  35625. mysql_tquery(connectionID, queryBuffer);
  35626. DealershipCars[vehicle][dcExists] = 0;
  35627. SendInfoMessage(playerid, "You have deleted a vehicle: %s.", GetVehicleModelName(DealershipCars[vehicle][dcModel]));
  35628. ShowDealershipEditMenu(playerid, company);
  35629. }
  35630. }
  35631. }
  35632. else
  35633. {
  35634. ShowDealershipEditMenu(playerid, company);
  35635. }
  35636. return 1;
  35637. }
  35638. Dialog:DealerPrice(playerid, response, listitem, inputtext[])
  35639. {
  35640. new
  35641. company = PlayerData[playerid][pCompany];
  35642. if (!IsValidCompanyID(company))
  35643. {
  35644. return 0;
  35645. }
  35646. if (response)
  35647. {
  35648. new vehicle = PlayerData[playerid][pSelected], amount;
  35649. if (sscanf(inputtext, "i", amount))
  35650. {
  35651. return Dialog_Show(playerid, DealerPrice, DIALOG_STYLE_INPUT, "{FFFFFF}Vehicle price", "The current price for this vehicle is %s.\n\nPlease input the new price for this vehicle below.", "Submit", "Cancel", FormatNumber(DealershipCars[vehicle][dcPrice]));
  35652. }
  35653. else if (amount < 0)
  35654. {
  35655. return Dialog_Show(playerid, DealerPrice, DIALOG_STYLE_INPUT, "{FFFFFF}Vehicle price", "The current price for this vehicle is %s.\n\nPlease input the new price for this vehicle below.", "Submit", "Cancel", FormatNumber(DealershipCars[vehicle][dcPrice]));
  35656. }
  35657. else
  35658. {
  35659. DealershipCars[vehicle][dcPrice] = amount;
  35660. SaveDealershipCar(vehicle);
  35661. SendInfoMessage(playerid, "You have set the price to %s for vehicle: %s.", FormatNumber(amount), GetVehicleModelName(DealershipCars[vehicle][dcModel]));
  35662. ShowDealershipEditMenu(playerid, company);
  35663. }
  35664. }
  35665. return 1;
  35666. }
  35667. GetFirstDealershipCar(company)
  35668. {
  35669. for (new i = 0; i < MAX_DEALERSHIP_CARS; i ++)
  35670. {
  35671. if (DealershipCars[i][dcCompany] == BusinessInfo[company][bID] && DealershipCars[i][dcModel] > 0)
  35672. {
  35673. return i;
  35674. }
  35675. }
  35676. return -1;
  35677. }
  35678. ShowDealershipPreviewMenu(playerid, company)
  35679. {
  35680. if (IsValidCompanyID(company) && BusinessInfo[company][bType] == BUSINESS_DEALERSHIP)
  35681. {
  35682. new index = GetFirstDealershipCar(company);
  35683. if (index == -1)
  35684. {
  35685. return 0;
  35686. }
  35687. else
  35688. {
  35689. PlayerData[playerid][pDealershipMenu] = company;
  35690. PlayerData[playerid][pDealershipIndex] = index;
  35691. ShowVehicleSelectionMenu(playerid, MODEL_SELECTION_VEHICLES);
  35692. }
  35693. }
  35694. return 1;
  35695. }
  35696. Dialog:PhoneMusic(playerid, response, listitem, inputtext[])
  35697. {
  35698. if(response)
  35699. {
  35700. }
  35701. return 1;
  35702. }
  35703. Dialog:PhoneMenu(playerid, response, listitem, inputtext[])
  35704. {
  35705. if (response)
  35706. {
  35707. switch (listitem)
  35708. {
  35709. case 0:
  35710. {
  35711. Dialog_Show(playerid, PhoneCall, DIALOG_STYLE_INPUT, "{6688FF}Call Number", "Please specify the number you would like to call:", "Call", "Cancel");
  35712. }
  35713. case 1:
  35714. {
  35715. Dialog_Show(playerid, PhoneSMS, DIALOG_STYLE_INPUT, "{6688FF}SMS Number", "Please specify the number you would like to SMS:", "Call", "Cancel");
  35716. }
  35717. case 2:
  35718. {
  35719. ListContacts(playerid);
  35720. }
  35721. case 3:
  35722. {
  35723. Dialog_Show(playerid, PhoneMusic, DIALOG_STYLE_LIST, "{6688ff}Phone Music", "Default Ringtone\nMusical Ringtone 1\nMusical Ringtone 2\nMusical Ringtone 3\nMusical Ringtone 4\nMusical Ringtone 5\nMusical Ringtone 6\nMusical Ringtone 7", "Select", "Cancel");
  35724. }
  35725. case 4:
  35726. {
  35727. SendErrorMessage(playerid, "This feature is still being developed.");
  35728. }
  35729. case 5:
  35730. {
  35731. Dialog_Show(playerid, PhoneSettings, DIALOG_STYLE_LIST, "{6688FF}Phone Settings", "Power %s\nSound Off", "Select", "Cancel", (PlayerData[playerid][pTogglePhone]) ? ("Off") : ("On"));
  35732. }
  35733. }
  35734. }
  35735. return 1;
  35736. }
  35737. Dialog:ContactNumber(playerid, response, listitem, inputtext[])
  35738. {
  35739. if (response)
  35740. {
  35741. new number;
  35742. if (sscanf(inputtext, "i", number))
  35743. {
  35744. return Dialog_Show(playerid, ContactNumber, DIALOG_STYLE_INPUT, "{FFFFFF}Contact number", "Please input the number for the contact '%s':", "Submit", "Cancel", gTargetName[playerid]);
  35745. }
  35746. else if (number < 1)
  35747. {
  35748. return Dialog_Show(playerid, ContactNumber, DIALOG_STYLE_INPUT, "{FFFFFF}Contact number", "You have entered an invalid number.\n\nPlease input the number for the contact '%s':", "Submit", "Cancel", gTargetName[playerid]);
  35749. }
  35750. else
  35751. {
  35752. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO `rp_contacts` (Phone, Contact, Number) VALUES(%i, '%s', %i)", PlayerData[playerid][pPhone], mysql_escaped(gTargetName[playerid]), number);
  35753. mysql_tquery(connectionID, queryBuffer);
  35754. ListContacts(playerid);
  35755. SendInfoMessage(playerid, "You have added a contact: %s (%i).", gTargetName[playerid], number);
  35756. }
  35757. }
  35758. return 1;
  35759. }
  35760. Dialog:AddContact(playerid, response, listitem, inputtext[])
  35761. {
  35762. if (response)
  35763. {
  35764. if (isnull(inputtext))
  35765. {
  35766. return Dialog_Show(playerid, AddContact, DIALOG_STYLE_INPUT, "{FFFFFF}Add contact", "Please input the name of the contact to add below:", "Submit", "Cancel");
  35767. }
  35768. else if (strlen(inputtext) > 24)
  35769. {
  35770. return Dialog_Show(playerid, AddContact, DIALOG_STYLE_INPUT, "{FFFFFF}Add contact", "The contact name must be below 24 characters.\n\nPlease input the name of the contact to add below:", "Submit", "Cancel");
  35771. }
  35772. else
  35773. {
  35774. strcpy(gTargetName[playerid], inputtext, MAX_PLAYER_NAME);
  35775. Dialog_Show(playerid, ContactNumber, DIALOG_STYLE_INPUT, "{FFFFFF}Contact number", "Please input the number for the contact '%s':", "Submit", "Cancel", gTargetName[playerid]);
  35776. }
  35777. }
  35778. else
  35779. {
  35780. ListContacts(playerid);
  35781. }
  35782. return 1;
  35783. }
  35784. Dialog:ContactOptions(playerid, response, listitem, inputtext[])
  35785. {
  35786. if (response)
  35787. {
  35788. switch (listitem)
  35789. {
  35790. case 0:
  35791. {
  35792. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT Contact, Number FROM `rp_contacts` WHERE ID = %i", PlayerData[playerid][pSelected]);
  35793. mysql_tquery(connectionID, queryBuffer, "OnPlayerCallContact", "i", playerid);
  35794. }
  35795. case 1:
  35796. {
  35797. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT Contact, Number FROM `rp_contacts` WHERE ID = %i", PlayerData[playerid][pSelected]);
  35798. mysql_tquery(connectionID, queryBuffer, "OnPlayerTextContact", "i", playerid);
  35799. }
  35800. case 2:
  35801. {
  35802. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM `rp_contacts` WHERE ID = %i", PlayerData[playerid][pSelected]);
  35803. mysql_tquery(connectionID, queryBuffer);
  35804. ListContacts(playerid);
  35805. SendInfoMessage(playerid, "You have deleted the selected contact.");
  35806. }
  35807. }
  35808. }
  35809. else
  35810. {
  35811. ListContacts(playerid);
  35812. }
  35813. return 1;
  35814. }
  35815. Dialog:Contacts(playerid, response, listitem, inputtext[])
  35816. {
  35817. if (response)
  35818. {
  35819. if (listitem == 0)
  35820. {
  35821. Dialog_Show(playerid, AddContact, DIALOG_STYLE_INPUT, "{FFFFFF}Add contact", "Please input the name of the contact to add below:", "Submit", "Cancel");
  35822. }
  35823. else
  35824. {
  35825. PlayerData[playerid][pSelected] = gListedItems[playerid][--listitem];
  35826. Dialog_Show(playerid, ContactOptions, DIALOG_STYLE_LIST, "{FFFFFF}Contact options", "Call contact\nText Message\nDelete contact", "Select", "Cancel");
  35827. }
  35828. }
  35829. return 1;
  35830. }
  35831. Dialog:PhoneSettings(playerid, response, listitem, inputtext[])
  35832. {
  35833. if (response)
  35834. {
  35835. switch (listitem)
  35836. {
  35837. case 0:
  35838. {
  35839. if (PlayerData[playerid][pTogglePhone] == 0)
  35840. PlayerData[playerid][pTogglePhone] = 1;
  35841. else
  35842. PlayerData[playerid][pTogglePhone] = 0;
  35843. }
  35844. }
  35845. }
  35846. return 1;
  35847. }
  35848. Dialog:PhoneSMS(playerid, response, listitem, inputtext[])
  35849. {
  35850. new number;
  35851. if (response)
  35852. {
  35853. if (sscanf(inputtext, "i", number))
  35854. {
  35855. return Dialog_Show(playerid, PhoneSMS, DIALOG_STYLE_INPUT, "{6688FF}SMS Number", "Please specify the number you would like to SMS:", "Call", "Cancel");
  35856. }
  35857. else if (PlayerData[playerid][pPhone] == number)
  35858. {
  35859. return Dialog_Show(playerid, PhoneSMS, DIALOG_STYLE_INPUT, "{6688FF}SMS Number", "You can't text your own number.\n\nPlease specify the number you would like to SMS:", "Call", "Cancel");
  35860. }
  35861. else if (number < 1)
  35862. {
  35863. return Dialog_Show(playerid, PhoneSMS, DIALOG_STYLE_INPUT, "{6688FF}SMS Number", "Please specify the number you would like to SMS:", "Call", "Cancel");
  35864. }
  35865. else
  35866. {
  35867. new strHead[64];
  35868. format(strHead, sizeof(strHead), "{6688FF}SMS to %i", number);
  35869. PlayerData[playerid][pPhoneSMS] = number;
  35870. Dialog_Show(playerid, PhoneSMStext, DIALOG_STYLE_INPUT, strHead, "Please type your message:", "Send", "Cancel");
  35871. }
  35872. }
  35873. return 1;
  35874. }
  35875. Dialog:PhoneSMStext(playerid, response, listitem, inputtext[])
  35876. {
  35877. new text[512];
  35878. new number = PlayerData[playerid][pPhoneSMS];
  35879. new strHead[64];
  35880. if (response)
  35881. {
  35882. format(strHead, sizeof(strHead), "{6688FF}SMS to %i", number);
  35883. if (sscanf(inputtext, "s[512]", text))
  35884. {
  35885. Dialog_Show(playerid, PhoneSMStext, DIALOG_STYLE_INPUT, strHead, "Please type your message:", "Send", "Cancel");
  35886. }
  35887. else
  35888. {
  35889. SendTextMessage(playerid, number, text);
  35890. }
  35891. }
  35892. return 1;
  35893. }
  35894. Dialog:PhoneCall(playerid, response, listitem, inputtext[])
  35895. {
  35896. if (response)
  35897. {
  35898. new number;
  35899. if (sscanf(inputtext, "i", number))
  35900. {
  35901. return Dialog_Show(playerid, PhoneCall, DIALOG_STYLE_INPUT, "{6688FF}Call Number", "Please specify the number you would like to call:", "Call", "Cancel");
  35902. }
  35903. else if (PlayerData[playerid][pCalling] > 0)
  35904. {
  35905. return Dialog_Show(playerid, PhoneCall, DIALOG_STYLE_INPUT, "{6688FF}Call Number", "You are already on a call. Use {6688FF}/hangup{FFFFFF} to end it.\n\nPlease specify the number you would like to call:", "Call", "Cancel");
  35906. }
  35907. else if (PlayerData[playerid][pPhone] == number)
  35908. {
  35909. return Dialog_Show(playerid, PhoneCall, DIALOG_STYLE_INPUT, "{6688FF}Call Number", "You can't dial your own number.\n\nPlease specify the number you would like to call:", "Call", "Cancel");
  35910. }
  35911. else if (number < 1)
  35912. {
  35913. return Dialog_Show(playerid, PhoneCall, DIALOG_STYLE_INPUT, "{6688FF}Call Number", "You have entered an invalid phone number.\n\nPlease specify the number you would like to call:", "Call", "Cancel");
  35914. }
  35915. else
  35916. {
  35917. CallNumber(playerid, number);
  35918. }
  35919. }
  35920. return 1;
  35921. }
  35922. Dialog:PhoneCallPP(playerid, response, listitem, inputtext[])
  35923. {
  35924. if (response)
  35925. {
  35926. new number, payphone = GetClosestPayphone(playerid);
  35927. if (sscanf(inputtext, "i", number))
  35928. {
  35929. return Dialog_Show(playerid, PhoneCall, DIALOG_STYLE_INPUT, "{6688FF}Call Number", "Please specify the number you would like to call:", "Call", "Cancel");
  35930. }
  35931. else if (PlayerData[playerid][pCalling] > 0)
  35932. {
  35933. return Dialog_Show(playerid, PhoneCall, DIALOG_STYLE_INPUT, "{6688FF}Call Number", "You are already on a call. Use {6688FF}/hangup{FFFFFF} to end it.\n\nPlease specify the number you would like to call:", "Call", "Cancel");
  35934. }
  35935. else if (PlayerData[playerid][pPhone] == number)
  35936. {
  35937. return Dialog_Show(playerid, PhoneCall, DIALOG_STYLE_INPUT, "{6688FF}Call Number", "You can't dial your own number.\n\nPlease specify the number you would like to call:", "Call", "Cancel");
  35938. }
  35939. else if (number < 1)
  35940. {
  35941. return Dialog_Show(playerid, PhoneCall, DIALOG_STYLE_INPUT, "{6688FF}Call Number", "You have entered an invalid phone number.\n\nPlease specify the number you would like to call:", "Call", "Cancel");
  35942. }
  35943. else if (IsValidPayphoneID(payphone) && number == Payphones[payphone][phNumber])
  35944. {
  35945. return Dialog_Show(playerid, PhoneCall, DIALOG_STYLE_INPUT, "{6688FF}Call Number", "You can't call this number as it belongs to this payphone.\n\nPlease specify the number you would like to call:", "Call", "Cancel");
  35946. }
  35947. else if (IsValidPayphoneID(payphone) && (Payphones[payphone][phOccupied] || Payphones[payphone][phCaller] != INVALID_PLAYER_ID))
  35948. {
  35949. return Dialog_Show(playerid, PhoneCall, DIALOG_STYLE_INPUT, "{6688FF}Call Number", "This payphone is already in use.\n\nPlease specify the number you would like to call:", "Call", "Cancel");
  35950. }
  35951. else
  35952. {
  35953. CallNumber(playerid, number, payphone);
  35954. }
  35955. }
  35956. return 1;
  35957. }
  35958. Dialog:SearchCitizem(playerid, response, listitem, inputtext[]) {
  35959. if(response) {
  35960. mdc_SearchCitizen(playerid, inputtext);
  35961. } else {
  35962. SelectTextDraw(playerid, -1);
  35963. }
  35964. return 1;
  35965. }
  35966. Dialog:SearchPhoneNumber(playerid, response, listitem, inputtext[]) {
  35967. if(response) {
  35968. if(!IsNumeric(inputtext)) {
  35969. SendClientMessage(playerid, COLOR_GREY, "You have to enter a valid numeric phone number.");
  35970. Dialog_Show(playerid, SearchPhoneNumber, DIALOG_STYLE_INPUT, "{3D62A8}Search Phone Number", "Please enter the phone number below:", "Search", "Cancel");
  35971. } else {
  35972. new query[130];
  35973. mysql_format(connectionID, query, sizeof(query), "SELECT `username`, `skin`, `age`, `gender`, `carlicense`, `gunlicense`, `job` FROM `users` WHERE `phone` = %i;", strval(inputtext));
  35974. mysql_tquery(connectionID, query, "mdc_SearchPhoneNumber", "ii", playerid, strval(inputtext));
  35975. }
  35976. } else {
  35977. SelectTextDraw(playerid, -1);
  35978. }
  35979. return 1;
  35980. }
  35981. Dialog:DIALOG_MDC_SEARCH_SERIAL(playerid, response, listitem, inputtext[]) {
  35982. if(response) {
  35983. if(!IsNumeric(inputtext)) {
  35984. SendClientMessage(playerid, COLOR_GREY, "You have to enter a numeric weapon serial number.");
  35985. Dialog_Show(playerid, DIALOG_MDC_SEARCH_SERIAL, DIALOG_STYLE_INPUT, "{3D62A8}Search Weapon Serial", "Please enter the weapons serial number below:", "Search", "Cancel");
  35986. } else {
  35987. new query[140];
  35988. mysql_format(connectionID, query, sizeof(query), "SELECT `username`, `skin`, `age`, `sex`, `carlicense`, `gunlicense`, `job`, `phone` FROM `users` WHERE `WepSerial` = %d;", strval(inputtext));
  35989. mysql_tquery(connectionID, query, "mdc_SearchSerial", "i", playerid);
  35990. }
  35991. } else {
  35992. SelectTextDraw(playerid, -1);
  35993. }
  35994. return 1;
  35995. }
  35996. Dialog:DIALOG_MDC_SEARCH_PLATE(playerid, response, listitem, inputtext[]) {
  35997. if(response) {
  35998. new query[140];
  35999. mysql_format(connectionID, query, sizeof(query), "SELECT `modelid`, `color1`, `color2`, `owner` FROM `vehicles` WHERE `plate` = '%e';", inputtext);
  36000. mysql_tquery(connectionID, query, "mdc_SearchLicensePlate", "is", playerid, inputtext);
  36001. } else {
  36002. SelectTextDraw(playerid, -1);
  36003. }
  36004. return 1;
  36005. }
  36006. Dialog:DIALOG_RELEASECAR(playerid, response, listitem, inputtext[])
  36007. {
  36008. if (response)
  36009. {
  36010. new
  36011. carid = ListedVehicles[playerid][listitem];
  36012. if(IsValidVehicle(carid))
  36013. {
  36014. if(VehicleInfo[carid][carImpounded] == 1)
  36015. {
  36016. if (PlayerData[playerid][pCash] < VehicleInfo[carid][carImpoundPrice])
  36017. return SendErrorMessage(playerid, "You can't afford to release this vehicle.");
  36018. GivePlayerCash(playerid, -VehicleInfo[carid][carImpoundPrice]);
  36019. VehicleInfo[carid][vPosX] = 1182.026;
  36020. VehicleInfo[carid][vPosY] = -1794.379;
  36021. VehicleInfo[carid][vPosZ] = 13.103;
  36022. VehicleInfo[carid][vPosA] = 0.0;
  36023. SetVehiclePos(carid, VehicleInfo[carid][vPosX], VehicleInfo[carid][vPosY], VehicleInfo[carid][vPosZ]);
  36024. SetVehicleZAngle(carid, VehicleInfo[carid][vPosA]);
  36025. SendClientMessageEx(playerid, COLOR_GREY, "You have released your %s for %s.", vehicleNames[VehicleInfo[carid][vModel] - 400], FormatNumber(VehicleInfo[carid][carImpoundPrice]));
  36026. VehicleInfo[carid][carImpounded] = 0;
  36027. VehicleInfo[carid][carImpoundPrice] = 0;
  36028. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE `vehicles` SET `carimpounded` = 0 WHERE id = %i", VehicleInfo[carid][vID]);
  36029. mysql_tquery(connectionID, queryBuffer);
  36030. ReloadVehicle(carid);
  36031. }
  36032. }
  36033. }
  36034. return 1;
  36035. }
  36036. Dialog:DIALOG_HELPCMD(playerid, response, listitem, inputtext[])
  36037. {
  36038. if(response)
  36039. {
  36040. switch(listitem)
  36041. {
  36042. case 0:
  36043. {
  36044. SendClientMessage(playerid, COLOR_YELLOW, "Account: {C8C8C8}/stats, /buylevel, /b, /g, /me, /do, /(o)oc, /(s)hout, /(l)ow, /(w)hisper, /(n)ewbie.");
  36045. SendClientMessage(playerid, COLOR_YELLOW, "Account: {C8C8C8}/pay, /id, /time, /report, /upgrade, /charity, /stopmusic, /joinevent, /quitevent, /setspawn.");
  36046. SendClientMessage(playerid, COLOR_YELLOW, "General: {C8C8C8}/dice, /flipcoin, /accent, /helpers, /helpme, /accept, /activity, /skill, /quitjob.");
  36047. SendClientMessage(playerid, COLOR_YELLOW, "General: {C8C8C8}/give, /sell, /toggle, /cancelcp, /afk, /(ad)vertise, /buy, /refuel, /phone, /sms.");
  36048. SendClientMessage(playerid, COLOR_YELLOW, "General: {C8C8C8}/clothing, /locate, /frisk, /contract, /number, /boombox, /switchspeedo, /stuck.");
  36049. SendClientMessage(playerid, COLOR_YELLOW, "General: {C8C8C8}/shakehand, /dropgun, /grabgun, /usecookies, /usecigar, /usedrug, /showid.");
  36050. SendClientMessage(playerid, COLOR_YELLOW, "General: {C8C8C8}/(inv)entory, /guninv, /changename, /drop, /eject, /dicebet, /gangs, /factions.");
  36051. SendClientMessage(playerid, COLOR_YELLOW, "General: {C8C8C8}/calculate, /serverstats, /resetupgrades, /turfs, /lands, /watch, /gps, /fixvw.");
  36052. SendClientMessage(playerid, COLOR_YELLOW, "General: {C8C8C8}/myupgrades, /unmute, /breakin, /achievements, /buyinsurance, /tie, /untie.");
  36053. SendClientMessage(playerid, COLOR_YELLOW, "General: {C8C8C8}/househelp, /garagehelp, /bizhelp, /jobhelp, /animhelp, /vehiclehelp, /viphelp.");
  36054. SendClientMessage(playerid, COLOR_YELLOW, "General: {C8C8C8}/bankhelp, /factionhelp, /ganghelp, /landhelp, /helperhelp, /breakcuffs");
  36055. if(PlayerData[playerid][pBanAppealer])
  36056. {
  36057. SendClientMessage(playerid, COLOR_NAVYBLUE, "\n{FF6347}Ban Appealer Commands:{FFFFFF} /banip, /baninfo, /banhistory, /unbanip, /unban.");
  36058. }
  36059. if(PlayerData[playerid][pDeveloper])
  36060. {
  36061. SendClientMessage(playerid, COLOR_NAVYBLUE, "\n{FF6347}Developer Commands:{FFFFFF} /changelist, /gmx, /renamecmd, /createalias");
  36062. }
  36063. if(PlayerData[playerid][pDynamicAdmin])
  36064. {
  36065. SendClientMessage(playerid, COLOR_NAVYBLUE, "\n{FF6347}Dynamic Admin Commands:{FFFFFF} /dynamichelp, /setvip, /setstat.");
  36066. }
  36067. if(PlayerData[playerid][pAdminPersonnel])
  36068. {
  36069. SendClientMessage(playerid, COLOR_NAVYBLUE, "\n{FF6347}Admin Personnel Commands:{FFFFFF} /setstaff, /oadmins, /makeadmin, /makeformeradmin, /forceaduty.");
  36070. }
  36071. if(PlayerData[playerid][pHumanResources])
  36072. {
  36073. SendClientMessage(playerid, COLOR_NAVYBLUE, "\n{FF6347}Human Resources Commands:{FFFFFF} /banhistory, /oadmins, /ocheck.");
  36074. }
  36075. if(PlayerData[playerid][pAdmin] > 0)
  36076. {
  36077. SendClientMessage(playerid, COLOR_NAVYBLUE, "\n{FF6347}Administrative Commands:{FFFFFF} /a, /adminhelp.");
  36078. }
  36079. }
  36080. case 1:
  36081. {
  36082. switch(PlayerData[playerid][pJob])
  36083. {
  36084. //case JOB_NONE: SendClientMessage(playerid, COLOR_GREY, "You have no job and therefore no job commands to view.");
  36085. case JOB_PIZZAMAN: SendClientMessage(playerid, COLOR_GREY, "* JOB * /getpizza, /cancelcp.");
  36086. case JOB_COURIER: SendClientMessage(playerid, COLOR_GREY, "* JOB * /load, /deliver, /cancelcp.");
  36087. case JOB_FISHERMAN: SendClientMessage(playerid, COLOR_GREY, "* JOB * /fish, /myfish, /sellfish.");
  36088. case JOB_BODYGUARD: SendClientMessage(playerid, COLOR_GREY, "* JOB * /sellvest, /frisk.");
  36089. case JOB_WEAPONDEALER: SendClientMessage(playerid, COLOR_GREY, "* JOB * /smugglemats, /sellgun.");
  36090. case JOB_MECHANIC: SendClientMessage(playerid, COLOR_GREY, "* JOB * /buycomps, /repair, /refill, /nos, /hyd, /takecall.");
  36091. case JOB_MINER: SendClientMessage(playerid, COLOR_GREY, "* JOB * /mine, /cancelcp.");
  36092. case JOB_SWEEPER: SendClientMessage(playerid, COLOR_GREY, "* JOB * /startsweeping, /stopsweeping.");
  36093. case JOB_TAXIDRIVER: SendClientMessage(playerid, COLOR_GREY, "* JOB * /setfare, /takecall.");
  36094. case JOB_DRUGDEALER: SendClientMessage(playerid, COLOR_GREY, "* JOB * /buydrug, /planthelp, /cookmeth, /smuggledrugs.");
  36095. case JOB_LAWYER: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /defend, /free, /wanted.");
  36096. case JOB_DETECTIVE: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /find.");
  36097. case JOB_GARBAGEMAN: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /garbage");
  36098. case JOB_FARMER: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /harvest");
  36099. }
  36100. if(PlayerData[playerid][pSecondJob] != JOB_NONE)
  36101. {
  36102. switch(PlayerData[playerid][pSecondJob])
  36103. {
  36104. //case JOB_NONE: SendClientMessage(playerid, COLOR_GREY, "You have no job and therefore no job commands to view.");
  36105. case JOB_PIZZAMAN: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /getpizza.");
  36106. case JOB_COURIER: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /load, /deliver.");
  36107. case JOB_FISHERMAN: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /fish, /myfish, /sellfish.");
  36108. case JOB_BODYGUARD: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /sellvest, /frisk.");
  36109. case JOB_WEAPONDEALER: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /smugglemats, /sellgun.");
  36110. case JOB_MECHANIC: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /buycomps, /repair, /refill, /nos, /hyd.");
  36111. case JOB_MINER: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /mine.");
  36112. case JOB_SWEEPER: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /startsweeping, /stopsweeping.");
  36113. case JOB_TAXIDRIVER: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /setfare.");
  36114. case JOB_DRUGDEALER: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /buydrug, /planthelp, /cookmeth, /smuggledrugs.");
  36115. case JOB_LAWYER: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /defend, /free, /wanted.");
  36116. case JOB_DETECTIVE: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /find.");
  36117. case JOB_GARBAGEMAN: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /garbage");
  36118. }
  36119. }
  36120. }
  36121. case 2:
  36122. {
  36123. if(PlayerData[playerid][pGang] == -1)
  36124. {
  36125. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a gang member.");
  36126. }
  36127. SendClientMessage(playerid, COLOR_GREEN, "_______________________________________");
  36128. SendClientMessage(playerid, COLOR_WHITE, "** GANG HELP ** type a command for more information.");
  36129. SendClientMessage(playerid, COLOR_GREY, "** GANG ** /f /gang /gstash /gbackup /bandana /capture /claim /reclaim /turfinfo /points");
  36130. SendClientMessage(playerid, COLOR_GREY, "** GANG ** /gbuyvehicle /gpark /gfindcar /grespawncars /gsellcar /gunmod /lock, /endalliance, /gspray");
  36131. SendClientMessage(playerid, COLOR_GREY, "** CREW ** /managecrew /crew");
  36132. }
  36133. case 3:
  36134. {
  36135. if(PlayerData[playerid][pFaction] == -1)
  36136. {
  36137. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not apart of any faction.");
  36138. }
  36139. SendClientMessage(playerid, COLOR_GREEN, "_______________________________________");
  36140. SendClientMessage(playerid, COLOR_WHITE, "** FACTION HELP ** type a command for more information.");
  36141. SendClientMessage(playerid, COLOR_GREY, "** FACTION ** /fc /d /(r)adio /div /faction /division /locker /showbadge /(m)egaphone");
  36142. switch(FactionInfo[PlayerData[playerid][pFaction]][fType])
  36143. {
  36144. case FACTION_POLICE, FACTION_FEDERAL, FACTION_ARMY:
  36145. {
  36146. SendClientMessage(playerid, COLOR_GREY, "** FACTION ** /gate /door /cell /tazer /cuff /uncuff /drag /detain /charge /arrest");
  36147. SendClientMessage(playerid, COLOR_GREY, "** FACTION ** /wanted /frisk /take /ticket /gov /ram /deploy /undeploy /undeployall /backup");
  36148. SendClientMessage(playerid, COLOR_GREY, "** FACTION ** /mdc /clearwanted /siren /badge /vticket /vfrisk /vtake /seizeplant /mir /fpark");
  36149. if(FactionInfo[PlayerData[playerid][pFaction]][fType] == FACTION_FEDERAL)
  36150. SendClientMessage(playerid, COLOR_GREY, "** FACTION ** /listcallers /trackcall /cells /passport /callsign /bug /listbugs /tog bugged");
  36151. else
  36152. SendClientMessage(playerid, COLOR_GREY, "** FACTION ** /listcallers /trackcall /cells /claim /callsign /fpark");
  36153. }
  36154. case FACTION_MEDIC:
  36155. {
  36156. SendClientMessage(playerid, COLOR_GREY, "** FACTION ** /heal /drag /stretcher /deliverpt /getpt /listpt /injuries /deploy /undeploy /undeployall");
  36157. SendClientMessage(playerid, COLOR_GREY, "** FACTION ** /badge /gov /backup /listcallers /trackcall /callsign /fpark");
  36158. }
  36159. case FACTION_NEWS:
  36160. {
  36161. SendClientMessage(playerid, COLOR_GREY, "** FACTION ** /news /live /endlive /liveban /badge /addeposit /adwithdraw /fpark");
  36162. }
  36163. case FACTION_GOVERNMENT:
  36164. {
  36165. SendClientMessage(playerid, COLOR_GREY, "** FACTION ** /gov /settax /factionpay /tazer /cuff /uncuff /detain /taxdeposit /taxwithdraw /fpark");
  36166. SendClientMessage(playerid, COLOR_GREY, "** FACTION ** /backup /badge");
  36167. }
  36168. case FACTION_HITMAN:
  36169. {
  36170. SendClientMessage(playerid, COLOR_GREY, "** FACTION ** /contracts /takehit /profile /passport /plantbomb /pickupbomb /detonate");
  36171. SendClientMessage(playerid, COLOR_GREY, "** FACTION ** /hfind, /noknife, /hm /fpark");
  36172. }
  36173. }
  36174. }
  36175. case 4:
  36176. {
  36177. if(!PlayerData[playerid][pDonator])
  36178. {
  36179. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you don't have a VIP subscription.");
  36180. }
  36181. SendClientMessage(playerid, COLOR_NAVYBLUE, "__________________ VIP Help __________________");
  36182. SendClientMessage(playerid, COLOR_WHITE, "** VIP HELP ** type a command for more information.");
  36183. SendClientMessage(playerid, COLOR_GREY, "** VIP ** /(v)ip /vipinfo /vipcolor /vipinvite /vipnumber /vipmusic");
  36184. if(PlayerData[playerid][pDonator] == 3)
  36185. {
  36186. SendClientMessage(playerid, COLOR_GREY, "** VIP ** /repair /nos /hyd /viprimkit");
  36187. }
  36188. }
  36189. case 5:
  36190. {
  36191. SendClientMessage(playerid, COLOR_WHITE, "** HOUSE HELP ** type a command for more information.");
  36192. SendClientMessage(playerid, COLOR_GREY, "** HOUSE ** /buyhouse /lock /stash /furniture /upgradehouse /sellhouse /sellmyhouse");
  36193. SendClientMessage(playerid, COLOR_GREY, "** HOUSE ** /door /renthouse /unrent /setrent /tenants /evict /evictall /houseinfo");
  36194. SendClientMessage(playerid, COLOR_GREY, "** HOUSE ** /houseinvite /hlights /installhousealarm (/iha), /uninstallhousealarm (/uha)");
  36195. }
  36196. case 6:
  36197. {
  36198. SendClientMessage(playerid, COLOR_WHITE, "** VEHICLE HELP ** type a command for more information.");
  36199. SendClientMessage(playerid, COLOR_GREY, "** VEHICLE ** /lights /hood /boot /buy /carstorage /park /lock /findcar");
  36200. SendClientMessage(playerid, COLOR_GREY, "** VEHICLE ** /vstash /neon /unmod /colorcar /paintcar /upgradevehicle /sellcar /sellmycar");
  36201. SendClientMessage(playerid, COLOR_GREY, "** VEHICLE ** /givekeys /takekeys /setradio /paytickets /carinfo /gascan /breakin");
  36202. }
  36203. case 7:
  36204. {
  36205. SendClientMessage(playerid, COLOR_WHITE, "** BUSINESS HELP ** type a command for more information.");
  36206. SendClientMessage(playerid, COLOR_GREY, "** BUSINESS ** /buybiz /lock /bwithdraw /bdeposit /entryfee /sellbiz /sellmybiz /bizinfo");
  36207. SendClientMessage(playerid, COLOR_GREY, "** BUSINESS ** /bdepositmats /bwithdrawmats");
  36208. }
  36209. case 8:
  36210. {
  36211. callcmd::hh(playerid, inputtext);
  36212. }
  36213. case 9:
  36214. {
  36215. callcmd::adminhelp(playerid, inputtext);
  36216. }
  36217. }
  36218. }
  36219. return 1;
  36220. }
  36221. Dialog:DIALOG_NEWUPGRADEONE(playerid, response, listitem, inputtext[])
  36222. {
  36223. if(response)
  36224. {
  36225. if(PlayerData[playerid][pUpgradePoints] < 1)
  36226. {
  36227. return SendClientMessage(playerid, COLOR_GREY, "You have no upgrade points available which you can spend.");
  36228. }
  36229. switch(listitem)
  36230. {
  36231. case 0:
  36232. {
  36233. if(PlayerData[playerid][pInventoryUpgrade] >= 5)
  36234. {
  36235. return SendClientMessage(playerid, COLOR_GREY, "Your inventory skill is already upgraded to its maximum level of 5.");
  36236. }
  36237. PlayerData[playerid][pInventoryUpgrade]++;
  36238. PlayerData[playerid][pUpgradePoints]--;
  36239. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET inventoryupgrade = %i, upgradepoints = %i WHERE uid = %i", PlayerData[playerid][pInventoryUpgrade], PlayerData[playerid][pUpgradePoints], PlayerData[playerid][pID]);
  36240. mysql_tquery(connectionID, queryBuffer);
  36241. SendClientMessageEx(playerid, COLOR_GREEN, "You upgraded your inventory skill to %i/5. Your inventory capacity was increased.", PlayerData[playerid][pInventoryUpgrade]);
  36242. }
  36243. case 1:
  36244. {
  36245. if(PlayerData[playerid][pAddictUpgrade] >= 3)
  36246. {
  36247. return SendClientMessage(playerid, COLOR_GREY, "Your addict skill is already upgraded to its maximum level of 3.");
  36248. }
  36249. PlayerData[playerid][pAddictUpgrade]++;
  36250. PlayerData[playerid][pUpgradePoints]--;
  36251. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET addictupgrade = %i, upgradepoints = %i WHERE uid = %i", PlayerData[playerid][pAddictUpgrade], PlayerData[playerid][pUpgradePoints], PlayerData[playerid][pID]);
  36252. mysql_tquery(connectionID, queryBuffer);
  36253. SendClientMessageEx(playerid, COLOR_GREEN, "You upgraded your addict skill to level %i/3. You now gain %.1f more health & armor when using drugs.", PlayerData[playerid][pAddictUpgrade], PlayerData[playerid][pAddictUpgrade] * 5.0);
  36254. }
  36255. case 2:
  36256. {
  36257. if(PlayerData[playerid][pTraderUpgrade] >= 3)
  36258. {
  36259. return SendClientMessage(playerid, COLOR_GREY, "Your trader skill is already upgraded to its maximum level of 3.");
  36260. }
  36261. PlayerData[playerid][pTraderUpgrade]++;
  36262. PlayerData[playerid][pUpgradePoints]--;
  36263. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET traderupgrade = %i, upgradepoints = %i WHERE uid = %i", PlayerData[playerid][pTraderUpgrade], PlayerData[playerid][pUpgradePoints], PlayerData[playerid][pID]);
  36264. mysql_tquery(connectionID, queryBuffer);
  36265. SendClientMessageEx(playerid, COLOR_GREEN, "You upgraded your trader skill to level %i/3. You now pay %i percent less for items in shops.", PlayerData[playerid][pTraderUpgrade], PlayerData[playerid][pTraderUpgrade] * 10);
  36266. }
  36267. case 3:
  36268. {
  36269. if(PlayerData[playerid][pAssetUpgrade] >= 4)
  36270. {
  36271. return SendClientMessage(playerid, COLOR_GREY, "Your asset skill is already upgraded to its maximum level of 4.");
  36272. }
  36273. PlayerData[playerid][pAssetUpgrade]++;
  36274. PlayerData[playerid][pUpgradePoints]--;
  36275. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET assetupgrade = %i, upgradepoints = %i WHERE uid = %i", PlayerData[playerid][pAssetUpgrade], PlayerData[playerid][pUpgradePoints], PlayerData[playerid][pID]);
  36276. mysql_tquery(connectionID, queryBuffer);
  36277. SendClientMessageEx(playerid, COLOR_GREEN, "You upgraded your asset skill to level %i/4. You can now own %i/%i houses and garages and %i/%i businesses and vehicles.", PlayerData[playerid][pAssetUpgrade], GetPlayerAssetLimit(playerid, LIMIT_HOUSES), GetPlayerAssetLimit(playerid, LIMIT_GARAGES), GetPlayerAssetLimit(playerid, LIMIT_BUSINESSES), GetPlayerAssetLimit(playerid, LIMIT_VEHICLES));
  36278. }
  36279. case 4:
  36280. {
  36281. if(PlayerData[playerid][pLaborUpgrade] >= 5)
  36282. {
  36283. return SendClientMessage(playerid, COLOR_GREY, "Your labor skill is already upgraded to its maximum level of 5.");
  36284. }
  36285. PlayerData[playerid][pLaborUpgrade]++;
  36286. PlayerData[playerid][pUpgradePoints]--;
  36287. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET laborupgrade = %i, upgradepoints = %i WHERE uid = %i", PlayerData[playerid][pLaborUpgrade], PlayerData[playerid][pUpgradePoints], PlayerData[playerid][pID]);
  36288. mysql_tquery(connectionID, queryBuffer);
  36289. SendClientMessageEx(playerid, COLOR_GREEN, "You upgraded your labor skill to level %i/5. You now earn %i percent more extra cash when you work.", PlayerData[playerid][pLaborUpgrade], PlayerData[playerid][pLaborUpgrade] * 2);
  36290. }
  36291. case 5:
  36292. {
  36293. if(PlayerData[playerid][pSpawnHealth] >= 100)
  36294. {
  36295. return SendClientMessage(playerid, COLOR_GREY, "Your spawn health is at maximum (100).");
  36296. }
  36297. PlayerData[playerid][pSpawnHealth] += 5.0;
  36298. PlayerData[playerid][pUpgradePoints]--;
  36299. SendClientMessageEx(playerid, COLOR_GREEN, "You have upgraded your spawn health. You will now spawn with %.1f health after death.", PlayerData[playerid][pSpawnHealth]);
  36300. }
  36301. case 6:
  36302. {
  36303. if(PlayerData[playerid][pSpawnArmor] > 100 && PlayerData[playerid][pDonator] == 0)
  36304. {
  36305. return SendClientMessage(playerid, COLOR_GREY, "Your spawn armor is at maximum (100).");
  36306. }
  36307. else if(PlayerData[playerid][pSpawnArmor] > 125 && PlayerData[playerid][pDonator] <= 2)
  36308. {
  36309. return SendClientMessage(playerid, COLOR_GREY, "Your spawn armor is at maximum (125).");
  36310. }
  36311. else if(PlayerData[playerid][pSpawnArmor] > 150 && PlayerData[playerid][pDonator] == 3)
  36312. {
  36313. return SendClientMessage(playerid, COLOR_GREY, "Your spawn armor is at maximum (150).");
  36314. }
  36315. PlayerData[playerid][pSpawnArmor] += 2.0;
  36316. PlayerData[playerid][pUpgradePoints]--;
  36317. SendClientMessageEx(playerid, COLOR_GREEN, "You have upgraded your spawn armor. You will now spawn with %.1f armor after death.", PlayerData[playerid][pSpawnArmor]);
  36318. }
  36319. }
  36320. if(PlayerData[playerid][pInventoryUpgrade] == 5 || PlayerData[playerid][pAddictUpgrade] == 3 || PlayerData[playerid][pTraderUpgrade] == 3 || PlayerData[playerid][pAssetUpgrade] == 4 || PlayerData[playerid][pLaborUpgrade] == 5 || PlayerData[playerid][pSpawnHealth] == 100 || PlayerData[playerid][pSpawnArmor] == 100)
  36321. {
  36322. AwardAchievement(playerid, "Benefits");
  36323. }
  36324. }
  36325. return 1;
  36326. }
  36327. Dialog:DIALOG_SHOW_TRUCKJOBS(playerid, response, listitem, inputtext[])
  36328. {
  36329. if(response)
  36330. {
  36331. /* LEGAL TRUCK JOBS */
  36332. if(listitem == 0)
  36333. {
  36334. PlayerTruckJob[playerid][pTDActive] = 1;
  36335. PlayerTruckJob[playerid][pTDLegal] = 1;
  36336. PlayerTruckJob[playerid][pTDJobID] = PlayerData[playerid][pLegalTruckJob1];
  36337. PlayerTruckJob[playerid][pTDDestDepot] = LegalTruckJobInfo[PlayerTruckJob[playerid][pTDJobID]][pTJDestDepot];
  36338. SetTimerEx("LoadTruckJob", 10000, 0, "ii", playerid, PlayerTruckJob[playerid][pTDLegal]);
  36339. GameTextForPlayer(playerid, "~w~Loading Trailer, please wait...",10000,3);
  36340. TogglePlayerControllable(playerid, 0);
  36341. }
  36342. if(listitem == 1)
  36343. {
  36344. PlayerTruckJob[playerid][pTDActive] = 1;
  36345. PlayerTruckJob[playerid][pTDLegal] = 1;
  36346. PlayerTruckJob[playerid][pTDJobID] = PlayerData[playerid][pLegalTruckJob2];
  36347. PlayerTruckJob[playerid][pTDDestDepot] = LegalTruckJobInfo[PlayerTruckJob[playerid][pTDJobID]][pTJDestDepot];
  36348. SetTimerEx("LoadTruckJob", 10000, 0, "ii", playerid, PlayerTruckJob[playerid][pTDLegal]);
  36349. GameTextForPlayer(playerid, "~w~Loading Trailer, please wait...",10000,3);
  36350. TogglePlayerControllable(playerid, 0);
  36351. }
  36352. if(listitem == 2)
  36353. {
  36354. PlayerTruckJob[playerid][pTDActive] = 1;
  36355. PlayerTruckJob[playerid][pTDLegal] = 1;
  36356. PlayerTruckJob[playerid][pTDJobID] = PlayerData[playerid][pLegalTruckJob3];
  36357. PlayerTruckJob[playerid][pTDDestDepot] = LegalTruckJobInfo[PlayerTruckJob[playerid][pTDJobID]][pTJDestDepot];
  36358. SetTimerEx("LoadTruckJob", 10000, 0, "ii", playerid, PlayerTruckJob[playerid][pTDLegal]);
  36359. GameTextForPlayer(playerid, "~w~Loading Trailer, please wait...",10000,3);
  36360. TogglePlayerControllable(playerid, 0);
  36361. }
  36362. /* Illegal Truck Jobs */
  36363. if(listitem == 3)
  36364. {
  36365. PlayerTruckJob[playerid][pTDActive] = 1;
  36366. PlayerTruckJob[playerid][pTDLegal] = 0;
  36367. PlayerTruckJob[playerid][pTDJobID] = PlayerData[playerid][pIllegalTruckJob1];
  36368. PlayerTruckJob[playerid][pTDDestDepot] = IllegalTruckJobInfo[PlayerTruckJob[playerid][pTDJobID]][pTJDestDepot];
  36369. SetTimerEx("LoadTruckJob", 10000, 0, "ii", playerid, PlayerTruckJob[playerid][pTDLegal]);
  36370. GameTextForPlayer(playerid, "~w~Loading Trailer, please wait...",10000,3);
  36371. TogglePlayerControllable(playerid, 0);
  36372. }
  36373. if(listitem == 4)
  36374. {
  36375. PlayerTruckJob[playerid][pTDActive] = 1;
  36376. PlayerTruckJob[playerid][pTDLegal] = 0;
  36377. PlayerTruckJob[playerid][pTDJobID] = PlayerData[playerid][pIllegalTruckJob2];
  36378. PlayerTruckJob[playerid][pTDDestDepot] = IllegalTruckJobInfo[PlayerTruckJob[playerid][pTDJobID]][pTJDestDepot];
  36379. SetTimerEx("LoadTruckJob", 10000, 0, "ii", playerid, PlayerTruckJob[playerid][pTDLegal]);
  36380. GameTextForPlayer(playerid, "~w~Loading Trailer, please wait...",10000,3);
  36381. TogglePlayerControllable(playerid, 0);
  36382. }
  36383. if(listitem == 5)
  36384. {
  36385. PlayerTruckJob[playerid][pTDActive] = 1;
  36386. PlayerTruckJob[playerid][pTDLegal] = 0;
  36387. PlayerTruckJob[playerid][pTDJobID] = PlayerData[playerid][pIllegalTruckJob3];
  36388. PlayerTruckJob[playerid][pTDDestDepot] = IllegalTruckJobInfo[PlayerTruckJob[playerid][pTDJobID]][pTJDestDepot];
  36389. SetTimerEx("LoadTruckJob", 10000, 0, "ii", playerid, PlayerTruckJob[playerid][pTDLegal]);
  36390. GameTextForPlayer(playerid, "~w~Loading Trailer, please wait...",10000,3);
  36391. TogglePlayerControllable(playerid, 0);
  36392. }
  36393. }
  36394. return 1;
  36395. }
  36396. Dialog:DIALOG_PCP(playerid, response, listitem, inputtext[])
  36397. {
  36398. if(response)
  36399. {
  36400. new params[158], string[200];
  36401. if(listitem == 0)
  36402. {
  36403. format(string,sizeof(string),"Please enter the reason why you wish to report this player:");
  36404. Dialog_Show(playerid, DIALOG_PCP_REPORT, DIALOG_STYLE_INPUT, "{33CCFF}Player Control Panel :: Reporting", string, "Report", "Cancel");
  36405. }
  36406. if(listitem == 1)
  36407. {
  36408. Dialog_Show(playerid, DIALOG_PM, DIALOG_STYLE_INPUT, "Private Message", "Input your private message text:", "Send", "Cancel");
  36409. }
  36410. if(listitem == 2)
  36411. {
  36412. format(string,sizeof(string),"Please enter the reason why you wish to kick this player:");
  36413. Dialog_Show(playerid, DIALOG_PCP_KICK, DIALOG_STYLE_INPUT, "{33CCFF}Player Control Panel :: Kicking", string, "Kick", "Cancel");
  36414. }
  36415. if(listitem == 3)
  36416. {
  36417. format(string,sizeof(string),"Please enter the time to ban this player for:");
  36418. Dialog_Show(playerid, DIALOG_PCP_BAN1, DIALOG_STYLE_INPUT, "{33CCFF}Player Control Panel :: Banning", string, "Continue", "Cancel");
  36419. }
  36420. if(listitem == 4)
  36421. {
  36422. format(params, sizeof(params), "%i", GetPVarInt(playerid, "pClickedID"));
  36423. DeletePVar(playerid, "pClickedID");
  36424. return callcmd::spec(playerid, params);
  36425. }
  36426. if(listitem == 5)
  36427. {
  36428. format(params, sizeof(params), "%i", GetPVarInt(playerid, "pClickedID"));
  36429. DeletePVar(playerid, "pClickedID");
  36430. return callcmd::gethere(playerid, params);
  36431. }
  36432. if(listitem == 6)
  36433. {
  36434. format(params, sizeof(params), "%i", GetPVarInt(playerid, "pClickedID"));
  36435. DeletePVar(playerid, "pClickedID");
  36436. return callcmd::goto(playerid, params);
  36437. }
  36438. if(listitem == 7)
  36439. {
  36440. format(params, sizeof(params), "%i", GetPVarInt(playerid, "pClickedID"));
  36441. DeletePVar(playerid, "pClickedID");
  36442. return callcmd::nmute(playerid, params);
  36443. }
  36444. if(listitem == 8)
  36445. {
  36446. format(params, sizeof(params), "%i", GetPVarInt(playerid, "pClickedID"));
  36447. DeletePVar(playerid, "pClickedID");
  36448. return callcmd::freeze(playerid, params);
  36449. }
  36450. if(listitem == 9)
  36451. {
  36452. format(params, sizeof(params), "%i", GetPVarInt(playerid, "pClickedID"));
  36453. DeletePVar(playerid, "pClickedID");
  36454. return callcmd::unfreeze(playerid, params);
  36455. }
  36456. if(listitem == 10)
  36457. {
  36458. format(params, sizeof(params), "%i", GetPVarInt(playerid, "pClickedID"));
  36459. DeletePVar(playerid, "pClickedID");
  36460. return callcmd::slap(playerid, params);
  36461. }
  36462. if(listitem == 11)
  36463. {
  36464. format(params, sizeof(params), "%i", GetPVarInt(playerid, "pClickedID"));
  36465. DeletePVar(playerid, "pClickedID");
  36466. return callcmd::revive(playerid, params);
  36467. }
  36468. if(listitem == 12)
  36469. {
  36470. format(params, sizeof(params), "%i", GetPVarInt(playerid, "pClickedID"));
  36471. DeletePVar(playerid, "pClickedID");
  36472. return callcmd::check(playerid, params);
  36473. }
  36474. if(listitem == 13)
  36475. {
  36476. format(params, sizeof(params), "%i", GetPVarInt(playerid, "pClickedID"));
  36477. DeletePVar(playerid, "pClickedID");
  36478. return callcmd::nrn(playerid, params);
  36479. }
  36480. if(listitem == 14)
  36481. {
  36482. format(params, sizeof(params), "%i", GetPVarInt(playerid, "pClickedID"));
  36483. DeletePVar(playerid, "pClickedID");
  36484. return callcmd::showrules(playerid, params);
  36485. }
  36486. if(listitem == 15)
  36487. {
  36488. format(params, sizeof(params), "%i", GetPVarInt(playerid, "pClickedID"));
  36489. DeletePVar(playerid, "pClickedID");
  36490. return callcmd::listguns(playerid, params);
  36491. }
  36492. if(listitem == 16)
  36493. {
  36494. format(params, sizeof(params), "%i", GetPVarInt(playerid, "pClickedID"));
  36495. DeletePVar(playerid, "pClickedID");
  36496. return callcmd::listpvehs(playerid, params);
  36497. }
  36498. if(listitem == 17) { DeletePVar(playerid, "pClickedID"); return 1; }
  36499. }
  36500. else
  36501. {
  36502. DeletePVar(playerid, "pClickedID");
  36503. return 1;
  36504. }
  36505. return 1;
  36506. }
  36507. Dialog:DIALOG_PM(playerid, response, listitem, inputtext[])
  36508. {
  36509. if(response)
  36510. {
  36511. if(!IsPlayerConnected(GetPVarInt(playerid, "pClickedID")))
  36512. {
  36513. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  36514. }
  36515. if(PlayerData[playerid][pHours] < 3)
  36516. {
  36517. return SendClientMessage(playerid, COLOR_GREY, "You need to play at least 3 hours+ to use this command");
  36518. }
  36519. if(PlayerData[GetPVarInt(playerid, "pClickedID")][pTogglePM])
  36520. {
  36521. return SendClientMessage(playerid, COLOR_GREY, "That player has disabled incoming private messages.");
  36522. }
  36523. if(GetPVarInt(playerid, "pClickedID") == playerid)
  36524. {
  36525. return SendClientMessage(playerid, COLOR_GREY, "You can't pm yourself");
  36526. }
  36527. SendClientMessageEx(GetPVarInt(playerid, "pClickedID"), COLOR_GREEN, "(( PM from %s: %s ))", GetRPName(playerid), inputtext);
  36528. SendClientMessageEx(GetPVarInt(playerid, "pClickedID"), COLOR_GREEN, "(( PM to %s: %s ))", GetRPName(GetPVarInt(playerid, "pClickedID")), inputtext);
  36529. if(PlayerData[GetPVarInt(playerid, "pClickedID")][pWhisperFrom] == INVALID_PLAYER_ID)
  36530. {
  36531. SendClientMessage(GetPVarInt(playerid, "pClickedID"), COLOR_WHITE, "* You can use '/rpm [message]' to reply to this private message.");
  36532. }
  36533. PlayerData[GetPVarInt(playerid, "pClickedID")][pWhisperFrom] = playerid;
  36534. }
  36535. return 1;
  36536. }
  36537. Dialog:DIALOG_PCP_REPORT(playerid, response, listitem, inputtext[])
  36538. {
  36539. if(response)
  36540. {
  36541. new params[158];
  36542. format(params, sizeof(params), "%i %s", GetPVarInt(playerid, "pClickedID"), inputtext);
  36543. DeletePVar(playerid, "pClickedID");
  36544. return callcmd::report(playerid, params);
  36545. }
  36546. else
  36547. {
  36548. DeletePVar(playerid, "pClickedID");
  36549. return 1;
  36550. }
  36551. }
  36552. Dialog:DIALOG_PCP_KICK(playerid, response, listitem, inputtext[])
  36553. {
  36554. if(response)
  36555. {
  36556. new params[158];
  36557. format(params, sizeof(params), "%i %s", GetPVarInt(playerid, "pClickedID"), inputtext);
  36558. DeletePVar(playerid, "pClickedID");
  36559. return callcmd::kick(playerid, params);
  36560. }
  36561. else
  36562. {
  36563. DeletePVar(playerid, "pClickedID");
  36564. return 1;
  36565. }
  36566. }
  36567. Dialog:DIALOG_PCP_BAN1(playerid, response, listitem, inputtext[])
  36568. {
  36569. if(response)
  36570. {
  36571. new string[128];
  36572. SetPVarInt(playerid, "pBanTime", strval(inputtext));
  36573. format(string,sizeof(string),"Please enter the reason why you wish to ban this player:");
  36574. Dialog_Show(playerid, DIALOG_PCP_BAN2, DIALOG_STYLE_INPUT, "{33CCFF}Player Control Panel :: Banning", string, "Ban", "Cancel");
  36575. }
  36576. else
  36577. {
  36578. DeletePVar(playerid, "pClickedID");
  36579. DeletePVar(playerid, "pBanTime");
  36580. }
  36581. return 1;
  36582. }
  36583. Dialog:DIALOG_PCP_BAN2(playerid, response, listitem, inputtext[])
  36584. {
  36585. if(response)
  36586. {
  36587. new params[158];
  36588. format(params, sizeof(params), "%i %i %s", GetPVarInt(playerid, "pClickedID"), GetPVarInt(playerid, "pBanTime"), inputtext);
  36589. DeletePVar(playerid, "pClickedID");
  36590. DeletePVar(playerid, "pBanTime");
  36591. return callcmd::ban(playerid, params);
  36592. }
  36593. else
  36594. {
  36595. DeletePVar(playerid, "pClickedID");
  36596. DeletePVar(playerid, "pBanTime");
  36597. return 1;
  36598. }
  36599. }
  36600. Dialog:DIALOG_SHOW_TUTORIAL(playerid, response, listitem, inputtext[])
  36601. {
  36602. if(response || !response)
  36603. {
  36604. if(InsideTut[playerid] < 1)
  36605. {
  36606. return 1;
  36607. }
  36608. switch(TutStep[playerid])
  36609. {
  36610. case 1:
  36611. {
  36612. new str[1024];
  36613. ClearChatbox(playerid);
  36614. TutStep[playerid] = 2;
  36615. InterpolateCameraPos(playerid, 3022.353027, -640.721740, 193.414672, 1227.661254, -1835.082397, 25.913717, 12000);
  36616. InterpolateCameraLookAt(playerid, 3019.046142, -644.348388, 192.459640, 1226.208251, -1830.758422, 23.866357, 12000);
  36617. SetPlayerPos(playerid, 1223.7166,-1851.4952,8.3894);
  36618. strcat(str, "{FFFFFF}You're about to see our Department of Motor Vehicles. This is where you'll obtain your drivers license.\n");
  36619. strcat(str, "While you may drive without a license, it is recommended that you obtain one, else LSPD will be after you!\n");
  36620. strcat(str, "Once you've obtained your drivers license, it's time to get a job! We have many great jobs to offer.\n");
  36621. strcat(str, "If you're looking for a decent starting job, try out our courier job, garbage man job, or miner job!\n");
  36622. strcat(str, "{FF8000}Press next to continue.");
  36623. Dialog_Show(playerid, DIALOG_SHOW_TUTORIAL, DIALOG_STYLE_MSGBOX, "{33CCFF}Tutorial - Driver License", str, "Next", "");
  36624. }
  36625. case 2:
  36626. {
  36627. new str[1024];
  36628. ClearChatbox(playerid);
  36629. TutStep[playerid] = 3;
  36630. InterpolateCameraPos(playerid, 1244.807250, -1896.417480, 62.970653, 1320.417602, -1480.743286, 78.601524, 5000);
  36631. InterpolateCameraLookAt(playerid, 1243.523193, -1892.262817, 60.502914, 1318.168212, -1476.724731, 76.654434, 5000);
  36632. SetPlayerPos(playerid, 1310.9757,-1445.2444,-27.2783);
  36633. strcat(str, "{FFFFFF}This is the market area, the most common hangout on Old School Roleplay\n");
  36634. strcat(str, "You'll be starting out as a level 1 newbie with no upgrades. You'll need to level up with respect points.\n");
  36635. strcat(str, "For every hour you play, you'll gain 1 respect point. You earn this on your paycheck.\n");
  36636. strcat(str, "Paychecks will be given out once every hour when the time hits xx:00.\n");
  36637. strcat(str, "~As a new player, your inventory is severely limited. You'll need to upgrade it with upgrade points.\n");
  36638. strcat(str, "You'll also start out with a 2 hour weapon restriction to avoid deathmatching.\n");
  36639. strcat(str, "We believe that our upgrades system gives the players an incentive to play and work hard.\n");
  36640. strcat(str, "{FF8000}Press next to continue.");
  36641. Dialog_Show(playerid, DIALOG_SHOW_TUTORIAL, DIALOG_STYLE_MSGBOX, "{33CCFF}Tutorial - Hanging out", str, "Next", "");
  36642. }
  36643. case 3:
  36644. {
  36645. new str[1024];
  36646. ClearChatbox(playerid);
  36647. TutStep[playerid] = 4;
  36648. InterpolateCameraPos(playerid, 1320.417602, -1480.743408, 78.601516, 1482.683227, -1628.944824, 44.981044, 5000);
  36649. InterpolateCameraLookAt(playerid, 1317.750488, -1476.783447, 77.116455, 1486.893188, -1631.457153, 43.999187, 5000);
  36650. SetPlayerPos(playerid, 1493.3798,-1668.6997,-15.7351);
  36651. strcat(str, "{FFFFFF}Old School Roleplay has many great factions to offer.\n");
  36652. strcat(str, "You're currently looking at the Los Santos Police Department.\n");
  36653. strcat(str, "Factions are legal organizations, each with their own unique roles.\n");
  36654. strcat(str, "Whether it be enforcing the law, saving lives, or reporting the news.\n");
  36655. strcat(str, "You can apply to become a faction member on our forum at os-rp.net\n");
  36656. strcat(str, "Being in a faction is quite fun and can lead to some good cash and perks for you!\n");
  36657. strcat(str, "{FF8000}Press next to continue.");
  36658. Dialog_Show(playerid, DIALOG_SHOW_TUTORIAL, DIALOG_STYLE_MSGBOX, "{33CCFF}Tutorial - Factions", str, "Next", "");
  36659. }
  36660. case 4:
  36661. {
  36662. new str[1024];
  36663. ClearChatbox(playerid);
  36664. TutStep[playerid] = 5;
  36665. InterpolateCameraPos(playerid, 1477.633544, -1627.411010, 50.594058, 2446.644531, -1661.652465, 29.177988, 7000);
  36666. InterpolateCameraLookAt(playerid, 1481.815795, -1629.860473, 49.365783, 2451.346191, -1662.243896, 27.582590, 7000);
  36667. SetPlayerPos(playerid, 2467.3708,-1666.0961,7.8903);
  36668. strcat(str, "{FFFFFF}Doing things the legal way isnt your type? We've got you covered\n");
  36669. strcat(str, "Here on Old School Roleplay we have an amazing gang system with many unique features!\n");
  36670. strcat(str, "Gangs are illegal organizations you may join by roleplaying with the higher ranks.\n");
  36671. strcat(str, "Gangs offer many different types of roleplay, from street gangs to mafias & cartels.\n");
  36672. strcat(str, "Grab yourself a gun and roleplay your way into a gang!\n");
  36673. strcat(str, "{FF8000}Press next to continue.");
  36674. Dialog_Show(playerid, DIALOG_SHOW_TUTORIAL, DIALOG_STYLE_MSGBOX, "{33CCFF}Tutorial - Gangs", str, "Next", "");
  36675. }
  36676. case 5:
  36677. {
  36678. new str[1024];
  36679. ClearChatbox(playerid);
  36680. TutStep[playerid] = 6;
  36681. InterpolateCameraPos(playerid, 2426.551025, -1659.479614, 44.816139, 2097.071533, -1293.159912, 29.785530, 7000);
  36682. InterpolateCameraLookAt(playerid, 2431.008300, -1659.783935, 42.571231, 2095.802246, -1288.467041, 28.616756, 7000);
  36683. SetPlayerPos(playerid, 2093.6177,-1302.5441,4.6590);
  36684. strcat(str, "{FFFFFF}Want your own piece of real estate? We've got you covered!\n");
  36685. strcat(str, "Here on Old School Roleplay we offer a wide variety of property types you may own.\n");
  36686. strcat(str, "Buying your own house will allow you to customize the interior and store your goodies!\n");
  36687. strcat(str, "Buying a garage will allow you to keep your car from being stolen, repair it, and upgrade it!\n");
  36688. strcat(str, "Buying your own business is an excellent source of income! There are many different types!\n");
  36689. strcat(str, "Lands are quite special. You can own your own piece of the map!\n");
  36690. strcat(str, "Owning a land allows you to place walls and other objects, and customize your piece of land.\n");
  36691. strcat(str, "{FF8000}Press next to continue.");
  36692. Dialog_Show(playerid, DIALOG_SHOW_TUTORIAL, DIALOG_STYLE_MSGBOX, "{33CCFF}Tutorial - Properties", str, "Next", "");
  36693. }
  36694. case 6:
  36695. {
  36696. new str[1024];
  36697. ClearChatbox(playerid);
  36698. TutStep[playerid] = 7;
  36699. InterpolateCameraPos(playerid, 2100.492675, -1313.117553, 40.094261, 2214.083496, -1122.290161, 34.281135, 7000);
  36700. InterpolateCameraLookAt(playerid, 2099.261718, -1308.616088, 38.299301, 2214.811767, -1127.109375, 33.165603, 7000);
  36701. SetPlayerPos(playerid, 2216.8718,-1122.6305,4.1262);
  36702. strcat(str, "{FFFFFF}Being a roleplay server, we do have rules, but we promise they're not too bad!\n");
  36703. strcat(str, "1.) No deathmatching, e.g. killing without a proper reason. Don't ruin it for everyone else.\n");
  36704. strcat(str, "2.) No metagaming. Metagaming is mixing OOC information in character.\n");
  36705. strcat(str, "3.) No powergaming. Powergaming is commiting unrealistic acts and forcing actions upon others.\n");
  36706. strcat(str, "4.) No hacking/cheating. We have zero tolerance for people who use cheats. Permanent ban.\n");
  36707. strcat(str, "5.) No exploiting. If you find a bug that gives you an unfair advantage, report it on the forums.\n");
  36708. strcat(str, "Please visit our website - www.os-rp.net for a complete list of our rules!\n");
  36709. strcat(str, "{FF8000}Press next to continue.");
  36710. Dialog_Show(playerid, DIALOG_SHOW_TUTORIAL, DIALOG_STYLE_MSGBOX, "{33CCFF}Tutorial - Rules", str, "Next", "");
  36711. }
  36712. case 7:
  36713. {
  36714. new str[1024];
  36715. ClearChatbox(playerid);
  36716. TutStep[playerid] = 8;
  36717. InterpolateCameraPos(playerid, 2219.225830, -1129.354248, 40.080249, 1765.863159, -1268.650512, 123.706245, 5500);
  36718. InterpolateCameraLookAt(playerid, 2219.667968, -1134.274780, 39.310207, 1760.993774, -1269.778442, 123.835456, 5500);
  36719. strcat(str, "{FFFFFF}Thanks for taking the time to read our tutorial, we greatly appreciate it.\n");
  36720. strcat(str, "We know you'll have tons of fun here, and meet many great people.\n");
  36721. strcat(str, "So get out there! Get a job and buy yourself some property! Make a name for yourself!\n");
  36722. strcat(str, "{FF8000}Press next to continue.");
  36723. Dialog_Show(playerid, DIALOG_SHOW_TUTORIAL, DIALOG_STYLE_MSGBOX, "{33CCFF}Tutorial - The end", str, "Next", "");
  36724. }
  36725. case 8:
  36726. {
  36727. InterpolateCameraPos(playerid, 1314.181030, -1916.689697, 218.157684, 1479.942749, -1804.981689, 161.074020, 5500, CAMERA_MOVE);
  36728. InterpolateCameraLookAt(playerid, 1317.859252, -1914.111328, 215.961776, 1480.490600, -1800.099243, 160.145843, 5500, CAMERA_MOVE);
  36729. SetPlayerPos(playerid, 1481.419189, -1790.421020, 156.753326);
  36730. SetPlayerFacingAngle(playerid, 184.29);
  36731. TogglePlayerControllable(playerid, 1);
  36732. ShowDialogToPlayer(playerid, ACCOUNT_CREATION);
  36733. new randomhp = playerid + random(20);
  36734. SetPlayerVirtualWorld(playerid, randomhp);
  36735. }
  36736. }
  36737. }
  36738. return 1;
  36739. }
  36740. Dialog:DIALOG_FOOD(playerid, response, listitem, inputtext[])
  36741. {
  36742. if(response)
  36743. {
  36744. if(listitem == 0) //Sprunk
  36745. {
  36746. GivePlayerCash(playerid, -50);
  36747. GivePlayerHealth(playerid, 25.0);
  36748. ShowActionBubble(playerid, "* %s pays $50 to the vendor and receives a can of sprunk.", GetRPName(playerid));
  36749. }
  36750. else if(listitem == 1) //Burger
  36751. {
  36752. GivePlayerCash(playerid, -15);
  36753. GivePlayerHealth(playerid, 10.0);
  36754. ShowActionBubble(playerid, "* %s pays $15 to the vendor and receives a piece of burger.", GetRPName(playerid));
  36755. }
  36756. else if(listitem == 2) //Cigar
  36757. {
  36758. GivePlayerCash(playerid, -35);
  36759. PlayerData[playerid][pCigars]++;
  36760. ShowActionBubble(playerid, "* %s pays $35 to the vendor and receives a piece of cigar.", GetRPName(playerid));
  36761. }
  36762. else if(listitem == 3) //Hot dog
  36763. {
  36764. GivePlayerCash(playerid, -25);
  36765. GivePlayerHealth(playerid, 17.0);
  36766. ShowActionBubble(playerid, "* %s pays $25 to the vendor and receives a piece of hot dog.", GetRPName(playerid));
  36767. }
  36768. else if(listitem == 4) //Rope
  36769. {
  36770. GivePlayerCash(playerid, -20);
  36771. PlayerData[playerid][pRope] += 2;
  36772. ShowActionBubble(playerid, "* %s pays $20 to the vendor and receives 2 ropes.", GetRPName(playerid));
  36773. }
  36774. else if(listitem == 5) //Chocolate
  36775. {
  36776. GivePlayerCash(playerid, -15);
  36777. GivePlayerHealth(playerid, 12.0);
  36778. ShowActionBubble(playerid, "* %s pays $15 to the vendor and receives a bar of chocolate.", GetRPName(playerid));
  36779. }
  36780. }
  36781. return 1;
  36782. }
  36783. Dialog:DIALOG_BLACKMARKET1(playerid, response, listitem, inputtext[])
  36784. {
  36785. if(response)
  36786. {
  36787. if(listitem == 0)
  36788. {
  36789. GivePlayerWeaponEx(playerid, 8);
  36790. }
  36791. else if(listitem == 1)
  36792. {
  36793. GivePlayerWeaponEx(playerid, 24);
  36794. }
  36795. else if(listitem == 2)
  36796. {
  36797. GivePlayerWeaponEx(playerid, 29);
  36798. }
  36799. else if(listitem == 3)
  36800. {
  36801. GivePlayerWeaponEx(playerid, 33);
  36802. }
  36803. else if(listitem == 4)
  36804. {
  36805. GivePlayerWeaponEx(playerid, 30);
  36806. }
  36807. }
  36808. return 1;
  36809. }
  36810. Dialog:DIALOG_BLACKMARKET2(playerid, response, listitem, inputtext[])
  36811. {
  36812. if(response)
  36813. {
  36814. if(listitem == 0)
  36815. {
  36816. GivePlayerWeaponEx(playerid, 8);
  36817. }
  36818. else if(listitem == 1)
  36819. {
  36820. GivePlayerWeaponEx(playerid, 24);
  36821. }
  36822. else if(listitem == 2)
  36823. {
  36824. GivePlayerWeaponEx(playerid, 29);
  36825. }
  36826. else if(listitem == 3)
  36827. {
  36828. GivePlayerWeaponEx(playerid, 33);
  36829. }
  36830. else if(listitem == 4)
  36831. {
  36832. GivePlayerWeaponEx(playerid, 30);
  36833. }
  36834. else if(listitem == 5)
  36835. {
  36836. GivePlayerWeaponEx(playerid, 31);
  36837. }
  36838. }
  36839. return 1;
  36840. }
  36841. Dialog:DIALOG_SETTINGS2(playerid, response, listitem, inputtext[])
  36842. {
  36843. if(response)
  36844. {
  36845. switch(listitem)
  36846. {
  36847. case 0:
  36848. {
  36849. if(!PlayerData[playerid][pTogglePM])
  36850. {
  36851. PlayerData[playerid][pTogglePM] = 1;
  36852. SendClientMessage(playerid, COLOR_AQUA, "PM toggled. You will no longer receive any private message from players.");
  36853. }
  36854. else
  36855. {
  36856. PlayerData[playerid][pTogglePM] = 0;
  36857. SendClientMessage(playerid, COLOR_AQUA, "PM enabled. You will now receive private message from players again.");
  36858. }
  36859. ShowDialogToPlayer(playerid, DIALOG_SETTINGS2);
  36860. }
  36861. case 1:
  36862. {
  36863. if(!PlayerData[playerid][pDonator])
  36864. {
  36865. return SendClientMessage(playerid, COLOR_GREY, "You are not a VIP member and therefore cannot toggle this feature.");
  36866. }
  36867. if(!PlayerData[playerid][pToggleVIP])
  36868. {
  36869. PlayerData[playerid][pToggleVIP] = 1;
  36870. SendClientMessage(playerid, COLOR_AQUA, "VIP chat toggled. You will no longer see any messages in VIP chat.");
  36871. }
  36872. else
  36873. {
  36874. PlayerData[playerid][pToggleVIP] = 0;
  36875. SendClientMessage(playerid, COLOR_AQUA, "VIP chat enabled. You will now see messages in VIP chat again.");
  36876. }
  36877. ShowDialogToPlayer(playerid, DIALOG_SETTINGS2);
  36878. }
  36879. case 2:
  36880. {
  36881. if(PlayerData[playerid][pFaction] == -1)
  36882. {
  36883. return SendClientMessage(playerid, COLOR_GREY, "You are not apart of a faction and therefore can't toggle this chat.");
  36884. }
  36885. if(!PlayerData[playerid][pToggleFaction])
  36886. {
  36887. PlayerData[playerid][pToggleFaction] = 1;
  36888. SendClientMessage(playerid, COLOR_AQUA, "Faction chat toggled. You will no longer see any messages in faction chat.");
  36889. }
  36890. else
  36891. {
  36892. PlayerData[playerid][pToggleFaction] = 0;
  36893. SendClientMessage(playerid, COLOR_AQUA, "Faction chat enabled. You will now see messages in faction chat again.");
  36894. }
  36895. ShowDialogToPlayer(playerid, DIALOG_SETTINGS2);
  36896. }
  36897. case 3:
  36898. {
  36899. if(PlayerData[playerid][pGang] == -1)
  36900. {
  36901. return SendClientMessage(playerid, COLOR_GREY, "You are not a gang member and therefore can't toggle this chat.");
  36902. }
  36903. if(!PlayerData[playerid][pToggleGang])
  36904. {
  36905. PlayerData[playerid][pToggleGang] = 1;
  36906. SendClientMessage(playerid, COLOR_AQUA, "Gang chat toggled. You will no longer see any messages in gang chat.");
  36907. }
  36908. else
  36909. {
  36910. PlayerData[playerid][pToggleGang] = 0;
  36911. SendClientMessage(playerid, COLOR_AQUA, "Gang chat enabled. You will now see messages in gang chat again.");
  36912. }
  36913. ShowDialogToPlayer(playerid, DIALOG_SETTINGS2);
  36914. }
  36915. case 4:
  36916. {
  36917. if(!PlayerData[playerid][pToggleCam])
  36918. {
  36919. PlayerData[playerid][pToggleCam] = 1;
  36920. SendClientMessage(playerid, COLOR_AQUA, "Spawn camera toggled. You will no longer see the camera effects upon spawning.");
  36921. }
  36922. else
  36923. {
  36924. PlayerData[playerid][pToggleCam] = 0;
  36925. SendClientMessage(playerid, COLOR_AQUA, "Spawn camera enabled. You will now see the camera effects when you spawn again.");
  36926. }
  36927. ShowDialogToPlayer(playerid, DIALOG_SETTINGS2);
  36928. }
  36929. case 5:
  36930. {
  36931. if(!PlayerData[playerid][pToggleHUD])
  36932. {
  36933. PlayerData[playerid][pToggleHUD] = 1;
  36934. SendClientMessage(playerid, COLOR_AQUA, "HUD toggled. You will no longer see your health & armor indicators.");
  36935. PlayerTextDrawHide(playerid, PlayerData[playerid][pText][3]);
  36936. PlayerTextDrawHide(playerid, PlayerData[playerid][pText][4]);
  36937. }
  36938. else
  36939. {
  36940. PlayerData[playerid][pToggleHUD] = 0;
  36941. SendClientMessage(playerid, COLOR_AQUA, "HUD enabled. You will now see your health & armor indicators again.");
  36942. PlayerTextDrawShow(playerid, PlayerData[playerid][pText][3]);
  36943. PlayerTextDrawShow(playerid, PlayerData[playerid][pText][4]);
  36944. }
  36945. ShowDialogToPlayer(playerid, DIALOG_SETTINGS2);
  36946. }
  36947. case 6:
  36948. {
  36949. if(!PlayerData[playerid][pToggleVehCam])
  36950. {
  36951. PlayerData[playerid][pToggleVehCam] = 1;
  36952. SendClientMessage(playerid, COLOR_AQUA, "One Seat Driving Person toggled.");
  36953. }
  36954. else
  36955. {
  36956. PlayerData[playerid][pToggleVehCam] = 0;
  36957. SendClientMessage(playerid, COLOR_AQUA, "On Seat Driving Person enabled.");
  36958. }
  36959. ShowDialogToPlayer(playerid, DIALOG_SETTINGS2);
  36960. }
  36961. case 7: ShowDialogToPlayer(playerid, DIALOG_SETTINGS);
  36962. }
  36963. }
  36964. return 1;
  36965. }
  36966. Dialog:DIALOG_SETTINGS(playerid, response, listitem, inputtext[])
  36967. {
  36968. if(response)
  36969. {
  36970. switch(listitem)
  36971. {
  36972. case 0:
  36973. {
  36974. if(!PlayerData[playerid][pToggleTextdraws])
  36975. {
  36976. PlayerTextDrawHide(playerid, PlayerData[playerid][pText][0]);
  36977. PlayerTextDrawHide(playerid, PlayerData[playerid][pText][1]);
  36978. PlayerTextDrawHide(playerid, PlayerData[playerid][pText][2]);
  36979. PlayerTextDrawHide(playerid, PlayerData[playerid][pText][3]);
  36980. PlayerTextDrawHide(playerid, PlayerData[playerid][pText][4]);
  36981. TextDrawHideForPlayer(playerid, TimeTD);
  36982. PlayerData[playerid][pToggleTextdraws] = 1;
  36983. SendClientMessage(playerid, COLOR_AQUA, "Textdraws toggled. You will no longer see any textdraws.");
  36984. }
  36985. else
  36986. {
  36987. if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && VehicleHasEngine(GetPlayerVehicleID(playerid)))
  36988. {
  36989. PlayerTextDrawShow(playerid, PlayerData[playerid][pText][1]);
  36990. PlayerTextDrawShow(playerid, PlayerData[playerid][pText][2]);
  36991. }
  36992. if(PlayerData[playerid][pGPSOn])
  36993. {
  36994. PlayerTextDrawShow(playerid, PlayerData[playerid][pText][0]);
  36995. }
  36996. if(PlayerData[playerid][pWatchOn])
  36997. {
  36998. TextDrawShowForPlayer(playerid, TimeTD);
  36999. }
  37000. if(!PlayerData[playerid][pToggleHUD])
  37001. {
  37002. PlayerTextDrawShow(playerid, PlayerData[playerid][pText][3]);
  37003. PlayerTextDrawShow(playerid, PlayerData[playerid][pText][4]);
  37004. }
  37005. PlayerData[playerid][pToggleTextdraws] = 0;
  37006. SendClientMessage(playerid, COLOR_AQUA, "Textdraws enabled. You will now see textdraws again.");
  37007. }
  37008. ShowDialogToPlayer(playerid, DIALOG_SETTINGS);
  37009. }
  37010. case 1:
  37011. {
  37012. if(!PlayerData[playerid][pToggleOOC])
  37013. {
  37014. PlayerData[playerid][pToggleOOC] = 1;
  37015. SendClientMessage(playerid, COLOR_AQUA, "OOC chat toggled. You will no longer see any messages in /o.");
  37016. }
  37017. else
  37018. {
  37019. PlayerData[playerid][pToggleOOC] = 0;
  37020. SendClientMessage(playerid, COLOR_AQUA, "OOC chat enabled. You will now see messages in /o again.");
  37021. }
  37022. ShowDialogToPlayer(playerid, DIALOG_SETTINGS);
  37023. }
  37024. case 2:
  37025. {
  37026. if(!PlayerData[playerid][pToggleGlobal])
  37027. {
  37028. PlayerData[playerid][pToggleGlobal] = 1;
  37029. SendClientMessage(playerid, COLOR_AQUA, "Global chat toggled. You will no longer see any messages in /g.");
  37030. }
  37031. else
  37032. {
  37033. PlayerData[playerid][pToggleGlobal] = 0;
  37034. SendClientMessage(playerid, COLOR_AQUA, "Global chat enabled. You can now speak to other players in /g.");
  37035. }
  37036. ShowDialogToPlayer(playerid, DIALOG_SETTINGS);
  37037. }
  37038. case 3:
  37039. {
  37040. if(!PlayerData[playerid][pTogglePhone])
  37041. {
  37042. if(PlayerData[playerid][pCallLine] != INVALID_PLAYER_ID)
  37043. {
  37044. return SendClientMessage(playerid, COLOR_GREY, "You can't do this while in a call.");
  37045. }
  37046. PlayerData[playerid][pTogglePhone] = 1;
  37047. SendClientMessage(playerid, COLOR_AQUA, "Phone toggled. You will no longer receive calls or texts.");
  37048. }
  37049. else
  37050. {
  37051. PlayerData[playerid][pTogglePhone] = 0;
  37052. SendClientMessage(playerid, COLOR_AQUA, "Phone enabled. You can now receive calls and texts again.");
  37053. }
  37054. ShowDialogToPlayer(playerid, DIALOG_SETTINGS);
  37055. }
  37056. case 4:
  37057. {
  37058. if(!PlayerData[playerid][pToggleWhisper])
  37059. {
  37060. PlayerData[playerid][pToggleWhisper] = 1;
  37061. SendClientMessage(playerid, COLOR_AQUA, "Whispers toggled. You will no longer receive any whispers from players.");
  37062. }
  37063. else
  37064. {
  37065. PlayerData[playerid][pToggleWhisper] = 0;
  37066. SendClientMessage(playerid, COLOR_AQUA, "Whispers enabled. You will now receive whispers from players again.");
  37067. }
  37068. ShowDialogToPlayer(playerid, DIALOG_SETTINGS);
  37069. }
  37070. case 5:
  37071. {
  37072. if(!PlayerData[playerid][pToggleNewbie])
  37073. {
  37074. PlayerData[playerid][pToggleNewbie] = 1;
  37075. SendClientMessage(playerid, COLOR_AQUA, "Newbie chat toggled. You will no longer see any messages in newbie chat.");
  37076. }
  37077. else
  37078. {
  37079. PlayerData[playerid][pToggleNewbie] = 0;
  37080. SendClientMessage(playerid, COLOR_AQUA, "Newbie chat enabled. You will now see messages in newbie chat again.");
  37081. }
  37082. ShowDialogToPlayer(playerid, DIALOG_SETTINGS);
  37083. }
  37084. case 6:
  37085. {
  37086. if(!PlayerData[playerid][pWalkieTalkie])
  37087. {
  37088. return SendClientMessage(playerid, COLOR_GREY, "You don't have a walkie talkie.");
  37089. }
  37090. if(!PlayerData[playerid][pToggleWT])
  37091. {
  37092. PlayerData[playerid][pToggleWT] = 1;
  37093. SendClientMessage(playerid, COLOR_AQUA, "Walkie talkie toggled. You will no longer receive any messages on your walkie talkie.");
  37094. }
  37095. else
  37096. {
  37097. PlayerData[playerid][pToggleWT] = 0;
  37098. SendClientMessage(playerid, COLOR_AQUA, "Walkie talkie enabled. You will now receive messages on your walkie talkie again.");
  37099. }
  37100. ShowDialogToPlayer(playerid, DIALOG_SETTINGS);
  37101. }
  37102. case 7:
  37103. {
  37104. if(PlayerData[playerid][pFaction] == -1)
  37105. {
  37106. return SendClientMessage(playerid, COLOR_GREY, "You are not apart of a faction and therefore can't toggle your radio.");
  37107. }
  37108. if(!PlayerData[playerid][pToggleRadio])
  37109. {
  37110. PlayerData[playerid][pToggleRadio] = 1;
  37111. SendClientMessage(playerid, COLOR_AQUA, "Radio chat toggled. You will no longer receive any messages on your radio.");
  37112. }
  37113. else
  37114. {
  37115. PlayerData[playerid][pToggleRadio] = 0;
  37116. SendClientMessage(playerid, COLOR_AQUA, "Radio chat enabled. You will now receive messages on your radio again.");
  37117. }
  37118. ShowDialogToPlayer(playerid, DIALOG_SETTINGS);
  37119. }
  37120. case 8:
  37121. {
  37122. if(!PlayerData[playerid][pToggleMusic])
  37123. {
  37124. PlayerData[playerid][pToggleMusic] = 1;
  37125. StopAudioStreamForPlayer(playerid);
  37126. SendClientMessage(playerid, COLOR_AQUA, "Music streams toggled. You will no longer hear any music played locally & globally.");
  37127. }
  37128. else
  37129. {
  37130. PlayerData[playerid][pToggleMusic] = 0;
  37131. SendClientMessage(playerid, COLOR_AQUA, "Music streams enabled. You will now hear music played locally & globally again.");
  37132. }
  37133. ShowDialogToPlayer(playerid, DIALOG_SETTINGS);
  37134. }
  37135. case 9:
  37136. {
  37137. if(!PlayerData[playerid][pToggleNews])
  37138. {
  37139. PlayerData[playerid][pToggleNews] = 1;
  37140. SendClientMessage(playerid, COLOR_AQUA, "News chat toggled. You will no longer see any news broadcasts.");
  37141. }
  37142. else
  37143. {
  37144. PlayerData[playerid][pToggleNews] = 0;
  37145. SendClientMessage(playerid, COLOR_AQUA, "News chat enabled. You will now see news broadcasts again.");
  37146. }
  37147. ShowDialogToPlayer(playerid, DIALOG_SETTINGS);
  37148. }
  37149. case 10: ShowDialogToPlayer(playerid, DIALOG_SETTINGS2);
  37150. }
  37151. }
  37152. return 1;
  37153. }
  37154. Dialog:DIALOG_HELP(playerid, response, listitem, inputtext[])
  37155. {
  37156. if(response)
  37157. {
  37158. new sstring[2048];
  37159. switch(listitem)
  37160. {
  37161. case 0: // JOBS
  37162. {
  37163. format(sstring, sizeof(sstring), "{FFFFFF}Chat: /stats, /b, /g, /me, /do, /(o)oc, /(s)hout, /(l)ow, /(w)hisper, /(n)ewbie.");
  37164. Dialog_Show(playerid, DIALOG_HELP, DIALOG_STYLE_MSGBOX, "{FFFFFF}Commands", sstring, "Ok","");
  37165. }
  37166. case 1: // STORES
  37167. {
  37168. format(sstring, sizeof(sstring), "{FFFFFF}General: /pay, /id, /time, /report, /upgrade, /charity, /stopmusic, /joinevent, /quitevent.");
  37169. strcat(sstring, "\n{FFFFFF}General: /dice, /flipcoin, /accent, /helpers, /helpme, /accept, /properties, /skill, /quitjob.");
  37170. strcat(sstring, "\n{FFFFFF}General: /give, /sell, /toggle, /cancelcp, /afk, /(ad)vertise, /buy, /refuel, /phone, /sms.");
  37171. strcat(sstring, "\n{FFFFFF}General: /clothing, /locate, /frisk, /contract, /number, /boombox, /switchspeedo, /stuck.");
  37172. strcat(sstring, "\n{FFFFFF}General: /shakehand, /dropgun, /grabgun, /usecookies, /usecigar, /usedrug, /showid.");
  37173. strcat(sstring, "\n{FFFFFF}General: /(inv)entory, /guninv, /loadammo, /drop, /eject, /dicebet, /gangs, /factions.");
  37174. strcat(sstring, "\n{FFFFFF}General: /calculate, /serverstats, /turfs, /lands, /changename, /watch, /gps, /fixvw.");
  37175. Dialog_Show(playerid, DIALOG_HELP, DIALOG_STYLE_MSGBOX, "{FFFFFF}Commands", sstring, "Ok","");
  37176. }
  37177. case 2: // GENERAL LOCATIONS
  37178. {
  37179. format(sstring, sizeof(sstring), "{FFFFFF}UPGRADES: /resetupgrades, /myupgrades.");
  37180. Dialog_Show(playerid, DIALOG_HELP, DIALOG_STYLE_MSGBOX, "{FFFFFF}Commands", sstring, "Ok","");
  37181. }
  37182. case 3: // Find Points
  37183. {
  37184. format(sstring, sizeof(sstring), "{FFFFFF}Other: /househelp, /garagehelp, /bizhelp, /jobhelp, /animhelp, /vehiclehelp, /viphelp.");
  37185. strcat(sstring, "\n{FFFFFF}Other: /bankhelp, /factionhelp, /ganghelp, /landhelp, /helperhelp.");
  37186. Dialog_Show(playerid, DIALOG_HELP, DIALOG_STYLE_MSGBOX, "{FFFFFF}Commands", sstring, "Ok","");
  37187. }
  37188. case 4:
  37189. {
  37190. if(PlayerData[playerid][pGang] == -1)
  37191. {
  37192. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a gang member.");
  37193. }
  37194. format(sstring, sizeof(sstring), "** GANG ** /f /gang /gstash /gbackup /bandana /capture /claim /reclaim /turfinfo /points\n");
  37195. strcat(sstring, "** GANG ** /gbuyvehicle /gpark /gfindcar /grespawncars /gsellcar /gunmod /lock, /endalliance, /gspray\n");
  37196. strcat(sstring, "** CREW ** /managecrew /crew\n");
  37197. Dialog_Show(playerid, DIALOG_HELP, DIALOG_STYLE_MSGBOX, "Help | Gang Commands", sstring, "Ok","");
  37198. }//gang
  37199. case 5:
  37200. {
  37201. if(PlayerData[playerid][pFaction] == -1)
  37202. {
  37203. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not apart of any faction.");
  37204. }
  37205. format(sstring, sizeof(sstring), "** FACTION ** /fc /d /(r)adio /div /faction /division /locker /showbadge /(m)egaphone\n");
  37206. switch(FactionInfo[PlayerData[playerid][pFaction]][fType])
  37207. {
  37208. case FACTION_POLICE, FACTION_FEDERAL, FACTION_ARMY:
  37209. {
  37210. strcat(sstring, "** FACTION ** /gate /door /cell /tazer /cuff /uncuff /drag /detain /charge /arrest\n");
  37211. strcat(sstring, "** FACTION ** /wanted /frisk /take /ticket /gov /ram /deploy /undeploy /undeployall /backup\n");
  37212. strcat(sstring, "** FACTION ** /mdc /clearwanted /siren /badge /vticket /vfrisk /vtake /seizeplant /mir\n");
  37213. if(FactionInfo[PlayerData[playerid][pFaction]][fType] == FACTION_FEDERAL)
  37214. strcat(sstring, "** FACTION ** /listcallers /trackcall /cells /passport /callsign /bug /listbugs /tog bugged\n");
  37215. else
  37216. strcat(sstring, "** FACTION ** /listcallers /trackcall /cells /claim /callsign\n");
  37217. }
  37218. case FACTION_MEDIC:
  37219. {
  37220. strcat(sstring, "** FACTION ** /heal /drag /stretcher /deliverpt /getpt /listpt /injuries /deploy /undeploy /undeployall\n");
  37221. strcat(sstring, "** FACTION ** /badge /gov /backup /listcallers /trackcall /callsign\n");
  37222. }
  37223. case FACTION_NEWS:
  37224. {
  37225. format(sstring, sizeof(sstring), "** FACTION ** /news /live /endlive /liveban /badge /addeposit /adwithdraw\n");
  37226. }
  37227. case FACTION_GOVERNMENT:
  37228. {
  37229. strcat(sstring, "** FACTION ** /gov /settax /factionpay /tazer /cuff /uncuff /detain /taxdeposit /taxwithdraw\n");
  37230. strcat(sstring, "** FACTION ** /backup /badge\n");
  37231. }
  37232. case FACTION_HITMAN:
  37233. {
  37234. strcat(sstring, "** FACTION ** /contracts /takehit /profile /passport /plantbomb /pickupbomb /detonate\n");
  37235. strcat(sstring, "** FACTION ** /hfind /noknife\n");
  37236. }
  37237. }
  37238. Dialog_Show(playerid, DIALOG_HELP, DIALOG_STYLE_MSGBOX, "Help | Faction Commands", sstring, "Ok","");
  37239. }//faction
  37240. case 6:
  37241. {
  37242. if(!PlayerData[playerid][pDonator])
  37243. {
  37244. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you don't have a VIP subscription.\n");
  37245. }
  37246. format(sstring, sizeof(sstring), "** VIP ** /(v)ip /vipinfo /viptag /vipcolor /vipinvite /vipnumber /vipmusic\n");
  37247. if(PlayerData[playerid][pDonator] == 3)
  37248. {
  37249. strcat(sstring, "** VIP ** /repair /nos /hyd\n");
  37250. }
  37251. Dialog_Show(playerid, DIALOG_HELP, DIALOG_STYLE_MSGBOX, "Help | VIP Commands", sstring, "Ok","");
  37252. }//vip
  37253. case 7:
  37254. {
  37255. if(PlayerData[playerid][pJob] == JOB_NONE && PlayerData[playerid][pSecondJob] == JOB_NONE)
  37256. {
  37257. return SendClientMessage(playerid, COLOR_GREY, "You have no job and therefore no job commands to view.");
  37258. }
  37259. switch(PlayerData[playerid][pJob])
  37260. {
  37261. //case JOB_NONE: SendClientMessage(playerid, COLOR_GREY, "You have no job and therefore no job commands to view.");
  37262. case JOB_PIZZAMAN: format(sstring, sizeof(sstring), "** JOB ** /getpizza, /cancelcp.\n");
  37263. case JOB_COURIER: strcat(sstring, "** JOB ** /load, /deliver, /cancelcp.\n");
  37264. case JOB_FISHERMAN: strcat(sstring, "** JOB ** /fish, /myfish, /sellfish.\n");
  37265. case JOB_BODYGUARD: strcat(sstring, "** JOB ** /sellvest, /frisk.\n");
  37266. case JOB_WEAPONDEALER: strcat(sstring, "** JOB ** /smugglemats, /sellgun.\n");
  37267. case JOB_MECHANIC: strcat(sstring, "** JOB ** /buycomps, /repair, /refill, /nos, /hyd, /takecall.\n");
  37268. case JOB_MINER: strcat(sstring, "** JOB ** /mine, /cancelcp.\n");
  37269. case JOB_SWEEPER: strcat(sstring, "** JOB ** /startsweeping, /stopsweeping.\n");
  37270. case JOB_TAXIDRIVER: strcat(sstring, "** JOB ** /setfare, /takecall.\n");
  37271. case JOB_DRUGDEALER: strcat(sstring, "** JOB ** /buydrug, /planthelp, /cookmeth, /smuggledrugs.\n");
  37272. case JOB_LAWYER: strcat(sstring, "** JOB ** /defend, /free, /wanted.\n");
  37273. case JOB_DETECTIVE: strcat(sstring, "** JOB ** /find.\n");
  37274. case JOB_GARBAGEMAN: strcat(sstring, "** JOB ** /garbage\n");
  37275. case JOB_FARMER: strcat(sstring, "** JOB ** /harvest\n");
  37276. }
  37277. if(PlayerData[playerid][pSecondJob] != JOB_NONE)
  37278. {
  37279. switch(PlayerData[playerid][pSecondJob])
  37280. {
  37281. //case JOB_NONE: SendClientMessage(playerid, COLOR_GREY, "You have no job and therefore no job commands to view.");
  37282. case JOB_PIZZAMAN: strcat(sstring, "** JOB ** /getpizza.\n");
  37283. case JOB_COURIER: strcat(sstring, "** JOB ** /load, /deliver.\n");
  37284. case JOB_FISHERMAN: strcat(sstring, "** JOB ** /fish, /myfish, /sellfish.\n");
  37285. case JOB_BODYGUARD: strcat(sstring, "** JOB ** /sellvest, /frisk.\n");
  37286. case JOB_WEAPONDEALER: strcat(sstring, "** JOB ** /smugglemats, /sellgun.\n");
  37287. case JOB_MECHANIC: strcat(sstring, "** JOB ** /buycomps, /repair, /refill, /nos, /hyd.\n");
  37288. case JOB_MINER: strcat(sstring, "** JOB ** /mine.\n");
  37289. case JOB_SWEEPER: strcat(sstring, "** JOB ** /startsweeping, /stopsweeping.\n");
  37290. case JOB_TAXIDRIVER: strcat(sstring, "** JOB ** /setfare.\n");
  37291. case JOB_DRUGDEALER: strcat(sstring, "** JOB ** /buydrug, /planthelp, /cookmeth, /smuggledrugs.\n");
  37292. case JOB_LAWYER: strcat(sstring, "** JOB ** /defend, /free, /wanted.\n");
  37293. case JOB_DETECTIVE: strcat(sstring, "** JOB ** /find.\n");
  37294. case JOB_GARBAGEMAN: strcat(sstring, "** JOB ** /garbage\n");
  37295. }
  37296. }
  37297. Dialog_Show(playerid, DIALOG_HELP, DIALOG_STYLE_MSGBOX, "Help | Job Commands", sstring, "Ok","");
  37298. }//job
  37299. }
  37300. }
  37301. return 1;
  37302. }
  37303. Dialog:DIALOG_STATS(playerid, response, listitem, inputtext[])
  37304. {
  37305. if(response)
  37306. {
  37307. switch(listitem)
  37308. {
  37309. case 0: DisplayStats(playerid);
  37310. case 1: DisplayInventory(playerid);
  37311. }
  37312. }
  37313. return 1;
  37314. }
  37315. Dialog:DIALOG_ADNEW(playerid, response, listitem, inputtext[])
  37316. {
  37317. if(response)
  37318. {
  37319. new businessid = GetInsideBusiness(playerid), price = strlen(inputtext) * 25;
  37320. if(isnull(inputtext)) return SendClientMessage(playerid, COLOR_GREY, "Please input your advertisement");
  37321. if((PlayerData[playerid][pDonator] == 0) && (businessid == -1 || BusinessInfo[businessid][bType] != 5))
  37322. {
  37323. if(GetClosestBusiness(playerid, BUSINESS_AGENCY) == -1)
  37324. {
  37325. SendClientMessage(playerid, COLOR_GREY, "There are no advertisement agencies in town.");
  37326. return 1;
  37327. }
  37328. businessid = GetClosestBusiness(playerid, BUSINESS_AGENCY);
  37329. }
  37330. if(PlayerData[playerid][pDonator] < 3 && PlayerData[playerid][pCash] < price)
  37331. {
  37332. return SendClientMessageEx(playerid, COLOR_GREY, "You need %s in order to place the advertisement. You can't afford that.", FormatNumber(price));
  37333. }
  37334. if(PlayerData[playerid][pDonator] == 3)
  37335. {
  37336. SendClientMessage(playerid, COLOR_VIP, "VIP Perk: Your advertisement was posted free of charge!");
  37337. }
  37338. else
  37339. {
  37340. new string[20];
  37341. format(string, sizeof(string), "~r~-$%i", price);
  37342. GameTextForPlayer(playerid, string, 5000, 1);
  37343. GivePlayerCash(playerid, -price);
  37344. if(businessid >= 0)
  37345. {
  37346. if(BusinessInfo[businessid][bProducts] > 0)
  37347. {
  37348. BusinessInfo[businessid][bCash] += (price/100) * 75;
  37349. }
  37350. BusinessInfo[businessid][bProducts]--;
  37351. gNewsVault += (price/100)*5;
  37352. SaveServerInfo();
  37353. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bID]);
  37354. mysql_tquery(connectionID, queryBuffer);
  37355. }
  37356. }
  37357. gLastAd = gettime();
  37358. strval(inputtext);
  37359. SendClientMessageToAllEx((PlayerData[playerid][pDonator] > 0) ? (0x00AA00FF) : (0x00AA00FF), "> Advertisement: %s {00aa00}[Ph: %i]", inputtext, PlayerData[playerid][pPhone]);
  37360. }
  37361. return 1;
  37362. }
  37363. Dialog:MPSPAYTICKETS(playerid, response, listitem, inputtext[])
  37364. {
  37365. if(response)
  37366. {
  37367. new
  37368. szMessage[128];
  37369. if(PlayerData[playerid][pWantedLevel] != 0)
  37370. {
  37371. return SendClientMessageEx(playerid, COLOR_YELLOW, "The police has been warned that you are wanted, and are on their way.");
  37372. }
  37373. if(VehicleInfo[listitem][vTickets]) {
  37374. if(GetPlayerCash(playerid) < VehicleInfo[listitem][vTickets]) {
  37375. return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough money on you to pay the ticket.");
  37376. }
  37377. GivePlayerCash(playerid, -VehicleInfo[listitem][vTickets]);
  37378. format(szMessage, sizeof(szMessage), "You have paid the $%s ticket on your %s.", number_format(VehicleInfo[listitem][vTickets]), vehicleNames[VehicleInfo[listitem][vModel] - 400]);
  37379. SendClientMessageEx(playerid, COLOR_GREY, szMessage);
  37380. VehicleInfo[listitem][vTickets] = 0;
  37381. }
  37382. else if(VehicleInfo[listitem][pvImpounded]) {
  37383. new
  37384. iCost = (VehicleInfo[listitem][vPrice] / 20) + VehicleInfo[listitem][vTickets] + (PlayerData[playerid][pLevel] * 3000);
  37385. if(GetPlayerCash(playerid) < iCost) {
  37386. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money on you.");
  37387. }
  37388. format(szMessage, sizeof(szMessage), "You have released your %s for $%i.", vehicleNames[VehicleInfo[listitem][vModel] - 400], iCost);
  37389. SendClientMessage(playerid, COLOR_AQUA, szMessage);
  37390. GivePlayerCash(playerid, -iCost);
  37391. new Float:vehposx, Float:vehposy, Float:vehposz, Float:angle;
  37392. vehposx = 1198.6892;
  37393. vehposy = -1834.5319;
  37394. vehposz = 13.3995;
  37395. angle = 268.9968;
  37396. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET pos_x = '%f', pos_y = '%f', pos_z = '%f', pos_a = '%f', impounded = 0 WHERE id = %d", vehposx, vehposy, vehposz, angle, VehicleInfo[listitem][vID]);
  37397. mysql_tquery(connectionID, queryBuffer);
  37398. VehicleInfo[listitem][pvImpounded] = 0;
  37399. }
  37400. else SendClientMessage(playerid, COLOR_GREY, "This vehicle either does not exist, or does not need to be released or have its tickets paid.");
  37401. }
  37402. return 1;
  37403. }
  37404. Dialog:DIALOG_RENTCAR(playerid, response, listitem, inputtext[])
  37405. {
  37406. if(!response)
  37407. {
  37408. RemovePlayerFromVehicle(playerid);
  37409. }
  37410. else
  37411. {
  37412. if(PlayerData[playerid][pCash] < 999)
  37413. {
  37414. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't rent this truck.");
  37415. }
  37416. GivePlayerCash(playerid, -1000);
  37417. SendClientMessage(playerid, COLOR_GREY, "Dealership: Thank you for renting a truck, good luck in your job!");
  37418. Renting[playerid] = 1;
  37419. }
  37420. return 1;
  37421. }
  37422. Dialog:DIALOG_BUYVEHICLENEW(playerid, response, listitem, inputtext[])
  37423. {
  37424. if(response)
  37425. {
  37426. switch(listitem)
  37427. {
  37428. case 0: ShowVehicleSelectionMenu(playerid, MODEL_SELECTION_VEHICLES);
  37429. case 1: ShowDialogToPlayer(playerid, DIALOG_BUYVEHICLE);
  37430. }
  37431. }
  37432. return 1;
  37433. }
  37434. Dialog:DIALOG_NEWBIE(playerid, response, listitem, inputtext[])
  37435. {
  37436. if(response)
  37437. {
  37438. new string[128];
  37439. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN && PlayerData[playerid][pHelper] == 0)
  37440. {
  37441. PlayerData[playerid][pLastNewbie] = gettime();
  37442. }
  37443. if(isnull(inputtext)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot send no question!");
  37444. if(strlen(inputtext) > 110) return SendClientMessageEx(playerid, COLOR_GREY, "That message is too long!");
  37445. format(string, sizeof(string), "{FF0000}New Question! {FFFFFF}%s(%d): %s", GetPlayerNameEx(playerid), playerid, inputtext);
  37446. SendQuestionToStaff(COLOR_RED, string);
  37447. SendQuestionToStaff(COLOR_WHITE, "* /nanswer (/na) to asnwer | /trashnewb (/tn) to trash *");
  37448. SetPVarInt(playerid, "SendQuestion", 1);
  37449. SetPVarString(playerid, "Question", inputtext);
  37450. SendClientMessage(playerid, COLOR_WHITE, "Your question was successfully submitted, please wait. An helper will reply shortly.");
  37451. }
  37452. return 1;
  37453. }
  37454. Dialog:ACCOUNT_CREATION(playerid, response, listitem, inputtext[])
  37455. {
  37456. if(!response) return ShowDialogToPlayer(playerid, ACCOUNT_CREATION);
  37457. switch(listitem)
  37458. {
  37459. case 0: return ShowDialogToPlayer(playerid, ACCOUNT_CREATION);
  37460. case 1: return ShowDialogToPlayer(playerid, DIALOG_GENDER);
  37461. case 2: return ShowDialogToPlayer(playerid, DIALOG_AGE);
  37462. case 3:
  37463. {
  37464. szMiscArray[0] = 0;
  37465. szMiscArray = "None\n" \
  37466. "English\n" \
  37467. "American\n";
  37468. return Dialog_Show(playerid, DIALOG_REGISTER_ACCENT, DIALOG_STYLE_LIST, "Accent", szMiscArray, "Select", "<<");
  37469. }
  37470. case 4:
  37471. {
  37472. if(PlayerData[playerid][pGender] == -1) {
  37473. SendClientMessage(playerid, COLOR_YELLOW, "Please select your gender first.");
  37474. return ShowDialogToPlayer(playerid, DIALOG_GENDER);
  37475. }
  37476. ShowPlayerSelectionMenu(playerid, MODEL_SELECTION_SKIN_REGISTER, "Choose a Skin", clothesShopSkins, sizeof(clothesShopSkins));
  37477. }
  37478. case 5:
  37479. {
  37480. if(PlayerData[playerid][pGender] == 0)
  37481. {
  37482. SendClientMessage(playerid, COLOR_YELLOW, "Please pick a gender.");
  37483. return ShowDialogToPlayer(playerid, ACCOUNT_CREATION);
  37484. }
  37485. if(PlayerData[playerid][pAge] == 0)
  37486. {
  37487. SendClientMessage(playerid, COLOR_GREY, "You must choose a age to complete");
  37488. ShowDialogToPlayer(playerid, ACCOUNT_CREATION);
  37489. }
  37490. PlayerData[playerid][pTutorial] = 0;
  37491. PlayerData[playerid][pSetup] = 0;
  37492. HideTutorialTextDraws(playerid);
  37493. SetPlayerSkin(playerid, PlayerData[playerid][pSkin]);
  37494. SetPlayerPos(playerid, 1585.4670,-2332.8362,13.5890);
  37495. SetPlayerFacingAngle(playerid, 87.7721);
  37496. print("Spawned player on spawn 2");
  37497. SetPlayerVirtualWorld(playerid, 0);
  37498. SetCameraBehindPlayer(playerid);
  37499. StopAudioStreamForPlayer(playerid);
  37500. TogglePlayerControllable(playerid, 1);
  37501. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET setup = 0, gender = %i, age = %i, skin = %i WHERE uid = %i", PlayerData[playerid][pGender], PlayerData[playerid][pAge], PlayerData[playerid][pSkin], PlayerData[playerid][pID]);
  37502. mysql_tquery(connectionID, queryBuffer);
  37503. SendClientMessage(playerid, COLOR_WHITE, "Welcome to {00aa00}Old School Roleplay{FFFFFF}. Make sure to visit os-rp.net for news and updates.");
  37504. SendClientMessage(playerid, COLOR_WHITE, "Use the {FFFF90}/locate{FFFFFF} command to point to locations of jobs, businesses, and common places.");
  37505. StopAudioStreamForPlayer(playerid);
  37506. DestroyDynamic3DTextLabel(fRepfamtext[playerid]);
  37507. fRepfamtext[playerid] = Text3D:INVALID_3DTEXT_ID;
  37508. SendStaffMessage(COLOR_YELLOW, "OnPlayerSpawn: %s[%d] has just spawned on Old School Roleplay for the first time!", GetRPName(playerid), playerid);
  37509. SendClientMessage(playerid, COLOR_AQUA, "You need a driver's license, the DMV has been marked on your map. Navigate to the marker to begin your drivers test.");
  37510. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  37511. SetPlayerCheckpoint(playerid, 1219.2590, -1812.1093, 16.5938, 3.0);
  37512. return 1;
  37513. }
  37514. }
  37515. return 1;
  37516. }
  37517. Dialog:DIALOG_REGISTER_ACCENT(playerid, response, listitem, inputtext[])
  37518. {
  37519. if(response)
  37520. {
  37521. switch(listitem)
  37522. {
  37523. case 0: strcpy(PlayerData[playerid][pAccent], "None", 16);
  37524. case 1: strcpy(PlayerData[playerid][pAccent], "English", 16);
  37525. case 2: strcpy(PlayerData[playerid][pAccent], "American", 16);
  37526. case 3: strcpy(PlayerData[playerid][pAccent], "British", 16);
  37527. case 4: strcpy(PlayerData[playerid][pAccent], "Chinese", 16);
  37528. case 5: strcpy(PlayerData[playerid][pAccent], "Korean", 16);
  37529. case 6: strcpy(PlayerData[playerid][pAccent], "Japanese", 16);
  37530. case 7: strcpy(PlayerData[playerid][pAccent], "Asian", 16);
  37531. case 8: strcpy(PlayerData[playerid][pAccent], "Canadian", 16);
  37532. case 9: strcpy(PlayerData[playerid][pAccent], "Australian", 16);
  37533. case 10: strcpy(PlayerData[playerid][pAccent], "Southern", 16);
  37534. case 11: strcpy(PlayerData[playerid][pAccent], "Russian", 16);
  37535. case 12: strcpy(PlayerData[playerid][pAccent], "Ukrainian", 16);
  37536. case 13: strcpy(PlayerData[playerid][pAccent], "German", 16);
  37537. case 14: strcpy(PlayerData[playerid][pAccent], "French", 16);
  37538. case 15: strcpy(PlayerData[playerid][pAccent], "Portuguese", 16);
  37539. case 16: strcpy(PlayerData[playerid][pAccent], "Polish", 16);
  37540. case 17: strcpy(PlayerData[playerid][pAccent], "Estonian", 16);
  37541. case 18: strcpy(PlayerData[playerid][pAccent], "Latvian", 16);
  37542. case 19: strcpy(PlayerData[playerid][pAccent], "Dutch", 16);
  37543. case 20: strcpy(PlayerData[playerid][pAccent], "Jamaican", 16);
  37544. case 21: strcpy(PlayerData[playerid][pAccent], "Turkish", 16);
  37545. case 22: strcpy(PlayerData[playerid][pAccent], "Mexican", 16);
  37546. case 23: strcpy(PlayerData[playerid][pAccent], "Spanish", 16);
  37547. case 24: strcpy(PlayerData[playerid][pAccent], "Arabic", 16);
  37548. case 25: strcpy(PlayerData[playerid][pAccent], "Israeli", 16);
  37549. case 26: strcpy(PlayerData[playerid][pAccent], "Romanian", 16);
  37550. case 27: strcpy(PlayerData[playerid][pAccent], "Italian", 16);
  37551. case 28: strcpy(PlayerData[playerid][pAccent], "Gangsta", 16);
  37552. case 29: strcpy(PlayerData[playerid][pAccent], "Greek", 16);
  37553. case 30: strcpy(PlayerData[playerid][pAccent], "Serbian", 16);
  37554. case 31: strcpy(PlayerData[playerid][pAccent], "Balkin", 16);
  37555. case 32: strcpy(PlayerData[playerid][pAccent], "Danish", 16);
  37556. case 33: strcpy(PlayerData[playerid][pAccent], "Scottish", 16);
  37557. case 34: strcpy(PlayerData[playerid][pAccent], "Irish", 16);
  37558. case 35: strcpy(PlayerData[playerid][pAccent], "Indian", 16);
  37559. case 36: strcpy(PlayerData[playerid][pAccent], "Norwegian", 16);
  37560. case 37: strcpy(PlayerData[playerid][pAccent], "Swedish", 16);
  37561. case 38: strcpy(PlayerData[playerid][pAccent], "Finnish", 16);
  37562. case 39: strcpy(PlayerData[playerid][pAccent], "Hungarian", 16);
  37563. case 40: strcpy(PlayerData[playerid][pAccent], "Bulgarian", 16);
  37564. case 41: strcpy(PlayerData[playerid][pAccent], "Pakistani", 16);
  37565. case 42: strcpy(PlayerData[playerid][pAccent], "Cuban", 16);
  37566. case 43: strcpy(PlayerData[playerid][pAccent], "Slavic", 16);
  37567. case 44: strcpy(PlayerData[playerid][pAccent], "Indonesian", 16);
  37568. case 45: strcpy(PlayerData[playerid][pAccent], "Filipino", 16);
  37569. case 46: strcpy(PlayerData[playerid][pAccent], "Hawaiian", 16);
  37570. case 47: strcpy(PlayerData[playerid][pAccent], "Somalian", 16);
  37571. case 48: strcpy(PlayerData[playerid][pAccent], "Armenian", 16);
  37572. case 49: strcpy(PlayerData[playerid][pAccent], "Persian", 16);
  37573. case 50: strcpy(PlayerData[playerid][pAccent], "Vietnamese", 16);
  37574. case 51: strcpy(PlayerData[playerid][pAccent], "Slovenian", 16);
  37575. case 52: strcpy(PlayerData[playerid][pAccent], "Kiwi", 16);
  37576. case 53: strcpy(PlayerData[playerid][pAccent], "Brazilian", 16);
  37577. case 54: strcpy(PlayerData[playerid][pAccent], "Georgian", 16);
  37578. default: SendClientMessage(playerid, COLOR_GREY, "Invalid accent. Valid types range from 0 to 53.");
  37579. }
  37580. }
  37581. return ShowDialogToPlayer(playerid, ACCOUNT_CREATION);
  37582. }
  37583. Dialog:Graffiti_Text(playerid, response, listitem, inputtext[])
  37584. {
  37585. if (response)
  37586. {
  37587. new id = Graffiti_Nearest(playerid);
  37588. if (id == -1)
  37589. return 0;
  37590. if (isnull(inputtext))
  37591. {
  37592. return Dialog_Show(playerid, Graffiti_Text, DIALOG_STYLE_INPUT, "Graffiti Text", "Please enter the text you wish to spray below.\n\nNote: Your text input cannot exceed over 64 characters.", "Submit", "Cancel");
  37593. }
  37594. if (strlen(inputtext) > 64)
  37595. {
  37596. return Dialog_Show(playerid, Graffiti_Text, DIALOG_STYLE_INPUT, "Graffiti Text", "Error: Your input can't exceed 64 characters.\n\nPlease enter the text you wish to spray below.\n\nNote: Your text input cannot exceed over 64 characters.", "Submit", "Cancel");
  37597. }
  37598. if (IsSprayingInProgress(id))
  37599. {
  37600. return SendClientMessage(playerid, COLOR_GREY, "There is another player spraying at this point already.");
  37601. }
  37602. PlayerData[playerid][pGraffiti] = id;
  37603. PlayerData[playerid][pGraffitiTime] = 15;
  37604. GraffitiData[id][graffitiDefault] = 0;
  37605. format(GraffitiData[id][graffitiFont], 50, gang_tag_font[playerid]);
  37606. printf("Debug: %s", GraffitiData[id][graffitiFont]);
  37607. strpack(PlayerData[playerid][pGraffitiText], inputtext, 64 char);
  37608. ApplyAnimationEx(playerid, "GRAFFITI", "spraycan_fire", 4.1, 1, 0, 0, 0, 0);
  37609. SendAdminMessage(COLOR_LIGHTRED, "%s[ID %i] has started spraying a gang tag %s", GetRPName(playerid), playerid, inputtext);
  37610. GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~b~Spraying...~w~ please wait!", 15000, 3);
  37611. SendProximityMessage(playerid, 30.0, COLOR_PURPLE, "* %s takes out a can of spray paint and sprays the wall.", GetRPName(playerid));
  37612. }
  37613. return 1;
  37614. }
  37615. Dialog:DIALOG_REGISTER(playerid, response, listitem, inputtext[])
  37616. {
  37617. if(response)
  37618. {
  37619. if(isnull(inputtext))
  37620. {
  37621. ShowDialogToPlayer(playerid, DIALOG_REGISTER);
  37622. return 1;
  37623. }
  37624. if(strlen(inputtext) < 4)
  37625. {
  37626. SendClientMessage(playerid, COLOR_LIGHTRED, "* Please choose a password containing at least 4 characters.");
  37627. ShowDialogToPlayer(playerid, DIALOG_REGISTER);
  37628. return 1;
  37629. }
  37630. WP_Hash(PlayerData[playerid][pPassword], 129, inputtext);
  37631. Dialog_Show(playerid, DIALOG_CONFIRMPASS, DIALOG_STYLE_PASSWORD, "Old School Roleplay - Confirm Pass", "Please repeat your account password for verification:", "Submit", "Back");
  37632. }
  37633. else
  37634. {
  37635. KickPlayer(playerid);
  37636. }
  37637. return 1;
  37638. }
  37639. Dialog:DIALOG_CONFIRMPASS(playerid, response, listitem, inputtext[])
  37640. {
  37641. if(response)
  37642. {
  37643. new
  37644. password[129];
  37645. if(isnull(inputtext))
  37646. {
  37647. return Dialog_Show(playerid, DIALOG_CONFIRMPASS, DIALOG_STYLE_PASSWORD, "Old School Roleplay - Confirm Pass", "Please repeat your account password for verification:", "Submit", "Back");
  37648. }
  37649. WP_Hash(password, sizeof(password), inputtext);
  37650. if(!strcmp(PlayerData[playerid][pPassword], password))
  37651. {
  37652. gTotalRegistered++;
  37653. SaveServerInfo();
  37654. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO "#TABLE_USERS" (username, password, regdate, lastlogin, ip, passwordchanged) VALUES('%s', '%s', NOW(), NOW(), '%s', 1)", GetPlayerNameEx(playerid), password, GetPlayerIP(playerid));
  37655. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_ACCOUNT_REGISTER, playerid);
  37656. }
  37657. else
  37658. {
  37659. ShowDialogToPlayer(playerid, DIALOG_REGISTER);
  37660. SendClientMessage(playerid, COLOR_LIGHTRED, "* Your repeated password does not match your chosen password. Please try again.");
  37661. }
  37662. }
  37663. else
  37664. {
  37665. ShowDialogToPlayer(playerid, DIALOG_REGISTER);
  37666. }
  37667. return 1;
  37668. }
  37669. Dialog:DIALOG_LOGIN(playerid, response, listitem, inputtext[])
  37670. {
  37671. if(!response)
  37672. {
  37673. ShowDialogToPlayer(playerid, DIALOG_LOGIN);
  37674. }
  37675. if(response)
  37676. {
  37677. new
  37678. specifiers[] = "%D of %M, %Y @ %k:%i",
  37679. password[129];
  37680. if(isnull(inputtext))
  37681. {
  37682. ShowDialogToPlayer(playerid, DIALOG_LOGIN);
  37683. return 1;
  37684. }
  37685. WP_Hash(password, sizeof(password), inputtext);
  37686. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT *, DATE_FORMAT(lastlogin, '%s') AS login_date FROM "#TABLE_USERS" WHERE username = '%s' AND password = '%s'", specifiers, GetPlayerNameEx(playerid), password);
  37687. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_PROCESS_LOGIN, playerid);
  37688. }
  37689. else
  37690. {
  37691. KickPlayer(playerid);
  37692. }
  37693. return 1;
  37694. }
  37695. Dialog:DIALOG_GENDER(playerid, response, listitem, inputtext[])
  37696. {
  37697. if(response)
  37698. {
  37699. if(listitem == 0)
  37700. {
  37701. PlayerData[playerid][pGender] = 1;
  37702. PlayerData[playerid][pSkin] = 299;
  37703. SendClientMessage(playerid, COLOR_YELLOW, "Your character is a Male. Now you need to choose the age of your character.");
  37704. }
  37705. else if(listitem == 1)
  37706. {
  37707. PlayerData[playerid][pGender] = 2;
  37708. PlayerData[playerid][pSkin] = 69;
  37709. SendClientMessage(playerid, COLOR_YELLOW, "Your character is a Female. Now you need to choose the age of your character.");
  37710. }
  37711. ShowDialogToPlayer(playerid, ACCOUNT_CREATION);
  37712. }
  37713. else
  37714. {
  37715. ShowDialogToPlayer(playerid, DIALOG_GENDER);
  37716. }
  37717. return 1;
  37718. }
  37719. Dialog:DIALOG_AGE(playerid, response, listitem, inputtext[])
  37720. {
  37721. if(response)
  37722. {
  37723. new age = strval(inputtext);
  37724. if(!(10 <= age <= 99))
  37725. {
  37726. ShowDialogToPlayer(playerid, DIALOG_AGE);
  37727. SendClientMessage(playerid, COLOR_GREY, "You may only enter a number from 10 to 99. Please try again.");
  37728. return 1;
  37729. }
  37730. PlayerData[playerid][pAge] = age;
  37731. PlayerData[playerid][pReferralUID] = 0;
  37732. //PlayerData[playerid][pTutorial] = 1;
  37733. //PlayerData[playerid][pTutorialTimer] = SetTimerEx("TutorialTimer", 3000, false, "ii", playerid, 1);
  37734. //SendClientMessage(playerid, COLOR_GREEN, "* Good stuff! That's all we need right now. The tutorial will start in a moment.");
  37735. //SetPlayerToSpawn(playerid);
  37736. // SendClientMessageEx(playerid, COLOR_YELLOW, "Wow! your character is %i years old. Have you been referred to the server by anyone?", age);
  37737. ShowDialogToPlayer(playerid, ACCOUNT_CREATION);
  37738. }
  37739. else
  37740. {
  37741. ShowDialogToPlayer(playerid, DIALOG_AGE);
  37742. }
  37743. return 1;
  37744. }
  37745. Dialog:DIALOG_REFERRAL(playerid, response, listitem, inputtext[])
  37746. {
  37747. if(response)
  37748. {
  37749. if(isnull(inputtext) || strlen(inputtext) > 24)
  37750. {
  37751. return ShowDialogToPlayer(playerid, DIALOG_REFERRAL);
  37752. }
  37753. if(!strcmp(inputtext, GetPlayerNameEx(playerid)))
  37754. {
  37755. SendClientMessage(playerid, COLOR_GREY, "You can't put down your own name as a referral.");
  37756. return ShowDialogToPlayer(playerid, DIALOG_REFERRAL);
  37757. }
  37758. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT username, ip, uid FROM "#TABLE_USERS" WHERE username = '%e'", inputtext);
  37759. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_CHECK_REFERRAL, playerid);
  37760. }
  37761. else
  37762. {
  37763. PlayerData[playerid][pTutorial] = 1;
  37764. PlayerData[playerid][pTutorialTimer] = SetTimerEx("TutorialTimer", 3000, false, "ii", playerid, 11);
  37765. //SendClientMessage(playerid, COLOR_YELLOW, "That's all the information we need right now. The tutorial will start in just a moment.");
  37766. }
  37767. return 1;
  37768. }
  37769. Dialog:DIALOG_INTERIORS(playerid, response, listitem, inputtext[])
  37770. {
  37771. if(response)
  37772. {
  37773. TeleportToCoords(playerid, interiorArray[listitem][intX], interiorArray[listitem][intY], interiorArray[listitem][intZ], interiorArray[listitem][intA], interiorArray[listitem][intID], GetPlayerVirtualWorld(playerid));
  37774. GameTextForPlayer(playerid, "~w~Teleported", 5000, 1);
  37775. }
  37776. return 1;
  37777. }
  37778. Dialog:DIALOG_BUY(playerid, response, listitem, inputtext[])
  37779. {
  37780. if(response)
  37781. {
  37782. new businessid = GetInsideBusiness(playerid);
  37783. if(BusinessInfo[businessid][bProducts] <= 0)
  37784. {
  37785. return SendClientMessage(playerid, COLOR_GREY, "This business is out of stock.");
  37786. }
  37787. if(BusinessInfo[businessid][bType] == BUSINESS_STORE)
  37788. {
  37789. switch(listitem)
  37790. {
  37791. case 0:
  37792. {
  37793. new price = 600;
  37794. if(PlayerData[playerid][pCash] < price)
  37795. {
  37796. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  37797. }
  37798. if(PlayerData[playerid][pTraderUpgrade] > 0)
  37799. {
  37800. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  37801. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  37802. }
  37803. PlayerData[playerid][pPhone] = random(799999) + 199999;
  37804. GivePlayerCash(playerid, -price);
  37805. BusinessInfo[businessid][bCash] += price;
  37806. BusinessInfo[businessid][bProducts]--;
  37807. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  37808. mysql_tquery(connectionID, queryBuffer);
  37809. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET phone = %i WHERE uid = %i", PlayerData[playerid][pPhone], PlayerData[playerid][pID]);
  37810. mysql_tquery(connectionID, queryBuffer);
  37811. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received a mobile phone.", GetRPName(playerid), price);
  37812. SendClientMessageEx(playerid, COLOR_WHITE, "Mobile phone purchased. Your new phone number is %i.", PlayerData[playerid][pPhone]);
  37813. }
  37814. case 1:
  37815. {
  37816. new price = 300;
  37817. if(PlayerData[playerid][pCash] < price)
  37818. {
  37819. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  37820. }
  37821. if(PlayerData[playerid][pWalkieTalkie])
  37822. {
  37823. return SendClientMessage(playerid, COLOR_GREY, "You have a walkie talkie already.");
  37824. }
  37825. if(PlayerData[playerid][pTraderUpgrade] > 0)
  37826. {
  37827. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  37828. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  37829. }
  37830. PlayerData[playerid][pWalkieTalkie] = 1;
  37831. GivePlayerCash(playerid, -price);
  37832. BusinessInfo[businessid][bCash] += price;
  37833. BusinessInfo[businessid][bProducts]--;
  37834. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  37835. mysql_tquery(connectionID, queryBuffer);
  37836. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET walkietalkie = 1 WHERE uid = %i", PlayerData[playerid][pID]);
  37837. mysql_tquery(connectionID, queryBuffer);
  37838. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received a walkie talkie.", GetRPName(playerid), price);
  37839. SendClientMessage(playerid, COLOR_WHITE, "Walkie talkie purchased. Use /wt to speak and /channel to change the frequency.");
  37840. }
  37841. case 2:
  37842. {
  37843. new price = 500;
  37844. if(PlayerData[playerid][pCash] < price)
  37845. {
  37846. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  37847. }
  37848. if(PlayerData[playerid][pCigars] >= 20)
  37849. {
  37850. return SendClientMessage(playerid, COLOR_GREY, "You can't have more than 20 cigars.");
  37851. }
  37852. if(PlayerData[playerid][pTraderUpgrade] > 0)
  37853. {
  37854. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  37855. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  37856. }
  37857. PlayerData[playerid][pCigars] += 10;
  37858. GivePlayerCash(playerid, -price);
  37859. BusinessInfo[businessid][bCash] += price;
  37860. BusinessInfo[businessid][bProducts]--;
  37861. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  37862. mysql_tquery(connectionID, queryBuffer);
  37863. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET cigars = %i WHERE uid = %i", PlayerData[playerid][pCigars], PlayerData[playerid][pID]);
  37864. mysql_tquery(connectionID, queryBuffer);
  37865. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received a pack of cigars.", GetRPName(playerid), price);
  37866. SendClientMessage(playerid, COLOR_WHITE, "Cigars purchased. Use /usecigar to smoke a cigar.");
  37867. }
  37868. case 3:
  37869. {
  37870. new price = 100;
  37871. if(PlayerData[playerid][pCash] < price)
  37872. {
  37873. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  37874. }
  37875. if(PlayerData[playerid][pSpraycans] + 10 > 20)
  37876. {
  37877. return SendClientMessage(playerid, COLOR_GREY, "You can't have more than 20 spraycans.");
  37878. }
  37879. if(PlayerData[playerid][pTraderUpgrade] > 0)
  37880. {
  37881. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  37882. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  37883. }
  37884. PlayerData[playerid][pSpraycans] += 10;
  37885. GivePlayerCash(playerid, -price);
  37886. BusinessInfo[businessid][bCash] += price;
  37887. BusinessInfo[businessid][bProducts]--;
  37888. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  37889. mysql_tquery(connectionID, queryBuffer);
  37890. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET spraycans = %i WHERE uid = %i", PlayerData[playerid][pSpraycans], PlayerData[playerid][pID]);
  37891. mysql_tquery(connectionID, queryBuffer);
  37892. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received 10 spraycans.", GetRPName(playerid), price);
  37893. SendClientMessage(playerid, COLOR_WHITE, "Spraycans purchased. Use /colorcar and /paintcar in a vehicle to use them.");
  37894. }
  37895. /* case 4:
  37896. {
  37897. new price = 200;
  37898. if(PlayerData[playerid][pCash] < price)
  37899. {
  37900. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  37901. }
  37902. if(PlayerData[playerid][pPhonebook])
  37903. {
  37904. return SendClientMessage(playerid, COLOR_GREY, "You have a phonebook already.");
  37905. }
  37906. if(PlayerData[playerid][pTraderUpgrade] > 0)
  37907. {
  37908. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  37909. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  37910. }
  37911. PlayerData[playerid][pPhonebook] = 1;
  37912. GivePlayerCash(playerid, -price);
  37913. BusinessInfo[businessid][bCash] += price;
  37914. BusinessInfo[businessid][bProducts]--;
  37915. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  37916. mysql_tquery(connectionID, queryBuffer);
  37917. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET phonebook = 1 WHERE uid = %i", PlayerData[playerid][pID]);
  37918. mysql_tquery(connectionID, queryBuffer);
  37919. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received a phonebook.", GetRPName(playerid), price);
  37920. SendClientMessage(playerid, COLOR_WHITE, "Phonebook purchased. Use /number to lookup a player's number.");
  37921. }*/
  37922. case 4:
  37923. {
  37924. new price = 200;
  37925. if(PlayerData[playerid][pCash] < price)
  37926. {
  37927. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  37928. }
  37929. if(PlayerData[playerid][pTraderUpgrade] > 0)
  37930. {
  37931. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  37932. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  37933. }
  37934. GivePlayerWeaponEx(playerid, 43);
  37935. GivePlayerCash(playerid, -price);
  37936. BusinessInfo[businessid][bCash] += price;
  37937. BusinessInfo[businessid][bProducts]--;
  37938. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  37939. mysql_tquery(connectionID, queryBuffer);
  37940. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received a camera.", GetRPName(playerid), price);
  37941. SendClientMessage(playerid, COLOR_WHITE, "Camera purchased.");
  37942. }
  37943. case 5:
  37944. {
  37945. new price = 50;
  37946. if(PlayerData[playerid][pCash] < price)
  37947. {
  37948. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  37949. }
  37950. if(PlayerData[playerid][pMP3Player])
  37951. {
  37952. return SendClientMessage(playerid, COLOR_GREY, "You have an MP3 player already.");
  37953. }
  37954. if(PlayerData[playerid][pTraderUpgrade] > 0)
  37955. {
  37956. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  37957. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  37958. }
  37959. PlayerData[playerid][pMP3Player] = 1;
  37960. GivePlayerCash(playerid, -price);
  37961. BusinessInfo[businessid][bCash] += price;
  37962. BusinessInfo[businessid][bProducts]--;
  37963. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  37964. mysql_tquery(connectionID, queryBuffer);
  37965. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET mp3player = 1 WHERE uid = %i", PlayerData[playerid][pID]);
  37966. mysql_tquery(connectionID, queryBuffer);
  37967. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received an MP3 player.", GetRPName(playerid), price);
  37968. SendClientMessage(playerid, COLOR_WHITE, "MP3 player purchased. Use /mp3 for a list of options.");
  37969. }
  37970. case 6:
  37971. {
  37972. new price = 50;
  37973. if(PlayerData[playerid][pCash] < price)
  37974. {
  37975. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  37976. }
  37977. if(PlayerData[playerid][pFishingRod])
  37978. {
  37979. return SendClientMessage(playerid, COLOR_GREY, "You have a fishing rod already.");
  37980. }
  37981. if(PlayerData[playerid][pTraderUpgrade] > 0)
  37982. {
  37983. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  37984. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  37985. }
  37986. PlayerData[playerid][pFishingRod] = 1;
  37987. GivePlayerCash(playerid, -price);
  37988. BusinessInfo[businessid][bCash] += price;
  37989. BusinessInfo[businessid][bProducts]--;
  37990. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  37991. mysql_tquery(connectionID, queryBuffer);
  37992. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET fishingrod = 1 WHERE uid = %i", PlayerData[playerid][pID]);
  37993. mysql_tquery(connectionID, queryBuffer);
  37994. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received a fishing rod.", GetRPName(playerid), price);
  37995. SendClientMessage(playerid, COLOR_WHITE, "Fishing rod purchased. Use /fish at the pier or in a boat to begin fishing.");
  37996. }
  37997. case 7:
  37998. {
  37999. new price = 300;
  38000. if(PlayerData[playerid][pCash] < price)
  38001. {
  38002. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38003. }
  38004. if(PlayerData[playerid][pFishingBait] + 10 > 20)
  38005. {
  38006. return SendClientMessage(playerid, COLOR_GREY, "You can't have more than 20 pieces of bait.");
  38007. }
  38008. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38009. {
  38010. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38011. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38012. }
  38013. PlayerData[playerid][pFishingBait] += 10;
  38014. GivePlayerCash(playerid, -price);
  38015. BusinessInfo[businessid][bCash] += price;
  38016. BusinessInfo[businessid][bProducts]--;
  38017. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38018. mysql_tquery(connectionID, queryBuffer);
  38019. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET fishingbait = %i WHERE uid = %i", PlayerData[playerid][pFishingBait], PlayerData[playerid][pID]);
  38020. mysql_tquery(connectionID, queryBuffer);
  38021. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received fish bait.", GetRPName(playerid), price);
  38022. SendClientMessage(playerid, COLOR_WHITE, "Fishing bait purchased. Bait increases the odds of catching bigger fish.");
  38023. }
  38024. case 8:
  38025. {
  38026. new price = 300;
  38027. if(PlayerData[playerid][pCash] < price)
  38028. {
  38029. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38030. }
  38031. if(PlayerData[playerid][pMuriaticAcid] + 1 > 10)
  38032. {
  38033. return SendClientMessage(playerid, COLOR_GREY, "You can't have more than 10 bottles of muriatic acid.");
  38034. }
  38035. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38036. {
  38037. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38038. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38039. }
  38040. PlayerData[playerid][pMuriaticAcid] += 1;
  38041. GivePlayerCash(playerid, -price);
  38042. BusinessInfo[businessid][bCash] += price;
  38043. BusinessInfo[businessid][bProducts]--;
  38044. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38045. mysql_tquery(connectionID, queryBuffer);
  38046. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET muriaticacid = %i WHERE uid = %i", PlayerData[playerid][pMuriaticAcid], PlayerData[playerid][pID]);
  38047. mysql_tquery(connectionID, queryBuffer);
  38048. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received a bottle of muriatic acid.", GetRPName(playerid), price);
  38049. SendClientMessage(playerid, COLOR_WHITE, "Muriatic acid purchased.");
  38050. }
  38051. case 9:
  38052. {
  38053. new price = 30;
  38054. if(PlayerData[playerid][pCash] < price)
  38055. {
  38056. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38057. }
  38058. if(PlayerData[playerid][pBakingSoda] + 1 > 3)
  38059. {
  38060. return SendClientMessage(playerid, COLOR_GREY, "You can't have more than 3 bottles of baking soda.");
  38061. }
  38062. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38063. {
  38064. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38065. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38066. }
  38067. PlayerData[playerid][pBakingSoda] += 1;
  38068. GivePlayerCash(playerid, -price);
  38069. BusinessInfo[businessid][bCash] += price;
  38070. BusinessInfo[businessid][bProducts]--;
  38071. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38072. mysql_tquery(connectionID, queryBuffer);
  38073. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET bakingsoda = %i WHERE uid = %i", PlayerData[playerid][pBakingSoda], PlayerData[playerid][pID]);
  38074. mysql_tquery(connectionID, queryBuffer);
  38075. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received a bottle of baking soda.", GetRPName(playerid), price);
  38076. SendClientMessage(playerid, COLOR_WHITE, "Baking soda purchased.");
  38077. }
  38078. case 10:
  38079. {
  38080. new price = 600;
  38081. if(PlayerData[playerid][pCash] < price)
  38082. {
  38083. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38084. }
  38085. if(PlayerData[playerid][pWatch])
  38086. {
  38087. return SendClientMessage(playerid, COLOR_GREY, "You have a pocket watch already.");
  38088. }
  38089. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38090. {
  38091. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38092. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38093. }
  38094. PlayerData[playerid][pWatch] = 1;
  38095. GivePlayerCash(playerid, -price);
  38096. BusinessInfo[businessid][bCash] += price;
  38097. BusinessInfo[businessid][bProducts]--;
  38098. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38099. mysql_tquery(connectionID, queryBuffer);
  38100. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET watch = 1 WHERE uid = %i", PlayerData[playerid][pID]);
  38101. mysql_tquery(connectionID, queryBuffer);
  38102. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received a pocket watch.", GetRPName(playerid), price);
  38103. SendClientMessage(playerid, COLOR_WHITE, "Pocket watch purchased. Use /watch to toggle it.");
  38104. }
  38105. case 11:
  38106. {
  38107. new price = 150;
  38108. if(PlayerData[playerid][pCash] < price)
  38109. {
  38110. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38111. }
  38112. if(PlayerData[playerid][pGPS])
  38113. {
  38114. return SendClientMessage(playerid, COLOR_GREY, "You have a GPS already.");
  38115. }
  38116. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38117. {
  38118. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38119. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38120. }
  38121. PlayerData[playerid][pGPS] = 1;
  38122. GivePlayerCash(playerid, -price);
  38123. BusinessInfo[businessid][bCash] += price;
  38124. BusinessInfo[businessid][bProducts]--;
  38125. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38126. mysql_tquery(connectionID, queryBuffer);
  38127. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET gps = 1 WHERE uid = %i", PlayerData[playerid][pID]);
  38128. mysql_tquery(connectionID, queryBuffer);
  38129. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received a GPS.", GetRPName(playerid), price);
  38130. SendClientMessage(playerid, COLOR_WHITE, "GPS purchased. Use /gps to toggle it.");
  38131. }
  38132. case 12:
  38133. {
  38134. new price = 70;
  38135. if(PlayerData[playerid][pCash] < price)
  38136. {
  38137. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38138. }
  38139. if(PlayerData[playerid][pGasCan] + 5 > 20)
  38140. {
  38141. return SendClientMessage(playerid, COLOR_GREY, "You can't have more than 20 liters of gas.");
  38142. }
  38143. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38144. {
  38145. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38146. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38147. }
  38148. PlayerData[playerid][pGasCan] += 5;
  38149. GivePlayerCash(playerid, -price);
  38150. BusinessInfo[businessid][bCash] += price;
  38151. BusinessInfo[businessid][bProducts]--;
  38152. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38153. mysql_tquery(connectionID, queryBuffer);
  38154. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET gascan = %i WHERE uid = %i", PlayerData[playerid][pGasCan], PlayerData[playerid][pID]);
  38155. mysql_tquery(connectionID, queryBuffer);
  38156. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received 5 liters of gasoline.", GetRPName(playerid), price);
  38157. SendClientMessage(playerid, COLOR_WHITE, "Gas can purchased. Use /gascan in a vehicle to refill its fuel.");
  38158. }
  38159. case 13:
  38160. {
  38161. new price = 40;
  38162. if(PlayerData[playerid][pCash] < price)
  38163. {
  38164. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38165. }
  38166. if(PlayerData[playerid][pRope] + 2 > 10)
  38167. {
  38168. return SendClientMessage(playerid, COLOR_GREY, "You can't have more than 10 ropes.");
  38169. }
  38170. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38171. {
  38172. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38173. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38174. }
  38175. PlayerData[playerid][pRope] += 2;
  38176. GivePlayerCash(playerid, -price);
  38177. BusinessInfo[businessid][bCash] += price;
  38178. BusinessInfo[businessid][bProducts]--;
  38179. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38180. mysql_tquery(connectionID, queryBuffer);
  38181. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET rope = %i WHERE uid = %i", PlayerData[playerid][pRope], PlayerData[playerid][pID]);
  38182. mysql_tquery(connectionID, queryBuffer);
  38183. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received 2 ropes.", GetRPName(playerid), price);
  38184. SendClientMessage(playerid, COLOR_WHITE, "Ropes purchased. Use /tie to tie people in your vehicle.");
  38185. }
  38186. case 14:
  38187. {
  38188. new price = 300;
  38189. if(PlayerData[playerid][pCash] < price)
  38190. {
  38191. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38192. }
  38193. if(PlayerData[playerid][pBoombox] == 1)
  38194. {
  38195. return SendClientMessage(playerid, COLOR_GREY, "You already own a boombox.");
  38196. }
  38197. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38198. {
  38199. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38200. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38201. }
  38202. PlayerData[playerid][pBoombox] = 1;
  38203. GivePlayerCash(playerid, -price);
  38204. BusinessInfo[businessid][bCash] += price;
  38205. BusinessInfo[businessid][bProducts]--;
  38206. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38207. mysql_tquery(connectionID, queryBuffer);
  38208. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET boombox = %i WHERE uid = %i", PlayerData[playerid][pBoombox], PlayerData[playerid][pID]);
  38209. mysql_tquery(connectionID, queryBuffer);
  38210. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received a boombox.", GetRPName(playerid), price);
  38211. SendClientMessage(playerid, COLOR_WHITE, "Boombox purchased. Use /boombox for more information.");
  38212. }
  38213. case 15:
  38214. {
  38215. new price = 30;
  38216. if(PlayerData[playerid][pCash] < price)
  38217. {
  38218. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38219. }
  38220. if(PlayerData[playerid][pBlindfold] + 2 > 10)
  38221. {
  38222. return SendClientMessage(playerid, COLOR_GREY, "You can't have more than 10 blindfolds.");
  38223. }
  38224. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38225. {
  38226. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38227. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38228. }
  38229. PlayerData[playerid][pBlindfold] += 2;
  38230. GivePlayerCash(playerid, -price);
  38231. BusinessInfo[businessid][bCash] += price;
  38232. BusinessInfo[businessid][bProducts]--;
  38233. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38234. mysql_tquery(connectionID, queryBuffer);
  38235. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET blindfold = %i WHERE uid = %i", PlayerData[playerid][pBlindfold], PlayerData[playerid][pID]);
  38236. mysql_tquery(connectionID, queryBuffer);
  38237. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received 2 blindfolds.", GetRPName(playerid), price);
  38238. SendClientMessage(playerid, COLOR_WHITE, "2 blindfolds purchased. Use /blindfold to blind people in your vehicle.");
  38239. }
  38240. }
  38241. }
  38242. else if(BusinessInfo[businessid][bType] == BUSINESS_GUNSHOP)
  38243. {
  38244. if(PlayerData[playerid][pGunLicense] == 0)
  38245. {
  38246. return SendClientMessage(playerid, COLOR_GREY, "You don't have a gun license, you may request that on our forums");
  38247. }
  38248. if(PlayerData[playerid][pHours] < 2 || PlayerData[playerid][pWeaponRestricted])
  38249. {
  38250. return SendClientMessage(playerid, COLOR_GREY, "You are either weapon restricted or you played less than 2 hours. You can't buy stuff here.");
  38251. }
  38252. switch(listitem)
  38253. {
  38254. case 0:
  38255. {
  38256. new price = 15000;
  38257. if(PlayerData[playerid][pCash] < price)
  38258. {
  38259. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38260. }
  38261. if(PlayerHasWeapon(playerid, 22))
  38262. {
  38263. return SendClientMessage(playerid, COLOR_GREY, "You have this weapon already.");
  38264. }
  38265. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38266. {
  38267. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38268. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38269. }
  38270. GivePlayerCash(playerid, -price);
  38271. GivePlayerWeaponEx(playerid, 22);
  38272. BusinessInfo[businessid][bCash] += price;
  38273. BusinessInfo[businessid][bProducts]--;
  38274. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38275. mysql_tquery(connectionID, queryBuffer);
  38276. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received a 9mm pistol.", GetRPName(playerid), price);
  38277. SendClientMessage(playerid, COLOR_WHITE, "9mm pistol purchased.");
  38278. }
  38279. case 1:
  38280. {
  38281. new price = 25000;
  38282. if(PlayerData[playerid][pCash] < price)
  38283. {
  38284. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38285. }
  38286. if(PlayerHasWeapon(playerid, 25))
  38287. {
  38288. return SendClientMessage(playerid, COLOR_GREY, "You have this weapon already.");
  38289. }
  38290. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38291. {
  38292. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38293. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38294. }
  38295. GivePlayerCash(playerid, -price);
  38296. GivePlayerWeaponEx(playerid, 25);
  38297. BusinessInfo[businessid][bCash] += price;
  38298. BusinessInfo[businessid][bProducts]--;
  38299. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38300. mysql_tquery(connectionID, queryBuffer);
  38301. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received a shotgun.", GetRPName(playerid), price);
  38302. SendClientMessage(playerid, COLOR_WHITE, "Shotgun purchased.");
  38303. }
  38304. case 2:
  38305. {
  38306. new price = 40000;
  38307. if(PlayerData[playerid][pCash] < price)
  38308. {
  38309. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38310. }
  38311. if(PlayerHasWeapon(playerid, 33))
  38312. {
  38313. return SendClientMessage(playerid, COLOR_GREY, "You have this weapon already.");
  38314. }
  38315. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38316. {
  38317. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38318. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38319. }
  38320. GivePlayerCash(playerid, -price);
  38321. GivePlayerWeaponEx(playerid, 33);
  38322. BusinessInfo[businessid][bCash] += price;
  38323. BusinessInfo[businessid][bProducts]--;
  38324. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38325. mysql_tquery(connectionID, queryBuffer);
  38326. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received a country rifle.", GetRPName(playerid), price);
  38327. SendClientMessage(playerid, COLOR_WHITE, "Country rifle purchased.");
  38328. }
  38329. case 3:
  38330. {
  38331. new price = 15000;
  38332. if(PlayerData[playerid][pCash] < price)
  38333. {
  38334. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38335. }
  38336. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38337. {
  38338. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38339. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38340. }
  38341. SetScriptArmour(playerid, 25.0);
  38342. GivePlayerCash(playerid, -price);
  38343. BusinessInfo[businessid][bCash] += price;
  38344. BusinessInfo[businessid][bProducts]--;
  38345. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38346. mysql_tquery(connectionID, queryBuffer);
  38347. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received light armor.", GetRPName(playerid), price);
  38348. SendClientMessage(playerid, COLOR_WHITE, "Light armor of 35 armor points purchased.");
  38349. }
  38350. case 4:
  38351. {
  38352. new price = 25000;
  38353. if(PlayerData[playerid][pCash] < price)
  38354. {
  38355. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38356. }
  38357. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38358. {
  38359. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38360. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38361. }
  38362. SetScriptArmour(playerid, 50.0);
  38363. GivePlayerCash(playerid, -price);
  38364. BusinessInfo[businessid][bCash] += price;
  38365. BusinessInfo[businessid][bProducts]--;
  38366. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38367. mysql_tquery(connectionID, queryBuffer);
  38368. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received medium armor.", GetRPName(playerid), price);
  38369. SendClientMessage(playerid, COLOR_WHITE, "Light armor of 60 armor points purchased.");
  38370. }
  38371. }
  38372. }
  38373. else if(BusinessInfo[businessid][bType] == BUSINESS_CLOTHES)
  38374. {
  38375. new
  38376. string[128];
  38377. format(string, sizeof(string), "%s's %s [%i products]", BusinessInfo[businessid][bOwner], bizInteriors[BusinessInfo[businessid][bType]][intType], BusinessInfo[businessid][bProducts]);
  38378. if(listitem == 0)
  38379. {
  38380. //ShowDialogToPlayer(playerid, DIALOG_BUYCLOTHES);
  38381. Dialog_Show(playerid, ClothesNew, DIALOG_STYLE_LIST, "Clothes Shop", "Custom Skins\nNormal Skins", "Select", "Close");
  38382. }
  38383. else
  38384. {
  38385. PlayerData[playerid][pCategory] = listitem - 1;
  38386. ShowDialogToPlayer(playerid, DIALOG_BUYCLOTHINGTYPE);
  38387. }
  38388. }
  38389. else if(BusinessInfo[businessid][bType] == BUSINESS_GYM)
  38390. {
  38391. switch(listitem)
  38392. {
  38393. case 0:
  38394. {
  38395. if(PlayerData[playerid][pFightStyle] == FIGHT_STYLE_NORMAL)
  38396. {
  38397. return SendClientMessage(playerid, COLOR_GREY, "You already have this fighting style.");
  38398. }
  38399. PlayerData[playerid][pFightStyle] = FIGHT_STYLE_NORMAL;
  38400. SetPlayerFightingStyle(playerid, PlayerData[playerid][pFightStyle]);
  38401. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET fightstyle = %i WHERE uid = %i", PlayerData[playerid][pFightStyle], PlayerData[playerid][pID]);
  38402. mysql_tquery(connectionID, queryBuffer);
  38403. SendClientMessage(playerid, COLOR_WHITE, "You have chosen the normal fighting style.");
  38404. }
  38405. case 1:
  38406. {
  38407. new price = 4725;
  38408. if(PlayerData[playerid][pCash] < price)
  38409. {
  38410. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38411. }
  38412. if(PlayerData[playerid][pFightStyle] == FIGHT_STYLE_BOXING)
  38413. {
  38414. return SendClientMessage(playerid, COLOR_GREY, "You already have this fighting style.");
  38415. }
  38416. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38417. {
  38418. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38419. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38420. }
  38421. GivePlayerCash(playerid, -price);
  38422. BusinessInfo[businessid][bCash] += price;
  38423. PlayerData[playerid][pFightStyle] = FIGHT_STYLE_BOXING;
  38424. SetPlayerFightingStyle(playerid, PlayerData[playerid][pFightStyle]);
  38425. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bID]);
  38426. mysql_tquery(connectionID, queryBuffer);
  38427. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET fightstyle = %i WHERE uid = %i", PlayerData[playerid][pFightStyle], PlayerData[playerid][pID]);
  38428. mysql_tquery(connectionID, queryBuffer);
  38429. SendClientMessageEx(playerid, COLOR_WHITE, "You have purchased the Boxing fighting style for $%i.", price);
  38430. }
  38431. case 2:
  38432. {
  38433. new price = 7650;
  38434. if(PlayerData[playerid][pCash] < price)
  38435. {
  38436. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38437. }
  38438. if(PlayerData[playerid][pFightStyle] == FIGHT_STYLE_KUNGFU)
  38439. {
  38440. return SendClientMessage(playerid, COLOR_GREY, "You already have this fighting style.");
  38441. }
  38442. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38443. {
  38444. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38445. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38446. }
  38447. GivePlayerCash(playerid, -price);
  38448. BusinessInfo[businessid][bCash] += price;
  38449. PlayerData[playerid][pFightStyle] = FIGHT_STYLE_KUNGFU;
  38450. SetPlayerFightingStyle(playerid, PlayerData[playerid][pFightStyle]);
  38451. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bID]);
  38452. mysql_tquery(connectionID, queryBuffer);
  38453. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET fightstyle = %i WHERE uid = %i", PlayerData[playerid][pFightStyle], PlayerData[playerid][pID]);
  38454. mysql_tquery(connectionID, queryBuffer);
  38455. SendClientMessageEx(playerid, COLOR_WHITE, "You have purchased the Kung-Fu fighting style for $%i.", price);
  38456. }
  38457. case 3:
  38458. {
  38459. new price = 9275;
  38460. if(PlayerData[playerid][pCash] < price)
  38461. {
  38462. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38463. }
  38464. if(PlayerData[playerid][pFightStyle] == FIGHT_STYLE_KNEEHEAD)
  38465. {
  38466. return SendClientMessage(playerid, COLOR_GREY, "You already have this fighting style.");
  38467. }
  38468. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38469. {
  38470. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38471. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38472. }
  38473. GivePlayerCash(playerid, -price);
  38474. BusinessInfo[businessid][bCash] += price;
  38475. PlayerData[playerid][pFightStyle] = FIGHT_STYLE_KNEEHEAD;
  38476. SetPlayerFightingStyle(playerid, PlayerData[playerid][pFightStyle]);
  38477. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bID]);
  38478. mysql_tquery(connectionID, queryBuffer);
  38479. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET fightstyle = %i WHERE uid = %i", PlayerData[playerid][pFightStyle], PlayerData[playerid][pID]);
  38480. mysql_tquery(connectionID, queryBuffer);
  38481. SendClientMessageEx(playerid, COLOR_WHITE, "You have purchased the Kneehead fighting style for $%i.", price);
  38482. }
  38483. case 4:
  38484. {
  38485. new price = 1250;
  38486. if(PlayerData[playerid][pCash] < price)
  38487. {
  38488. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38489. }
  38490. if(PlayerData[playerid][pFightStyle] == FIGHT_STYLE_GRABKICK)
  38491. {
  38492. return SendClientMessage(playerid, COLOR_GREY, "You already have this fighting style.");
  38493. }
  38494. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38495. {
  38496. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38497. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38498. }
  38499. GivePlayerCash(playerid, -price);
  38500. BusinessInfo[businessid][bCash] += price;
  38501. PlayerData[playerid][pFightStyle] = FIGHT_STYLE_GRABKICK;
  38502. SetPlayerFightingStyle(playerid, PlayerData[playerid][pFightStyle]);
  38503. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bID]);
  38504. mysql_tquery(connectionID, queryBuffer);
  38505. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET fightstyle = %i WHERE uid = %i", PlayerData[playerid][pFightStyle], PlayerData[playerid][pID]);
  38506. mysql_tquery(connectionID, queryBuffer);
  38507. SendClientMessageEx(playerid, COLOR_WHITE, "You have purchased the Grabkick fighting style for $%i.", price);
  38508. }
  38509. case 5:
  38510. {
  38511. new price = 2950;
  38512. if(PlayerData[playerid][pCash] < price)
  38513. {
  38514. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38515. }
  38516. if(PlayerData[playerid][pFightStyle] == FIGHT_STYLE_ELBOW)
  38517. {
  38518. return SendClientMessage(playerid, COLOR_GREY, "You already have this fighting style.");
  38519. }
  38520. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38521. {
  38522. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38523. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38524. }
  38525. GivePlayerCash(playerid, -price);
  38526. BusinessInfo[businessid][bCash] += price;
  38527. PlayerData[playerid][pFightStyle] = FIGHT_STYLE_ELBOW;
  38528. SetPlayerFightingStyle(playerid, PlayerData[playerid][pFightStyle]);
  38529. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bID]);
  38530. mysql_tquery(connectionID, queryBuffer);
  38531. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET fightstyle = %i WHERE uid = %i", PlayerData[playerid][pFightStyle], PlayerData[playerid][pID]);
  38532. mysql_tquery(connectionID, queryBuffer);
  38533. SendClientMessageEx(playerid, COLOR_WHITE, "You have purchased the Elbow fighting style for $%i.", price);
  38534. }
  38535. }
  38536. }
  38537. else if(BusinessInfo[businessid][bType] == BUSINESS_RESTAURANT)
  38538. {
  38539. switch(listitem)
  38540. {
  38541. case 0:
  38542. {
  38543. new price = 10;
  38544. if(PlayerData[playerid][pCash] < price)
  38545. {
  38546. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38547. }
  38548. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38549. {
  38550. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38551. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38552. }
  38553. GivePlayerCash(playerid, -price);
  38554. GivePlayerHealth(playerid, 10.0);
  38555. BusinessInfo[businessid][bCash] += price;
  38556. BusinessInfo[businessid][bProducts]--;
  38557. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38558. mysql_tquery(connectionID, queryBuffer);
  38559. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received a bottled water.", GetRPName(playerid), price);
  38560. }
  38561. case 1:
  38562. {
  38563. new price = 30;
  38564. if(PlayerData[playerid][pCash] < price)
  38565. {
  38566. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38567. }
  38568. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38569. {
  38570. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38571. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38572. }
  38573. GivePlayerCash(playerid, -price);
  38574. GivePlayerHealth(playerid, 15.0);
  38575. BusinessInfo[businessid][bCash] += price;
  38576. BusinessInfo[businessid][bProducts]--;
  38577. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38578. mysql_tquery(connectionID, queryBuffer);
  38579. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received a can of sprunk.", GetRPName(playerid), price);
  38580. }
  38581. case 2:
  38582. {
  38583. new price = 40;
  38584. if(PlayerData[playerid][pCash] < price)
  38585. {
  38586. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38587. }
  38588. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38589. {
  38590. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38591. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38592. }
  38593. GivePlayerCash(playerid, -price);
  38594. GivePlayerHealth(playerid, 20.0);
  38595. BusinessInfo[businessid][bCash] += price;
  38596. BusinessInfo[businessid][bProducts]--;
  38597. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38598. mysql_tquery(connectionID, queryBuffer);
  38599. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received french fries.", GetRPName(playerid), price);
  38600. }
  38601. case 3:
  38602. {
  38603. new price = 40;
  38604. if(PlayerData[playerid][pCash] < price)
  38605. {
  38606. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38607. }
  38608. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38609. {
  38610. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38611. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38612. }
  38613. GivePlayerCash(playerid, -price);
  38614. GivePlayerHealth(playerid, 25.0);
  38615. BusinessInfo[businessid][bCash] += price;
  38616. BusinessInfo[businessid][bProducts]--;
  38617. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38618. mysql_tquery(connectionID, queryBuffer);
  38619. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received a hamburger.", GetRPName(playerid), price);
  38620. }
  38621. case 4:
  38622. {
  38623. new price = 50;
  38624. if(PlayerData[playerid][pCash] < price)
  38625. {
  38626. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38627. }
  38628. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38629. {
  38630. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38631. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38632. }
  38633. GivePlayerCash(playerid, -price);
  38634. GivePlayerHealth(playerid, 30.0);
  38635. BusinessInfo[businessid][bCash] += price;
  38636. BusinessInfo[businessid][bProducts]--;
  38637. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38638. mysql_tquery(connectionID, queryBuffer);
  38639. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received a cheeseburger.", GetRPName(playerid), price);
  38640. }
  38641. case 5:
  38642. {
  38643. new price = 60;
  38644. if(PlayerData[playerid][pCash] < price)
  38645. {
  38646. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38647. }
  38648. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38649. {
  38650. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38651. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38652. }
  38653. GivePlayerCash(playerid, -price);
  38654. GivePlayerHealth(playerid, 25.0);
  38655. BusinessInfo[businessid][bCash] += price;
  38656. BusinessInfo[businessid][bProducts]--;
  38657. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38658. mysql_tquery(connectionID, queryBuffer);
  38659. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received a mac & cheese.", GetRPName(playerid), price);
  38660. }
  38661. case 6:
  38662. {
  38663. new price = 70;
  38664. if(PlayerData[playerid][pCash] < price)
  38665. {
  38666. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38667. }
  38668. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38669. {
  38670. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38671. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38672. }
  38673. GivePlayerCash(playerid, -price);
  38674. GivePlayerHealth(playerid, 35.0);
  38675. BusinessInfo[businessid][bCash] += price;
  38676. BusinessInfo[businessid][bProducts]--;
  38677. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38678. mysql_tquery(connectionID, queryBuffer);
  38679. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received a club sandwich.", GetRPName(playerid), price);
  38680. }
  38681. case 7:
  38682. {
  38683. new price = 80;
  38684. if(PlayerData[playerid][pCash] < price)
  38685. {
  38686. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38687. }
  38688. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38689. {
  38690. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38691. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38692. }
  38693. GivePlayerCash(playerid, -price);
  38694. GivePlayerHealth(playerid, 45.0);
  38695. BusinessInfo[businessid][bCash] += price;
  38696. BusinessInfo[businessid][bProducts]--;
  38697. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38698. mysql_tquery(connectionID, queryBuffer);
  38699. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received fish & chips.", GetRPName(playerid), price);
  38700. }
  38701. case 8:
  38702. {
  38703. new price = 110;
  38704. if(PlayerData[playerid][pCash] < price)
  38705. {
  38706. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38707. }
  38708. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38709. {
  38710. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38711. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38712. }
  38713. GivePlayerCash(playerid, -price);
  38714. GivePlayerHealth(playerid, 55.0);
  38715. BusinessInfo[businessid][bCash] += price;
  38716. BusinessInfo[businessid][bProducts]--;
  38717. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38718. mysql_tquery(connectionID, queryBuffer);
  38719. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received a pan pizza.", GetRPName(playerid), price);
  38720. }
  38721. }
  38722. }
  38723. else if(BusinessInfo[businessid][bType] == BUSINESS_BARCLUB)
  38724. {
  38725. switch(listitem)
  38726. {
  38727. case 0:
  38728. {
  38729. new price = 10;
  38730. if(PlayerData[playerid][pCash] < price)
  38731. {
  38732. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38733. }
  38734. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38735. {
  38736. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38737. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38738. }
  38739. GivePlayerCash(playerid, -price);
  38740. GivePlayerHealth(playerid, 10.0);
  38741. BusinessInfo[businessid][bCash] += price;
  38742. BusinessInfo[businessid][bProducts]--;
  38743. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38744. mysql_tquery(connectionID, queryBuffer);
  38745. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received a bottled water.", GetRPName(playerid), price);
  38746. }
  38747. case 1:
  38748. {
  38749. new price = 30;
  38750. if(PlayerData[playerid][pCash] < price)
  38751. {
  38752. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38753. }
  38754. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38755. {
  38756. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38757. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38758. }
  38759. GivePlayerCash(playerid, -price);
  38760. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  38761. BusinessInfo[businessid][bCash] += price;
  38762. BusinessInfo[businessid][bProducts]--;
  38763. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38764. mysql_tquery(connectionID, queryBuffer);
  38765. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received a can of sprunk.", GetRPName(playerid), price);
  38766. }
  38767. case 2:
  38768. {
  38769. new price = 45;
  38770. if(PlayerData[playerid][pCash] < price)
  38771. {
  38772. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38773. }
  38774. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38775. {
  38776. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38777. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38778. }
  38779. GivePlayerCash(playerid, -price);
  38780. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
  38781. BusinessInfo[businessid][bCash] += price;
  38782. BusinessInfo[businessid][bProducts]--;
  38783. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38784. mysql_tquery(connectionID, queryBuffer);
  38785. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received a bottle of beer.", GetRPName(playerid), price);
  38786. }
  38787. case 3:
  38788. {
  38789. new price = 300;
  38790. if(PlayerData[playerid][pCash] < price)
  38791. {
  38792. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38793. }
  38794. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38795. {
  38796. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38797. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38798. }
  38799. GivePlayerCash(playerid, -price);
  38800. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  38801. BusinessInfo[businessid][bCash] += price;
  38802. BusinessInfo[businessid][bProducts]--;
  38803. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38804. mysql_tquery(connectionID, queryBuffer);
  38805. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received a bottle of wine.", GetRPName(playerid), price);
  38806. }
  38807. case 4:
  38808. {
  38809. new price = 500;
  38810. if(PlayerData[playerid][pCash] < price)
  38811. {
  38812. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this.");
  38813. }
  38814. if(PlayerData[playerid][pTraderUpgrade] > 0)
  38815. {
  38816. price -= percent(price, (PlayerData[playerid][pTraderUpgrade] * 10));
  38817. SendClientMessageEx(playerid, COLOR_YELLOW3, "Trader Perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerData[playerid][pTraderUpgrade], price);
  38818. }
  38819. GivePlayerCash(playerid, -price);
  38820. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  38821. BusinessInfo[businessid][bCash] += price;
  38822. BusinessInfo[businessid][bProducts]--;
  38823. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38824. mysql_tquery(connectionID, queryBuffer);
  38825. ShowActionBubble(playerid, "* %s paid $%i to the shopkeeper and received a bottle of whiskey.", GetRPName(playerid), price);
  38826. }
  38827. }
  38828. }
  38829. else if(BusinessInfo[businessid][bType] == BUSINESS_TOOLSHOP)
  38830. {
  38831. //First aid kit\t500 materials\nBody repair kit\t1000 materials\nPolice scanner\t2000 materials\nRimkit\t4000 materials
  38832. switch(listitem)
  38833. {
  38834. case 0:
  38835. {
  38836. if(PlayerData[playerid][pMaterials] < 1000)
  38837. {
  38838. return SendClientMessage(playerid, COLOR_GREY, "You don't have that many materials.");
  38839. }
  38840. if(PlayerData[playerid][pFirstAid] + 1 > 20)
  38841. {
  38842. return SendClientMessage(playerid, COLOR_GREY, "You can't carry more than 20 first aid kits.");
  38843. }
  38844. PlayerData[playerid][pFirstAid]++;
  38845. PlayerData[playerid][pMaterials] -= 1000;
  38846. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET firstaid = %i, materials = %i WHERE uid = %i", PlayerData[playerid][pFirstAid], PlayerData[playerid][pMaterials], PlayerData[playerid][pID]);
  38847. mysql_tquery(connectionID, queryBuffer);
  38848. BusinessInfo[businessid][bMaterials] += 1000;
  38849. BusinessInfo[businessid][bProducts]--;
  38850. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET materials = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bMaterials], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38851. mysql_tquery(connectionID, queryBuffer);
  38852. ShowActionBubble(playerid, "* %s exchanged 500 materials to the shopkeeper and received a first aid kit.", GetRPName(playerid));
  38853. SendClientMessage(playerid, COLOR_WHITE, "HINT: Use /firstaid to in order to use a first aid kit.");
  38854. }
  38855. case 1:
  38856. {
  38857. if(PlayerData[playerid][pMaterials] < 10000)
  38858. {
  38859. return SendClientMessage(playerid, COLOR_GREY, "You don't have that many materials.");
  38860. }
  38861. if(PlayerData[playerid][pBodykits] + 1 > 10)
  38862. {
  38863. return SendClientMessage(playerid, COLOR_GREY, "You can't carry more than 10 bodywork kits.");
  38864. }
  38865. PlayerData[playerid][pBodykits]++;
  38866. PlayerData[playerid][pMaterials] -= 10000;
  38867. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET bodykits = %i, materials = %i WHERE uid = %i", PlayerData[playerid][pBodykits], PlayerData[playerid][pMaterials], PlayerData[playerid][pID]);
  38868. mysql_tquery(connectionID, queryBuffer);
  38869. BusinessInfo[businessid][bMaterials] += 10000;
  38870. BusinessInfo[businessid][bProducts]--;
  38871. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET materials = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bMaterials], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38872. mysql_tquery(connectionID, queryBuffer);
  38873. ShowActionBubble(playerid, "* %s exchanged 1000 materials to the shopkeeper and received a bodywork kit.", GetRPName(playerid));
  38874. SendClientMessage(playerid, COLOR_WHITE, "HINT: Use /bodykit in a vehicle to repair its bodywork and health.");
  38875. }
  38876. case 2:
  38877. {
  38878. if(PlayerData[playerid][pMaterials] < 5000)
  38879. {
  38880. return SendClientMessage(playerid, COLOR_GREY, "You don't have that many materials.");
  38881. }
  38882. if(PlayerData[playerid][pPoliceScanner])
  38883. {
  38884. return SendClientMessage(playerid, COLOR_GREY, "You already have this item.");
  38885. }
  38886. PlayerData[playerid][pPoliceScanner] = 1;
  38887. PlayerData[playerid][pMaterials] -= 5000;
  38888. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET policescanner = 1, materials = %i WHERE uid = %i", PlayerData[playerid][pMaterials], PlayerData[playerid][pID]);
  38889. mysql_tquery(connectionID, queryBuffer);
  38890. BusinessInfo[businessid][bMaterials] += 5000;
  38891. BusinessInfo[businessid][bProducts]--;
  38892. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET materials = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bMaterials], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38893. mysql_tquery(connectionID, queryBuffer);
  38894. ShowActionBubble(playerid, "* %s exchanged 2000 materials to the shopkeeper and received a police scanner.", GetRPName(playerid));
  38895. SendClientMessage(playerid, COLOR_WHITE, "HINT: Use /scanner to listen to emergency and department chats.");
  38896. }
  38897. case 3:
  38898. {
  38899. if(PlayerData[playerid][pMaterials] < 4000)
  38900. {
  38901. return SendClientMessage(playerid, COLOR_GREY, "You don't have that many materials.");
  38902. }
  38903. if(PlayerData[playerid][pRimkits] + 1 > 5)
  38904. {
  38905. return SendClientMessage(playerid, COLOR_GREY, "You can't carry more than 5 rimkits.");
  38906. }
  38907. PlayerData[playerid][pRimkits]++;
  38908. PlayerData[playerid][pMaterials] -= 4000;
  38909. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET rimkits = %i, materials = %i WHERE uid = %i", PlayerData[playerid][pRimkits], PlayerData[playerid][pMaterials], PlayerData[playerid][pID]);
  38910. mysql_tquery(connectionID, queryBuffer);
  38911. BusinessInfo[businessid][bMaterials] += 4000;
  38912. BusinessInfo[businessid][bProducts]--;
  38913. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET materials = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bMaterials], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38914. mysql_tquery(connectionID, queryBuffer);
  38915. ShowActionBubble(playerid, "* %s exchanged 4000 materials to the shopkeeper and received a rimkit.", GetRPName(playerid));
  38916. SendClientMessage(playerid, COLOR_WHITE, "HINT: Use /rimkit in your vehicle to install a new set of rims.");
  38917. }
  38918. case 4:
  38919. {
  38920. if(PlayerData[playerid][pCash] < 500)
  38921. return SendClientMessage(playerid, COLOR_GREY, "You dont have enough money to purchase");
  38922. PlayerData[playerid][pHelmet] = 1;
  38923. GivePlayerCash(playerid, -500);
  38924. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET helmet = %d WHERE uid = %i", PlayerData[playerid][pHelmet], PlayerData[playerid][pID]);
  38925. mysql_tquery(connectionID, queryBuffer);
  38926. SendClientMessage(playerid, COLOR_GREEN, "Helmet purchased. /helmet to use it.");
  38927. }
  38928. case 5:
  38929. {
  38930. if(PlayerData[playerid][pMaterials] < 2500)
  38931. {
  38932. return SendClientMessage(playerid, COLOR_GREY, "You don't have that many materials.");
  38933. }
  38934. if(PlayerData[playerid][pHouseAlarm] > 1)
  38935. {
  38936. return SendClientMessage(playerid, COLOR_GREY, "You can't carry more than 1 house alarm.");
  38937. }
  38938. PlayerData[playerid][pHouseAlarm]++;
  38939. PlayerData[playerid][pMaterials] -= 2500;
  38940. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET housealarm = %i, materials = %i WHERE uid = %i", PlayerData[playerid][pRimkits], PlayerData[playerid][pMaterials], PlayerData[playerid][pID]);
  38941. mysql_tquery(connectionID, queryBuffer);
  38942. BusinessInfo[businessid][bMaterials] += 2500;
  38943. BusinessInfo[businessid][bProducts]--;
  38944. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET materials = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bMaterials], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38945. mysql_tquery(connectionID, queryBuffer);
  38946. ShowActionBubble(playerid, "* %s exchanged 2500 materials to the shopkeeper and received a house alarm.", GetRPName(playerid));
  38947. SendClientMessage(playerid, COLOR_WHITE, "HINT: Use /usehousealarm in your house to install the alarm.");
  38948. }
  38949. case 6: //pVehicleCMD
  38950. {
  38951. if(PlayerData[playerid][pMaterials] < 4500)
  38952. {
  38953. return SendClientMessage(playerid, COLOR_GREY, "You don't have that many materials.");
  38954. }
  38955. if(PlayerData[playerid][pVehicleCMD] == 1)
  38956. {
  38957. return SendClientMessage(playerid, COLOR_GREY, "You can't carry more than 1 vehicle command.");
  38958. }
  38959. PlayerData[playerid][pVehicleCMD] = 1;
  38960. PlayerData[playerid][pMaterials] -= 4500;
  38961. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET vehiclecmd = %i, materials = %i WHERE uid = %i", PlayerData[playerid][pRimkits], PlayerData[playerid][pMaterials], PlayerData[playerid][pID]);
  38962. mysql_tquery(connectionID, queryBuffer);
  38963. BusinessInfo[businessid][bMaterials] += 4500;
  38964. BusinessInfo[businessid][bProducts]--;
  38965. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET materials = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bMaterials], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38966. mysql_tquery(connectionID, queryBuffer);
  38967. ShowActionBubble(playerid, "* %s exchanged 4500 materials to the shopkeeper and received a auto vehicle command.", GetRPName(playerid));
  38968. SendClientMessage(playerid, COLOR_WHITE, "HINT: Press '2' while you are driving an vehicle to activate.");
  38969. }
  38970. case 7: //pCrowbar
  38971. {
  38972. if(PlayerData[playerid][pMaterials] < 2500)
  38973. {
  38974. return SendClientMessage(playerid, COLOR_GREY, "You don't have that many materials.");
  38975. }
  38976. if(PlayerData[playerid][pVehicleCMD] == 1)
  38977. {
  38978. return SendClientMessage(playerid, COLOR_GREY, "You can't carry more than 1 vehicle command.");
  38979. }
  38980. PlayerData[playerid][pCrowbar] = 1;
  38981. PlayerData[playerid][pMaterials] -= 2500;
  38982. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET crowbar = %i, materials = %i WHERE uid = %i", PlayerData[playerid][pRimkits], PlayerData[playerid][pMaterials], PlayerData[playerid][pID]);
  38983. mysql_tquery(connectionID, queryBuffer);
  38984. BusinessInfo[businessid][bMaterials] += 2500;
  38985. BusinessInfo[businessid][bProducts]--;
  38986. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET materials = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bMaterials], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  38987. mysql_tquery(connectionID, queryBuffer);
  38988. ShowActionBubble(playerid, "* %s exchanged 2500 materials to the shopkeeper and received a crowbar.", GetRPName(playerid));
  38989. SendClientMessage(playerid, COLOR_WHITE, "HINT: Use '/breakcuffs' to break cuffs from anybody's hand.");
  38990. }
  38991. }
  38992. }
  38993. }
  38994. return 1;
  38995. }
  38996. Dialog:DIALOG_PICKLOAD(playerid, response, listitem, inputtext[])
  38997. {
  38998. if(response)
  38999. {
  39000. if(!PlayerHasJob(playerid, JOB_COURIER))
  39001. {
  39002. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you are not a Courier.");
  39003. }
  39004. if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 414 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 498)
  39005. {
  39006. return SendClientMessage(playerid, COLOR_GREY, "You need to be driving a Mule or a Boxville.");
  39007. }
  39008. if(!IsPlayerInRangeOfPoint(playerid, 8.0, -63.4372, -1121.4932, 1.1103))
  39009. {
  39010. return SendClientMessage(playerid, COLOR_GREY, "You are not at the loading dock.");
  39011. }
  39012. switch(listitem)
  39013. {
  39014. case 0:
  39015. {
  39016. SendClientMessage(playerid, COLOR_AQUA, "You selected {FF6347}Grocery supplies{33CCFF}. Use /deliver at any Supermarket to drop off this shipment.");
  39017. PlayerData[playerid][pShipment] = BUSINESS_STORE;
  39018. }
  39019. case 1:
  39020. {
  39021. SendClientMessage(playerid, COLOR_AQUA, "You selected {FF6347}Ammunition{33CCFF}. Use /deliver at any Gun Shop to drop off this shipment.");
  39022. PlayerData[playerid][pShipment] = BUSINESS_GUNSHOP;
  39023. }
  39024. case 2:
  39025. {
  39026. SendClientMessage(playerid, COLOR_AQUA, "You selected {FF6347}Clothing items{33CCFF}. Use /deliver at any Clothes Shop to drop off this shipment.");
  39027. PlayerData[playerid][pShipment] = BUSINESS_CLOTHES;
  39028. }
  39029. case 3:
  39030. {
  39031. SendClientMessage(playerid, COLOR_AQUA, "You selected {FF6347}Food & drinks{33CCFF}. Use /deliver at any Restaurant to drop off this shipment.");
  39032. PlayerData[playerid][pShipment] = BUSINESS_RESTAURANT;
  39033. }
  39034. case 4:
  39035. {
  39036. SendClientMessage(playerid, COLOR_AQUA, "You selected {FF6347}Beverages{33CCFF}. Use /deliver at any Club/Bar to drop off this shipment.");
  39037. PlayerData[playerid][pShipment] = BUSINESS_BARCLUB;
  39038. }
  39039. case 5:
  39040. {
  39041. SendClientMessage(playerid, COLOR_AQUA, "You selected {FF6347}Tools & equipment{33CCFF}. Use /deliver at any Tool Shop to drop off this shipment.");
  39042. PlayerData[playerid][pShipment] = BUSINESS_TOOLSHOP;
  39043. }
  39044. }
  39045. PlayerData[playerid][pLastLoad] = gettime();
  39046. }
  39047. return 1;
  39048. }
  39049. Dialog:DIALOG_UNREADTEXTS(playerid, response, listitem, inputtext[])
  39050. {
  39051. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM texts WHERE recipient_number = %i ORDER BY date DESC LIMIT 25", PlayerData[playerid][pPhone]);
  39052. mysql_tquery(connectionID, queryBuffer);
  39053. if(response)
  39054. {
  39055. callcmd::texts(playerid, "\1");
  39056. }
  39057. return 1;
  39058. }
  39059. Dialog:DIALOG_ATM(playerid, response, listitem, inputtext[])
  39060. {
  39061. if(response)
  39062. {
  39063. if(listitem == 0)
  39064. {
  39065. ShowDialogToPlayer(playerid, DIALOG_ATMDEPOSIT);
  39066. }
  39067. else
  39068. {
  39069. ShowDialogToPlayer(playerid, DIALOG_ATMWITHDRAW);
  39070. }
  39071. }
  39072. return 1;
  39073. }
  39074. Dialog:DIALOG_ATMDEPOSIT(playerid, response, listitem, inputtext[])
  39075. {
  39076. if(response)
  39077. {
  39078. new amount, fee;
  39079. if(sscanf(inputtext, "i", amount))
  39080. {
  39081. return ShowDialogToPlayer(playerid, DIALOG_ATM);
  39082. }
  39083. if(amount < 1 || amount > PlayerData[playerid][pCash])
  39084. {
  39085. SendClientMessage(playerid, COLOR_GREY, "Insufficient amount. Please try again.");
  39086. ShowDialogToPlayer(playerid, DIALOG_ATMDEPOSIT);
  39087. return 1;
  39088. }
  39089. if(amount > 1000000)
  39090. {
  39091. SendClientMessage(playerid, COLOR_GREY, "You can't deposit more than $1,000,000 at a time.");
  39092. ShowDialogToPlayer(playerid, DIALOG_ATMDEPOSIT);
  39093. return 1;
  39094. }
  39095. PlayerData[playerid][pBank] += amount;
  39096. GivePlayerCash(playerid, -amount);
  39097. if(PlayerData[playerid][pDonator] == 0)
  39098. {
  39099. fee = percent(amount, 3);
  39100. PlayerData[playerid][pBank] -= fee;
  39101. // AddToTaxVault(fee);
  39102. }
  39103. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET bank = %i WHERE uid = %i", PlayerData[playerid][pBank], PlayerData[playerid][pID]);
  39104. mysql_tquery(connectionID, queryBuffer);
  39105. ShowActionBubble(playerid, "* %s presses a button and deposits some cash into the ATM.", GetRPName(playerid));
  39106. SendClientMessageEx(playerid, COLOR_AQUA, "You have deposited %s into your account. Your new balance is %s.", FormatNumber(amount), FormatNumber(PlayerData[playerid][pBank]));
  39107. if(fee)
  39108. {
  39109. SendClientMessageEx(playerid, COLOR_WHITE, "A 3 percent convenience fee of %s was deducted from your bank account.", FormatNumber(fee));
  39110. AddToTaxVault(fee);
  39111. }
  39112. else if(PlayerData[playerid][pDonator] > 0)
  39113. {
  39114. SendClientMessage(playerid, COLOR_VIP, "VIP Perk: You do not pay the 3 percent convenience fee as you are a VIP!");
  39115. }
  39116. }
  39117. return 1;
  39118. }
  39119. Dialog:DIALOG_ATMWITHDRAW(playerid, response, listitem, inputtext[])
  39120. {
  39121. if(response)
  39122. {
  39123. new amount, fee;
  39124. if(sscanf(inputtext, "i", amount))
  39125. {
  39126. return ShowDialogToPlayer(playerid, DIALOG_ATMWITHDRAW);
  39127. }
  39128. if(amount < 1 || amount > PlayerData[playerid][pBank])
  39129. {
  39130. SendClientMessage(playerid, COLOR_GREY, "Insufficient amount. Please try again.");
  39131. ShowDialogToPlayer(playerid, DIALOG_ATMWITHDRAW);
  39132. return 1;
  39133. }
  39134. if(amount > 1000000)
  39135. {
  39136. SendClientMessage(playerid, COLOR_GREY, "You can't withdraw more than $1,000,000 at a time.");
  39137. ShowDialogToPlayer(playerid, DIALOG_ATMWITHDRAW);
  39138. return 1;
  39139. }
  39140. PlayerData[playerid][pBank] -= amount;
  39141. GivePlayerCash(playerid, amount);
  39142. if(PlayerData[playerid][pDonator] == 0)
  39143. {
  39144. fee = percent(amount, 3);
  39145. PlayerData[playerid][pBank] -= fee;
  39146. }
  39147. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET bank = %i WHERE uid = %i", PlayerData[playerid][pBank], PlayerData[playerid][pID]);
  39148. mysql_tquery(connectionID, queryBuffer);
  39149. ShowActionBubble(playerid, "* %s presses a button and withdraws some cash from the ATM.", GetRPName(playerid));
  39150. SendClientMessageEx(playerid, COLOR_AQUA, "You have withdrawn %s from your account. Your new balance is %s.", FormatNumber(amount), FormatNumber(PlayerData[playerid][pBank]));
  39151. if(fee)
  39152. {
  39153. SendClientMessageEx(playerid, COLOR_WHITE, "A 3 percent convenience fee of %s was deducted from your bank account.", FormatNumber(fee));
  39154. AddToTaxVault(fee);
  39155. }
  39156. else if(PlayerData[playerid][pDonator] > 0)
  39157. {
  39158. SendClientMessage(playerid, COLOR_VIP, "VIP Perk: You do not pay the 3 percent convenience fee as you are a VIP!");
  39159. }
  39160. }
  39161. return 1;
  39162. }
  39163. Dialog:DIALOG_CHANGEPASS(playerid, response, listitem, inputtext[])
  39164. {
  39165. if(response)
  39166. {
  39167. if(strlen(inputtext) < 4)
  39168. {
  39169. return SendClientMessage(playerid, COLOR_GREY, "You need to enter a password greater than 4 characters.");
  39170. }
  39171. new
  39172. password[129];
  39173. WP_Hash(password, sizeof(password), inputtext);
  39174. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET password = '%s', passwordchanged = '1' WHERE uid = %i", password, PlayerData[playerid][pID]);
  39175. mysql_tquery(connectionID, queryBuffer);
  39176. SendClientMessage(playerid, COLOR_WHITE, "Your account password was changed successfully.");
  39177. }
  39178. return 1;
  39179. }
  39180. Dialog:DIALOG_BUYCLOTHINGTYPE(playerid, response, listitem, inputtext[])
  39181. {
  39182. if(response)
  39183. {
  39184. PlayerData[playerid][pMenuType] = listitem;
  39185. if(listitem == 0)
  39186. ShowClothingSelectionMenu(playerid);
  39187. else
  39188. ShowDialogToPlayer(playerid, DIALOG_BUYCLOTHING);
  39189. }
  39190. else
  39191. {
  39192. callcmd::buy(playerid, "\1");
  39193. }
  39194. return 1;
  39195. }
  39196. Dialog:DIALOG_BUYCLOTHING(playerid, response, listitem, inputtext[])
  39197. {
  39198. if(response)
  39199. {
  39200. PreviewClothing(playerid, listitem + PlayerData[playerid][pClothingIndex]);
  39201. }
  39202. else
  39203. {
  39204. ShowDialogToPlayer(playerid, DIALOG_BUYCLOTHINGTYPE);
  39205. }
  39206. return 1;
  39207. }
  39208. Dialog:DIALOG_CLOTHING(playerid, response, listitem, inputtext[])
  39209. {
  39210. if(response)
  39211. {
  39212. if(!ClothingInfo[playerid][listitem][cExists])
  39213. {
  39214. return SendClientMessage(playerid, COLOR_GREY, "The slot you've selected does not contain any item of clothing.");
  39215. }
  39216. if(ClothingInfo[playerid][listitem][cAttached]) {
  39217. Dialog_Show(playerid, DIALOG_CLOTHINGMENU, DIALOG_STYLE_LIST, ClothingInfo[playerid][listitem][cName], "Detach\nEdit\nDelete", "Select", "Cancel");
  39218. } else {
  39219. Dialog_Show(playerid, DIALOG_CLOTHINGMENU, DIALOG_STYLE_LIST, ClothingInfo[playerid][listitem][cName], "Attach\nEdit\nDelete", "Select", "Cancel");
  39220. }
  39221. PlayerData[playerid][pSelected] = listitem;
  39222. }
  39223. return 1;
  39224. }
  39225. Dialog:DIALOG_CLOTHINGMENU(playerid, response, listitem, inputtext[])
  39226. {
  39227. if(response)
  39228. {
  39229. new clothingid = PlayerData[playerid][pSelected];
  39230. switch(listitem)
  39231. {
  39232. case 0:
  39233. {
  39234. if(!ClothingInfo[playerid][clothingid][cAttached])
  39235. {
  39236. ClothingInfo[playerid][clothingid][cAttachedIndex] = GetAvailableAttachedSlot(playerid);
  39237. if(ClothingInfo[playerid][clothingid][cAttachedIndex] >= 0)
  39238. {
  39239. ClothingInfo[playerid][clothingid][cAttached] = 1;
  39240. SetPlayerAttachedObject(playerid, ClothingInfo[playerid][clothingid][cAttachedIndex], ClothingInfo[playerid][clothingid][cModel], ClothingInfo[playerid][clothingid][cBone], ClothingInfo[playerid][clothingid][cPosX], ClothingInfo[playerid][clothingid][cPosY], ClothingInfo[playerid][clothingid][cPosZ], ClothingInfo[playerid][clothingid][cRotX], ClothingInfo[playerid][clothingid][cRotY], ClothingInfo[playerid][clothingid][cRotZ],
  39241. ClothingInfo[playerid][clothingid][cScaleX], ClothingInfo[playerid][clothingid][cScaleY], ClothingInfo[playerid][clothingid][cScaleZ]);
  39242. SendClientMessageEx(playerid, COLOR_WHITE, "%s attached to slot %i/5.", ClothingInfo[playerid][clothingid][cName], ClothingInfo[playerid][clothingid][cAttachedIndex] + 1);
  39243. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE clothing SET attached = 1 WHERE id = %i", ClothingInfo[playerid][clothingid][cID]);
  39244. mysql_tquery(connectionID, queryBuffer);
  39245. for(new i = 0, count = 0; i < MAX_PLAYER_CLOTHING; i ++)
  39246. {
  39247. if(ClothingInfo[playerid][i][cExists] && ClothingInfo[playerid][i][cAttached])
  39248. {
  39249. count++;
  39250. if(count == 5)
  39251. {
  39252. AwardAchievement(playerid, "Dress up");
  39253. }
  39254. }
  39255. }
  39256. }
  39257. else
  39258. {
  39259. SendClientMessage(playerid, COLOR_GREY, "No attachment slots available. You can only have up to five clothing items attached at once.");
  39260. }
  39261. }
  39262. else
  39263. {
  39264. RemovePlayerAttachedObject(playerid, ClothingInfo[playerid][clothingid][cAttachedIndex]);
  39265. ClothingInfo[playerid][clothingid][cAttached] = 0;
  39266. ClothingInfo[playerid][clothingid][cAttachedIndex] = -1;
  39267. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE clothing SET attached = 0 WHERE id = %i", ClothingInfo[playerid][clothingid][cID]);
  39268. mysql_tquery(connectionID, queryBuffer);
  39269. SendClientMessageEx(playerid, COLOR_WHITE, "%s detached and added to inventory.", ClothingInfo[playerid][clothingid][cName]);
  39270. }
  39271. }
  39272. case 1:
  39273. {
  39274. Dialog_Show(playerid, DIALOG_CLOTHINGEDIT, DIALOG_STYLE_LIST, "Edition menu", "Edit offset\nChange bone", "Select", "Cancel");
  39275. }
  39276. case 2:
  39277. {
  39278. RemovePlayerAttachedObject(playerid, ClothingInfo[playerid][clothingid][cAttachedIndex]);
  39279. SendClientMessageEx(playerid, COLOR_WHITE, "%s deleted from your clothing inventory.", ClothingInfo[playerid][clothingid][cName]);
  39280. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM clothing WHERE id = %i", ClothingInfo[playerid][clothingid][cID]);
  39281. mysql_tquery(connectionID, queryBuffer);
  39282. ClothingInfo[playerid][clothingid][cAttached] = 0;
  39283. ClothingInfo[playerid][clothingid][cAttachedIndex] = -1;
  39284. ClothingInfo[playerid][clothingid][cExists] = 0;
  39285. ClothingInfo[playerid][clothingid][cID] = 0;
  39286. ClothingInfo[playerid][clothingid][cName] = 0;
  39287. }
  39288. }
  39289. }
  39290. return 1;
  39291. }
  39292. Dialog:DIALOG_CLOTHINGEDIT(playerid, response, listitem, inputtext[])
  39293. {
  39294. if(response)
  39295. {
  39296. switch(listitem)
  39297. {
  39298. case 0:
  39299. {
  39300. PlayerData[playerid][pEditType] = EDIT_CLOTHING;
  39301. if(!ClothingInfo[playerid][PlayerData[playerid][pSelected]][cAttached]) {
  39302. SetPlayerAttachedObject(playerid, 9, ClothingInfo[playerid][PlayerData[playerid][pSelected]][cModel], ClothingInfo[playerid][PlayerData[playerid][pSelected]][cBone], ClothingInfo[playerid][PlayerData[playerid][pSelected]][cPosX], ClothingInfo[playerid][PlayerData[playerid][pSelected]][cPosY], ClothingInfo[playerid][PlayerData[playerid][pSelected]][cPosZ],
  39303. ClothingInfo[playerid][PlayerData[playerid][pSelected]][cRotX], ClothingInfo[playerid][PlayerData[playerid][pSelected]][cRotY], ClothingInfo[playerid][PlayerData[playerid][pSelected]][cRotZ], ClothingInfo[playerid][PlayerData[playerid][pSelected]][cScaleX], ClothingInfo[playerid][PlayerData[playerid][pSelected]][cScaleY], ClothingInfo[playerid][PlayerData[playerid][pSelected]][cScaleZ]);
  39304. EditAttachedObject(playerid, 9);
  39305. }
  39306. else {
  39307. EditAttachedObject(playerid, ClothingInfo[playerid][PlayerData[playerid][pSelected]][cAttachedIndex]);
  39308. }
  39309. GameTextForPlayer(playerid, "~w~Editing Mode~n~~g~Click disk to save~n~~r~Press ESC to cancel", 5000, 1);
  39310. }
  39311. case 1:
  39312. {
  39313. Dialog_Show(playerid, DIALOG_CLOTHINGBONE, DIALOG_STYLE_LIST, "Choose a new bone for this clothing item.", "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 shoulder\nRight shoulder\nNeck\nJaw", "Select", "Cancel");
  39314. }
  39315. }
  39316. }
  39317. return 1;
  39318. }
  39319. Dialog:DIALOG_CLOTHINGBONE(playerid, response, listitem, inputtext[])
  39320. {
  39321. if(response)
  39322. {
  39323. ClothingInfo[playerid][PlayerData[playerid][pSelected]][cBone] = listitem + 1;
  39324. if(ClothingInfo[playerid][PlayerData[playerid][pSelected]][cAttached])
  39325. {
  39326. RemovePlayerAttachedObject(playerid, ClothingInfo[playerid][PlayerData[playerid][pSelected]][cAttachedIndex]);
  39327. SetPlayerAttachedObject(playerid, ClothingInfo[playerid][PlayerData[playerid][pSelected]][cAttachedIndex], ClothingInfo[playerid][PlayerData[playerid][pSelected]][cModel], ClothingInfo[playerid][PlayerData[playerid][pSelected]][cBone], ClothingInfo[playerid][PlayerData[playerid][pSelected]][cPosX], ClothingInfo[playerid][PlayerData[playerid][pSelected]][cPosY], ClothingInfo[playerid][PlayerData[playerid][pSelected]][cPosZ],
  39328. ClothingInfo[playerid][PlayerData[playerid][pSelected]][cRotX], ClothingInfo[playerid][PlayerData[playerid][pSelected]][cRotY], ClothingInfo[playerid][PlayerData[playerid][pSelected]][cRotZ], ClothingInfo[playerid][PlayerData[playerid][pSelected]][cScaleX], ClothingInfo[playerid][PlayerData[playerid][pSelected]][cScaleY], ClothingInfo[playerid][PlayerData[playerid][pSelected]][cScaleZ]);
  39329. }
  39330. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE clothing SET boneid = %i WHERE id = %i", ClothingInfo[playerid][PlayerData[playerid][pSelected]][cBone], ClothingInfo[playerid][PlayerData[playerid][pSelected]][cID]);
  39331. mysql_tquery(connectionID, queryBuffer);
  39332. SendClientMessageEx(playerid, COLOR_WHITE, "Bone for {00AA00}%s{FFFFFF} changed to '%s'.", ClothingInfo[playerid][PlayerData[playerid][pSelected]][cName], inputtext);
  39333. }
  39334. return 1;
  39335. }
  39336. Dialog:DIALOG_SPAWNCAR(playerid, response, listitem, inputtext[])
  39337. {
  39338. if(response)
  39339. {
  39340. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM vehicles WHERE ownerid = %i LIMIT %i, 1", PlayerData[playerid][pID], listitem);
  39341. mysql_tquery(connectionID, queryBuffer, "OnPlayerSpawnVehicle", "ii", playerid, false);
  39342. }
  39343. return 1;
  39344. }
  39345. Dialog:DIALOG_DESPAWNCAR(playerid, response, listitem, inputtext[])
  39346. {
  39347. if(response)
  39348. {
  39349. new count;
  39350. foreach(new i: Vehicle)
  39351. {
  39352. if((VehicleInfo[i][vID] > 0 && IsVehicleOwner(playerid, i)) && (count++ == listitem))
  39353. {
  39354. if(IsVehicleOccupied(i) && GetVehicleDriver(i) != playerid)
  39355. {
  39356. return SendClientMessage(playerid, COLOR_GREY, "This vehicle is occupied.");
  39357. }
  39358. SendClientMessageEx(playerid, COLOR_AQUA, "Your {FF6347}%s{33CCFF} which is located in %s has been despawned.", GetVehicleName(i), GetVehicleZoneName(i));
  39359. DespawnVehicle(i);
  39360. return 1;
  39361. }
  39362. }
  39363. }
  39364. return 1;
  39365. }
  39366. Dialog:DIALOG_CARSTORAGE(playerid, response, listitem, inputtext[])
  39367. {
  39368. if(response)
  39369. {
  39370. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT id FROM vehicles WHERE ownerid = %i LIMIT %i, 1", PlayerData[playerid][pID], listitem);
  39371. mysql_tquery(connectionID, queryBuffer, "OnPlayerUseCarStorage", "i", playerid);
  39372. }
  39373. return 1;
  39374. }
  39375. Dialog:DIALOG_FINDCAR(playerid, response, listitem, inputtext[])
  39376. {
  39377. if(response)
  39378. {
  39379. new count, garageid;
  39380. foreach(new i: Vehicle)
  39381. {
  39382. if((VehicleInfo[i][vID] > 0 && IsVehicleOwner(playerid, i)) && (count++ == listitem))
  39383. {
  39384. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  39385. if((garageid = GetVehicleGarage(i)) >= 0)
  39386. {
  39387. SetPlayerCheckpoint(playerid, GarageInfo[garageid][gPosX], GarageInfo[garageid][gPosY], GarageInfo[garageid][gPosZ], 3.0);
  39388. SendClientMessageEx(playerid, COLOR_YELLOW, "Your %s is located in a garage. Checkpoint marked at the garage's location.", GetVehicleName(i));
  39389. }
  39390. else
  39391. {
  39392. new
  39393. Float:x,
  39394. Float:y,
  39395. Float:z;
  39396. GetVehiclePos(i, x, y, z);
  39397. SetPlayerCheckpoint(playerid, x, y, z, 3.0);
  39398. SendClientMessageEx(playerid, COLOR_YELLOW, "Your %s is located in %s. Checkpoint marked at the location.", GetVehicleName(i), GetZoneName(x, y, z));
  39399. }
  39400. return 1;
  39401. }
  39402. }
  39403. }
  39404. return 1;
  39405. }
  39406. Dialog:DIALOG_BIZINTERIOR(playerid, response, listitem, inputtext[])
  39407. {
  39408. if(response)
  39409. {
  39410. new businessid = PlayerData[playerid][pSelected];
  39411. foreach(new i : Player)
  39412. {
  39413. if(GetInsideBusiness(i) == businessid)
  39414. {
  39415. SetPlayerPos(i, bizInteriorArray[listitem][intX], bizInteriorArray[listitem][intY], bizInteriorArray[listitem][intZ]);
  39416. SetPlayerFacingAngle(i, bizInteriorArray[listitem][intA]);
  39417. SetPlayerInterior(i, bizInteriorArray[listitem][intID]);
  39418. SetCameraBehindPlayer(i);
  39419. }
  39420. }
  39421. BusinessInfo[businessid][bIntX] = bizInteriorArray[listitem][intX];
  39422. BusinessInfo[businessid][bIntY] = bizInteriorArray[listitem][intY];
  39423. BusinessInfo[businessid][bIntZ] = bizInteriorArray[listitem][intZ];
  39424. BusinessInfo[businessid][bIntA] = bizInteriorArray[listitem][intA];
  39425. BusinessInfo[businessid][bInterior] = bizInteriorArray[listitem][intID];
  39426. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET int_x = '%f', int_y = '%f', int_z = '%f', int_a = '%f', interior = %i WHERE id = %i", BusinessInfo[businessid][bIntX], BusinessInfo[businessid][bIntY], BusinessInfo[businessid][bIntZ], BusinessInfo[businessid][bIntA], BusinessInfo[businessid][bInterior], BusinessInfo[businessid][bID]);
  39427. mysql_tquery(connectionID, queryBuffer);
  39428. ReloadBusiness(businessid);
  39429. SendClientMessageEx(playerid, COLOR_AQUA, "You've changed the interior of business %i to %s.", businessid, bizInteriorArray[listitem][intName]);
  39430. }
  39431. return 1;
  39432. }
  39433. Dialog:DIALOG_FACTIONLOCKER(playerid, response, listitem, inputtext[])
  39434. {
  39435. if((response) && PlayerData[playerid][pFaction] >= 0 && IsPlayerInRangeOfLocker(playerid, PlayerData[playerid][pFaction]))
  39436. {
  39437. switch(FactionInfo[PlayerData[playerid][pFaction]][fType])
  39438. {
  39439. case FACTION_POLICE, FACTION_MEDIC, FACTION_FEDERAL, FACTION_ARMY:
  39440. {
  39441. if(listitem == 0) // Toggle duty
  39442. {
  39443. if(!PlayerData[playerid][pDuty])
  39444. {
  39445. if(IsLawEnforcement(playerid))
  39446. {
  39447. ShowActionBubble(playerid, "* %s clocks in and grabs their police issued equipment from the locker.", GetRPName(playerid));
  39448. }
  39449. else if(FactionInfo[PlayerData[playerid][pFaction]][fType] == FACTION_MEDIC)
  39450. {
  39451. ShowActionBubble(playerid, "* %s clocks in and grabs their medical supplies from the locker.", GetRPName(playerid));
  39452. }
  39453. PlayerData[playerid][pDuty] = 1;
  39454. SetPlayerHealth(playerid, 100.0);
  39455. SetScriptArmour(playerid, 100.0);
  39456. }
  39457. else
  39458. {
  39459. PlayerData[playerid][pDuty] = 0;
  39460. //ResetPlayerWeaponsEx(playerid);
  39461. //SetScriptArmour(playerid, 0.0);
  39462. ShowActionBubble(playerid, "* %s clocks out and puts their equipment back in the locker.", GetRPName(playerid));
  39463. }
  39464. }
  39465. else if(listitem == 1) // Equipment
  39466. {
  39467. if(PlayerData[playerid][pGunLicense] == 0)
  39468. {
  39469. return SendClientMessage(playerid, COLOR_GREY, "You cannot use your faction equipment as you don't have a gun license.");
  39470. }
  39471. ShowDialogToPlayer(playerid, DIALOG_FACTIONEQUIPMENT);
  39472. /*if(IsLawEnforcement(playerid))
  39473. {
  39474. Dialog_Show(playerid, DIALOG_FACTIONEQUIPMENT, DIALOG_STYLE_LIST, "Equipment", "Kevlar Vest\nMedkit\nNitestick\nSpraycan\nDesert Eagle\nShotgun\nMP5\nM4\nSPAS-12\nSniper Rifle", "Select", "Cancel");
  39475. }
  39476. else
  39477. {
  39478. Dialog_Show(playerid, DIALOG_FACTIONEQUIPMENT, DIALOG_STYLE_LIST, "Equipment", "Kevlar Vest\nMedkit\nFire Extinguisher\nDesert Eagle\nPainkillers", "Select", "Cancel");
  39479. }*/
  39480. }
  39481. else if(listitem == 2) // Uniforms
  39482. {
  39483. if(!GetFactionSkinCount(PlayerData[playerid][pFaction]))
  39484. {
  39485. return SendClientMessage(playerid, COLOR_GREY, "There are no uniforms setup for your faction.");
  39486. }
  39487. if(PlayerData[playerid][pClothes] >= 0)
  39488. {
  39489. PlayerData[playerid][pSkin] = PlayerData[playerid][pClothes];
  39490. PlayerData[playerid][pClothes] = -1;
  39491. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET skin = %i, clothes = -1 WHERE uid = %i", PlayerData[playerid][pSkin], PlayerData[playerid][pID]);
  39492. mysql_tquery(connectionID, queryBuffer);
  39493. SetPlayerSkin(playerid, PlayerData[playerid][pSkin]);
  39494. ShowActionBubble(playerid, "* %s switches back to their old outfit.", GetRPName(playerid));
  39495. }
  39496. else
  39497. {
  39498. PlayerData[playerid][pSkinSelected] = -1;
  39499. Dialog_Show(playerid, DIALOG_FACTIONSKINS, DIALOG_STYLE_MSGBOX, "Uniform selection", "Press {00AA00}>> Next{A9C4E4} to browse through available uniforms.", ">> Next", "Confirm");
  39500. }
  39501. }
  39502. else if(listitem == 3 && FactionInfo[PlayerData[playerid][pFaction]][fType] != FACTION_MEDIC)
  39503. {
  39504. ShowCopClothingMenu(playerid);
  39505. }
  39506. }
  39507. case FACTION_GOVERNMENT, FACTION_NEWS:
  39508. {
  39509. if(PlayerData[playerid][pGunLicense] == 0)
  39510. {
  39511. return SendClientMessage(playerid, COLOR_GREY, "You cannot use your faction equipment as you don't have a gun license.");
  39512. }
  39513. if(listitem == 0) // Equipment
  39514. {
  39515. ShowDialogToPlayer(playerid, DIALOG_FACTIONEQUIPMENT);
  39516. /*if(FactionInfo[PlayerData[playerid][pFaction]][fType] == FACTION_GOVERNMENT)
  39517. {
  39518. Dialog_Show(playerid, DIALOG_FACTIONEQUIPMENT, DIALOG_STYLE_LIST, "Equipment", "Kevlar Vest\nMedkit\nDesert Eagle\nShotgun\nMP5\nM4\nSPAS-12", "Select", "Cancel");
  39519. }
  39520. else
  39521. {
  39522. Dialog_Show(playerid, DIALOG_FACTIONEQUIPMENT, DIALOG_STYLE_LIST, "Equipment", "Kevlar Vest\nMedkit\nCamera", "Select", "Cancel");
  39523. }*/
  39524. }
  39525. else if(listitem == 1) // Uniforms
  39526. {
  39527. if(!GetFactionSkinCount(PlayerData[playerid][pFaction]))
  39528. {
  39529. return SendClientMessage(playerid, COLOR_GREY, "There are no uniforms setup for your faction.");
  39530. }
  39531. if(PlayerData[playerid][pClothes] >= 0)
  39532. {
  39533. PlayerData[playerid][pSkin] = PlayerData[playerid][pClothes];
  39534. PlayerData[playerid][pClothes] = -1;
  39535. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET skin = %i, clothes = -1 WHERE uid = %i", PlayerData[playerid][pSkin], PlayerData[playerid][pID]);
  39536. mysql_tquery(connectionID, queryBuffer);
  39537. ShowActionBubble(playerid, "* %s switches back to their old outfit.", GetRPName(playerid));
  39538. }
  39539. else
  39540. {
  39541. PlayerData[playerid][pSkinSelected] = -1;
  39542. Dialog_Show(playerid, DIALOG_FACTIONSKINS, DIALOG_STYLE_MSGBOX, "Uniform selection", "Press {00AA00}>> Next{A9C4E4} to browse through available uniforms.", ">> Next", "Confirm");
  39543. }
  39544. }
  39545. }
  39546. case FACTION_HITMAN:
  39547. {
  39548. if(PlayerData[playerid][pGunLicense] == 0)
  39549. {
  39550. return SendClientMessage(playerid, COLOR_GREY, "You cannot use your faction equipment as you don't have a gun license.");
  39551. }
  39552. if(listitem == 0) // Order weapons
  39553. {
  39554. Dialog_Show(playerid, DIALOG_FACTIONEQUIPMENT, DIALOG_STYLE_LIST, "Order weapons", "Kevlar Vest ($1,000)\nKnife ($1,500)\nSilenced pistol ($1,000)\nShotgun ($1,500)\nDesert Eagle ($2,000)\nMP5 ($2,500)\nCountry rifle ($4,000)\nAK-47 ($6,000)\nM4 ($8,000)\nSPAS-12 ($8,500)\nSniper rifle ($9,000)\nBomb ($15,000)", "Order", "Cancel");
  39555. }
  39556. else if(listitem == 1) // Change clothes
  39557. {
  39558. Dialog_Show(playerid, DIALOG_HITMANCLOTHES, DIALOG_STYLE_INPUT, "Change clothes", "Please input the ID of the skin you wish to purchase.\n(( List of skins: http://wiki.sa-mp.com/wiki/Skins:All ))", "Submit", "Cancel");
  39559. }
  39560. }
  39561. }
  39562. }
  39563. return 1;
  39564. }
  39565. Dialog:DIALOG_FACTIONEQUIPMENT(playerid, response, listitem, inputtext[])
  39566. {
  39567. if((response) && PlayerData[playerid][pFaction] >= 0 && IsPlayerInRangeOfLocker(playerid, PlayerData[playerid][pFaction]))
  39568. {
  39569. switch(FactionInfo[PlayerData[playerid][pFaction]][fType])
  39570. {
  39571. /*case FACTION_POLICE, FACTION_FEDERAL, FACTION_ARMY:
  39572. {
  39573. switch(listitem)
  39574. {
  39575. case 0:
  39576. {
  39577. SetScriptArmour(playerid, 100.0);
  39578. ShowActionBubble(playerid, "* %s grabs a kevlar vest from the locker and puts it on.", GetRPName(playerid));
  39579. }
  39580. case 1:
  39581. {
  39582. SetPlayerHealth(playerid, 100.0);
  39583. ShowActionBubble(playerid, "* %s grabs a medkit from the locker and opens it.", GetRPName(playerid));
  39584. }
  39585. case 2:
  39586. {
  39587. GivePlayerWeaponEx(playerid, 3);
  39588. ShowActionBubble(playerid, "* %s grabs a nitestick from the locker.", GetRPName(playerid));
  39589. }
  39590. case 3:
  39591. {
  39592. GivePlayerWeaponEx(playerid, 41);
  39593. ShowActionBubble(playerid, "* %s grabs a can of pepper spray from the locker.", GetRPName(playerid));
  39594. }
  39595. case 4:
  39596. {
  39597. GivePlayerWeaponEx(playerid, 24);
  39598. ShowActionBubble(playerid, "* %s grabs a Desert Eagle from the locker.", GetRPName(playerid));
  39599. }
  39600. case 5:
  39601. {
  39602. GivePlayerWeaponEx(playerid, 25);
  39603. ShowActionBubble(playerid, "* %s grabs a Shotgun from the locker.", GetRPName(playerid));
  39604. }
  39605. case 6:
  39606. {
  39607. GivePlayerWeaponEx(playerid, 29);
  39608. ShowActionBubble(playerid, "* %s grabs an MP5 from the locker.", GetRPName(playerid));
  39609. }
  39610. case 7:
  39611. {
  39612. GivePlayerWeaponEx(playerid, 31);
  39613. ShowActionBubble(playerid, "* %s grabs an M4 from the locker.", GetRPName(playerid));
  39614. }
  39615. case 8:
  39616. {
  39617. GivePlayerWeaponEx(playerid, 27);
  39618. ShowActionBubble(playerid, "* %s grabs a SPAS-12 from the locker.", GetRPName(playerid));
  39619. }
  39620. case 9:
  39621. {
  39622. GivePlayerWeaponEx(playerid, 34);
  39623. ShowActionBubble(playerid, "* %s grabs a Sniper Rifle from the locker.", GetRPName(playerid));
  39624. }
  39625. }
  39626. }
  39627. case FACTION_MEDIC:
  39628. {
  39629. switch(listitem)
  39630. {
  39631. case 0:
  39632. {
  39633. SetScriptArmour(playerid, 100.0);
  39634. ShowActionBubble(playerid, "* %s grabs a kevlar vest from the locker and puts it on.", GetRPName(playerid));
  39635. }
  39636. case 1:
  39637. {
  39638. SetPlayerHealth(playerid, 100.0);
  39639. ShowActionBubble(playerid, "* %s grabs a medkit from the locker and opens it.", GetRPName(playerid));
  39640. }
  39641. case 2:
  39642. {
  39643. GivePlayerWeaponEx(playerid, 42);
  39644. ShowActionBubble(playerid, "* %s grabs a fire extinguisher from the locker.", GetRPName(playerid));
  39645. }
  39646. case 3:
  39647. {
  39648. GivePlayerWeaponEx(playerid, 24);
  39649. ShowActionBubble(playerid, "* %s grabs a Desert Eagle from the locker.", GetRPName(playerid));
  39650. }
  39651. case 4:
  39652. {
  39653. PlayerData[playerid][pPainkillers] = 5;
  39654. ShowActionBubble(playerid, "* %s grabs a five pack of painkillers from the locker.", GetRPName(playerid));
  39655. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET painkillers = %i WHERE uid = %i", PlayerData[playerid][pPainkillers], PlayerData[playerid][pID]);
  39656. mysql_tquery(connectionID, queryBuffer);
  39657. }
  39658. }
  39659. }
  39660. case FACTION_GOVERNMENT:
  39661. {
  39662. switch(listitem)
  39663. {
  39664. case 0:
  39665. {
  39666. SetScriptArmour(playerid, 100.0);
  39667. ShowActionBubble(playerid, "* %s grabs a kevlar vest from the locker and puts it on.", GetRPName(playerid));
  39668. }
  39669. case 1:
  39670. {
  39671. SetPlayerHealth(playerid, 100.0);
  39672. ShowActionBubble(playerid, "* %s grabs a medkit from the locker and opens it.", GetRPName(playerid));
  39673. }
  39674. case 2:
  39675. {
  39676. GivePlayerWeaponEx(playerid, 24);
  39677. ShowActionBubble(playerid, "* %s grabs a Desert Eagle from the locker.", GetRPName(playerid));
  39678. }
  39679. case 3:
  39680. {
  39681. GivePlayerWeaponEx(playerid, 25);
  39682. ShowActionBubble(playerid, "* %s grabs a Shotgun from the locker.", GetRPName(playerid));
  39683. }
  39684. case 4:
  39685. {
  39686. GivePlayerWeaponEx(playerid, 29);
  39687. ShowActionBubble(playerid, "* %s grabs an MP5 from the locker.", GetRPName(playerid));
  39688. }
  39689. case 5:
  39690. {
  39691. GivePlayerWeaponEx(playerid, 31);
  39692. ShowActionBubble(playerid, "* %s grabs an M4 from the locker.", GetRPName(playerid));
  39693. }
  39694. case 6:
  39695. {
  39696. GivePlayerWeaponEx(playerid, 27);
  39697. ShowActionBubble(playerid, "* %s grabs a SPAS-12 from the locker.", GetRPName(playerid));
  39698. }
  39699. case 7:
  39700. {
  39701. GivePlayerWeaponEx(playerid, 34);
  39702. ShowActionBubble(playerid, "* %s grabs a Sniper Rifle from the locker.", GetRPName(playerid));
  39703. }
  39704. }
  39705. }
  39706. case FACTION_NEWS:
  39707. {
  39708. switch(listitem)
  39709. {
  39710. case 0:
  39711. {
  39712. SetScriptArmour(playerid, 100.0);
  39713. ShowActionBubble(playerid, "* %s grabs a kevlar vest from the locker and puts it on.", GetRPName(playerid));
  39714. }
  39715. case 1:
  39716. {
  39717. SetPlayerHealth(playerid, 100.0);
  39718. ShowActionBubble(playerid, "* %s grabs a medkit from the locker and opens it.", GetRPName(playerid));
  39719. }
  39720. case 2:
  39721. {
  39722. GivePlayerWeaponEx(playerid, 43);
  39723. ShowActionBubble(playerid, "* %s grabs a digital camera from the locker.", GetRPName(playerid));
  39724. }
  39725. }
  39726. }*/
  39727. case FACTION_HITMAN:
  39728. {
  39729. switch(listitem)
  39730. {
  39731. case 0:
  39732. {
  39733. if(PlayerData[playerid][pCash] < 1000)
  39734. {
  39735. return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon.");
  39736. }
  39737. GivePlayerCash(playerid, -1000);
  39738. SetScriptArmour(playerid, 100.0);
  39739. SendClientMessageEx(playerid, COLOR_AQUA, "* You ordered a kevlar vest for $1,000.");
  39740. GameTextForPlayer(playerid, "~r~-$1000", 5000, 1);
  39741. }
  39742. case 1:
  39743. {
  39744. if(PlayerData[playerid][pCash] < 1500)
  39745. {
  39746. return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon.");
  39747. }
  39748. GivePlayerWeaponEx(playerid, 4);
  39749. GivePlayerCash(playerid, -1500);
  39750. SendClientMessageEx(playerid, COLOR_AQUA, "* You ordered a knife for $1,500.");
  39751. GameTextForPlayer(playerid, "~r~-$1500", 5000, 1);
  39752. }
  39753. case 2:
  39754. {
  39755. if(PlayerData[playerid][pCash] < 1000)
  39756. {
  39757. return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon.");
  39758. }
  39759. GivePlayerWeaponEx(playerid, 23);
  39760. GivePlayerCash(playerid, -1000);
  39761. SendClientMessageEx(playerid, COLOR_AQUA, "* You ordered a silenced pistol for $1,000.");
  39762. GameTextForPlayer(playerid, "~r~-$1000", 5000, 1);
  39763. }
  39764. case 3:
  39765. {
  39766. if(PlayerData[playerid][pCash] < 1500)
  39767. {
  39768. return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon.");
  39769. }
  39770. GivePlayerWeaponEx(playerid, 25);
  39771. GivePlayerCash(playerid, -1500);
  39772. SendClientMessageEx(playerid, COLOR_AQUA, "* You ordered a shotgun for $1,500.");
  39773. GameTextForPlayer(playerid, "~r~-$1500", 5000, 1);
  39774. }
  39775. case 4:
  39776. {
  39777. if(PlayerData[playerid][pCash] < 2000)
  39778. {
  39779. return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon.");
  39780. }
  39781. GivePlayerWeaponEx(playerid, 24);
  39782. GivePlayerCash(playerid, -2000);
  39783. SendClientMessageEx(playerid, COLOR_AQUA, "* You ordered a Desert Eagle for $2,000.");
  39784. GameTextForPlayer(playerid, "~r~-$2000", 5000, 1);
  39785. }
  39786. case 5:
  39787. {
  39788. if(PlayerData[playerid][pCash] < 2500)
  39789. {
  39790. return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon.");
  39791. }
  39792. GivePlayerWeaponEx(playerid, 29);
  39793. GivePlayerCash(playerid, -2500);
  39794. SendClientMessageEx(playerid, COLOR_AQUA, "* You ordered an MP5 for $2,500.");
  39795. GameTextForPlayer(playerid, "~r~-$2500", 5000, 1);
  39796. }
  39797. case 6:
  39798. {
  39799. if(PlayerData[playerid][pCash] < 4000)
  39800. {
  39801. return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon.");
  39802. }
  39803. GivePlayerWeaponEx(playerid, 33);
  39804. GivePlayerCash(playerid, -4000);
  39805. SendClientMessageEx(playerid, COLOR_AQUA, "* You ordered a country rifle for $4,000.");
  39806. GameTextForPlayer(playerid, "~r~-$4000", 5000, 1);
  39807. }
  39808. case 7:
  39809. {
  39810. if(PlayerData[playerid][pCash] < 6000)
  39811. {
  39812. return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon.");
  39813. }
  39814. GivePlayerWeaponEx(playerid, 30);
  39815. GivePlayerCash(playerid, -6000);
  39816. SendClientMessageEx(playerid, COLOR_AQUA, "* You ordered an AK-47 for $6,000.");
  39817. GameTextForPlayer(playerid, "~r~-$6000", 5000, 1);
  39818. }
  39819. case 8:
  39820. {
  39821. if(PlayerData[playerid][pCash] < 8000)
  39822. {
  39823. return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon.");
  39824. }
  39825. GivePlayerWeaponEx(playerid, 31);
  39826. GivePlayerCash(playerid, -8000);
  39827. SendClientMessageEx(playerid, COLOR_AQUA, "* You ordered an M4 for $8,000.");
  39828. GameTextForPlayer(playerid, "~r~-$8000", 5000, 1);
  39829. }
  39830. case 9:
  39831. {
  39832. if(PlayerData[playerid][pCash] < 8500)
  39833. {
  39834. return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon.");
  39835. }
  39836. GivePlayerWeaponEx(playerid, 27);
  39837. GivePlayerCash(playerid, -8500);
  39838. SendClientMessageEx(playerid, COLOR_AQUA, "* You ordered a SPAS-12 for $8,500.");
  39839. GameTextForPlayer(playerid, "~r~-$8500", 5000, 1);
  39840. }
  39841. case 10:
  39842. {
  39843. if(PlayerData[playerid][pCash] < 9000)
  39844. {
  39845. return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon.");
  39846. }
  39847. GivePlayerWeaponEx(playerid, 34);
  39848. GivePlayerCash(playerid, -9000);
  39849. SendClientMessageEx(playerid, COLOR_AQUA, "* You ordered a sniper rifle for $9,000.");
  39850. GameTextForPlayer(playerid, "~r~-$9000", 5000, 1);
  39851. }
  39852. case 11:
  39853. {
  39854. if(PlayerData[playerid][pCash] < 15000)
  39855. {
  39856. return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon.");
  39857. }
  39858. if(PlayerData[playerid][pBombs] > 3)
  39859. {
  39860. return SendClientMessage(playerid, COLOR_GREY, "You have more than 3 bombs. You can't buy anymore.");
  39861. }
  39862. PlayerData[playerid][pBombs]++;
  39863. GivePlayerCash(playerid, -15000);
  39864. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET bombs = %i WHERE uid = %i", PlayerData[playerid][pBombs], PlayerData[playerid][pID]);
  39865. mysql_tquery(connectionID, queryBuffer);
  39866. SendClientMessageEx(playerid, COLOR_AQUA, "* You ordered a bomb for $15,000. /plantbomb to place the bomb.");
  39867. GameTextForPlayer(playerid, "~r~-$15000", 5000, 1);
  39868. }
  39869. }
  39870. }
  39871. default:
  39872. {
  39873. new amount, weapon, locker = GetNearbyLocker(playerid);
  39874. if(strfind(inputtext, "Kevlar Vest", true) != -1)
  39875. {
  39876. amount = LockerInfo[locker][locKevlar][1];
  39877. if(PlayerData[playerid][pCash] < amount)
  39878. {
  39879. return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon.");
  39880. }
  39881. SetScriptArmour(playerid, 100.0);
  39882. GivePlayerCash(playerid, -amount);
  39883. SendClientMessageEx(playerid, COLOR_AQUA, "* You received a kevlar vest for $%i.", amount);
  39884. }
  39885. else if(strfind(inputtext, "Medkit", true) != -1)
  39886. {
  39887. amount = LockerInfo[locker][locMedKit][1];
  39888. if(PlayerData[playerid][pCash] < amount)
  39889. {
  39890. return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon.");
  39891. }
  39892. SetPlayerHealth(playerid, 100.0);
  39893. GivePlayerCash(playerid, -amount);
  39894. SendClientMessageEx(playerid, COLOR_AQUA, "* You received a medkit for $%i.", amount);
  39895. }
  39896. else if(strfind(inputtext, "Nitestick", true) != -1)
  39897. {
  39898. amount = LockerInfo[locker][locNitestick][1]; weapon = 3;
  39899. if(PlayerData[playerid][pCash] < amount)
  39900. {
  39901. return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon.");
  39902. }
  39903. GivePlayerWeaponEx(playerid, weapon);
  39904. GivePlayerCash(playerid, -amount);
  39905. SendClientMessageEx(playerid, COLOR_AQUA, "* You received a %s for $%i.", GetWeaponNameEx(weapon), amount);
  39906. }
  39907. else if(strfind(inputtext, "Mace", true) != -1)
  39908. {
  39909. amount = LockerInfo[locker][locMace][1]; weapon = 41;
  39910. if(PlayerData[playerid][pCash] < amount)
  39911. {
  39912. return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon.");
  39913. }
  39914. GivePlayerWeaponEx(playerid, weapon);
  39915. GivePlayerCash(playerid, -amount);
  39916. SendClientMessageEx(playerid, COLOR_AQUA, "* You received a %s for $%i.", GetWeaponNameEx(weapon), amount);
  39917. }
  39918. else if(strfind(inputtext, "Deagle", true) != -1)
  39919. {
  39920. amount = LockerInfo[locker][locDeagle][1]; weapon = 24;
  39921. if(PlayerData[playerid][pCash] < amount)
  39922. {
  39923. return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon.");
  39924. }
  39925. GivePlayerWeaponEx(playerid, weapon);
  39926. GivePlayerCash(playerid, -amount);
  39927. SendClientMessageEx(playerid, COLOR_AQUA, "* You received a %s for $%i.", GetWeaponNameEx(weapon), amount);
  39928. }
  39929. else if(strfind(inputtext, "Shotgun", true) != -1)
  39930. {
  39931. amount = LockerInfo[locker][locShotgun][1]; weapon = 25;
  39932. if(PlayerData[playerid][pCash] < amount)
  39933. {
  39934. return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon.");
  39935. }
  39936. GivePlayerWeaponEx(playerid, weapon);
  39937. GivePlayerCash(playerid, -amount);
  39938. SendClientMessageEx(playerid, COLOR_AQUA, "* You received a %s for $%i.", GetWeaponNameEx(weapon), amount);
  39939. }
  39940. else if(strfind(inputtext, "MP5", true) != -1)
  39941. {
  39942. amount = LockerInfo[locker][locMP5][1]; weapon = 29;
  39943. if(PlayerData[playerid][pCash] < amount)
  39944. {
  39945. return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon.");
  39946. }
  39947. GivePlayerWeaponEx(playerid, weapon);
  39948. GivePlayerCash(playerid, -amount);
  39949. SendClientMessageEx(playerid, COLOR_AQUA, "* You received a %s for $%i.", GetWeaponNameEx(weapon), amount);
  39950. }
  39951. else if(strfind(inputtext, "M4", true) != -1)
  39952. {
  39953. amount = LockerInfo[locker][locM4][1]; weapon = 31;
  39954. if(PlayerData[playerid][pCash] < amount)
  39955. {
  39956. return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon.");
  39957. }
  39958. GivePlayerWeaponEx(playerid, weapon);
  39959. GivePlayerCash(playerid, -amount);
  39960. SendClientMessageEx(playerid, COLOR_AQUA, "* You received a %s for $%i.", GetWeaponNameEx(weapon), amount);
  39961. }
  39962. else if(strfind(inputtext, "SPAS-12", true) != -1)
  39963. {
  39964. amount = LockerInfo[locker][locSpas12][1]; weapon = 27;
  39965. if(PlayerData[playerid][pCash] < amount)
  39966. {
  39967. return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon.");
  39968. }
  39969. GivePlayerWeaponEx(playerid, weapon);
  39970. GivePlayerCash(playerid, -amount);
  39971. SendClientMessageEx(playerid, COLOR_AQUA, "* You received a %s for $%i.", GetWeaponNameEx(weapon), amount);
  39972. }
  39973. else if(strfind(inputtext, "Sniper", true) != -1)
  39974. {
  39975. amount = LockerInfo[locker][locSniper][1]; weapon = 34;
  39976. if(PlayerData[playerid][pCash] < amount)
  39977. {
  39978. return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon.");
  39979. }
  39980. GivePlayerWeaponEx(playerid, weapon);
  39981. GivePlayerCash(playerid, -amount);
  39982. SendClientMessageEx(playerid, COLOR_AQUA, "* You received a %s for $%i.", GetWeaponNameEx(weapon), amount);
  39983. }
  39984. else if(strfind(inputtext, "Camera", true) != -1)
  39985. {
  39986. amount = LockerInfo[locker][locCamera][1]; weapon = 43;
  39987. if(PlayerData[playerid][pCash] < amount)
  39988. {
  39989. return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon.");
  39990. }
  39991. GivePlayerWeaponEx(playerid, weapon);
  39992. GivePlayerCash(playerid, -amount);
  39993. SendClientMessageEx(playerid, COLOR_AQUA, "* You received a %s for $%i.", GetWeaponNameEx(weapon), amount);
  39994. }
  39995. else if(strfind(inputtext, "Fire Extinguisher", true) != -1)
  39996. {
  39997. amount = LockerInfo[locker][locFireExt][1]; weapon = 42;
  39998. if(PlayerData[playerid][pCash] < amount)
  39999. {
  40000. return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon.");
  40001. }
  40002. GivePlayerWeaponEx(playerid, weapon);
  40003. GivePlayerCash(playerid, -amount);
  40004. SendClientMessageEx(playerid, COLOR_AQUA, "* You received a %s for $%i.", GetWeaponNameEx(weapon), amount);
  40005. }
  40006. else if(strfind(inputtext, "Painkillers", true) != -1)
  40007. {
  40008. amount = LockerInfo[locker][locPainKillers][1];
  40009. if(PlayerData[playerid][pCash] < amount)
  40010. {
  40011. return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon.");
  40012. }
  40013. PlayerData[playerid][pPainkillers] = 5;
  40014. GivePlayerCash(playerid, -amount);
  40015. SendClientMessageEx(playerid, COLOR_AQUA, "* You received painkillers for $%i.", amount);
  40016. }
  40017. }
  40018. }
  40019. }
  40020. return 1;
  40021. }
  40022. Dialog:DIALOG_FACTIONSKINS(playerid, response, listitem, inputtext[])
  40023. {
  40024. if(PlayerData[playerid][pFaction] >= 0 && IsPlayerInRangeOfLocker(playerid, PlayerData[playerid][pFaction]))
  40025. {
  40026. if(response)
  40027. {
  40028. new index = PlayerData[playerid][pSkinSelected] + 1;
  40029. if(index >= MAX_FACTION_SKINS)
  40030. {
  40031. // When the player is shown the dialog for the first time, their skin isn't changed until they click >> Next.
  40032. SetPlayerSkin(playerid, PlayerData[playerid][pSkin]);
  40033. PlayerData[playerid][pSkinSelected] = -1;
  40034. }
  40035. else
  40036. {
  40037. // Find the next skin in the array.
  40038. for(new i = index; i < MAX_FACTION_SKINS; i ++)
  40039. {
  40040. if(FactionInfo[PlayerData[playerid][pFaction]][fSkins][i] != 0)
  40041. {
  40042. SetPlayerSkin(playerid, FactionInfo[PlayerData[playerid][pFaction]][fSkins][i]);
  40043. PlayerData[playerid][pSkinSelected] = i;
  40044. break;
  40045. }
  40046. }
  40047. if(index == PlayerData[playerid][pSkinSelected] + 1)
  40048. {
  40049. // Looks like there was no skin found. So, we'll go back to the very first valid skin in the skin array.
  40050. for(new i = 0; i < MAX_FACTION_SKINS; i ++)
  40051. {
  40052. if(FactionInfo[PlayerData[playerid][pFaction]][fSkins][i] != 0)
  40053. {
  40054. SetPlayerSkin(playerid, FactionInfo[PlayerData[playerid][pFaction]][fSkins][i]);
  40055. PlayerData[playerid][pSkinSelected] = i;
  40056. break;
  40057. }
  40058. }
  40059. }
  40060. }
  40061. Dialog_Show(playerid, DIALOG_FACTIONSKINS, DIALOG_STYLE_MSGBOX, "Uniform selection", "Press {00AA00}>> Next{A9C4E4} to browse through available uniforms.", ">> Next", "Confirm");
  40062. }
  40063. else
  40064. {
  40065. PlayerData[playerid][pClothes] = PlayerData[playerid][pSkin];
  40066. PlayerData[playerid][pSkin] = GetPlayerSkinScript(playerid);
  40067. PlayerData[playerid][pSkinSelected] = -1;
  40068. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET skin = %i, clothes = %i WHERE uid = %i", PlayerData[playerid][pSkin], PlayerData[playerid][pClothes], PlayerData[playerid][pID]);
  40069. mysql_tquery(connectionID, queryBuffer);
  40070. ShowActionBubble(playerid, "* %s takes a uniform out of the locker and puts it on.", GetRPName(playerid));
  40071. }
  40072. }
  40073. return 1;
  40074. }
  40075. Dialog:DIALOG_HITMANCLOTHES(playerid, response, listitem, inputtext[])
  40076. {
  40077. if((response) && PlayerData[playerid][pFaction] >= 0 && IsPlayerInRangeOfLocker(playerid, PlayerData[playerid][pFaction]))
  40078. {
  40079. new skinid;
  40080. if(sscanf(inputtext, "i", skinid))
  40081. {
  40082. return Dialog_Show(playerid, DIALOG_HITMANCLOTHES, DIALOG_STYLE_INPUT, "Change clothes", "Please input the ID of the skin you wish to purchase.\n(( List of skins: http://wiki.sa-mp.com/wiki/Skins:All ))", "Submit", "Cancel");
  40083. }
  40084. if(!(1 <= skinid <= 311))
  40085. {
  40086. SendClientMessage(playerid, COLOR_GREY, "Invalid skin.");
  40087. return Dialog_Show(playerid, DIALOG_HITMANCLOTHES, DIALOG_STYLE_INPUT, "Change clothes", "Please input the ID of the skin you wish to purchase.\n(( List of skins: http://wiki.sa-mp.com/wiki/Skins:All ))", "Submit", "Cancel");
  40088. }
  40089. SetScriptSkin(playerid, skinid);
  40090. GameTextForPlayer(playerid, "~w~Clothes changed for free", 3000, 3);
  40091. }
  40092. return 1;
  40093. }
  40094. Dialog:DIALOG_VEHICLELOOKUP1(playerid, response, listitem, inputtext[])
  40095. {
  40096. if((response) && IsLawEnforcement(playerid))
  40097. {
  40098. new vehicleid, string[128];
  40099. if(sscanf(inputtext, "i", vehicleid))
  40100. {
  40101. return Dialog_Show(playerid, DIALOG_VEHICLELOOKUP1, DIALOG_STYLE_INPUT, "Vehicle lookup", "Enter the ID of the vehicle to lookup.\n(( You can find out the ID of a vehicle by using /dl. ))", "Submit", "Cancel");
  40102. }
  40103. if(!IsValidVehicle(vehicleid) || !VehicleInfo[vehicleid][vOwnerID])
  40104. {
  40105. SendClientMessage(playerid, COLOR_GREY, "The vehicle ID specified is not owned by any particular person.");
  40106. return Dialog_Show(playerid, DIALOG_VEHICLELOOKUP1, DIALOG_STYLE_INPUT, "Vehicle lookup", "Enter the ID of the vehicle to lookup.\n(( You can find out the ID of a vehicle by using /dl. ))", "Submit", "Cancel");
  40107. }
  40108. PlayerData[playerid][pSelected] = vehicleid;
  40109. format(string, sizeof(string), "Name: %s\nOwner: %s\nTickets: $%i\nLocation: %s", GetVehicleName(vehicleid), VehicleInfo[vehicleid][vOwner], VehicleInfo[vehicleid][vTickets], GetVehicleZoneName(vehicleid));
  40110. Dialog_Show(playerid, DIALOG_VEHICLELOOKUP2, DIALOG_STYLE_MSGBOX, "Vehicle lookup", string, "Track", "Cancel");
  40111. }
  40112. return 1;
  40113. }
  40114. Dialog:DIALOG_VEHICLELOOKUP2(playerid, response, listitem, inputtext[])
  40115. {
  40116. if((response) && IsLawEnforcement(playerid))
  40117. {
  40118. new garageid, vehicleid = PlayerData[playerid][pSelected];
  40119. if((garageid = GetVehicleGarage(vehicleid)) >= 0)
  40120. {
  40121. SetPlayerCheckpoint(playerid, GarageInfo[garageid][gPosX], GarageInfo[garageid][gPosY], GarageInfo[garageid][gPosZ], 3.0);
  40122. SendClientMessage(playerid, COLOR_WHITE, "Checkpoint marked at the garage this vehicle is inside of.");
  40123. }
  40124. else
  40125. {
  40126. new
  40127. Float:x,
  40128. Float:y,
  40129. Float:z;
  40130. SendClientMessage(playerid, COLOR_WHITE, "Checkpoint marked at the vehicle's last known location.");
  40131. GetVehiclePos(vehicleid, x, y, z);
  40132. SetPlayerCheckpoint(playerid, x, y, z, 3.0);
  40133. }
  40134. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  40135. }
  40136. return 1;
  40137. }
  40138. Dialog:DIALOG_FACTIONPAY1(playerid, response, listitem, inputtext[])
  40139. {
  40140. if(response)
  40141. {
  40142. PlayerData[playerid][pSelected] = listitem;
  40143. Dialog_Show(playerid, DIALOG_FACTIONPAY2, DIALOG_STYLE_INPUT, "Change paycheck", "Enter the new paycheck amount for this rank:", "Submit", "Back");
  40144. }
  40145. return 1;
  40146. }
  40147. Dialog:DIALOG_FACTIONPAY2(playerid, response, listitem, inputtext[])
  40148. {
  40149. if(GetFactionType(playerid) != FACTION_NONE)
  40150. {
  40151. if(response)
  40152. {
  40153. new amount, factionid = PlayerData[playerid][pFaction], rankid = PlayerData[playerid][pSelected];
  40154. if(sscanf(inputtext, "i", amount))
  40155. {
  40156. return Dialog_Show(playerid, DIALOG_FACTIONPAY2, DIALOG_STYLE_INPUT, "Change paycheck", "Enter the new paycheck amount for this rank:", "Submit", "Back");
  40157. }
  40158. if(!(1 <= amount <= 10000))
  40159. {
  40160. SendClientMessage(playerid, COLOR_GREY, "The specified amount must range from $1 to $10,000.");
  40161. return Dialog_Show(playerid, DIALOG_FACTIONPAY2, DIALOG_STYLE_INPUT, "Change paycheck", "Enter the new paycheck amount for this rank:", "Submit", "Back");
  40162. }
  40163. if(GetTotalFactionPay(factionid) - FactionInfo[factionid][fPaycheck][rankid] + amount > FactionInfo[factionid][fBudget])
  40164. {
  40165. return SendClientMessageEx(playerid, COLOR_GREY, "Your faction only has a budget of $%i left! might have to do some adjusting there.", (FactionInfo[factionid][fBudget] - GetTotalFactionPay(factionid)));
  40166. }
  40167. FactionInfo[factionid][fPaycheck][rankid] = amount;
  40168. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO factionpay VALUES(%i, %i, %i) ON DUPLICATE KEY UPDATE amount = %i", factionid, rankid, amount, amount);
  40169. mysql_tquery(connectionID, queryBuffer);
  40170. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the paycheck for rank %i to $%i.", rankid, amount);
  40171. SendAdminMessage(COLOR_RED, "AdmCmd: %s [ID: %i] has set the paycheck for rank %i to $%i.", GetRPName(playerid), playerid, rankid, amount);
  40172. Log_Write("log_faction", "%s (uid: %i) set %s's (id: %i) paycheck for rank %i to $%i.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], FactionInfo[factionid][fName], factionid, rankid, amount);
  40173. }
  40174. ShowDialogToPlayer(playerid, DIALOG_FACTIONPAY1);
  40175. }
  40176. return 1;
  40177. }
  40178. Dialog:DIALOG_PHONEBOOK(playerid, response, listitem, inputtext[])
  40179. {
  40180. if(response)
  40181. {
  40182. if(!strcmp(inputtext, ">> Next page", true))
  40183. {
  40184. PlayerData[playerid][pPage]++;
  40185. ShowDialogToPlayer(playerid, DIALOG_PHONEBOOK);
  40186. }
  40187. else if(!strcmp(inputtext, "<< Go back", true) && PlayerData[playerid][pPage] > 1)
  40188. {
  40189. PlayerData[playerid][pPage]--;
  40190. ShowDialogToPlayer(playerid, DIALOG_PHONEBOOK);
  40191. }
  40192. }
  40193. return 1;
  40194. }
  40195. Dialog:DIALOG_CREATEZONE(playerid, response, listitem, inputtext[])
  40196. {
  40197. if((response) && (PlayerData[playerid][pAdmin] >= MANAGEMENT || PlayerData[playerid][pGangMod] || PlayerData[playerid][pDynamicAdmin]))
  40198. {
  40199. PlayerData[playerid][pMinX] = 0.0;
  40200. PlayerData[playerid][pMinY] = 0.0;
  40201. PlayerData[playerid][pMaxX] = 0.0;
  40202. PlayerData[playerid][pMaxY] = 0.0;
  40203. if(PlayerData[playerid][pZoneType] == ZONETYPE_LAND)
  40204. {
  40205. PlayerData[playerid][pZoneCreation] = ZONETYPE_LAND;
  40206. SendClientMessage(playerid, COLOR_WHITE, "Your land needs to be within a square or rectangle. /confirm to set the four boundary points.");
  40207. }
  40208. else if(PlayerData[playerid][pZoneType] == ZONETYPE_TURF)
  40209. {
  40210. PlayerData[playerid][pZoneCreation] = ZONETYPE_TURF;
  40211. SendClientMessage(playerid, COLOR_WHITE, "Your turf needs to be within a square or rectangle. /confirm to set the four boundary points.");
  40212. }
  40213. }
  40214. return 1;
  40215. }
  40216. Dialog:DIALOG_CONFIRMZONE(playerid, response, listitem, inputtext[])
  40217. {
  40218. if(response)
  40219. {
  40220. if(PlayerData[playerid][pZoneCreation] == ZONETYPE_LAND)
  40221. {
  40222. for(new i = 0; i < MAX_LANDS; i ++)
  40223. {
  40224. if(!LandInfo[i][lExists])
  40225. {
  40226. new
  40227. Float:minx = PlayerData[playerid][pMinX],
  40228. Float:miny = PlayerData[playerid][pMinY],
  40229. Float:maxx = PlayerData[playerid][pMaxX],
  40230. Float:maxy = PlayerData[playerid][pMaxY],
  40231. Float:x, Float:y, Float:z;
  40232. GetPlayerPos(playerid, z, z, z);
  40233. if(minx > maxx)
  40234. {
  40235. PlayerData[playerid][pMinX] = maxx;
  40236. PlayerData[playerid][pMaxX] = minx;
  40237. }
  40238. if(miny > maxy)
  40239. {
  40240. PlayerData[playerid][pMinY] = maxy;
  40241. PlayerData[playerid][pMaxY] = miny;
  40242. }
  40243. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO lands (price, min_x, min_y, max_x, max_y, heightx, heighty, heightz) VALUES(%i, '%f', '%f', '%f', '%f', '%f', '%f', '%f')", PlayerData[playerid][pLandCost], PlayerData[playerid][pMinX], PlayerData[playerid][pMinY], PlayerData[playerid][pMaxX], PlayerData[playerid][pMaxY], x, y, z);
  40244. mysql_tquery(connectionID, queryBuffer, "OnAdminCreateLand", "iiifffffff", playerid, i, PlayerData[playerid][pLandCost], PlayerData[playerid][pMinX], PlayerData[playerid][pMinY], PlayerData[playerid][pMaxX], PlayerData[playerid][pMaxY], x, y, z);
  40245. CancelZoneCreation(playerid);
  40246. return 1;
  40247. }
  40248. }
  40249. SendClientMessage(playerid, COLOR_GREY, "Land slots are currently full. Ask developers to increase the internal limit.");
  40250. CancelZoneCreation(playerid);
  40251. }
  40252. else if(PlayerData[playerid][pZoneCreation] == ZONETYPE_TURF)
  40253. {
  40254. for(new i = 0; i < MAX_TURFS; i ++)
  40255. {
  40256. if(!TurfInfo[i][tExists])
  40257. {
  40258. new
  40259. Float:minx = PlayerData[playerid][pMinX],
  40260. Float:miny = PlayerData[playerid][pMinY],
  40261. Float:maxx = PlayerData[playerid][pMaxX],
  40262. Float:maxy = PlayerData[playerid][pMaxY],
  40263. Float:z;
  40264. GetPlayerPos(playerid, z, z, z);
  40265. if(minx > maxx)
  40266. {
  40267. PlayerData[playerid][pMinX] = maxx;
  40268. PlayerData[playerid][pMaxX] = minx;
  40269. }
  40270. if(miny > maxy)
  40271. {
  40272. PlayerData[playerid][pMinY] = maxy;
  40273. PlayerData[playerid][pMaxY] = miny;
  40274. }
  40275. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO turfs (id, name, type, min_x, min_y, max_x, max_y, height) VALUES(%i, '%e', %i, '%f', '%f', '%f', '%f', '%f')", i, PlayerData[playerid][pTurfName], PlayerData[playerid][pTurfType], PlayerData[playerid][pMinX], PlayerData[playerid][pMinY], PlayerData[playerid][pMaxX], PlayerData[playerid][pMaxY], z);
  40276. mysql_tquery(connectionID, queryBuffer, "OnAdminCreateTurf", "iisifffff", playerid, i, PlayerData[playerid][pTurfName], PlayerData[playerid][pTurfType], PlayerData[playerid][pMinX], PlayerData[playerid][pMinY], PlayerData[playerid][pMaxX], PlayerData[playerid][pMaxY], z);
  40277. CancelZoneCreation(playerid);
  40278. return 1;
  40279. }
  40280. }
  40281. SendClientMessage(playerid, COLOR_GREY, "Turf slots are currently full. Ask developers to increase the internal limit.");
  40282. CancelZoneCreation(playerid);
  40283. }
  40284. }
  40285. else
  40286. {
  40287. CancelZoneCreation(playerid);
  40288. if(PlayerData[playerid][pZoneType] == ZONETYPE_LAND)
  40289. {
  40290. SendClientMessage(playerid, COLOR_WHITE, "Your land needs to be within a square or rectangle. /confirm to set the four boundary points.");
  40291. SendClientMessage(playerid, COLOR_WHITE, "Note: You can use /landcancel to exit land creation mode.");
  40292. PlayerData[playerid][pZoneCreation] = ZONETYPE_LAND;
  40293. }
  40294. else if(PlayerData[playerid][pZoneType] == ZONETYPE_TURF)
  40295. {
  40296. SendClientMessage(playerid, COLOR_WHITE, "Your turf needs to be within a square or rectangle. /confirm to set the four boundary points.");
  40297. SendClientMessage(playerid, COLOR_WHITE, "Note: You can use /turfcancel to exit turf creation mode.");
  40298. PlayerData[playerid][pZoneCreation] = ZONETYPE_TURF;
  40299. }
  40300. }
  40301. return 1;
  40302. }
  40303. Dialog:DIALOG_LANDBUILDTYPE(playerid, response, listitem, inputtext[])
  40304. {
  40305. new landid = GetNearbyLand(playerid);
  40306. if(landid == -1 || !HasLandPerms(playerid, landid))
  40307. {
  40308. return 0;
  40309. }
  40310. if(response)
  40311. {
  40312. PlayerData[playerid][pMenuType] = listitem;
  40313. ShowDialogToPlayer(playerid, DIALOG_LANDBUILD1);
  40314. }
  40315. else
  40316. {
  40317. ShowDialogToPlayer(playerid, DIALOG_LANDMENU);
  40318. }
  40319. return 1;
  40320. }
  40321. Dialog:DIALOG_LANDBUILD1(playerid, response, listitem, inputtext[])
  40322. {
  40323. new landid = GetNearbyLand(playerid);
  40324. if(landid == -1 || !HasLandPerms(playerid, landid))
  40325. {
  40326. return 0;
  40327. }
  40328. if(response)
  40329. {
  40330. switch(PlayerData[playerid][pMenuType])
  40331. {
  40332. case 0: // Model selection
  40333. {
  40334. PlayerData[playerid][pCategory] = listitem;
  40335. ShowLandObjects(playerid, MODEL_SELECTION_LANDOBJECTS);
  40336. }
  40337. case 1:
  40338. {
  40339. PlayerData[playerid][pCategory] = listitem;
  40340. ShowDialogToPlayer(playerid, DIALOG_LANDBUILD2);
  40341. }
  40342. }
  40343. }
  40344. else
  40345. {
  40346. ShowDialogToPlayer(playerid, DIALOG_LANDBUILDTYPE);
  40347. }
  40348. return 1;
  40349. }
  40350. Dialog:DIALOG_LANDBUILD2(playerid, response, listitem, inputtext[])
  40351. {
  40352. new landid = GetNearbyLand(playerid);
  40353. if(landid == -1 || !HasLandPerms(playerid, landid))
  40354. {
  40355. return 0;
  40356. }
  40357. if(response)
  40358. {
  40359. PurchaseLandObject(playerid, landid, listitem + PlayerData[playerid][pFurnitureIndex]);
  40360. }
  40361. else
  40362. {
  40363. ShowDialogToPlayer(playerid, DIALOG_LANDBUILD1);
  40364. }
  40365. return 1;
  40366. }
  40367. Dialog:DIALOG_LANDMENU(playerid, response, listitem, inputtext[])
  40368. {
  40369. new landid = GetNearbyLand(playerid);
  40370. if(landid == -1 || !HasLandPerms(playerid, landid))
  40371. {
  40372. return 1;
  40373. }
  40374. if(response)
  40375. {
  40376. switch(listitem)
  40377. {
  40378. case 0:
  40379. {
  40380. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT COUNT(*) FROM landobjects WHERE landid = %i", LandInfo[landid][lID]);
  40381. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_COUNT_LANDOBJECTS, playerid);
  40382. }
  40383. case 1:
  40384. {
  40385. Dialog_Show(playerid, DIALOG_LANDEDITOBJECT, DIALOG_STYLE_INPUT, "Edit object", "Please enter the object ID of the object to edit:\nYou can find out the ID of objects by toggling labels in the menu.", "Submit", "Back");
  40386. }
  40387. case 2:
  40388. {
  40389. if(!LandInfo[landid][lLabels])
  40390. {
  40391. LandInfo[landid][lLabels] = 1;
  40392. SendClientMessage(playerid, COLOR_AQUA, "You will now see labels appear above the objects in your land.");
  40393. }
  40394. else
  40395. {
  40396. LandInfo[landid][lLabels] = 0;
  40397. SendClientMessage(playerid, COLOR_AQUA, "You will no longer see any labels appear above your land objects.");
  40398. }
  40399. ReloadAllLandObjects(landid);
  40400. ShowDialogToPlayer(playerid, DIALOG_LANDMENU);
  40401. }
  40402. case 3:
  40403. {
  40404. PlayerData[playerid][pPage] = 1;
  40405. ShowDialogToPlayer(playerid, DIALOG_LANDOBJECTS);
  40406. }
  40407. case 4:
  40408. {
  40409. Dialog_Show(playerid, DIALOG_LANDSELLALL, DIALOG_STYLE_MSGBOX, "Clear objects", "This option sells all the objects in your land. You will receive\n75 percent of the total cost of all your objects.\n\nPress {FF6347}Confirm{A9C4E4} to proceed with the operation.", "Confirm", "Back");
  40410. }
  40411. case 5:
  40412. {
  40413. if(LandInfo[landid][lLevel] >= 5)
  40414. {
  40415. return SendClientMessage(playerid, COLOR_GREY, "Your land can't be upgraded any further.");
  40416. }
  40417. new
  40418. string[224];
  40419. format(string, sizeof(string), "You are about to upgrade your land to level %i/5.\n\nThis upgrade will cost you {00AA00}$100,000{A9C4E4} and unlocks %i more\nobject slots for your land.\n\nAre you sure you want to upgrade your land?", LandInfo[landid][lLevel] + 1, GetLandObjectCapacity(LandInfo[landid][lLevel] + 1) - GetLandObjectCapacity(LandInfo[landid][lLevel]));
  40420. Dialog_Show(playerid, DIALOG_LANDUPGRADE, DIALOG_STYLE_MSGBOX, "Upgrade land", string, "Yes", "No");
  40421. }
  40422. case 6:
  40423. {
  40424. Dialog_Show(playerid, DIALOG_LANDPERMS, DIALOG_STYLE_INPUT, "Permissions", "Please enter the name or ID of the player to take or give permissions to:", "Submit", "Back");
  40425. }
  40426. }
  40427. }
  40428. return 1;
  40429. }
  40430. Dialog:DIALOG_LANDUPGRADE(playerid, response, listitem, inputtext[])
  40431. {
  40432. new landid = GetNearbyLand(playerid);
  40433. if(landid == -1 || !HasLandPerms(playerid, landid))
  40434. {
  40435. return 1;
  40436. }
  40437. if(response)
  40438. {
  40439. if(LandInfo[landid][lLevel] < 5)
  40440. {
  40441. if(PlayerData[playerid][pCash] < 100000)
  40442. {
  40443. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to upgrade your land.");
  40444. }
  40445. LandInfo[landid][lLevel]++;
  40446. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE lands SET level = level + 1 WHERE id = %i", LandInfo[landid][lID]);
  40447. mysql_tquery(connectionID, queryBuffer);
  40448. GivePlayerCash(playerid, -100000);
  40449. GameTextForPlayer(playerid, "~r~-$100000", 5000, 1);
  40450. SendClientMessageEx(playerid, COLOR_GREEN, "You paid $100,000 to upgrade your land to level %i/5. Your land can now have up to %i objects.", LandInfo[landid][lLevel], GetLandObjectCapacity(LandInfo[landid][lLevel]));
  40451. }
  40452. }
  40453. else
  40454. {
  40455. ShowDialogToPlayer(playerid, DIALOG_LANDMENU);
  40456. }
  40457. return 1;
  40458. }
  40459. Dialog:DIALOG_LANDEDITOBJECT(playerid, response, listitem, inputtext[])
  40460. {
  40461. new landid = GetNearbyLand(playerid);
  40462. if(landid == -1 || !HasLandPerms(playerid, landid))
  40463. {
  40464. return 1;
  40465. }
  40466. if(response)
  40467. {
  40468. new objectid;
  40469. if(sscanf(inputtext, "i", objectid))
  40470. {
  40471. return Dialog_Show(playerid, DIALOG_LANDEDITOBJECT, DIALOG_STYLE_INPUT, "Edit object", "Please enter the object ID of the object to edit:\nYou can find out the ID of objects by toggling labels in the menu.", "Submit", "Back");
  40472. }
  40473. if(!IsValidDynamicObject(objectid) || Streamer_GetExtraInt(objectid, E_OBJECT_TYPE) != E_OBJECT_LAND)
  40474. {
  40475. SendClientMessage(playerid, COLOR_GREY, "Invalid object. You can find out an object's ID by enabling labels.");
  40476. return Dialog_Show(playerid, DIALOG_LANDEDITOBJECT, DIALOG_STYLE_INPUT, "Edit object", "Please enter the object ID of the object to edit:\nYou can find out the ID of objects by toggling labels in the menu.", "Submit", "Back");
  40477. }
  40478. if(Streamer_GetExtraInt(objectid, E_OBJECT_EXTRA_ID) != LandInfo[landid][lID])
  40479. {
  40480. SendClientMessage(playerid, COLOR_GREY, "Invalid object. This land object is not apart of your land.");
  40481. return Dialog_Show(playerid, DIALOG_LANDEDITOBJECT, DIALOG_STYLE_INPUT, "Edit object", "Please enter the object ID of the object to edit:\nYou can find out the ID of objects by toggling labels in the menu.", "Submit", "Back");
  40482. }
  40483. PlayerData[playerid][pSelected] = objectid;
  40484. ShowDialogToPlayer(playerid, DIALOG_LANDOBJECTMENU);
  40485. }
  40486. else
  40487. {
  40488. ShowDialogToPlayer(playerid, DIALOG_LANDMENU);
  40489. }
  40490. return 1;
  40491. }
  40492. Dialog:DIALOG_LANDOBJECTMENU(playerid, response, listitem, inputtext[])
  40493. {
  40494. new landid = GetNearbyLand(playerid);
  40495. if(landid == -1 || !HasLandPerms(playerid, landid))
  40496. {
  40497. return 1;
  40498. }
  40499. if(response)
  40500. {
  40501. new objectid = PlayerData[playerid][pSelected];
  40502. if(!strcmp(inputtext, "Edit object"))
  40503. {
  40504. if(Streamer_GetExtraInt(objectid, E_OBJECT_OPENED))
  40505. {
  40506. return SendClientMessage(playerid, COLOR_GREY, "You can't edit your gate while it is opened.");
  40507. }
  40508. PlayerData[playerid][pEditType] = EDIT_LAND_OBJECT;
  40509. PlayerData[playerid][pEditObject] = objectid;
  40510. PlayerData[playerid][pObjectLand] = landid;
  40511. EditDynamicObject(playerid, objectid);
  40512. GameTextForPlayer(playerid, "~w~Editing Mode~n~~g~Click disk to save~n~~r~Press ESC to cancel", 5000, 1);
  40513. }
  40514. else if(!strcmp(inputtext, "Edit gate destination"))
  40515. {
  40516. if(Streamer_GetExtraInt(objectid, E_OBJECT_OPENED))
  40517. {
  40518. return SendClientMessage(playerid, COLOR_GREY, "You can't edit your gate while it is opened.");
  40519. }
  40520. PlayerData[playerid][pEditType] = EDIT_LAND_GATE_MOVE;
  40521. PlayerData[playerid][pEditObject] = objectid;
  40522. PlayerData[playerid][pObjectLand] = landid;
  40523. EditDynamicObject(playerid, objectid);
  40524. SendClientMessage(playerid, COLOR_WHITE, "You are now editing the move-to position for your gate.");
  40525. GameTextForPlayer(playerid, "~w~Editing Mode~n~~g~Click disk to save~n~~r~Press ESC to cancel", 5000, 1);
  40526. }
  40527. else if(!strcmp(inputtext, "Duplicate object"))
  40528. {
  40529. PlayerData[playerid][pSelected] = objectid;
  40530. PlayerData[playerid][pObjectLand] = landid;
  40531. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT COUNT(*) FROM landobjects WHERE landid = %i", LandInfo[landid][lID]);
  40532. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_DUPLICATE_LANDOBJ, playerid);
  40533. }
  40534. else if(!strcmp(inputtext, "Sell object"))
  40535. {
  40536. PlayerData[playerid][pSelected] = objectid;
  40537. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT name, price FROM landobjects WHERE id = %i", Streamer_GetExtraInt(objectid, E_OBJECT_INDEX_ID));
  40538. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_SELL_LANDOBJECT, playerid);
  40539. }
  40540. }
  40541. else
  40542. {
  40543. ShowDialogToPlayer(playerid, DIALOG_LANDMENU);
  40544. //Dialog_Show(playerid, DIALOG_LANDEDITOBJECT, DIALOG_STYLE_INPUT, "Edit object", "Please enter the object ID of the object to edit:\nYou can find out the ID of objects by toggling labels in the menu.", "Submit", "Back");
  40545. }
  40546. return 1;
  40547. }
  40548. Dialog:DIALOG_LANDOBJECTS(playerid, response, listitem, inputtext[])
  40549. {
  40550. if(response)
  40551. {
  40552. if(!strcmp(inputtext, ">> Next page", true))
  40553. {
  40554. PlayerData[playerid][pPage]++;
  40555. ShowDialogToPlayer(playerid, DIALOG_LANDOBJECTS);
  40556. }
  40557. else if(!strcmp(inputtext, "<< Go back", true) && PlayerData[playerid][pPage] > 1)
  40558. {
  40559. PlayerData[playerid][pPage]--;
  40560. ShowDialogToPlayer(playerid, DIALOG_LANDOBJECTS);
  40561. }
  40562. else
  40563. {
  40564. new objectid = strval(inputtext);
  40565. if(IsValidDynamicObject(objectid) && Streamer_GetExtraInt(objectid, E_OBJECT_TYPE) == E_OBJECT_LAND)
  40566. {
  40567. PlayerData[playerid][pSelected] = objectid;
  40568. ShowDialogToPlayer(playerid, DIALOG_LANDOBJECTMENU);
  40569. }
  40570. }
  40571. }
  40572. else
  40573. {
  40574. ShowDialogToPlayer(playerid, DIALOG_LANDMENU);
  40575. }
  40576. return 1;
  40577. }
  40578. Dialog:DIALOG_LANDSELLALL(playerid, response, listitem, inputtext[])
  40579. {
  40580. new landid = GetNearbyLand(playerid);
  40581. if(landid == -1 || !HasLandPerms(playerid, landid))
  40582. {
  40583. return 1;
  40584. }
  40585. if(response)
  40586. {
  40587. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT price FROM landobjects WHERE landid = %i", LandInfo[landid][lID]);
  40588. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_CLEAR_LANDOBJECTS, playerid);
  40589. }
  40590. else
  40591. {
  40592. ShowDialogToPlayer(playerid, DIALOG_LANDMENU);
  40593. }
  40594. return 1;
  40595. }
  40596. /*Dialog:DIALOG_LANDPERMS:
  40597. {
  40598. new landid = GetNearbyLand(playerid), targetid;
  40599. if(landid == -1 || !HasLandPerms(playerid, landid))
  40600. {
  40601. return 1;
  40602. }
  40603. if(response)
  40604. {
  40605. if(sscanf(inputtext, "u", targetid))
  40606. {
  40607. return Dialog_Show(playerid, DIALOG_LANDPERMS, DIALOG_STYLE_INPUT, "Permissions", "Please enter the name or ID of the player to take or give permissions to:", "Submit", "Back");
  40608. }
  40609. if(!IsPlayerConnected(targetid))
  40610. {
  40611. SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  40612. return Dialog_Show(playerid, DIALOG_LANDPERMS, DIALOG_STYLE_INPUT, "Permissions", "Please enter the name or ID of the player to take or give permissions to:", "Submit", "Back");
  40613. }
  40614. if(targetid == playerid)
  40615. {
  40616. SendClientMessage(playerid, COLOR_GREY, "You can't give permissions to yourself.");
  40617. return Dialog_Show(playerid, DIALOG_LANDPERMS, DIALOG_STYLE_INPUT, "Permissions", "Please enter the name or ID of the player to take or give permissions to:", "Submit", "Back");
  40618. }
  40619. if(PlayerData[targetid][pLandPerms] == landid)
  40620. {
  40621. PlayerData[targetid][pLandPerms] = -1;
  40622. SendClientMessageEx(targetid, COLOR_AQUA, "%s has removed your access to their land's objects.", GetRPName(playerid));
  40623. SendClientMessageEx(playerid, COLOR_AQUA, "You have removed %s's access to your land's objects.", GetRPName(targetid));
  40624. }
  40625. else
  40626. {
  40627. PlayerData[targetid][pLandPerms] = landid;
  40628. SendClientMessageEx(targetid, COLOR_AQUA, "%s has granted you access to their land's objects.", GetRPName(playerid));
  40629. SendClientMessageEx(playerid, COLOR_AQUA, "You have granted %s access to your land's objects.", GetRPName(targetid));
  40630. }
  40631. }
  40632. ShowDialogToPlayer(playerid, DIALOG_LANDMENU);
  40633. }*/
  40634. Dialog:DIALOG_LANDPERMS(playerid, response, listitem, inputtext[])
  40635. {
  40636. new landid = GetNearbyLand(playerid), targetid;
  40637. if(landid == -1 || !IsLandOwner(playerid, landid))
  40638. {
  40639. return 1;
  40640. }
  40641. if(response)
  40642. {
  40643. if(sscanf(inputtext, "u", targetid))
  40644. {
  40645. return Dialog_Show(playerid, DIALOG_LANDPERMS, DIALOG_STYLE_INPUT, "Permissions", "Please enter the name or ID of the player to take or give permissions to:", "Submit", "Back");
  40646. }
  40647. if(!IsPlayerConnected(targetid))
  40648. {
  40649. SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  40650. return Dialog_Show(playerid, DIALOG_LANDPERMS, DIALOG_STYLE_INPUT, "Permissions", "Please enter the name or ID of the player to take or give permissions to:", "Submit", "Back");
  40651. }
  40652. if(targetid == playerid)
  40653. {
  40654. SendClientMessage(playerid, COLOR_GREY, "You can't give permissions to yourself.");
  40655. return Dialog_Show(playerid, DIALOG_LANDPERMS, DIALOG_STYLE_INPUT, "Permissions", "Please enter the name or ID of the player to take or give permissions to:", "Submit", "Back");
  40656. }
  40657. if(PlayerData[targetid][pLandPerms] == landid)
  40658. {
  40659. PlayerData[targetid][pLandPerms] = -1;
  40660. SendClientMessageEx(targetid, COLOR_AQUA, "%s has removed your access to their land's objects.", GetRPName(playerid));
  40661. SendClientMessageEx(playerid, COLOR_AQUA, "You have removed %s's access to your land's objects.", GetRPName(targetid));
  40662. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET landkeys = %i WHERE uid = %i", LandInfo[landid][lID], PlayerData[targetid][pID]);
  40663. mysql_tquery(connectionID, queryBuffer);
  40664. }
  40665. else if(PlayerData[targetid][pLandPerms] == -1)
  40666. {
  40667. PlayerData[targetid][pLandPerms] = landid;
  40668. SendClientMessageEx(targetid, COLOR_AQUA, "%s has granted you access to their land's objects.", GetRPName(playerid));
  40669. SendClientMessageEx(playerid, COLOR_AQUA, "You have granted %s access to your land's objects.", GetRPName(targetid));
  40670. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET landkeys = 0 WHERE uid = %i", PlayerData[targetid][pID]);
  40671. mysql_tquery(connectionID, queryBuffer);
  40672. }
  40673. else
  40674. {
  40675. SendClientMessage(playerid, COLOR_AQUA, "That player already has access to someone's land. (/droplandkeys)");
  40676. }
  40677. }
  40678. ShowDialogToPlayer(playerid, DIALOG_LANDMENU);
  40679. return 1;
  40680. }
  40681. Dialog:DIALOG_MP3PLAYER(playerid, response, listitem, inputtext[])
  40682. {
  40683. if(response)
  40684. {
  40685. switch(listitem)
  40686. {
  40687. case 0:
  40688. {
  40689. Dialog_Show(playerid, DIALOG_MP3URL, DIALOG_STYLE_INPUT, "Custom URL", "Please enter the URL of the stream you want to play:", "Submit", "Back");
  40690. }
  40691. case 1:
  40692. {
  40693. Dialog_Show(playerid, DIALOG_MP3MUSIC, DIALOG_STYLE_INPUT, "Uploaded Music", "Please enter the name of the .mp3 file to play:\n(Use /music for a list of all music uploaded to the server.)", "Submit", "Back");
  40694. }
  40695. case 2:
  40696. {
  40697. if(!connectionID)
  40698. {
  40699. return SendClientMessage(playerid, COLOR_GREY, "The radio station database is currently unavailable.");
  40700. }
  40701. ShowDialogToPlayer(playerid, DIALOG_MP3RADIO);
  40702. }
  40703. case 3:
  40704. {
  40705. switch(PlayerData[playerid][pMusicType])
  40706. {
  40707. case MUSIC_MP3PLAYER:
  40708. {
  40709. SetMusicStream(MUSIC_MP3PLAYER, playerid, "");
  40710. ShowActionBubble(playerid, "* %s turns off their MP3 player.", GetRPName(playerid));
  40711. }
  40712. case MUSIC_BOOMBOX:
  40713. {
  40714. SetMusicStream(MUSIC_BOOMBOX, playerid, "");
  40715. ShowActionBubble(playerid, "* %s turns off their boombox.", GetRPName(playerid));
  40716. }
  40717. case MUSIC_VEHICLE:
  40718. {
  40719. if(IsPlayerInAnyVehicle(playerid))
  40720. {
  40721. SetMusicStream(MUSIC_VEHICLE, GetPlayerVehicleID(playerid), "");
  40722. ShowActionBubble(playerid, "* %s turns off the radio in the vehicle.", GetRPName(playerid));
  40723. }
  40724. }
  40725. }
  40726. }
  40727. case 4:
  40728. {
  40729. if(PlayerData[playerid][pDonator] < 1)
  40730. {
  40731. return SendClientMessage(playerid, COLOR_GREY, "You must be a VIP to use this option");
  40732. }
  40733. Dialog_Show(playerid, DIALOG_VIPMUSIC, DIALOG_STYLE_INPUT, "VIP Uploaded Music", "Please enter the name of the .mp3 file to play:", "Submit", "Back");
  40734. }
  40735. }
  40736. }
  40737. return 1;
  40738. }
  40739. Dialog:DIALOG_MP3MUSIC(playerid, response, listitem, inputtext[])
  40740. {
  40741. if(response)
  40742. {
  40743. new url[128];
  40744. if(isnull(inputtext) || strfind(inputtext, ".mp3", true) == -1)
  40745. {
  40746. return Dialog_Show(playerid, DIALOG_MP3MUSIC, DIALOG_STYLE_INPUT, "Uploaded Music", "Please enter the name of the .mp3 file to play:\n(Use /music for a list of all music uploaded to the server.)", "Submit", "Back");
  40747. }
  40748. for(new i = 0, l = strlen(inputtext); i < l; i ++)
  40749. {
  40750. switch(inputtext[i])
  40751. {
  40752. case 'A'..'Z', 'a'..'z', '0'..'9', '_', '.', '\'', ' ':
  40753. {
  40754. continue;
  40755. }
  40756. default:
  40757. {
  40758. SendClientMessage(playerid, COLOR_GREY, "The name of the .mp3 contains invalid characters, please try again.");
  40759. return Dialog_Show(playerid, DIALOG_MP3MUSIC, DIALOG_STYLE_INPUT, "Uploaded Music", "Please enter the name of the .mp3 file to play:\n(Use /music for a list of all music uploaded to the server.)", "Submit", "Back");
  40760. }
  40761. }
  40762. }
  40763. format(url, sizeof(url), "http://%s/%s", SERVER_MUSIC_URL, inputtext);
  40764. switch(PlayerData[playerid][pMusicType])
  40765. {
  40766. case MUSIC_MP3PLAYER:
  40767. {
  40768. SetMusicStream(MUSIC_MP3PLAYER, playerid, url);
  40769. ShowActionBubble(playerid, "* %s changes the song on their MP3 player.", GetRPName(playerid));
  40770. }
  40771. case MUSIC_BOOMBOX:
  40772. {
  40773. SetMusicStream(MUSIC_BOOMBOX, playerid, url);
  40774. ShowActionBubble(playerid, "* %s changes the song on their boombox.", GetRPName(playerid));
  40775. }
  40776. case MUSIC_VEHICLE:
  40777. {
  40778. if(IsPlayerInAnyVehicle(playerid))
  40779. {
  40780. SetMusicStream(MUSIC_VEHICLE, GetPlayerVehicleID(playerid), url);
  40781. ShowActionBubble(playerid, "* %s changes the song on the radio.", GetRPName(playerid));
  40782. }
  40783. }
  40784. }
  40785. SendClientMessageEx(playerid, COLOR_AQUA, "You have started the playback of {00AA00}%s{33CCFF}.", inputtext);
  40786. }
  40787. else
  40788. {
  40789. ShowDialogToPlayer(playerid, DIALOG_MP3PLAYER);
  40790. }
  40791. return 1;
  40792. }
  40793. Dialog:DIALOG_VIPMUSIC(playerid, response, listitem, inputtext[])
  40794. {
  40795. if(response)
  40796. {
  40797. new url[128];
  40798. if(isnull(inputtext))
  40799. {
  40800. return Dialog_Show(playerid, DIALOG_VIPMUSIC, DIALOG_STYLE_INPUT, "VIP Uploaded Music", "Please enter the name of the .mp3 file to play:", "Submit", "Back");
  40801. }
  40802. for(new i = 0, l = strlen(inputtext); i < l; i ++)
  40803. {
  40804. switch(inputtext[i])
  40805. {
  40806. case 'A'..'Z', 'a'..'z', '0'..'9', '_', '.', '\'', ' ':
  40807. {
  40808. continue;
  40809. }
  40810. default:
  40811. {
  40812. SendClientMessage(playerid, COLOR_GREY, "The name of the .mp3 contains invalid characters, please try again.");
  40813. return Dialog_Show(playerid, DIALOG_VIPMUSIC, DIALOG_STYLE_INPUT, "VIP Uploaded Music", "Please enter the name of the .mp3 file to play:", "Submit", "Back");
  40814. }
  40815. }
  40816. }
  40817. format(url, sizeof(url), "http://%s/%d/%s", VIP_MUSIC_URL, PlayerData[playerid][pID], inputtext);
  40818. switch(PlayerData[playerid][pMusicType])
  40819. {
  40820. case MUSIC_MP3PLAYER:
  40821. {
  40822. SetMusicStream(MUSIC_MP3PLAYER, playerid, url);
  40823. ShowActionBubble(playerid, "* %s changes the song on their MP3 player.", GetRPName(playerid));
  40824. }
  40825. case MUSIC_BOOMBOX:
  40826. {
  40827. SetMusicStream(MUSIC_BOOMBOX, playerid, url);
  40828. ShowActionBubble(playerid, "* %s changes the song on their boombox.", GetRPName(playerid));
  40829. }
  40830. case MUSIC_VEHICLE:
  40831. {
  40832. if(IsPlayerInAnyVehicle(playerid))
  40833. {
  40834. SetMusicStream(MUSIC_VEHICLE, GetPlayerVehicleID(playerid), url);
  40835. ShowActionBubble(playerid, "* %s changes the song on the radio.", GetRPName(playerid));
  40836. }
  40837. }
  40838. }
  40839. SendClientMessageEx(playerid, COLOR_AQUA, "You have started the playback of {00AA00}%s{33CCFF}.", inputtext);
  40840. }
  40841. else
  40842. {
  40843. ShowDialogToPlayer(playerid, DIALOG_MP3PLAYER);
  40844. }
  40845. return 1;
  40846. }
  40847. stock IsValidYoutubeUrl(const url[])
  40848. {
  40849. static RegEx:rHex;
  40850. if(!rHex)
  40851. {
  40852. rHex = regex_build(\"((http(s)?:\/\/)?)(www\.)?((youtube\.com\/)|(youtu.be\/))[\S]+");
  40853. }
  40854. return regex_match_exid(url, rHex);
  40855. }
  40856. Dialog:DIALOG_MP3URL(playerid, response, listitem, inputtext[])
  40857. {
  40858. if(response)
  40859. {
  40860. if(isnull(inputtext))
  40861. {
  40862. return Dialog_Show(playerid, DIALOG_MP3URL, DIALOG_STYLE_INPUT, "Custom URL", "Please enter the URL of the stream you want to play:", "Submit", "Back");
  40863. }
  40864. if(!IsValidYoutubeUrl(inputtext) && strfind(inputtext, ".mp3", true) == -1)
  40865. {
  40866. return Dialog_Show(playerid, DIALOG_MP3URL, DIALOG_STYLE_INPUT, "Custom URL", ".MP3 or Youtube Links only! Please enter another URL", "Submit", "Back");
  40867. }
  40868. switch(PlayerData[playerid][pMusicType])
  40869. {
  40870. case MUSIC_MP3PLAYER:
  40871. {
  40872. SetMusicStream(MUSIC_MP3PLAYER, playerid, inputtext);
  40873. ShowActionBubble(playerid, "* %s changes the song on their MP3 player.", GetRPName(playerid));
  40874. }
  40875. case MUSIC_BOOMBOX:
  40876. {
  40877. SetMusicStream(MUSIC_BOOMBOX, playerid, inputtext);
  40878. ShowActionBubble(playerid, "* %s changes the song on their boombox.", GetRPName(playerid));
  40879. }
  40880. case MUSIC_VEHICLE:
  40881. {
  40882. if(IsPlayerInAnyVehicle(playerid))
  40883. {
  40884. SetMusicStream(MUSIC_VEHICLE, GetPlayerVehicleID(playerid), inputtext);
  40885. ShowActionBubble(playerid, "* %s changes the song on the radio.", GetRPName(playerid));
  40886. }
  40887. }
  40888. }
  40889. }
  40890. else
  40891. {
  40892. ShowDialogToPlayer(playerid, DIALOG_MP3PLAYER);
  40893. }
  40894. return 1;
  40895. }
  40896. Dialog:DIALOG_MP3RADIO(playerid, response, listitem, inputtext[])
  40897. {
  40898. if(response)
  40899. {
  40900. switch(listitem)
  40901. {
  40902. case 0:
  40903. {
  40904. ShowDialogToPlayer(playerid, DIALOG_MP3RADIOGENRES);
  40905. }
  40906. case 1:
  40907. {
  40908. ShowDialogToPlayer(playerid, DIALOG_MP3RADIOSEARCH);
  40909. }
  40910. /*case 2:
  40911. {
  40912. ShowDialogToPlayer(playerid, DIALOG_MP3APISEARCH);
  40913. }*/
  40914. }
  40915. }
  40916. else
  40917. {
  40918. ShowDialogToPlayer(playerid, DIALOG_MP3PLAYER);
  40919. }
  40920. return 1;
  40921. }
  40922. Dialog:DIALOG_MP3RADIOGENRES(playerid, response, listitem, inputtext[])
  40923. {
  40924. if(response)
  40925. {
  40926. strcpy(PlayerData[playerid][pGenre], inputtext, 32);
  40927. ShowDialogToPlayer(playerid, DIALOG_MP3RADIOSUBGENRES);
  40928. }
  40929. else
  40930. {
  40931. ShowDialogToPlayer(playerid, DIALOG_MP3RADIO);
  40932. }
  40933. return 1;
  40934. }
  40935. Dialog:DIALOG_MP3RADIOSUBGENRES(playerid, response, listitem, inputtext[])
  40936. {
  40937. if(response)
  40938. {
  40939. PlayerData[playerid][pPage] = 1;
  40940. PlayerData[playerid][pSearch] = 0;
  40941. strcpy(PlayerData[playerid][pSubgenre], inputtext, 32);
  40942. if(!PlayerData[playerid][pStationEdit])
  40943. {
  40944. ShowDialogToPlayer(playerid, DIALOG_MP3RADIORESULTS);
  40945. }
  40946. else
  40947. {
  40948. ShowDialogToPlayer(playerid, DIALOG_ADDSTATION);
  40949. }
  40950. }
  40951. else
  40952. {
  40953. ShowDialogToPlayer(playerid, DIALOG_MP3RADIOGENRES);
  40954. }
  40955. return 1;
  40956. }
  40957. Dialog:DIALOG_MP3RADIORESULTS(playerid, response, listitem, inputtext[])
  40958. {
  40959. if(response)
  40960. {
  40961. if(!strcmp(inputtext, ">> Next page", true))
  40962. {
  40963. PlayerData[playerid][pPage]++;
  40964. ShowDialogToPlayer(playerid, DIALOG_MP3RADIORESULTS);
  40965. }
  40966. else if(!strcmp(inputtext, "<< Go back", true) && PlayerData[playerid][pPage] > 1)
  40967. {
  40968. PlayerData[playerid][pPage]--;
  40969. ShowDialogToPlayer(playerid, DIALOG_MP3RADIORESULTS);
  40970. }
  40971. else
  40972. {
  40973. listitem = ((PlayerData[playerid][pPage] - 1) * MAX_LISTED_STATIONS) + listitem;
  40974. if(PlayerData[playerid][pSearch])
  40975. {
  40976. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT name, url FROM radiostations WHERE name LIKE '%%%e%%' OR subgenre LIKE '%%%e%%' ORDER BY name LIMIT %i, 1", PlayerData[playerid][pGenre], PlayerData[playerid][pGenre], listitem);
  40977. mysql_tquery(connectionID, queryBuffer, "Radio_PlayStation", "i", playerid);
  40978. }
  40979. else
  40980. {
  40981. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT name, url FROM radiostations WHERE genre = '%e' AND subgenre = '%e' ORDER BY name LIMIT %i, 1", PlayerData[playerid][pGenre], PlayerData[playerid][pSubgenre], listitem);
  40982. mysql_tquery(connectionID, queryBuffer, "Radio_PlayStation", "i", playerid);
  40983. }
  40984. }
  40985. }
  40986. else
  40987. {
  40988. if(PlayerData[playerid][pSearch])
  40989. {
  40990. ShowDialogToPlayer(playerid, DIALOG_MP3RADIOSEARCH);
  40991. }
  40992. else
  40993. {
  40994. ShowDialogToPlayer(playerid, DIALOG_MP3RADIOSUBGENRES);
  40995. }
  40996. }
  40997. return 1;
  40998. }
  40999. Dialog:DIALOG_MP3RADIOSEARCH(playerid, response, listitem, inputtext[])
  41000. {
  41001. if(response)
  41002. {
  41003. if(strlen(inputtext) < 3)
  41004. {
  41005. SendClientMessage(playerid, COLOR_GREY, "Your search query must contain 3 characters or more.");
  41006. return ShowDialogToPlayer(playerid, DIALOG_MP3RADIOSEARCH);
  41007. }
  41008. PlayerData[playerid][pPage] = 1;
  41009. PlayerData[playerid][pSearch] = 1;
  41010. strcpy(PlayerData[playerid][pGenre], inputtext, 32);
  41011. ShowDialogToPlayer(playerid, DIALOG_MP3RADIORESULTS);
  41012. }
  41013. else
  41014. {
  41015. ShowDialogToPlayer(playerid, DIALOG_MP3RADIO);
  41016. }
  41017. return 1;
  41018. }
  41019. Dialog:DIALOG_GANGSTASH(playerid, response, listitem, inputtext[])
  41020. {
  41021. if(PlayerData[playerid][pGang] == -1)
  41022. {
  41023. return 1;
  41024. }
  41025. if(response)
  41026. {
  41027. switch(listitem)
  41028. {
  41029. case 0:
  41030. {
  41031. ShowDialogToPlayer(playerid, DIALOG_GANGSTASHWEAPONS1);
  41032. }
  41033. case 1:
  41034. {
  41035. ShowDialogToPlayer(playerid, DIALOG_GANGSTASHVEST);
  41036. }
  41037. case 2:
  41038. {
  41039. ShowDialogToPlayer(playerid, DIALOG_GANGSTASHDRUGS1);
  41040. }
  41041. case 3:
  41042. {
  41043. if(!GetGangSkinCount(PlayerData[playerid][pGang]))
  41044. {
  41045. return SendClientMessage(playerid, COLOR_GREY, "There are no skins setup for your gang.");
  41046. }
  41047. PlayerData[playerid][pSkinSelected] = -1;
  41048. Dialog_Show(playerid, DIALOG_GANGSKINS, DIALOG_STYLE_MSGBOX, "Skin selection", "Press {00AA00}>> Next{A9C4E4} to browse through available gang skins.", ">> Next", "Confirm");
  41049. }
  41050. case 4:
  41051. {
  41052. if(PlayerData[playerid][pGangRank] < 5)
  41053. {
  41054. return SendClientMessage(playerid, COLOR_GREY, "You must be at least rank 5+ to craft weapons.");
  41055. }
  41056. ShowDialogToPlayer(playerid, DIALOG_GANGSTASHCRAFT);
  41057. }
  41058. case 5:
  41059. {
  41060. PlayerData[playerid][pSelected] = ITEM_MATERIALS;
  41061. ShowDialogToPlayer(playerid, DIALOG_GANGSTASHMATS);
  41062. }
  41063. case 6:
  41064. {
  41065. PlayerData[playerid][pSelected] = ITEM_CASH;
  41066. ShowDialogToPlayer(playerid, DIALOG_GANGSTASHCASH);
  41067. }
  41068. }
  41069. }
  41070. return 1;
  41071. }
  41072. Dialog:DIALOG_GANGSTASHVEST(playerid, response, listitem, inputtext[])
  41073. {
  41074. if(PlayerData[playerid][pGang] == -1)
  41075. {
  41076. return 1;
  41077. }
  41078. if(response)
  41079. {
  41080. switch(listitem)
  41081. {
  41082. case 0:
  41083. {
  41084. if(PlayerData[playerid][pGangRank] < GangInfo[PlayerData[playerid][pGang]][gVestRank])
  41085. {
  41086. return SendClientMessageEx(playerid, COLOR_GREY, "You must be at least rank %i+ to craft kevlar vests.", GangInfo[PlayerData[playerid][pGang]][gVestRank]);
  41087. }
  41088. if(GangInfo[PlayerData[playerid][pGang]][gMaterials] < 200)
  41089. {
  41090. return SendClientMessage(playerid, COLOR_GREY, "There aren't enough materials in the safe for kevlar vests.");
  41091. }
  41092. if(GetPlayerArmourEx(playerid) >= 100)
  41093. {
  41094. return SendClientMessage(playerid, COLOR_GREY, "You have a full vest already.");
  41095. }
  41096. GangInfo[PlayerData[playerid][pGang]][gMaterials] -= 200;
  41097. SetScriptArmour(playerid, 100.0);
  41098. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET materials = %i WHERE id = %i", GangInfo[PlayerData[playerid][pGang]][gMaterials], PlayerData[playerid][pGang]);
  41099. mysql_tquery(connectionID, queryBuffer);
  41100. ShowActionBubble(playerid, "* %s takes a kevlar vest from the gang stash.", GetRPName(playerid));
  41101. SendClientMessage(playerid, COLOR_AQUA, "You crafted a kevlar vest using 200 materials from the safe.");
  41102. }
  41103. case 1:
  41104. {
  41105. if(PlayerData[playerid][pGangRank] < 6)
  41106. {
  41107. return SendClientMessage(playerid, COLOR_GREY, "You need to be at least rank 6+ to change the vest rank.");
  41108. }
  41109. Dialog_Show(playerid, DIALOG_GANGSTASHVESTRANK, DIALOG_STYLE_LIST, "Choose a rank to restrict vests to:", "R0+\nR1+\nR2+\nR3+\nR4+\nR5+\nR6", "Select", "Back");
  41110. }
  41111. }
  41112. }
  41113. else
  41114. {
  41115. ShowDialogToPlayer(playerid, DIALOG_GANGSTASH);
  41116. }
  41117. return 1;
  41118. }
  41119. Dialog:DIALOG_GANGSTASHVESTRANK(playerid, response, listitem, inputtext[])
  41120. {
  41121. if(PlayerData[playerid][pGang] == -1)
  41122. {
  41123. return 1;
  41124. }
  41125. if(response)
  41126. {
  41127. GangInfo[PlayerData[playerid][pGang]][gVestRank] = listitem;
  41128. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the rank restriction for {FF6347}Kevlar vests{33CCFF} to rank %i+.", listitem);
  41129. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET rank_vest = %i WHERE id = %i", listitem, PlayerData[playerid][pGang]);
  41130. mysql_tquery(connectionID, queryBuffer);
  41131. }
  41132. ShowDialogToPlayer(playerid, DIALOG_GANGSTASHVEST);
  41133. return 1;
  41134. }
  41135. Dialog:DIALOG_GANGSTASHWEAPONS1(playerid, response, listitem, inputtext[])
  41136. {
  41137. if(PlayerData[playerid][pGang] == -1)
  41138. {
  41139. return 1;
  41140. }
  41141. if(response)
  41142. {
  41143. PlayerData[playerid][pSelected] = listitem;
  41144. Dialog_Show(playerid, DIALOG_GANGSTASHWEAPONS2, DIALOG_STYLE_LIST, "Gang stash | Weapons", "Withdraw\nDeposit\nChange Rank", "Select", "Back");
  41145. }
  41146. else
  41147. {
  41148. ShowDialogToPlayer(playerid, DIALOG_GANGSTASH);
  41149. }
  41150. return 1;
  41151. }
  41152. Dialog:DIALOG_GANGSTASHWEAPONS2(playerid, response, listitem, inputtext[])
  41153. {
  41154. if(PlayerData[playerid][pGang] == -1)
  41155. {
  41156. return 1;
  41157. }
  41158. if(response)
  41159. {
  41160. if(listitem == 0)
  41161. {
  41162. if(PlayerData[playerid][pGangRank] < 1)
  41163. {
  41164. return SendClientMessage(playerid, COLOR_GREY, "You must be at least rank 1+ in order to withdraw weapons.");
  41165. }
  41166. if(PlayerData[playerid][pHours] < 2 || PlayerData[playerid][pWeaponRestricted] > 0)
  41167. {
  41168. return SendClientMessage(playerid, COLOR_GREY, "You are either weapon restricted or you played less than two playing hours.");
  41169. }
  41170. switch(PlayerData[playerid][pSelected])
  41171. {
  41172. case GANGWEAPON_9MM:
  41173. {
  41174. if(PlayerData[playerid][pGangRank] < GangInfo[PlayerData[playerid][pGang]][gWeaponRanks][GANGWEAPON_9MM])
  41175. {
  41176. return SendClientMessage(playerid, COLOR_GREY, "Your rank isn't high enough to withdraw this weapon.");
  41177. }
  41178. if(GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_9MM] <= 0)
  41179. {
  41180. return SendClientMessage(playerid, COLOR_GREY, "The gang stash doesn't have any of this weapon left.");
  41181. }
  41182. if(PlayerHasWeapon(playerid, 22))
  41183. {
  41184. return SendClientMessage(playerid, COLOR_GREY, "You have this weapon already.");
  41185. }
  41186. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_9MM]--;
  41187. GivePlayerWeaponEx(playerid, 22);
  41188. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET weapon_9mm = weapon_9mm - 1 WHERE id = %i", PlayerData[playerid][pGang]);
  41189. mysql_tquery(connectionID, queryBuffer);
  41190. ShowActionBubble(playerid, "* %s withdraws a 9mm from the gang stash.", GetRPName(playerid));
  41191. Log_Write("log_gang", "%s (uid: %i) withdraws a 9mm from the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GangInfo[PlayerData[playerid][pGang]][gName], PlayerData[playerid][pGang]);
  41192. }
  41193. case GANGWEAPON_SDPISTOL:
  41194. {
  41195. if(PlayerData[playerid][pGangRank] < GangInfo[PlayerData[playerid][pGang]][gWeaponRanks][GANGWEAPON_SDPISTOL])
  41196. {
  41197. return SendClientMessage(playerid, COLOR_GREY, "Your rank isn't high enough to withdraw this weapon.");
  41198. }
  41199. if(GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_SDPISTOL] <= 0)
  41200. {
  41201. return SendClientMessage(playerid, COLOR_GREY, "The gang stash doesn't have any of this weapon left.");
  41202. }
  41203. if(PlayerHasWeapon(playerid, 23))
  41204. {
  41205. return SendClientMessage(playerid, COLOR_GREY, "You have this weapon already.");
  41206. }
  41207. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_SDPISTOL]--;
  41208. GivePlayerWeaponEx(playerid, 23);
  41209. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET weapon_sdpistol = weapon_sdpistol - 1 WHERE id = %i", PlayerData[playerid][pGang]);
  41210. mysql_tquery(connectionID, queryBuffer);
  41211. ShowActionBubble(playerid, "* %s withdraws a silenced pistol from the gang stash.", GetRPName(playerid));
  41212. Log_Write("log_gang", "%s (uid: %i) withdraws a silenced pistol from the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GangInfo[PlayerData[playerid][pGang]][gName], PlayerData[playerid][pGang]);
  41213. }
  41214. case GANGWEAPON_DEAGLE:
  41215. {
  41216. if(PlayerData[playerid][pGangRank] < GangInfo[PlayerData[playerid][pGang]][gWeaponRanks][GANGWEAPON_DEAGLE])
  41217. {
  41218. return SendClientMessage(playerid, COLOR_GREY, "Your rank isn't high enough to withdraw this weapon.");
  41219. }
  41220. if(GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_DEAGLE] <= 0)
  41221. {
  41222. return SendClientMessage(playerid, COLOR_GREY, "The gang stash doesn't have any of this weapon left.");
  41223. }
  41224. if(PlayerHasWeapon(playerid, 24))
  41225. {
  41226. return SendClientMessage(playerid, COLOR_GREY, "You have this weapon already.");
  41227. }
  41228. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_DEAGLE]--;
  41229. GivePlayerWeaponEx(playerid, 24);
  41230. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET weapon_deagle = weapon_deagle - 1 WHERE id = %i", PlayerData[playerid][pGang]);
  41231. mysql_tquery(connectionID, queryBuffer);
  41232. ShowActionBubble(playerid, "* %s withdraws a Desert Eagle from the gang stash.", GetRPName(playerid));
  41233. Log_Write("log_gang", "%s (uid: %i) withdraws a Desert Eagle from the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GangInfo[PlayerData[playerid][pGang]][gName], PlayerData[playerid][pGang]);
  41234. }
  41235. case GANGWEAPON_SHOTGUN:
  41236. {
  41237. if(PlayerData[playerid][pGangRank] < GangInfo[PlayerData[playerid][pGang]][gWeaponRanks][GANGWEAPON_SHOTGUN])
  41238. {
  41239. return SendClientMessage(playerid, COLOR_GREY, "Your rank isn't high enough to withdraw this weapon.");
  41240. }
  41241. if(GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_SHOTGUN] <= 0)
  41242. {
  41243. return SendClientMessage(playerid, COLOR_GREY, "The gang stash doesn't have any of this weapon left.");
  41244. }
  41245. if(PlayerHasWeapon(playerid, 25))
  41246. {
  41247. return SendClientMessage(playerid, COLOR_GREY, "You have this weapon already.");
  41248. }
  41249. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_SHOTGUN]--;
  41250. GivePlayerWeaponEx(playerid, 25);
  41251. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET weapon_shotgun = weapon_shotgun - 1 WHERE id = %i", PlayerData[playerid][pGang]);
  41252. mysql_tquery(connectionID, queryBuffer);
  41253. ShowActionBubble(playerid, "* %s withdraws a shotgun from the gang stash.", GetRPName(playerid));
  41254. Log_Write("log_gang", "%s (uid: %i) withdraws a shotgun from the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GangInfo[PlayerData[playerid][pGang]][gName], PlayerData[playerid][pGang]);
  41255. }
  41256. case GANGWEAPON_TEC9:
  41257. {
  41258. if(PlayerData[playerid][pGangRank] < GangInfo[PlayerData[playerid][pGang]][gWeaponRanks][GANGWEAPON_TEC9])
  41259. {
  41260. return SendClientMessage(playerid, COLOR_GREY, "Your rank isn't high enough to withdraw this weapon.");
  41261. }
  41262. if(GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_TEC9] <= 0)
  41263. {
  41264. return SendClientMessage(playerid, COLOR_GREY, "The gang stash doesn't have any of this weapon left.");
  41265. }
  41266. if(PlayerHasWeapon(playerid, 32))
  41267. {
  41268. return SendClientMessage(playerid, COLOR_GREY, "You have this weapon already.");
  41269. }
  41270. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_TEC9]--;
  41271. GivePlayerWeaponEx(playerid, 32);
  41272. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET weapon_tec9 = weapon_tec9 - 1 WHERE id = %i", PlayerData[playerid][pGang]);
  41273. mysql_tquery(connectionID, queryBuffer);
  41274. ShowActionBubble(playerid, "* %s withdraws a Tec-9 from the gang stash.", GetRPName(playerid));
  41275. Log_Write("log_gang", "%s (uid: %i) withdraws a Tec-9 from the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GangInfo[PlayerData[playerid][pGang]][gName], PlayerData[playerid][pGang]);
  41276. }
  41277. case GANGWEAPON_UZI:
  41278. {
  41279. if(PlayerData[playerid][pGangRank] < GangInfo[PlayerData[playerid][pGang]][gWeaponRanks][GANGWEAPON_UZI])
  41280. {
  41281. return SendClientMessage(playerid, COLOR_GREY, "Your rank isn't high enough to withdraw this weapon.");
  41282. }
  41283. if(GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_UZI] <= 0)
  41284. {
  41285. return SendClientMessage(playerid, COLOR_GREY, "The gang stash doesn't have any of this weapon left.");
  41286. }
  41287. if(PlayerHasWeapon(playerid, 28))
  41288. {
  41289. return SendClientMessage(playerid, COLOR_GREY, "You have this weapon already.");
  41290. }
  41291. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_UZI]--;
  41292. GivePlayerWeaponEx(playerid, 28);
  41293. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET weapon_uzi = weapon_uzi - 1 WHERE id = %i", PlayerData[playerid][pGang]);
  41294. mysql_tquery(connectionID, queryBuffer);
  41295. ShowActionBubble(playerid, "* %s withdraws a Micro Uzi from the gang stash.", GetRPName(playerid));
  41296. Log_Write("log_gang", "%s (uid: %i) withdraws a Micro Uzi from the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GangInfo[PlayerData[playerid][pGang]][gName], PlayerData[playerid][pGang]);
  41297. }
  41298. case GANGWEAPON_MP5:
  41299. {
  41300. if(PlayerData[playerid][pGangRank] < GangInfo[PlayerData[playerid][pGang]][gWeaponRanks][GANGWEAPON_MP5])
  41301. {
  41302. return SendClientMessage(playerid, COLOR_GREY, "Your rank isn't high enough to withdraw this weapon.");
  41303. }
  41304. if(GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_MP5] <= 0)
  41305. {
  41306. return SendClientMessage(playerid, COLOR_GREY, "The gang stash doesn't have any of this weapon left.");
  41307. }
  41308. if(PlayerHasWeapon(playerid, 29))
  41309. {
  41310. return SendClientMessage(playerid, COLOR_GREY, "You have this weapon already.");
  41311. }
  41312. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_MP5]--;
  41313. GivePlayerWeaponEx(playerid, 29);
  41314. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET weapon_mp5 = weapon_mp5 - 1 WHERE id = %i", PlayerData[playerid][pGang]);
  41315. mysql_tquery(connectionID, queryBuffer);
  41316. ShowActionBubble(playerid, "* %s withdraws an MP5 from the gang stash.", GetRPName(playerid));
  41317. Log_Write("log_gang", "%s (uid: %i) withdraws an MP5 from the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GangInfo[PlayerData[playerid][pGang]][gName], PlayerData[playerid][pGang]);
  41318. }
  41319. case GANGWEAPON_AK47:
  41320. {
  41321. if(PlayerData[playerid][pGangRank] < GangInfo[PlayerData[playerid][pGang]][gWeaponRanks][GANGWEAPON_AK47])
  41322. {
  41323. return SendClientMessage(playerid, COLOR_GREY, "Your rank isn't high enough to withdraw this weapon.");
  41324. }
  41325. if(GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_AK47] <= 0)
  41326. {
  41327. return SendClientMessage(playerid, COLOR_GREY, "The gang stash doesn't have any of this weapon left.");
  41328. }
  41329. if(PlayerHasWeapon(playerid, 30))
  41330. {
  41331. return SendClientMessage(playerid, COLOR_GREY, "You have this weapon already.");
  41332. }
  41333. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_AK47]--;
  41334. GivePlayerWeaponEx(playerid, 30);
  41335. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET weapon_ak47 = weapon_ak47 - 1 WHERE id = %i", PlayerData[playerid][pGang]);
  41336. mysql_tquery(connectionID, queryBuffer);
  41337. ShowActionBubble(playerid, "* %s withdraws an AK-47 from the gang stash.", GetRPName(playerid));
  41338. Log_Write("log_gang", "%s (uid: %i) withdraws an AK-47 from the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GangInfo[PlayerData[playerid][pGang]][gName], PlayerData[playerid][pGang]);
  41339. }
  41340. case GANGWEAPON_RIFLE:
  41341. {
  41342. if(PlayerData[playerid][pGangRank] < GangInfo[PlayerData[playerid][pGang]][gWeaponRanks][GANGWEAPON_RIFLE])
  41343. {
  41344. return SendClientMessage(playerid, COLOR_GREY, "Your rank isn't high enough to withdraw this weapon.");
  41345. }
  41346. if(GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_RIFLE] <= 0)
  41347. {
  41348. return SendClientMessage(playerid, COLOR_GREY, "The gang stash doesn't have any of this weapon left.");
  41349. }
  41350. if(PlayerHasWeapon(playerid, 33))
  41351. {
  41352. return SendClientMessage(playerid, COLOR_GREY, "You have this weapon already.");
  41353. }
  41354. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_RIFLE]--;
  41355. GivePlayerWeaponEx(playerid, 33);
  41356. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET weapon_rifle = weapon_rifle - 1 WHERE id = %i", PlayerData[playerid][pGang]);
  41357. mysql_tquery(connectionID, queryBuffer);
  41358. ShowActionBubble(playerid, "* %s withdraws a rifle from the gang stash.", GetRPName(playerid));
  41359. Log_Write("log_gang", "%s (uid: %i) withdraws a rifle from the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GangInfo[PlayerData[playerid][pGang]][gName], PlayerData[playerid][pGang]);
  41360. }
  41361. }
  41362. }
  41363. else if(listitem == 1)
  41364. {
  41365. if(IsLawEnforcement(playerid))
  41366. {
  41367. return SendClientMessage(playerid, COLOR_GREY, "Law enforcement is prohibited from storing weapons.");
  41368. }
  41369. if(GetPlayerHealthEx(playerid) < 60)
  41370. {
  41371. return SendClientMessage(playerid, COLOR_GREY, "You can't store weapons as your health is below 60.");
  41372. }
  41373. switch(PlayerData[playerid][pSelected])
  41374. {
  41375. case GANGWEAPON_9MM:
  41376. {
  41377. if(!PlayerHasWeapon(playerid, 22))
  41378. {
  41379. return SendClientMessage(playerid, COLOR_GREY, "You don't have this weapon.");
  41380. }
  41381. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_9MM]++;
  41382. RemovePlayerWeapon(playerid, 22);
  41383. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET weapon_9mm = weapon_9mm + 1 WHERE id = %i", PlayerData[playerid][pGang]);
  41384. mysql_tquery(connectionID, queryBuffer);
  41385. ShowActionBubble(playerid, "* %s deposits a 9mm in the gang stash.", GetRPName(playerid));
  41386. Log_Write("log_gang", "%s (uid: %i) deposits a 9mm in the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GangInfo[PlayerData[playerid][pGang]][gName], PlayerData[playerid][pGang]);
  41387. }
  41388. case GANGWEAPON_SDPISTOL:
  41389. {
  41390. if(!PlayerHasWeapon(playerid, 23))
  41391. {
  41392. return SendClientMessage(playerid, COLOR_GREY, "You don't have this weapon.");
  41393. }
  41394. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_SDPISTOL]++;
  41395. RemovePlayerWeapon(playerid, 23);
  41396. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET weapon_sdpistol = weapon_sdpistol + 1 WHERE id = %i", PlayerData[playerid][pGang]);
  41397. mysql_tquery(connectionID, queryBuffer);
  41398. ShowActionBubble(playerid, "* %s deposits a silenced pistol in the gang stash.", GetRPName(playerid));
  41399. Log_Write("log_gang", "%s (uid: %i) deposits a silenced pistol in the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GangInfo[PlayerData[playerid][pGang]][gName], PlayerData[playerid][pGang]);
  41400. }
  41401. case GANGWEAPON_DEAGLE:
  41402. {
  41403. if(!PlayerHasWeapon(playerid, 24))
  41404. {
  41405. return SendClientMessage(playerid, COLOR_GREY, "You don't have this weapon.");
  41406. }
  41407. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_DEAGLE]++;
  41408. RemovePlayerWeapon(playerid, 24);
  41409. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET weapon_deagle = weapon_deagle + 1 WHERE id = %i", PlayerData[playerid][pGang]);
  41410. mysql_tquery(connectionID, queryBuffer);
  41411. ShowActionBubble(playerid, "* %s deposits a Desert Eagle in the gang stash.", GetRPName(playerid));
  41412. Log_Write("log_gang", "%s (uid: %i) deposits a Desert Eagle in the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GangInfo[PlayerData[playerid][pGang]][gName], PlayerData[playerid][pGang]);
  41413. }
  41414. case GANGWEAPON_SHOTGUN:
  41415. {
  41416. if(!PlayerHasWeapon(playerid, 25))
  41417. {
  41418. return SendClientMessage(playerid, COLOR_GREY, "You don't have this weapon.");
  41419. }
  41420. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_SHOTGUN]++;
  41421. RemovePlayerWeapon(playerid, 25);
  41422. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET weapon_shotgun = weapon_shotgun + 1 WHERE id = %i", PlayerData[playerid][pGang]);
  41423. mysql_tquery(connectionID, queryBuffer);
  41424. ShowActionBubble(playerid, "* %s deposits a shotgun in the gang stash.", GetRPName(playerid));
  41425. Log_Write("log_gang", "%s (uid: %i) deposits a shotgun in the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GangInfo[PlayerData[playerid][pGang]][gName], PlayerData[playerid][pGang]);
  41426. }
  41427. /* case GANGWEAPON_SPAS12:
  41428. {
  41429. if(!PlayerHasWeapon(playerid, 27))
  41430. {
  41431. return SendClientMessage(playerid, COLOR_GREY, "You don't have this weapon.");
  41432. }
  41433. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_SPAS12]++;
  41434. RemovePlayerWeapon(playerid, 27);
  41435. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET weapon_spas12 = weapon_spas12 + 1 WHERE id = %i", PlayerData[playerid][pGang]);
  41436. mysql_tquery(connectionID, queryBuffer);
  41437. ShowActionBubble(playerid, "* %s deposits a SPAS-12 in the gang stash.", GetRPName(playerid));
  41438. Log_Write("log_gang", "%s (uid: %i) deposits a SPAS-12 in the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GangInfo[PlayerData[playerid][pGang]][gName], PlayerData[playerid][pGang]);
  41439. }
  41440. case GANGWEAPON_SAWNOFF:
  41441. {
  41442. if(!PlayerHasWeapon(playerid, 26))
  41443. {
  41444. return SendClientMessage(playerid, COLOR_GREY, "You don't have this weapon.");
  41445. }
  41446. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_SAWNOFF]++;
  41447. RemovePlayerWeapon(playerid, 26);
  41448. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET weapon_sawnoff = weapon_sawnoff + 1 WHERE id = %i", PlayerData[playerid][pGang]);
  41449. mysql_tquery(connectionID, queryBuffer);
  41450. ShowActionBubble(playerid, "* %s deposits a sawnoff shotgun in the gang stash.", GetRPName(playerid));
  41451. Log_Write("log_gang", "%s (uid: %i) deposits a sawnoff shotgun in the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GangInfo[PlayerData[playerid][pGang]][gName], PlayerData[playerid][pGang]);
  41452. }*/
  41453. case GANGWEAPON_TEC9:
  41454. {
  41455. if(!PlayerHasWeapon(playerid, 32))
  41456. {
  41457. return SendClientMessage(playerid, COLOR_GREY, "You don't have this weapon.");
  41458. }
  41459. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_TEC9]++;
  41460. RemovePlayerWeapon(playerid, 32);
  41461. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET weapon_tec9 = weapon_tec9 + 1 WHERE id = %i", PlayerData[playerid][pGang]);
  41462. mysql_tquery(connectionID, queryBuffer);
  41463. ShowActionBubble(playerid, "* %s deposits a Tec-9 in the gang stash.", GetRPName(playerid));
  41464. Log_Write("log_gang", "%s (uid: %i) deposits a Tec-9 in the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GangInfo[PlayerData[playerid][pGang]][gName], PlayerData[playerid][pGang]);
  41465. }
  41466. case GANGWEAPON_UZI:
  41467. {
  41468. if(!PlayerHasWeapon(playerid, 28))
  41469. {
  41470. return SendClientMessage(playerid, COLOR_GREY, "You don't have this weapon.");
  41471. }
  41472. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_UZI]++;
  41473. RemovePlayerWeapon(playerid, 28);
  41474. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET weapon_uzi = weapon_uzi + 1 WHERE id = %i", PlayerData[playerid][pGang]);
  41475. mysql_tquery(connectionID, queryBuffer);
  41476. ShowActionBubble(playerid, "* %s deposits a Micro Uzi in the gang stash.", GetRPName(playerid));
  41477. Log_Write("log_gang", "%s (uid: %i) deposits a Micro Uzi in the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GangInfo[PlayerData[playerid][pGang]][gName], PlayerData[playerid][pGang]);
  41478. }
  41479. case GANGWEAPON_MP5:
  41480. {
  41481. if(!PlayerHasWeapon(playerid, 29))
  41482. {
  41483. return SendClientMessage(playerid, COLOR_GREY, "You don't have this weapon.");
  41484. }
  41485. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_MP5]++;
  41486. RemovePlayerWeapon(playerid, 29);
  41487. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET weapon_mp5 = weapon_mp5 + 1 WHERE id = %i", PlayerData[playerid][pGang]);
  41488. mysql_tquery(connectionID, queryBuffer);
  41489. ShowActionBubble(playerid, "* %s deposits an MP5 in the gang stash.", GetRPName(playerid));
  41490. Log_Write("log_gang", "%s (uid: %i) deposits an MP5 in the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GangInfo[PlayerData[playerid][pGang]][gName], PlayerData[playerid][pGang]);
  41491. }
  41492. case GANGWEAPON_AK47:
  41493. {
  41494. if(!PlayerHasWeapon(playerid, 30))
  41495. {
  41496. return SendClientMessage(playerid, COLOR_GREY, "You don't have this weapon.");
  41497. }
  41498. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_AK47]++;
  41499. RemovePlayerWeapon(playerid, 30);
  41500. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET weapon_ak47 = weapon_ak47 + 1 WHERE id = %i", PlayerData[playerid][pGang]);
  41501. mysql_tquery(connectionID, queryBuffer);
  41502. ShowActionBubble(playerid, "* %s deposits an AK-47 in the gang stash.", GetRPName(playerid));
  41503. Log_Write("log_gang", "%s (uid: %i) deposits an AK-47 in the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GangInfo[PlayerData[playerid][pGang]][gName], PlayerData[playerid][pGang]);
  41504. }
  41505. /* case GANGWEAPON_M4:
  41506. {
  41507. if(!PlayerHasWeapon(playerid, 31))
  41508. {
  41509. return SendClientMessage(playerid, COLOR_GREY, "You don't have this weapon.");
  41510. }
  41511. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_M4]++;
  41512. RemovePlayerWeapon(playerid, 31);
  41513. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET weapon_m4 = weapon_m4 + 1 WHERE id = %i", PlayerData[playerid][pGang]);
  41514. mysql_tquery(connectionID, queryBuffer);
  41515. ShowActionBubble(playerid, "* %s deposits an M4 in the gang stash.", GetRPName(playerid));
  41516. Log_Write("log_gang", "%s (uid: %i) deposits an M4 in the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GangInfo[PlayerData[playerid][pGang]][gName], PlayerData[playerid][pGang]);
  41517. }*/
  41518. case GANGWEAPON_RIFLE:
  41519. {
  41520. if(!PlayerHasWeapon(playerid, 33))
  41521. {
  41522. return SendClientMessage(playerid, COLOR_GREY, "You don't have this weapon.");
  41523. }
  41524. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_RIFLE]++;
  41525. RemovePlayerWeapon(playerid, 33);
  41526. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET weapon_rifle = weapon_rifle + 1 WHERE id = %i", PlayerData[playerid][pGang]);
  41527. mysql_tquery(connectionID, queryBuffer);
  41528. ShowActionBubble(playerid, "* %s deposits a rifle in the gang stash.", GetRPName(playerid));
  41529. Log_Write("log_gang", "%s (uid: %i) deposits a rifle in the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GangInfo[PlayerData[playerid][pGang]][gName], PlayerData[playerid][pGang]);
  41530. }
  41531. /* case GANGWEAPON_SNIPER:
  41532. {
  41533. if(!PlayerHasWeapon(playerid, 34))
  41534. {
  41535. return SendClientMessage(playerid, COLOR_GREY, "You don't have this weapon.");
  41536. }
  41537. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_SNIPER]++;
  41538. RemovePlayerWeapon(playerid, 34);
  41539. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET weapon_sniper = weapon_sniper + 1 WHERE id = %i", PlayerData[playerid][pGang]);
  41540. mysql_tquery(connectionID, queryBuffer);
  41541. ShowActionBubble(playerid, "* %s deposits a sniper rifle in the gang stash.", GetRPName(playerid));
  41542. Log_Write("log_gang", "%s (uid: %i) deposits a sniper rifle in the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GangInfo[PlayerData[playerid][pGang]][gName], PlayerData[playerid][pGang]);
  41543. }
  41544. case GANGWEAPON_MOLOTOV:
  41545. {
  41546. if(!PlayerHasWeapon(playerid, 18))
  41547. {
  41548. return SendClientMessage(playerid, COLOR_GREY, "You don't have this weapon.");
  41549. }
  41550. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_MOLOTOV]++;
  41551. RemovePlayerWeapon(playerid, 18);
  41552. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET weapon_molotov = weapon_molotov + 1 WHERE id = %i", PlayerData[playerid][pGang]);
  41553. mysql_tquery(connectionID, queryBuffer);
  41554. ShowActionBubble(playerid, "* %s deposits a molotov in the gang stash.", GetRPName(playerid));
  41555. Log_Write("log_gang", "%s (uid: %i) deposits a molotov in the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GangInfo[PlayerData[playerid][pGang]][gName], PlayerData[playerid][pGang]);
  41556. }*/
  41557. }
  41558. }
  41559. else if(listitem == 2)
  41560. {
  41561. if(PlayerData[playerid][pGangRank] < 6)
  41562. {
  41563. return SendClientMessage(playerid, COLOR_GREY, "You need to be at least rank 6+ to edit weapon ranks.");
  41564. }
  41565. Dialog_Show(playerid, GangStashWeaponRank, DIALOG_STYLE_LIST, "Choose a rank to restrict withdrawals to:", "R0+\nR1+\nR2+\nR3+\nR4+\nR5+\nR6", "Select", "Back");
  41566. }
  41567. }
  41568. else
  41569. {
  41570. ShowDialogToPlayer(playerid, DIALOG_GANGSTASHWEAPONS1);
  41571. }
  41572. return 1;
  41573. }
  41574. Dialog:GangStashWeaponRank(playerid, response, listitem, inputtext[])
  41575. {
  41576. if(PlayerData[playerid][pGang] == -1)
  41577. {
  41578. return 1;
  41579. }
  41580. if(response)
  41581. {
  41582. switch(PlayerData[playerid][pSelected])
  41583. {
  41584. case GANGWEAPON_9MM:
  41585. {
  41586. GangInfo[PlayerData[playerid][pGang]][gWeaponRanks][GANGWEAPON_9MM] = listitem;
  41587. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the rank restriction for {FF6347}9mm{33CCFF} to rank %i+.", listitem);
  41588. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET rank_9mm = %i WHERE id = %i", listitem, PlayerData[playerid][pGang]);
  41589. mysql_tquery(connectionID, queryBuffer);
  41590. }
  41591. case GANGWEAPON_SDPISTOL:
  41592. {
  41593. GangInfo[PlayerData[playerid][pGang]][gWeaponRanks][GANGWEAPON_SDPISTOL] = listitem;
  41594. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the rank restriction for {FF6347}Silenced pistol{33CCFF} to rank %i+.", listitem);
  41595. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET rank_9mm = %i WHERE id = %i", listitem, PlayerData[playerid][pGang]);
  41596. mysql_tquery(connectionID, queryBuffer);
  41597. }
  41598. case GANGWEAPON_DEAGLE:
  41599. {
  41600. GangInfo[PlayerData[playerid][pGang]][gWeaponRanks][GANGWEAPON_DEAGLE] = listitem;
  41601. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the rank restriction for {FF6347}Desert Eagle{33CCFF} to rank %i+.", listitem);
  41602. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET rank_deagle = %i WHERE id = %i", listitem, PlayerData[playerid][pGang]);
  41603. mysql_tquery(connectionID, queryBuffer);
  41604. }
  41605. case GANGWEAPON_SHOTGUN:
  41606. {
  41607. GangInfo[PlayerData[playerid][pGang]][gWeaponRanks][GANGWEAPON_SHOTGUN] = listitem;
  41608. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the rank restriction for {FF6347}Shotgun{33CCFF} to rank %i+.", listitem);
  41609. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET rank_shotgun = %i WHERE id = %i", listitem, PlayerData[playerid][pGang]);
  41610. mysql_tquery(connectionID, queryBuffer);
  41611. }
  41612. case GANGWEAPON_TEC9:
  41613. {
  41614. GangInfo[PlayerData[playerid][pGang]][gWeaponRanks][GANGWEAPON_TEC9] = listitem;
  41615. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the rank restriction for {FF6347}Tec-9{33CCFF} to rank %i+.", listitem);
  41616. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET rank_tec9 = %i WHERE id = %i", listitem, PlayerData[playerid][pGang]);
  41617. mysql_tquery(connectionID, queryBuffer);
  41618. }
  41619. case GANGWEAPON_UZI:
  41620. {
  41621. GangInfo[PlayerData[playerid][pGang]][gWeaponRanks][GANGWEAPON_UZI] = listitem;
  41622. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the rank restriction for {FF6347}Micro Uzi{33CCFF} to rank %i+.", listitem);
  41623. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET rank_uzi = %i WHERE id = %i", listitem, PlayerData[playerid][pGang]);
  41624. mysql_tquery(connectionID, queryBuffer);
  41625. }
  41626. case GANGWEAPON_MP5:
  41627. {
  41628. GangInfo[PlayerData[playerid][pGang]][gWeaponRanks][GANGWEAPON_MP5] = listitem;
  41629. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the rank restriction for {FF6347}MP5{33CCFF} to rank %i+.", listitem);
  41630. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET rank_mp5 = %i WHERE id = %i", listitem, PlayerData[playerid][pGang]);
  41631. mysql_tquery(connectionID, queryBuffer);
  41632. }
  41633. case GANGWEAPON_AK47:
  41634. {
  41635. GangInfo[PlayerData[playerid][pGang]][gWeaponRanks][GANGWEAPON_AK47] = listitem;
  41636. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the rank restriction for {FF6347}AK-47{33CCFF} to rank %i+.", listitem);
  41637. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET rank_ak47 = %i WHERE id = %i", listitem, PlayerData[playerid][pGang]);
  41638. mysql_tquery(connectionID, queryBuffer);
  41639. }
  41640. case GANGWEAPON_RIFLE:
  41641. {
  41642. GangInfo[PlayerData[playerid][pGang]][gWeaponRanks][GANGWEAPON_RIFLE] = listitem;
  41643. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the rank restriction for {FF6347}Rifle{33CCFF} to rank %i+.", listitem);
  41644. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET rank_rifle = %i WHERE id = %i", listitem, PlayerData[playerid][pGang]);
  41645. mysql_tquery(connectionID, queryBuffer);
  41646. }
  41647. }
  41648. ShowDialogToPlayer(playerid, DIALOG_GANGSTASHWEAPONS1);
  41649. }
  41650. else
  41651. {
  41652. Dialog_Show(playerid, DIALOG_GANGSTASHWEAPONS2, DIALOG_STYLE_LIST, "Gang stash | Weapons", "Withdraw\nDeposit\nChange Rank", "Select", "Back");
  41653. }
  41654. return 1;
  41655. }
  41656. Dialog:DIALOG_GANGSTASHDRUGS1(playerid, response, listitem, inputtext[])
  41657. {
  41658. if(PlayerData[playerid][pGang] == -1)
  41659. {
  41660. return 1;
  41661. }
  41662. if(response)
  41663. {
  41664. switch(listitem)
  41665. {
  41666. case 0: PlayerData[playerid][pSelected] = ITEM_WEED;
  41667. case 1: PlayerData[playerid][pSelected] = ITEM_COCAINE;
  41668. case 2: PlayerData[playerid][pSelected] = ITEM_METH;
  41669. case 3: PlayerData[playerid][pSelected] = ITEM_PAINKILLERS;
  41670. }
  41671. ShowDialogToPlayer(playerid, DIALOG_GANGSTASHDRUGS2);
  41672. }
  41673. else
  41674. {
  41675. ShowDialogToPlayer(playerid, DIALOG_GANGSTASH);
  41676. }
  41677. return 1;
  41678. }
  41679. Dialog:DIALOG_GANGSTASHDRUGS2(playerid, response, listitem, inputtext[])
  41680. {
  41681. if(PlayerData[playerid][pGang] == -1)
  41682. {
  41683. return 1;
  41684. }
  41685. if(response)
  41686. {
  41687. if(listitem == 0)
  41688. {
  41689. if(PlayerData[playerid][pGangRank] < 2)
  41690. {
  41691. return SendClientMessage(playerid, COLOR_GREY, "You must be at least rank 2+ in order to withdraw drugs.");
  41692. }
  41693. ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW);
  41694. }
  41695. else if(listitem == 1)
  41696. {
  41697. ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT);
  41698. }
  41699. }
  41700. else
  41701. {
  41702. ShowDialogToPlayer(playerid, DIALOG_GANGSTASHDRUGS1);
  41703. }
  41704. return 1;
  41705. }
  41706. Dialog:DIALOG_GANGWITHDRAW(playerid, response, listitem, inputtext[])
  41707. {
  41708. if(PlayerData[playerid][pGang] == -1 || PlayerData[playerid][pGangRank] < 3)
  41709. {
  41710. return 1;
  41711. }
  41712. if(response)
  41713. {
  41714. new amount;
  41715. if(sscanf(inputtext, "i", amount))
  41716. {
  41717. return ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW);
  41718. }
  41719. switch(PlayerData[playerid][pSelected])
  41720. {
  41721. case ITEM_WEED:
  41722. {
  41723. if(amount < 1 || amount > GangInfo[PlayerData[playerid][pGang]][gWeed])
  41724. {
  41725. SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  41726. return ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW);
  41727. }
  41728. if(PlayerData[playerid][pWeed] + amount > GetPlayerCapacity(playerid, CAPACITY_WEED))
  41729. {
  41730. SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i weed. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pWeed], GetPlayerCapacity(playerid, CAPACITY_WEED));
  41731. return ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW);
  41732. }
  41733. GangInfo[PlayerData[playerid][pGang]][gWeed] -= amount;
  41734. PlayerData[playerid][pWeed] += amount;
  41735. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET weed = %i WHERE id = %i", GangInfo[PlayerData[playerid][pGang]][gWeed], PlayerData[playerid][pGang]);
  41736. mysql_tquery(connectionID, queryBuffer);
  41737. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET weed = %i WHERE uid = %i", PlayerData[playerid][pWeed], PlayerData[playerid][pID]);
  41738. mysql_tquery(connectionID, queryBuffer);
  41739. ShowActionBubble(playerid, "* %s withdraws some weed from the gang stash.", GetRPName(playerid));
  41740. SendClientMessageEx(playerid, COLOR_AQUA, "* You have withdrawn %i grams of weed from the gang stash.", amount);
  41741. Log_Write("log_gang", "%s (uid: %i) withdraws %i grams of weed from the gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount);
  41742. }
  41743. case ITEM_COCAINE:
  41744. {
  41745. if(amount < 1 || amount > GangInfo[PlayerData[playerid][pGang]][gCocaine])
  41746. {
  41747. SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  41748. return ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW);
  41749. }
  41750. if(PlayerData[playerid][pCocaine] + amount > GetPlayerCapacity(playerid, CAPACITY_COCAINE))
  41751. {
  41752. SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i cocaine. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pCocaine], GetPlayerCapacity(playerid, CAPACITY_COCAINE));
  41753. return ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW);
  41754. }
  41755. GangInfo[PlayerData[playerid][pGang]][gCocaine] -= amount;
  41756. PlayerData[playerid][pCocaine] += amount;
  41757. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET cocaine = %i WHERE id = %i", GangInfo[PlayerData[playerid][pGang]][gCocaine], PlayerData[playerid][pGang]);
  41758. mysql_tquery(connectionID, queryBuffer);
  41759. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET cocaine = %i WHERE uid = %i", PlayerData[playerid][pCocaine], PlayerData[playerid][pID]);
  41760. mysql_tquery(connectionID, queryBuffer);
  41761. ShowActionBubble(playerid, "* %s withdraws some cocaine from the gang stash.", GetRPName(playerid));
  41762. SendClientMessageEx(playerid, COLOR_AQUA, "* You have withdrawn %i grams of cocaine from the gang stash.", amount);
  41763. Log_Write("log_gang", "%s (uid: %i) withdraws %i grams of cocaine from the gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount);
  41764. }
  41765. case ITEM_METH:
  41766. {
  41767. if(amount < 1 || amount > GangInfo[PlayerData[playerid][pGang]][gMeth])
  41768. {
  41769. SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  41770. return ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW);
  41771. }
  41772. if(PlayerData[playerid][pMeth] + amount > GetPlayerCapacity(playerid, CAPACITY_METH))
  41773. {
  41774. SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i meth. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pMeth], GetPlayerCapacity(playerid, CAPACITY_METH));
  41775. return ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW);
  41776. }
  41777. GangInfo[PlayerData[playerid][pGang]][gMeth] -= amount;
  41778. PlayerData[playerid][pMeth] += amount;
  41779. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET meth = %i WHERE id = %i", GangInfo[PlayerData[playerid][pGang]][gMeth], PlayerData[playerid][pGang]);
  41780. mysql_tquery(connectionID, queryBuffer);
  41781. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET meth = %i WHERE uid = %i", PlayerData[playerid][pMeth], PlayerData[playerid][pID]);
  41782. mysql_tquery(connectionID, queryBuffer);
  41783. ShowActionBubble(playerid, "* %s withdraws some meth from the gang stash.", GetRPName(playerid));
  41784. SendClientMessageEx(playerid, COLOR_AQUA, "* You have withdrawn %i grams of meth from the gang stash.", amount);
  41785. Log_Write("log_gang", "%s (uid: %i) withdraws %i grams of meth from the gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount);
  41786. }
  41787. case ITEM_PAINKILLERS:
  41788. {
  41789. if(amount < 1 || amount > GangInfo[PlayerData[playerid][pGang]][gPainkillers])
  41790. {
  41791. SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  41792. return ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW);
  41793. }
  41794. if(PlayerData[playerid][pPainkillers] + amount > GetPlayerCapacity(playerid, CAPACITY_PAINKILLERS))
  41795. {
  41796. SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i painkillers. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pPainkillers], GetPlayerCapacity(playerid, CAPACITY_PAINKILLERS));
  41797. return ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW);
  41798. }
  41799. GangInfo[PlayerData[playerid][pGang]][gPainkillers] -= amount;
  41800. PlayerData[playerid][pPainkillers] += amount;
  41801. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET painkillers = %i WHERE id = %i", GangInfo[PlayerData[playerid][pGang]][gPainkillers], PlayerData[playerid][pGang]);
  41802. mysql_tquery(connectionID, queryBuffer);
  41803. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET painkillers = %i WHERE uid = %i", PlayerData[playerid][pPainkillers], PlayerData[playerid][pID]);
  41804. mysql_tquery(connectionID, queryBuffer);
  41805. ShowActionBubble(playerid, "* %s withdraws some painkillers from the gang stash.", GetRPName(playerid));
  41806. SendClientMessageEx(playerid, COLOR_AQUA, "* You have withdrawn %i painkillers from the gang stash.", amount);
  41807. Log_Write("log_gang", "%s (uid: %i) withdraws %i painkillers from the gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount);
  41808. }
  41809. case ITEM_MATERIALS:
  41810. {
  41811. if(amount < 1 || amount > GangInfo[PlayerData[playerid][pGang]][gMaterials])
  41812. {
  41813. SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  41814. return ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW);
  41815. }
  41816. if(PlayerData[playerid][pMaterials] + amount > GetPlayerCapacity(playerid, CAPACITY_MATERIALS))
  41817. {
  41818. SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i materials. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pMaterials], GetPlayerCapacity(playerid, CAPACITY_MATERIALS));
  41819. return ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW);
  41820. }
  41821. GangInfo[PlayerData[playerid][pGang]][gMaterials] -= amount;
  41822. PlayerData[playerid][pMaterials] += amount;
  41823. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET materials = %i WHERE id = %i", GangInfo[PlayerData[playerid][pGang]][gMaterials], PlayerData[playerid][pGang]);
  41824. mysql_tquery(connectionID, queryBuffer);
  41825. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET materials = %i WHERE uid = %i", PlayerData[playerid][pMaterials], PlayerData[playerid][pID]);
  41826. mysql_tquery(connectionID, queryBuffer);
  41827. ShowActionBubble(playerid, "* %s withdraws some materials from the gang stash.", GetRPName(playerid));
  41828. SendClientMessageEx(playerid, COLOR_AQUA, "* You have withdrawn %i materials from the gang stash.", amount);
  41829. Log_Write("log_gang", "%s (uid: %i) withdraws %i materials from the gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount);
  41830. }
  41831. case ITEM_CASH:
  41832. {
  41833. if(amount < 1 || amount > GangInfo[PlayerData[playerid][pGang]][gCash])
  41834. {
  41835. SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  41836. return ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW);
  41837. }
  41838. GangInfo[PlayerData[playerid][pGang]][gCash] -= amount;
  41839. GivePlayerCash(playerid, amount);
  41840. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET cash = %i WHERE id = %i", GangInfo[PlayerData[playerid][pGang]][gCash], PlayerData[playerid][pGang]);
  41841. mysql_tquery(connectionID, queryBuffer);
  41842. ShowActionBubble(playerid, "* %s withdraws some cash from the gang stash.", GetRPName(playerid));
  41843. SendClientMessageEx(playerid, COLOR_AQUA, "* You have withdrawn %s from the gang stash.", FormatNumber(amount));
  41844. Log_Write("log_gang", "%s (uid: %i) withdraws $%i from the gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount);
  41845. }
  41846. }
  41847. }
  41848. else
  41849. {
  41850. if(PlayerData[playerid][pSelected] == ITEM_MATERIALS) {
  41851. ShowDialogToPlayer(playerid, DIALOG_GANGSTASHMATS);
  41852. } else if(PlayerData[playerid][pSelected] == ITEM_CASH) {
  41853. ShowDialogToPlayer(playerid, DIALOG_GANGSTASHCASH);
  41854. } else {
  41855. ShowDialogToPlayer(playerid, DIALOG_GANGSTASHDRUGS2);
  41856. }
  41857. }
  41858. return 1;
  41859. }
  41860. Dialog:DIALOG_GANGDEPOSIT(playerid, response, listitem, inputtext[])
  41861. {
  41862. if(PlayerData[playerid][pGang] == -1)
  41863. {
  41864. return 1;
  41865. }
  41866. if(response)
  41867. {
  41868. new amount;
  41869. if(sscanf(inputtext, "i", amount))
  41870. {
  41871. return ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT);
  41872. }
  41873. switch(PlayerData[playerid][pSelected])
  41874. {
  41875. case ITEM_WEED:
  41876. {
  41877. if(amount < 1 || amount > PlayerData[playerid][pWeed])
  41878. {
  41879. SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  41880. return ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT);
  41881. }
  41882. if(GangInfo[PlayerData[playerid][pGang]][gWeed] + amount > GetGangStashCapacity(PlayerData[playerid][pGang], STASH_CAPACITY_WEED))
  41883. {
  41884. SendClientMessageEx(playerid, COLOR_GREY, "The gang stash can't contain more than %i grams of weed.", GetGangStashCapacity(PlayerData[playerid][pGang], STASH_CAPACITY_WEED));
  41885. return ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT);
  41886. }
  41887. GangInfo[PlayerData[playerid][pGang]][gWeed] += amount;
  41888. PlayerData[playerid][pWeed] -= amount;
  41889. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET weed = %i WHERE id = %i", GangInfo[PlayerData[playerid][pGang]][gWeed], PlayerData[playerid][pGang]);
  41890. mysql_tquery(connectionID, queryBuffer);
  41891. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET weed = %i WHERE uid = %i", PlayerData[playerid][pWeed], PlayerData[playerid][pID]);
  41892. mysql_tquery(connectionID, queryBuffer);
  41893. ShowActionBubble(playerid, "* %s deposits some weed in the gang stash.", GetRPName(playerid));
  41894. SendClientMessageEx(playerid, COLOR_AQUA, "* You have deposited %i grams of weed in the gang stash.", amount);
  41895. Log_Write("log_gang", "%s (uid: %i) deposits %i grams of weed in the gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount);
  41896. }
  41897. case ITEM_COCAINE:
  41898. {
  41899. if(amount < 1 || amount > PlayerData[playerid][pCocaine])
  41900. {
  41901. SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  41902. return ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT);
  41903. }
  41904. if(GangInfo[PlayerData[playerid][pGang]][gCocaine] + amount > GetGangStashCapacity(PlayerData[playerid][pGang], STASH_CAPACITY_COCAINE))
  41905. {
  41906. SendClientMessageEx(playerid, COLOR_GREY, "The gang stash can't contain more than %i grams of cocaine.", GetGangStashCapacity(PlayerData[playerid][pGang], STASH_CAPACITY_COCAINE));
  41907. return ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT);
  41908. }
  41909. GangInfo[PlayerData[playerid][pGang]][gCocaine] += amount;
  41910. PlayerData[playerid][pCocaine] -= amount;
  41911. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET cocaine = %i WHERE id = %i", GangInfo[PlayerData[playerid][pGang]][gCocaine], PlayerData[playerid][pGang]);
  41912. mysql_tquery(connectionID, queryBuffer);
  41913. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET cocaine = %i WHERE uid = %i", PlayerData[playerid][pCocaine], PlayerData[playerid][pID]);
  41914. mysql_tquery(connectionID, queryBuffer);
  41915. ShowActionBubble(playerid, "* %s deposits some cocaine in the gang stash.", GetRPName(playerid));
  41916. SendClientMessageEx(playerid, COLOR_AQUA, "* You have deposited %i grams of cocaine in the gang stash.", amount);
  41917. Log_Write("log_gang", "%s (uid: %i) deposits %i grams of cocaine in the gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount);
  41918. }
  41919. case ITEM_METH:
  41920. {
  41921. if(amount < 1 || amount > PlayerData[playerid][pMeth])
  41922. {
  41923. SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  41924. return ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT);
  41925. }
  41926. if(GangInfo[PlayerData[playerid][pGang]][gMeth] + amount > GetGangStashCapacity(PlayerData[playerid][pGang], STASH_CAPACITY_METH))
  41927. {
  41928. SendClientMessageEx(playerid, COLOR_GREY, "The gang stash can't contain more than %i grams of meth.", GetGangStashCapacity(PlayerData[playerid][pGang], STASH_CAPACITY_METH));
  41929. return ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT);
  41930. }
  41931. GangInfo[PlayerData[playerid][pGang]][gMeth] += amount;
  41932. PlayerData[playerid][pMeth] -= amount;
  41933. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET meth = %i WHERE id = %i", GangInfo[PlayerData[playerid][pGang]][gMeth], PlayerData[playerid][pGang]);
  41934. mysql_tquery(connectionID, queryBuffer);
  41935. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET meth = %i WHERE uid = %i", PlayerData[playerid][pMeth], PlayerData[playerid][pID]);
  41936. mysql_tquery(connectionID, queryBuffer);
  41937. ShowActionBubble(playerid, "* %s deposits some meth in the gang stash.", GetRPName(playerid));
  41938. SendClientMessageEx(playerid, COLOR_AQUA, "* You have deposited %i grams of meth in the gang stash.", amount);
  41939. Log_Write("log_gang", "%s (uid: %i) deposits %i grams of meth in the gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount);
  41940. }
  41941. case ITEM_PAINKILLERS:
  41942. {
  41943. if(amount < 1 || amount > PlayerData[playerid][pPainkillers])
  41944. {
  41945. SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  41946. return ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT);
  41947. }
  41948. if(GangInfo[PlayerData[playerid][pGang]][gPainkillers] + amount > GetGangStashCapacity(PlayerData[playerid][pGang], STASH_CAPACITY_PAINKILLERS))
  41949. {
  41950. SendClientMessageEx(playerid, COLOR_GREY, "The gang stash can't contain more than %i painkillers.", GetGangStashCapacity(PlayerData[playerid][pGang], STASH_CAPACITY_PAINKILLERS));
  41951. return ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT);
  41952. }
  41953. GangInfo[PlayerData[playerid][pGang]][gPainkillers] += amount;
  41954. PlayerData[playerid][pPainkillers] -= amount;
  41955. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET painkillers = %i WHERE id = %i", GangInfo[PlayerData[playerid][pGang]][gPainkillers], PlayerData[playerid][pGang]);
  41956. mysql_tquery(connectionID, queryBuffer);
  41957. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET painkillers = %i WHERE uid = %i", PlayerData[playerid][pPainkillers], PlayerData[playerid][pID]);
  41958. mysql_tquery(connectionID, queryBuffer);
  41959. ShowActionBubble(playerid, "* %s deposits some painkillers in the gang stash.", GetRPName(playerid));
  41960. SendClientMessageEx(playerid, COLOR_AQUA, "* You have deposited %i painkillers in the gang stash.", amount);
  41961. Log_Write("log_gang", "%s (uid: %i) deposits %i painkillers in the gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount);
  41962. }
  41963. case ITEM_MATERIALS:
  41964. {
  41965. if(amount < 1 || amount > PlayerData[playerid][pMaterials])
  41966. {
  41967. SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  41968. return ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT);
  41969. }
  41970. if(GangInfo[PlayerData[playerid][pGang]][gMaterials] + amount > GetGangStashCapacity(PlayerData[playerid][pGang], STASH_CAPACITY_MATERIALS))
  41971. {
  41972. SendClientMessageEx(playerid, COLOR_GREY, "The gang stash can't contain more than %i materials.", GetGangStashCapacity(PlayerData[playerid][pGang], STASH_CAPACITY_MATERIALS));
  41973. return ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT);
  41974. }
  41975. GangInfo[PlayerData[playerid][pGang]][gMaterials] += amount;
  41976. PlayerData[playerid][pMaterials] -= amount;
  41977. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET materials = %i WHERE id = %i", GangInfo[PlayerData[playerid][pGang]][gMaterials], PlayerData[playerid][pGang]);
  41978. mysql_tquery(connectionID, queryBuffer);
  41979. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET materials = %i WHERE uid = %i", PlayerData[playerid][pMaterials], PlayerData[playerid][pID]);
  41980. mysql_tquery(connectionID, queryBuffer);
  41981. ShowActionBubble(playerid, "* %s deposits some materials in the gang stash.", GetRPName(playerid));
  41982. SendClientMessageEx(playerid, COLOR_AQUA, "* You have deposited %i materials in the gang stash.", amount);
  41983. Log_Write("log_gang", "%s (uid: %i) deposits %i materials in the gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount);
  41984. }
  41985. case ITEM_CASH:
  41986. {
  41987. if(amount < 1 || amount > PlayerData[playerid][pCash])
  41988. {
  41989. SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  41990. return ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT);
  41991. }
  41992. if(GangInfo[PlayerData[playerid][pGang]][gCash] + amount > GetGangStashCapacity(PlayerData[playerid][pGang], STASH_CAPACITY_CASH))
  41993. {
  41994. SendClientMessageEx(playerid, COLOR_GREY, "The gang stash can't contain more than $%i.", GetGangStashCapacity(PlayerData[playerid][pGang], STASH_CAPACITY_CASH));
  41995. return ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT);
  41996. }
  41997. GangInfo[PlayerData[playerid][pGang]][gCash] += amount;
  41998. GivePlayerCash(playerid, -amount);
  41999. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET cash = %i WHERE id = %i", GangInfo[PlayerData[playerid][pGang]][gCash], PlayerData[playerid][pGang]);
  42000. mysql_tquery(connectionID, queryBuffer);
  42001. ShowActionBubble(playerid, "* %s deposits some cash in the gang stash.", GetRPName(playerid));
  42002. SendClientMessageEx(playerid, COLOR_AQUA, "* You have deposited %i in the gang stash.", FormatNumber(amount));
  42003. Log_Write("log_gang", "%s (uid: %i) deposited $%i in the gang stash.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount);
  42004. }
  42005. }
  42006. }
  42007. else
  42008. {
  42009. if(PlayerData[playerid][pSelected] == ITEM_MATERIALS) {
  42010. ShowDialogToPlayer(playerid, DIALOG_GANGSTASHMATS);
  42011. } else if(PlayerData[playerid][pSelected] == ITEM_CASH) {
  42012. ShowDialogToPlayer(playerid, DIALOG_GANGSTASHCASH);
  42013. } else {
  42014. ShowDialogToPlayer(playerid, DIALOG_GANGSTASHDRUGS2);
  42015. }
  42016. }
  42017. return 1;
  42018. }
  42019. Dialog:DIALOG_GANGSTASHCRAFT(playerid, response, listitem, inputtext[])
  42020. {
  42021. if(response)
  42022. {
  42023. switch(listitem)
  42024. {
  42025. case 0:
  42026. {
  42027. if(GangInfo[PlayerData[playerid][pGang]][gMaterials] < 100)
  42028. {
  42029. return SendClientMessage(playerid, COLOR_GREY, "There aren't enough materials in the safe.");
  42030. }
  42031. GangInfo[PlayerData[playerid][pGang]][gMaterials] -= 100;
  42032. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_9MM]++;
  42033. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET materials = %i, weapon_9mm = %i WHERE id = %i", GangInfo[PlayerData[playerid][pGang]][gMaterials], GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_9MM], PlayerData[playerid][pGang]);
  42034. mysql_tquery(connectionID, queryBuffer);
  42035. ShowActionBubble(playerid, "* %s crafts a 9mm and stores it to the gang stash.", GetRPName(playerid));
  42036. SendClientMessage(playerid, COLOR_AQUA, "You used 100 materials from your gang stash to craft a 9mm.");
  42037. Log_Write("log_gang", "%s (uid: %i) crafts a 9mm using 100 materials from the gang stash.", GetRPName(playerid), PlayerData[playerid][pID]);
  42038. ShowDialogToPlayer(playerid, DIALOG_GANGSTASHCRAFT);
  42039. }
  42040. case 1:
  42041. {
  42042. if(GangInfo[PlayerData[playerid][pGang]][gMaterials] < 150)
  42043. {
  42044. return SendClientMessage(playerid, COLOR_GREY, "There aren't enough materials in the safe.");
  42045. }
  42046. GangInfo[PlayerData[playerid][pGang]][gMaterials] -= 150;
  42047. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_SDPISTOL]++;
  42048. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET materials = %i, weapon_sdpistol = %i WHERE id = %i", GangInfo[PlayerData[playerid][pGang]][gMaterials], GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_SDPISTOL], PlayerData[playerid][pGang]);
  42049. mysql_tquery(connectionID, queryBuffer);
  42050. ShowActionBubble(playerid, "* %s crafts a silenced pistol and stores it to the gang stash.", GetRPName(playerid));
  42051. SendClientMessage(playerid, COLOR_AQUA, "You used 150 materials from your gang stash to craft a silenced pistol.");
  42052. Log_Write("log_gang", "%s (uid: %i) crafts a silenced pistol using 150 materials from the gang stash.", GetRPName(playerid), PlayerData[playerid][pID]);
  42053. ShowDialogToPlayer(playerid, DIALOG_GANGSTASHCRAFT);
  42054. }
  42055. case 2:
  42056. {
  42057. if(GangInfo[PlayerData[playerid][pGang]][gMaterials] < 200)
  42058. {
  42059. return SendClientMessage(playerid, COLOR_GREY, "There aren't enough materials in the safe.");
  42060. }
  42061. GangInfo[PlayerData[playerid][pGang]][gMaterials] -= 200;
  42062. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_SHOTGUN]++;
  42063. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET materials = %i, weapon_shotgun = %i WHERE id = %i", GangInfo[PlayerData[playerid][pGang]][gMaterials], GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_SHOTGUN], PlayerData[playerid][pGang]);
  42064. mysql_tquery(connectionID, queryBuffer);
  42065. ShowActionBubble(playerid, "* %s crafts a shotgun and stores it to the gang stash.", GetRPName(playerid));
  42066. SendClientMessage(playerid, COLOR_AQUA, "You used 200 materials from your gang stash to craft a shotgun.");
  42067. Log_Write("log_gang", "%s (uid: %i) crafts a shotgun using 200 materials from the gang stash.", GetRPName(playerid), PlayerData[playerid][pID]);
  42068. ShowDialogToPlayer(playerid, DIALOG_GANGSTASHCRAFT);
  42069. }
  42070. case 3:
  42071. {
  42072. if(GangInfo[PlayerData[playerid][pGang]][gMaterials] < 500)
  42073. {
  42074. return SendClientMessage(playerid, COLOR_GREY, "There aren't enough materials in the safe.");
  42075. }
  42076. GangInfo[PlayerData[playerid][pGang]][gMaterials] -= 500;
  42077. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_UZI]++;
  42078. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET materials = %i, weapon_uzi = %i WHERE id = %i", GangInfo[PlayerData[playerid][pGang]][gMaterials], GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_UZI], PlayerData[playerid][pGang]);
  42079. mysql_tquery(connectionID, queryBuffer);
  42080. ShowActionBubble(playerid, "* %s crafts a Micro SMG and stores it to the gang stash.", GetRPName(playerid));
  42081. SendClientMessage(playerid, COLOR_AQUA, "You used 500 materials from your gang stash to craft a Micro SMG.");
  42082. Log_Write("log_gang", "%s (uid: %i) crafts a Micro SMG using 500 materials from the gang stash.", GetRPName(playerid), PlayerData[playerid][pID]);
  42083. ShowDialogToPlayer(playerid, DIALOG_GANGSTASHCRAFT);
  42084. }
  42085. case 4:
  42086. {
  42087. if(GangInfo[PlayerData[playerid][pGang]][gMaterials] < 500)
  42088. {
  42089. return SendClientMessage(playerid, COLOR_GREY, "There aren't enough materials in the safe.");
  42090. }
  42091. GangInfo[PlayerData[playerid][pGang]][gMaterials] -= 500;
  42092. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_TEC9]++;
  42093. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET materials = %i, weapon_tec9 = %i WHERE id = %i", GangInfo[PlayerData[playerid][pGang]][gMaterials], GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_TEC9], PlayerData[playerid][pGang]);
  42094. mysql_tquery(connectionID, queryBuffer);
  42095. ShowActionBubble(playerid, "* %s crafts a Tec-9 and stores it to the gang stash.", GetRPName(playerid));
  42096. SendClientMessage(playerid, COLOR_AQUA, "You used 500 materials from your gang stash to craft a Tec-9.");
  42097. Log_Write("log_gang", "%s (uid: %i) crafts a Tec-9 using 500 materials from the gang stash.", GetRPName(playerid), PlayerData[playerid][pID]);
  42098. ShowDialogToPlayer(playerid, DIALOG_GANGSTASHCRAFT);
  42099. }
  42100. case 5:
  42101. {
  42102. if(GangInfo[PlayerData[playerid][pGang]][gMaterials] < 1000)
  42103. {
  42104. return SendClientMessage(playerid, COLOR_GREY, "There aren't enough materials in the safe.");
  42105. }
  42106. GangInfo[PlayerData[playerid][pGang]][gMaterials] -= 1000;
  42107. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_MP5]++;
  42108. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET materials = %i, weapon_mp5 = %i WHERE id = %i", GangInfo[PlayerData[playerid][pGang]][gMaterials], GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_MP5], PlayerData[playerid][pGang]);
  42109. mysql_tquery(connectionID, queryBuffer);
  42110. ShowActionBubble(playerid, "* %s crafts an MP5 and stores it to the gang stash.", GetRPName(playerid));
  42111. SendClientMessage(playerid, COLOR_AQUA, "You used 1000 materials from your gang stash to craft an MP5.");
  42112. Log_Write("log_gang", "%s (uid: %i) crafts an MP5 using 1000 materials from the gang stash.", GetRPName(playerid), PlayerData[playerid][pID]);
  42113. ShowDialogToPlayer(playerid, DIALOG_GANGSTASHCRAFT);
  42114. }
  42115. case 6:
  42116. {
  42117. if(GangInfo[PlayerData[playerid][pGang]][gMaterials] < 1000)
  42118. {
  42119. return SendClientMessage(playerid, COLOR_GREY, "There aren't enough materials in the safe.");
  42120. }
  42121. GangInfo[PlayerData[playerid][pGang]][gMaterials] -= 1000;
  42122. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_RIFLE]++;
  42123. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET materials = %i, weapon_rifle = %i WHERE id = %i", GangInfo[PlayerData[playerid][pGang]][gMaterials], GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_RIFLE], PlayerData[playerid][pGang]);
  42124. mysql_tquery(connectionID, queryBuffer);
  42125. ShowActionBubble(playerid, "* %s crafts a rifle and stores it to the gang stash.", GetRPName(playerid));
  42126. SendClientMessage(playerid, COLOR_AQUA, "You used 1000 materials from your gang stash to craft a rifle.");
  42127. Log_Write("log_gang", "%s (uid: %i) crafts a rifle using 1000 materials from the gang stash.", GetRPName(playerid), PlayerData[playerid][pID]);
  42128. ShowDialogToPlayer(playerid, DIALOG_GANGSTASHCRAFT);
  42129. }
  42130. case 7:
  42131. {
  42132. if(GangInfo[PlayerData[playerid][pGang]][gMaterials] < 2000)
  42133. {
  42134. return SendClientMessage(playerid, COLOR_GREY, "There aren't enough materials in the safe.");
  42135. }
  42136. GangInfo[PlayerData[playerid][pGang]][gMaterials] -= 2000;
  42137. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_DEAGLE]++;
  42138. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET materials = %i, weapon_deagle = %i WHERE id = %i", GangInfo[PlayerData[playerid][pGang]][gMaterials], GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_DEAGLE], PlayerData[playerid][pGang]);
  42139. mysql_tquery(connectionID, queryBuffer);
  42140. ShowActionBubble(playerid, "* %s crafts a Desert Eagle and stores it to the gang stash.", GetRPName(playerid));
  42141. SendClientMessage(playerid, COLOR_AQUA, "You used 2000 materials from your gang stash to craft a Desert Eagle.");
  42142. Log_Write("log_gang", "%s (uid: %i) crafts a Desert Eagle using 2000 materials from the gang stash.", GetRPName(playerid), PlayerData[playerid][pID]);
  42143. ShowDialogToPlayer(playerid, DIALOG_GANGSTASHCRAFT);
  42144. }
  42145. /* case 8:
  42146. {
  42147. if(GangInfo[PlayerData[playerid][pGang]][gMaterials] < 5000)
  42148. {
  42149. return SendClientMessage(playerid, COLOR_GREY, "There aren't enough materials in the safe.");
  42150. }
  42151. GangInfo[PlayerData[playerid][pGang]][gMaterials] -= 5000;
  42152. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_MOLOTOV]++;
  42153. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET materials = %i, weapon_molotov = %i WHERE id = %i", GangInfo[PlayerData[playerid][pGang]][gMaterials], GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_MOLOTOV], PlayerData[playerid][pGang]);
  42154. mysql_tquery(connectionID, queryBuffer);
  42155. ShowActionBubble(playerid, "* %s crafts a molotov and stores it to the gang stash.", GetRPName(playerid));
  42156. SendClientMessage(playerid, COLOR_AQUA, "You used 5000 materials from your gang stash to craft a molotov.");
  42157. Log_Write("log_gang", "%s (uid: %i) crafts a molotov using 5000 materials from the gang stash.", GetRPName(playerid), PlayerData[playerid][pID]);
  42158. ShowDialogToPlayer(playerid, DIALOG_GANGSTASHCRAFT);
  42159. }*/
  42160. case 8:
  42161. {
  42162. if(GangInfo[PlayerData[playerid][pGang]][gMaterials] < 3000)
  42163. {
  42164. return SendClientMessage(playerid, COLOR_GREY, "There aren't enough materials in the safe.");
  42165. }
  42166. GangInfo[PlayerData[playerid][pGang]][gMaterials] -= 3000;
  42167. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_AK47]++;
  42168. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET materials = %i, weapon_ak47 = %i WHERE id = %i", GangInfo[PlayerData[playerid][pGang]][gMaterials], GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_AK47], PlayerData[playerid][pGang]);
  42169. mysql_tquery(connectionID, queryBuffer);
  42170. ShowActionBubble(playerid, "* %s crafts an AK-47 and stores it to the gang stash.", GetRPName(playerid));
  42171. SendClientMessage(playerid, COLOR_AQUA, "You used 3000 materials from your gang stash to craft an AK-47.");
  42172. Log_Write("log_gang", "%s (uid: %i) crafts an AK-47 using 3000 materials from the gang stash.", GetRPName(playerid), PlayerData[playerid][pID]);
  42173. ShowDialogToPlayer(playerid, DIALOG_GANGSTASHCRAFT);
  42174. }
  42175. /* case 10:
  42176. {
  42177. if(GangInfo[PlayerData[playerid][pGang]][gMaterials] < 3000)
  42178. {
  42179. return SendClientMessage(playerid, COLOR_GREY, "There aren't enough materials in the safe.");
  42180. }
  42181. GangInfo[PlayerData[playerid][pGang]][gMaterials] -= 3000;
  42182. GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_SAWNOFF]++;
  42183. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET materials = %i, weapon_sawnoff = %i WHERE id = %i", GangInfo[PlayerData[playerid][pGang]][gMaterials], GangInfo[PlayerData[playerid][pGang]][gWeapons][GANGWEAPON_SAWNOFF], PlayerData[playerid][pGang]);
  42184. mysql_tquery(connectionID, queryBuffer);
  42185. ShowActionBubble(playerid, "* %s crafts a sawnoff shotgun and stores it to the gang stash.", GetRPName(playerid));
  42186. SendClientMessage(playerid, COLOR_AQUA, "You used 3000 materials from your gang stash to craft a sawnoff shotgun.");
  42187. Log_Write("log_gang", "%s (uid: %i) crafts a sawnoff shotgun using 3000 materials from the gang stash.", GetRPName(playerid), PlayerData[playerid][pID]);
  42188. ShowDialogToPlayer(playerid, DIALOG_GANGSTASHCRAFT);
  42189. }*/
  42190. }
  42191. }
  42192. else
  42193. {
  42194. ShowDialogToPlayer(playerid, DIALOG_GANGSTASH);
  42195. }
  42196. return 1;
  42197. }
  42198. Dialog:DIALOG_GANGSTASHMATS(playerid, response, listitem, inputtext[])
  42199. {
  42200. if(response)
  42201. {
  42202. if(listitem == 0)
  42203. {
  42204. if(PlayerData[playerid][pGangRank] < 6)
  42205. {
  42206. return SendClientMessage(playerid, COLOR_GREY, "You must be at least rank 6+ in order to withdraw materials.");
  42207. }
  42208. ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW);
  42209. }
  42210. else if(listitem == 1)
  42211. {
  42212. ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT);
  42213. }
  42214. }
  42215. else
  42216. {
  42217. ShowDialogToPlayer(playerid, DIALOG_GANGSTASH);
  42218. }
  42219. return 1;
  42220. }
  42221. Dialog:DIALOG_GANGSTASHCASH(playerid, response, listitem, inputtext[])
  42222. {
  42223. if(response)
  42224. {
  42225. if(listitem == 0)
  42226. {
  42227. if(PlayerData[playerid][pGangRank] < 6)
  42228. {
  42229. return SendClientMessage(playerid, COLOR_GREY, "You must be at least rank 6+ in order to withdraw cash.");
  42230. }
  42231. ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW);
  42232. }
  42233. else if(listitem == 1)
  42234. {
  42235. ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT);
  42236. }
  42237. }
  42238. else
  42239. {
  42240. ShowDialogToPlayer(playerid, DIALOG_GANGSTASH);
  42241. }
  42242. return 1;
  42243. }
  42244. Dialog:DIALOG_GANGSKINS(playerid, response, listitem, inputtext[])
  42245. {
  42246. if(PlayerData[playerid][pGang] >= 0)
  42247. {
  42248. if(response)
  42249. {
  42250. new index = PlayerData[playerid][pSkinSelected] + 1;
  42251. if(index >= MAX_GANG_SKINS)
  42252. {
  42253. // When the player is shown the dialog for the first time, their skin isn't chnaged until they click >> Next.
  42254. SetPlayerSkin(playerid, PlayerData[playerid][pSkin]);
  42255. PlayerData[playerid][pSkinSelected] = -1;
  42256. }
  42257. else
  42258. {
  42259. // Find the next skin in the array.
  42260. for(new i = index; i < MAX_GANG_SKINS; i ++)
  42261. {
  42262. if(GangInfo[PlayerData[playerid][pGang]][gSkins][i] != 0)
  42263. {
  42264. SetPlayerSkin(playerid, GangInfo[PlayerData[playerid][pGang]][gSkins][i]);
  42265. PlayerData[playerid][pSkinSelected] = i;
  42266. break;
  42267. }
  42268. }
  42269. if(index == PlayerData[playerid][pSkinSelected] + 1)
  42270. {
  42271. // Looks like there was no skin found. So, we'll go back to the very first valid skin in the skin array.
  42272. for(new i = 0; i < MAX_GANG_SKINS; i ++)
  42273. {
  42274. if(GangInfo[PlayerData[playerid][pGang]][gSkins][i] != 0)
  42275. {
  42276. SetPlayerSkin(playerid, GangInfo[PlayerData[playerid][pGang]][gSkins][i]);
  42277. PlayerData[playerid][pSkinSelected] = i;
  42278. break;
  42279. }
  42280. }
  42281. }
  42282. }
  42283. Dialog_Show(playerid, DIALOG_GANGSKINS, DIALOG_STYLE_MSGBOX, "Skin selection", "Press {00AA00}>> Next{A9C4E4} to browse through available gang skins.", ">> Next", "Confirm");
  42284. }
  42285. else
  42286. {
  42287. PlayerData[playerid][pSkinSelected] = -1;
  42288. SetScriptSkin(playerid, GetPlayerSkinScript(playerid));
  42289. ShowActionBubble(playerid, "* %s changes their clothes.", GetRPName(playerid));
  42290. }
  42291. }
  42292. return 1;
  42293. }
  42294. Dialog:DIALOG_GANGFINDCAR(playerid, response, listitem, inputtext[])
  42295. {
  42296. if(response)
  42297. {
  42298. new count, garageid;
  42299. foreach(new i: Vehicle)
  42300. {
  42301. if((VehicleInfo[i][vID] > 0 && VehicleInfo[i][vGang] == PlayerData[playerid][pGang]) && (count++ == listitem))
  42302. {
  42303. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  42304. if((garageid = GetVehicleGarage(i)) >= 0)
  42305. {
  42306. SetPlayerCheckpoint(playerid, GarageInfo[garageid][gPosX], GarageInfo[garageid][gPosY], GarageInfo[garageid][gPosZ], 3.0);
  42307. SendClientMessageEx(playerid, COLOR_YELLOW, "This %s is located in a garage. Checkpoint marked at the garage's location.", GetVehicleName(i));
  42308. }
  42309. else
  42310. {
  42311. new
  42312. Float:x,
  42313. Float:y,
  42314. Float:z;
  42315. GetVehiclePos(i, x, y, z);
  42316. SetPlayerCheckpoint(playerid, x, y, z, 3.0);
  42317. SendClientMessageEx(playerid, COLOR_YELLOW, "This %s is located in %s. Checkpoint marked at the location.", GetVehicleName(i), GetZoneName(x, y, z));
  42318. }
  42319. return 1;
  42320. }
  42321. }
  42322. }
  42323. return 1;
  42324. }
  42325. Dialog:DIALOG_GANGPOINTSHOP(playerid, response, listitem, inputtext[])
  42326. {
  42327. if(PlayerData[playerid][pGang] == -1 || PlayerData[playerid][pGangRank] < 6)
  42328. {
  42329. return 1;
  42330. }
  42331. if(response)
  42332. {
  42333. switch(listitem)
  42334. {
  42335. case 0:
  42336. {
  42337. if(GangInfo[PlayerData[playerid][pGang]][gPoints] < 500)
  42338. {
  42339. return SendClientMessage(playerid, COLOR_GREY, "Your gang doesn't have enough points.");
  42340. }
  42341. if(PlayerData[playerid][pCash] < 50000)
  42342. {
  42343. return SendClientMessage(playerid, COLOR_GREY, "You need $50,000 on hand to purchase this upgrade.");
  42344. }
  42345. if(GangInfo[PlayerData[playerid][pGang]][gDrugDealer])
  42346. {
  42347. return SendClientMessage(playerid, COLOR_GREY, "Your gang already has this upgrade.");
  42348. }
  42349. GangInfo[PlayerData[playerid][pGang]][gDrugDealer] = 1;
  42350. GangInfo[PlayerData[playerid][pGang]][gDrugX] = 0.0;
  42351. GangInfo[PlayerData[playerid][pGang]][gDrugY] = 0.0;
  42352. GangInfo[PlayerData[playerid][pGang]][gDrugZ] = 0.0;
  42353. GangInfo[PlayerData[playerid][pGang]][gDrugWeed] = 0;
  42354. GangInfo[PlayerData[playerid][pGang]][gDrugMeth] = 0;
  42355. GangInfo[PlayerData[playerid][pGang]][gDrugCocaine] = 0;
  42356. GangInfo[PlayerData[playerid][pGang]][gDrugPrices][0] = 500;
  42357. GangInfo[PlayerData[playerid][pGang]][gDrugPrices][1] = 1000;
  42358. GangInfo[PlayerData[playerid][pGang]][gDrugPrices][2] = 1500;
  42359. GangInfo[PlayerData[playerid][pGang]][gPoints] -= 500;
  42360. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET drugdealer = 1, drug_x = 0.0, drug_y = 0.0, drug_z = 0.0, drugweed = 0, drugcocaine = 0, drugmeth = 0, weed_price = 500, cocaine_price = 1000, meth_price = 1500, points = %i WHERE id = %i", GangInfo[PlayerData[playerid][pGang]][gPoints], PlayerData[playerid][pGang]);
  42361. mysql_tquery(connectionID, queryBuffer);
  42362. GivePlayerCash(playerid, -50000);
  42363. SendClientMessage(playerid, COLOR_AQUA, "You have spent 500 GP & $50,000 on an {00AA00}NPC drug dealer{33CCFF}. '/gang npc' to edit your drug dealer.");
  42364. Log_Write("log_gang", "%s (uid: %i) spent 500 GP & $50000 on an NPC drug dealer for %s (id: %i).", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GangInfo[PlayerData[playerid][pGang]][gName], PlayerData[playerid][pGang]);
  42365. }
  42366. case 1:
  42367. {
  42368. if(GangInfo[PlayerData[playerid][pGang]][gPoints] < 500)
  42369. {
  42370. return SendClientMessage(playerid, COLOR_GREY, "Your gang doesn't have enough points.");
  42371. }
  42372. if(PlayerData[playerid][pCash] < 50000)
  42373. {
  42374. return SendClientMessage(playerid, COLOR_GREY, "You need $50,000 on hand to purchase this upgrade.");
  42375. }
  42376. if(GangInfo[PlayerData[playerid][pGang]][gArmsDealer])
  42377. {
  42378. return SendClientMessage(playerid, COLOR_GREY, "Your gang already has this upgrade.");
  42379. }
  42380. GangInfo[PlayerData[playerid][pGang]][gArmsDealer] = 1;
  42381. GangInfo[PlayerData[playerid][pGang]][gArmsX] = 0.0;
  42382. GangInfo[PlayerData[playerid][pGang]][gArmsY] = 0.0;
  42383. GangInfo[PlayerData[playerid][pGang]][gArmsZ] = 0.0;
  42384. GangInfo[PlayerData[playerid][pGang]][gArmsMaterials] = 0;
  42385. GangInfo[PlayerData[playerid][pGang]][gPoints] -= 500;
  42386. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET armsdealer = 1, arms_x = 0.0, arms_y = 0.0, arms_z = 0.0, armsmaterials = 0, points = %i WHERE id = %i", GangInfo[PlayerData[playerid][pGang]][gPoints], PlayerData[playerid][pGang]);
  42387. mysql_tquery(connectionID, queryBuffer);
  42388. GivePlayerCash(playerid, -50000);
  42389. SendClientMessage(playerid, COLOR_AQUA, "You have spent 500 GP & $50,000 on an {00AA00}NPC arms dealer{33CCFF}. '/gang npc' to edit your arms dealer.");
  42390. Log_Write("log_gang", "%s (uid: %i) spent 500 GP & $50000 on an NPC arm dealer for %s (id: %i).", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GangInfo[PlayerData[playerid][pGang]][gName], PlayerData[playerid][pGang]);
  42391. }
  42392. case 2:
  42393. {
  42394. if(GangInfo[PlayerData[playerid][pGang]][gPoints] < 400)
  42395. {
  42396. return SendClientMessage(playerid, COLOR_GREY, "Your gang doesn't have enough points.");
  42397. }
  42398. if(PlayerData[playerid][pCash] < 75000)
  42399. {
  42400. return SendClientMessage(playerid, COLOR_GREY, "You need $75,000 on hand to purchase this upgrade.");
  42401. }
  42402. GivePlayerCash(playerid, -75000);
  42403. GiveGangPoints(PlayerData[playerid][pGang], -400);
  42404. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO flags VALUES(null, %i, 'Gang point redemption', NOW(), 'Duel arena')", PlayerData[playerid][pID]);
  42405. mysql_tquery(connectionID, queryBuffer);
  42406. SendClientMessage(playerid, COLOR_AQUA, "You have spent 400 GP & $75,000 on a {00AA00}Duel arena{33CCFF}. /report for an admin to set it up.");
  42407. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] has a pending flag for a duel arena for their gang.", GetRPName(playerid), playerid);
  42408. }
  42409. case 3:
  42410. {
  42411. if(GangInfo[PlayerData[playerid][pGang]][gPoints] < 4500)
  42412. {
  42413. return SendClientMessage(playerid, COLOR_GREY, "Your gang doesn't have enough points.");
  42414. }
  42415. if(PlayerData[playerid][pCash] < 100000)
  42416. {
  42417. return SendClientMessage(playerid, COLOR_GREY, "You need $100,000 on hand to purchase this upgrade.");
  42418. }
  42419. GivePlayerCash(playerid, -100000);
  42420. GiveGangPoints(PlayerData[playerid][pGang], -4500);
  42421. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO flags VALUES(null, %i, 'Gang point redemption', NOW(), 'Gang mapping (up to 50 objects)')", PlayerData[playerid][pID]);
  42422. mysql_tquery(connectionID, queryBuffer);
  42423. SendClientMessage(playerid, COLOR_AQUA, "You have spent 4500 GP & $100,000 on {00AA00}Mapping{33CCFF}. /report for an admin to set it up.");
  42424. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] has a pending flag for mapping for their gang.", GetRPName(playerid), playerid);
  42425. }
  42426. case 4:
  42427. {
  42428. if(GangInfo[PlayerData[playerid][pGang]][gPoints] < 5000)
  42429. {
  42430. return SendClientMessage(playerid, COLOR_GREY, "Your gang doesn't have enough points.");
  42431. }
  42432. if(PlayerData[playerid][pCash] < 100000)
  42433. {
  42434. return SendClientMessage(playerid, COLOR_GREY, "You need $100,000 on hand to purchase this upgrade.");
  42435. }
  42436. GivePlayerCash(playerid, -100000);
  42437. GiveGangPoints(PlayerData[playerid][pGang], -5000);
  42438. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO flags VALUES(null, %i, 'Gang point redemption', NOW(), 'Custom gang interior')", PlayerData[playerid][pID]);
  42439. mysql_tquery(connectionID, queryBuffer);
  42440. SendClientMessage(playerid, COLOR_AQUA, "You have spent 5000 GP & $100,000 on {00AA00}Custom gang interior{33CCFF}. /report for an admin to set it up.");
  42441. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] has a pending flag for a custom gang interior.", GetRPName(playerid), playerid);
  42442. }
  42443. case 5:
  42444. {
  42445. new cashNeeded = 100000 + (50000*GangInfo[PlayerData[playerid][pGang]][gMatLevel]);
  42446. new pointsNeeded = 1500 + (500*GangInfo[PlayerData[playerid][pGang]][gMatLevel]);
  42447. if(GangInfo[PlayerData[playerid][pGang]][gPoints] < pointsNeeded)
  42448. {
  42449. return SendClientMessage(playerid, COLOR_GREY, "Your gang doesn't have enough points.");
  42450. }
  42451. if(PlayerData[playerid][pCash] < cashNeeded)
  42452. {
  42453. return SendClientMessageEx(playerid, COLOR_GREY, "You need $%i on hand to purchase this upgrade.", cashNeeded);
  42454. }
  42455. if(GangInfo[PlayerData[playerid][pGang]][gMatLevel] + 1 > 3)
  42456. {
  42457. return SendClientMessage(playerid, COLOR_GREY, "Your gang's materials upgrade is already maxed out. (3/3)");
  42458. }
  42459. GangInfo[PlayerData[playerid][pGang]][gMatLevel]++;
  42460. GangInfo[PlayerData[playerid][pGang]][gPoints] -= pointsNeeded;
  42461. GivePlayerCash(playerid, -cashNeeded);
  42462. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET matlevel = %i, points = %i WHERE id = %i", GangInfo[PlayerData[playerid][pGang]][gMatLevel], GangInfo[PlayerData[playerid][pGang]][gPoints], PlayerData[playerid][pGang]);
  42463. mysql_tquery(connectionID, queryBuffer);
  42464. SendClientMessageEx(playerid, COLOR_GREEN, "You have spent %i GP & $%i for materials upgrade %i/3", pointsNeeded, cashNeeded, GangInfo[PlayerData[playerid][pGang]][gMatLevel]);
  42465. SendClientMessageEx(playerid, COLOR_GREEN, "Your gang will now receive %i materials from each material-class turf captured.", (10000+(5000*GangInfo[PlayerData[playerid][pGang]][gMatLevel])));
  42466. Log_Write("log_gang", "%s (uid: %i) spent %i GP & $%i for gang level %i/3 for %s (id: %i).", GetPlayerNameEx(playerid), PlayerData[playerid][pID], pointsNeeded, cashNeeded, GangInfo[PlayerData[playerid][pGang]][gMatLevel], GangInfo[PlayerData[playerid][pGang]][gName], PlayerData[playerid][pGang]);
  42467. }
  42468. case 6:
  42469. {
  42470. new cashNeeded = 40000 + (20000 * GangInfo[PlayerData[playerid][pGang]][gGunLevel]);
  42471. new pointsNeeded = 1500 + (250*GangInfo[PlayerData[playerid][pGang]][gGunLevel]);
  42472. if(GangInfo[PlayerData[playerid][pGang]][gPoints] < pointsNeeded)
  42473. {
  42474. return SendClientMessage(playerid, COLOR_GREY, "Your gang doesn't have enough points.");
  42475. }
  42476. if(PlayerData[playerid][pCash] < cashNeeded)
  42477. {
  42478. return SendClientMessageEx(playerid, COLOR_GREY, "You need $%i on hand to purchase this upgrade.", cashNeeded);
  42479. }
  42480. if(GangInfo[PlayerData[playerid][pGang]][gGunLevel] + 1 > 5)
  42481. {
  42482. return SendClientMessage(playerid, COLOR_GREY, "Your gang's gun upgrade is already maxed out. (5/5");
  42483. }
  42484. GangInfo[PlayerData[playerid][pGang]][gGunLevel]++;
  42485. GangInfo[PlayerData[playerid][pGang]][gPoints] -= pointsNeeded;
  42486. GivePlayerCash(playerid, -cashNeeded);
  42487. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET gunlevel = %i, points = %i WHERE id = %i", GangInfo[PlayerData[playerid][pGang]][gGunLevel], GangInfo[PlayerData[playerid][pGang]][gPoints], PlayerData[playerid][pGang]);
  42488. mysql_tquery(connectionID, queryBuffer);
  42489. SendClientMessageEx(playerid, COLOR_GREEN, "You have spent %i GP & $%i for guns upgrade %i/5", pointsNeeded, cashNeeded, GangInfo[PlayerData[playerid][pGang]][gGunLevel]);
  42490. SendClientMessageEx(playerid, COLOR_GREEN, "Your gang will now receive %i guns from each weapon-class turf captured.", (10+GangInfo[PlayerData[playerid][pGang]][gGunLevel]));
  42491. Log_Write("log_gang", "%s (uid: %i) spent %i GP & $%i for gang level %i/5 for %s (id: %i).", GetPlayerNameEx(playerid), PlayerData[playerid][pID], pointsNeeded, cashNeeded, GangInfo[PlayerData[playerid][pGang]][gGunLevel], GangInfo[PlayerData[playerid][pGang]][gName], PlayerData[playerid][pGang]);
  42492. }
  42493. case 7:
  42494. {
  42495. switch(GangInfo[PlayerData[playerid][pGang]][gLevel])
  42496. {
  42497. case 1:
  42498. {
  42499. if(GangInfo[PlayerData[playerid][pGang]][gPoints] < 6000)
  42500. {
  42501. return SendClientMessage(playerid, COLOR_GREY, "Your gang doesn't have enough points.");
  42502. }
  42503. if(PlayerData[playerid][pCash] < 75000)
  42504. {
  42505. return SendClientMessage(playerid, COLOR_GREY, "You need $75,000 on hand to purchase this upgrade.");
  42506. }
  42507. GangInfo[PlayerData[playerid][pGang]][gLevel] = 2;
  42508. GangInfo[PlayerData[playerid][pGang]][gPoints] -= 6000;
  42509. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET level = 2, points = %i WHERE id = %i", GangInfo[PlayerData[playerid][pGang]][gPoints], PlayerData[playerid][pGang]);
  42510. mysql_tquery(connectionID, queryBuffer);
  42511. GivePlayerCash(playerid, -75000);
  42512. ReloadGang(PlayerData[playerid][pGang]);
  42513. SendClientMessageEx(playerid, COLOR_GREEN, "You have spent 6000 GP & $75,000 for gang level 2/3. Your gang can now have %i members & %i gang vehicles.", GetGangMemberLimit(PlayerData[playerid][pGang]), GetGangVehicleLimit(PlayerData[playerid][pGang]));
  42514. SendClientMessage(playerid, COLOR_GREEN, "Your capacity for items in your gang stash has also been increased. Access your gang stash to learn more!");
  42515. Log_Write("log_gang", "%s (uid: %i) spent 6000 GP & $75000 for gang level 2/3 for %s (id: %i).", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GangInfo[PlayerData[playerid][pGang]][gName], PlayerData[playerid][pGang]);
  42516. }
  42517. case 2:
  42518. {
  42519. if(GangInfo[PlayerData[playerid][pGang]][gPoints] < 12000)
  42520. {
  42521. return SendClientMessage(playerid, COLOR_GREY, "Your gang doesn't have enough points.");
  42522. }
  42523. if(PlayerData[playerid][pCash] < 100000)
  42524. {
  42525. return SendClientMessage(playerid, COLOR_GREY, "You need $100,000 on hand to purchase this upgrade.");
  42526. }
  42527. GangInfo[PlayerData[playerid][pGang]][gLevel] = 3;
  42528. GangInfo[PlayerData[playerid][pGang]][gPoints] -= 12000;
  42529. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET level = 3, points = %i WHERE id = %i", GangInfo[PlayerData[playerid][pGang]][gPoints], PlayerData[playerid][pGang]);
  42530. mysql_tquery(connectionID, queryBuffer);
  42531. GivePlayerCash(playerid, -100000);
  42532. ReloadGang(PlayerData[playerid][pGang]);
  42533. SendClientMessageEx(playerid, COLOR_GREEN, "You have spent 12000 GP & $100,000 for gang level 3/3. Your gang can now have %i members & %i gang vehicles.", GetGangMemberLimit(PlayerData[playerid][pGang]), GetGangVehicleLimit(PlayerData[playerid][pGang]));
  42534. SendClientMessage(playerid, COLOR_GREEN, "Your capacity for items in your gang stash has also been increased. Access your gang stash to learn more!");
  42535. Log_Write("log_gang", "%s (uid: %i) spent 12000 GP & $100000 for gang level 3/3 for %s (id: %i).", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GangInfo[PlayerData[playerid][pGang]][gName], PlayerData[playerid][pGang]);
  42536. }
  42537. }
  42538. }
  42539. }
  42540. }
  42541. return 1;
  42542. }
  42543. Dialog:DIALOG_GANGARMSPRICES(playerid, response, listitem, inputtext[])
  42544. {
  42545. if(PlayerData[playerid][pGang] == -1 || PlayerData[playerid][pGangRank] < 5)
  42546. {
  42547. return 1;
  42548. }
  42549. if(response)
  42550. {
  42551. PlayerData[playerid][pSelected] = listitem;
  42552. Dialog_Show(playerid, DIALOG_GANGARMSPRICE, DIALOG_STYLE_INPUT, "Arms dealer | Prices", "Enter the new price for this item:", "Submit", "Back");
  42553. }
  42554. else
  42555. {
  42556. ShowDialogToPlayer(playerid, DIALOG_GANGARMSEDIT);
  42557. }
  42558. return 1;
  42559. }
  42560. Dialog:DIALOG_GANGARMSPRICE(playerid, response, listitem, inputtext[])
  42561. {
  42562. if(PlayerData[playerid][pGang] == -1 || PlayerData[playerid][pGangRank] < 5)
  42563. {
  42564. return 1;
  42565. }
  42566. if(response)
  42567. {
  42568. new amount;
  42569. if(sscanf(inputtext, "i", amount))
  42570. {
  42571. return Dialog_Show(playerid, DIALOG_GANGARMSPRICE, DIALOG_STYLE_INPUT, "Arms dealer | Prices", "Enter the new price for this item", "Submit", "Back");
  42572. }
  42573. if(amount < 0)
  42574. {
  42575. SendClientMessage(playerid, COLOR_GREY, "The amount can't be below $0.");
  42576. return Dialog_Show(playerid, DIALOG_GANGARMSPRICE, DIALOG_STYLE_INPUT, "Arms dealer | Prices", "Enter the new price for this item", "Submit", "Back");
  42577. }
  42578. GangInfo[PlayerData[playerid][pGang]][gArmsPrices][PlayerData[playerid][pSelected]] = amount;
  42579. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET armsprice_%i = %i WHERE id = %i", PlayerData[playerid][pSelected] + 1, amount, PlayerData[playerid][pGang]);
  42580. mysql_tquery(connectionID, queryBuffer);
  42581. if(PlayerData[playerid][pSelected] == 0) {
  42582. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the price of {00AA00}Micro Uzi{33CCFF} to $%i.", amount);
  42583. } else if(PlayerData[playerid][pSelected] == 1) {
  42584. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the price of {00AA00}Tec-9{33CCFF} to $%i.", amount);
  42585. } else if(PlayerData[playerid][pSelected] == 2) {
  42586. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the price of {00AA00}MP5{33CCFF} to $%i.", amount);
  42587. } else if(PlayerData[playerid][pSelected] == 3) {
  42588. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the price of {00AA00}Desert Eagle{33CCFF} to $%i.", amount);
  42589. } else if(PlayerData[playerid][pSelected] == 4) {
  42590. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the price of {00AA00}Molotov{33CCFF} to $%i.", amount);
  42591. } else if(PlayerData[playerid][pSelected] == 5) {
  42592. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the price of {00AA00}AK-47{33CCFF} to $%i.", amount);
  42593. } else if(PlayerData[playerid][pSelected] == 6) {
  42594. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the price of {00AA00}M4{33CCFF} to $%i.", amount);
  42595. } else if(PlayerData[playerid][pSelected] == 7) {
  42596. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the price of {00AA00}Sniper{33CCFF} to $%i.", amount);
  42597. } else if(PlayerData[playerid][pSelected] == 8) {
  42598. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the price of {00AA00}Sawnoff Shotgun{33CCFF} to $%i.", amount);
  42599. }
  42600. }
  42601. ShowDialogToPlayer(playerid, DIALOG_GANGARMSPRICES);
  42602. return 1;
  42603. }
  42604. Dialog:DIALOG_GANGARMSDEALER(playerid, response, listitem, inputtext[])
  42605. {
  42606. if(!IsPlayerInRangeOfPoint(playerid, 3.0, GangInfo[PlayerData[playerid][pDealerGang]][gArmsX], GangInfo[PlayerData[playerid][pDealerGang]][gArmsY], GangInfo[PlayerData[playerid][pDealerGang]][gArmsZ]))
  42607. {
  42608. return 1;
  42609. }
  42610. if(response)
  42611. {
  42612. if(listitem == 0)
  42613. {
  42614. ShowDialogToPlayer(playerid, DIALOG_GANGARMSWEAPONS);
  42615. }
  42616. else if(listitem == 1)
  42617. {
  42618. if(PlayerData[playerid][pGang] != PlayerData[playerid][pDealerGang])
  42619. {
  42620. return SendClientMessage(playerid, COLOR_GREY, "This arms dealer doesn't belong to your gang.");
  42621. }
  42622. if(PlayerData[playerid][pGangRank] < 6)
  42623. {
  42624. return SendClientMessage(playerid, COLOR_GREY, "You need to be rank 6+ in order to edit.");
  42625. }
  42626. ShowDialogToPlayer(playerid, DIALOG_GANGARMSEDIT);
  42627. }
  42628. }
  42629. return 1;
  42630. }
  42631. Dialog:DIALOG_GANGARMSWEAPONS(playerid, response, listitem, inputtext[])
  42632. {
  42633. if(!IsPlayerInRangeOfPoint(playerid, 3.0, GangInfo[PlayerData[playerid][pDealerGang]][gArmsX], GangInfo[PlayerData[playerid][pDealerGang]][gArmsY], GangInfo[PlayerData[playerid][pDealerGang]][gArmsZ]))
  42634. {
  42635. return 1;
  42636. }
  42637. if(response)
  42638. {
  42639. switch(listitem)
  42640. {
  42641. case 0:
  42642. {
  42643. if(GangInfo[PlayerData[playerid][pDealerGang]][gArmsMaterials] < 500)
  42644. {
  42645. return SendClientMessage(playerid, COLOR_GREY, "This gang's arms dealer doesn't have enough materials for this weapon.");
  42646. }
  42647. if(PlayerData[playerid][pCash] < GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem])
  42648. {
  42649. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this weapon.");
  42650. }
  42651. GangInfo[PlayerData[playerid][pDealerGang]][gArmsMaterials] -= 500;
  42652. GangInfo[PlayerData[playerid][pDealerGang]][gCash] += GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem];
  42653. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET armsmaterials = %i, cash = %i WHERE id = %i", GangInfo[PlayerData[playerid][pDealerGang]][gArmsMaterials], GangInfo[PlayerData[playerid][pDealerGang]][gCash], PlayerData[playerid][pDealerGang]);
  42654. mysql_tquery(connectionID, queryBuffer);
  42655. GivePlayerCash(playerid, -GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem]);
  42656. GivePlayerWeaponEx(playerid, 28);
  42657. ShowActionBubble(playerid, "* %s paid $%i to the arms dealer and received a micro uzi.", GetRPName(playerid), GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem]);
  42658. SendClientMessageEx(playerid, COLOR_AQUA, "You have purchased a {00AA00}micro uzi{33CCFF} for $%i.", GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem]);
  42659. }
  42660. case 1:
  42661. {
  42662. if(GangInfo[PlayerData[playerid][pDealerGang]][gArmsMaterials] < 500)
  42663. {
  42664. return SendClientMessage(playerid, COLOR_GREY, "This gang's arms dealer doesn't have enough materials for this weapon.");
  42665. }
  42666. if(PlayerData[playerid][pCash] < GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem])
  42667. {
  42668. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this weapon.");
  42669. }
  42670. GangInfo[PlayerData[playerid][pDealerGang]][gArmsMaterials] -= 500;
  42671. GangInfo[PlayerData[playerid][pDealerGang]][gCash] += GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem];
  42672. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET armsmaterials = %i, cash = %i WHERE id = %i", GangInfo[PlayerData[playerid][pDealerGang]][gArmsMaterials], GangInfo[PlayerData[playerid][pDealerGang]][gCash], PlayerData[playerid][pDealerGang]);
  42673. mysql_tquery(connectionID, queryBuffer);
  42674. GivePlayerCash(playerid, -GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem]);
  42675. GivePlayerWeaponEx(playerid, 32);
  42676. ShowActionBubble(playerid, "* %s paid $%i to the arms dealer and received a Tec-9.", GetRPName(playerid), GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem]);
  42677. SendClientMessageEx(playerid, COLOR_AQUA, "You have purchased a {00AA00}Tec-9{33CCFF} for $%i.", GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem]);
  42678. }
  42679. case 2:
  42680. {
  42681. if(GangInfo[PlayerData[playerid][pDealerGang]][gArmsMaterials] < 1000)
  42682. {
  42683. return SendClientMessage(playerid, COLOR_GREY, "This gang's arms dealer doesn't have enough materials for this weapon.");
  42684. }
  42685. if(PlayerData[playerid][pCash] < GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem])
  42686. {
  42687. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this weapon.");
  42688. }
  42689. GangInfo[PlayerData[playerid][pDealerGang]][gArmsMaterials] -= 1000;
  42690. GangInfo[PlayerData[playerid][pDealerGang]][gCash] += GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem];
  42691. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET armsmaterials = %i, cash = %i WHERE id = %i", GangInfo[PlayerData[playerid][pDealerGang]][gArmsMaterials], GangInfo[PlayerData[playerid][pDealerGang]][gCash], PlayerData[playerid][pDealerGang]);
  42692. mysql_tquery(connectionID, queryBuffer);
  42693. GivePlayerCash(playerid, -GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem]);
  42694. GivePlayerWeaponEx(playerid, 29);
  42695. ShowActionBubble(playerid, "* %s paid $%i to the arms dealer and received an MP5.", GetRPName(playerid), GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem]);
  42696. SendClientMessageEx(playerid, COLOR_AQUA, "You have purchased an {00AA00}MP5{33CCFF} for $%i.", GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem]);
  42697. }
  42698. case 3:
  42699. {
  42700. if(GangInfo[PlayerData[playerid][pDealerGang]][gArmsMaterials] < 2000)
  42701. {
  42702. return SendClientMessage(playerid, COLOR_GREY, "This gang's arms dealer doesn't have enough materials for this weapon.");
  42703. }
  42704. if(PlayerData[playerid][pCash] < GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem])
  42705. {
  42706. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this weapon.");
  42707. }
  42708. GangInfo[PlayerData[playerid][pDealerGang]][gArmsMaterials] -= 2000;
  42709. GangInfo[PlayerData[playerid][pDealerGang]][gCash] += GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem];
  42710. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET armsmaterials = %i, cash = %i WHERE id = %i", GangInfo[PlayerData[playerid][pDealerGang]][gArmsMaterials], GangInfo[PlayerData[playerid][pDealerGang]][gCash], PlayerData[playerid][pDealerGang]);
  42711. mysql_tquery(connectionID, queryBuffer);
  42712. GivePlayerCash(playerid, -GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem]);
  42713. GivePlayerWeaponEx(playerid, 24);
  42714. ShowActionBubble(playerid, "* %s paid $%i to the arms dealer and received a Desert Eagle.", GetRPName(playerid), GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem]);
  42715. SendClientMessageEx(playerid, COLOR_AQUA, "You have purchased a {00AA00}Desert Eagle{33CCFF} for $%i.", GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem]);
  42716. }
  42717. case 4:
  42718. {
  42719. if(GangInfo[PlayerData[playerid][pDealerGang]][gArmsMaterials] < 5000)
  42720. {
  42721. return SendClientMessage(playerid, COLOR_GREY, "This gang's arms dealer doesn't have enough materials for this weapon.");
  42722. }
  42723. if(PlayerData[playerid][pCash] < GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem])
  42724. {
  42725. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this weapon.");
  42726. }
  42727. GangInfo[PlayerData[playerid][pDealerGang]][gArmsMaterials] -= 5000;
  42728. GangInfo[PlayerData[playerid][pDealerGang]][gCash] += GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem];
  42729. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET armsmaterials = %i, cash = %i WHERE id = %i", GangInfo[PlayerData[playerid][pDealerGang]][gArmsMaterials], GangInfo[PlayerData[playerid][pDealerGang]][gCash], PlayerData[playerid][pDealerGang]);
  42730. mysql_tquery(connectionID, queryBuffer);
  42731. GivePlayerCash(playerid, -GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem]);
  42732. GivePlayerWeaponEx(playerid, 18);
  42733. ShowActionBubble(playerid, "* %s paid $%i to the arms dealer and received a molotov.", GetRPName(playerid), GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem]);
  42734. SendClientMessageEx(playerid, COLOR_AQUA, "You have purchased a {00AA00}molotov{33CCFF} for $%i.", GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem]);
  42735. }
  42736. case 5:
  42737. {
  42738. if(GangInfo[PlayerData[playerid][pDealerGang]][gArmsMaterials] < 3000)
  42739. {
  42740. return SendClientMessage(playerid, COLOR_GREY, "This gang's arms dealer doesn't have enough materials for this weapon.");
  42741. }
  42742. if(PlayerData[playerid][pCash] < GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem])
  42743. {
  42744. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this weapon.");
  42745. }
  42746. GangInfo[PlayerData[playerid][pDealerGang]][gArmsMaterials] -= 3000;
  42747. GangInfo[PlayerData[playerid][pDealerGang]][gCash] += GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem];
  42748. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET armsmaterials = %i, cash = %i WHERE id = %i", GangInfo[PlayerData[playerid][pDealerGang]][gArmsMaterials], GangInfo[PlayerData[playerid][pDealerGang]][gCash], PlayerData[playerid][pDealerGang]);
  42749. mysql_tquery(connectionID, queryBuffer);
  42750. GivePlayerCash(playerid, -GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem]);
  42751. GivePlayerWeaponEx(playerid, 30);
  42752. ShowActionBubble(playerid, "* %s paid $%i to the arms dealer and received an AK-47.", GetRPName(playerid), GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem]);
  42753. SendClientMessageEx(playerid, COLOR_AQUA, "You have purchased an {00AA00}AK-47{33CCFF} for $%i.", GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem]);
  42754. }
  42755. case 6:
  42756. {
  42757. if(GangInfo[PlayerData[playerid][pDealerGang]][gArmsMaterials] < 4000)
  42758. {
  42759. return SendClientMessage(playerid, COLOR_GREY, "This gang's arms dealer doesn't have enough materials for this weapon.");
  42760. }
  42761. if(PlayerData[playerid][pCash] < GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem])
  42762. {
  42763. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this weapon.");
  42764. }
  42765. GangInfo[PlayerData[playerid][pDealerGang]][gArmsMaterials] -= 4000;
  42766. GangInfo[PlayerData[playerid][pDealerGang]][gCash] += GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem];
  42767. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET armsmaterials = %i, cash = %i WHERE id = %i", GangInfo[PlayerData[playerid][pDealerGang]][gArmsMaterials], GangInfo[PlayerData[playerid][pDealerGang]][gCash], PlayerData[playerid][pDealerGang]);
  42768. mysql_tquery(connectionID, queryBuffer);
  42769. GivePlayerCash(playerid, -GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem]);
  42770. GivePlayerWeaponEx(playerid, 31);
  42771. ShowActionBubble(playerid, "* %s paid $%i to the arms dealer and received an M4.", GetRPName(playerid), GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem]);
  42772. SendClientMessageEx(playerid, COLOR_AQUA, "You have purchased an {00AA00}M4{33CCFF} for $%i.", GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem]);
  42773. }
  42774. case 7:
  42775. {
  42776. if(GangInfo[PlayerData[playerid][pDealerGang]][gArmsMaterials] < 6500)
  42777. {
  42778. return SendClientMessage(playerid, COLOR_GREY, "This gang's arms dealer doesn't have enough materials for this weapon.");
  42779. }
  42780. if(PlayerData[playerid][pCash] < GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem])
  42781. {
  42782. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this weapon.");
  42783. }
  42784. GangInfo[PlayerData[playerid][pDealerGang]][gArmsMaterials] -= 6500;
  42785. GangInfo[PlayerData[playerid][pDealerGang]][gCash] += GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem];
  42786. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET armsmaterials = %i, cash = %i WHERE id = %i", GangInfo[PlayerData[playerid][pDealerGang]][gArmsMaterials], GangInfo[PlayerData[playerid][pDealerGang]][gCash], PlayerData[playerid][pDealerGang]);
  42787. mysql_tquery(connectionID, queryBuffer);
  42788. GivePlayerCash(playerid, -GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem]);
  42789. GivePlayerWeaponEx(playerid, 34);
  42790. ShowActionBubble(playerid, "* %s paid $%i to the arms dealer and received a sniper.", GetRPName(playerid), GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem]);
  42791. SendClientMessageEx(playerid, COLOR_AQUA, "You have purchased a {00AA00}sniper{33CCFF} for $%i.", GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem]);
  42792. }
  42793. case 8:
  42794. {
  42795. if(GangInfo[PlayerData[playerid][pDealerGang]][gArmsMaterials] < 3000)
  42796. {
  42797. return SendClientMessage(playerid, COLOR_GREY, "This gang's arms dealer doesn't have enough materials for this weapon.");
  42798. }
  42799. if(PlayerData[playerid][pCash] < GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem])
  42800. {
  42801. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this weapon.");
  42802. }
  42803. GangInfo[PlayerData[playerid][pDealerGang]][gArmsMaterials] -= 3000;
  42804. GangInfo[PlayerData[playerid][pDealerGang]][gCash] += GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem];
  42805. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET armsmaterials = %i, cash = %i WHERE id = %i", GangInfo[PlayerData[playerid][pDealerGang]][gArmsMaterials], GangInfo[PlayerData[playerid][pDealerGang]][gCash], PlayerData[playerid][pDealerGang]);
  42806. mysql_tquery(connectionID, queryBuffer);
  42807. GivePlayerCash(playerid, -GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem]);
  42808. GivePlayerWeaponEx(playerid, 26);
  42809. ShowActionBubble(playerid, "* %s paid $%i to the arms dealer and received a sawnoff shotgun.", GetRPName(playerid), GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem]);
  42810. SendClientMessageEx(playerid, COLOR_AQUA, "You have purchased a {00AA00}sawnoff shotgun{33CCFF} for $%i.", GangInfo[PlayerData[playerid][pDealerGang]][gArmsPrices][listitem]);
  42811. }
  42812. }
  42813. }
  42814. else
  42815. {
  42816. ShowDialogToPlayer(playerid, DIALOG_GANGARMSDEALER);
  42817. }
  42818. return 1;
  42819. }
  42820. Dialog:DIALOG_GANGARMSEDIT(playerid, response, listitem, inputtext[])
  42821. {
  42822. if(PlayerData[playerid][pGang] == -1 || PlayerData[playerid][pGangRank] < 6)
  42823. {
  42824. return 1;
  42825. }
  42826. if(response)
  42827. {
  42828. switch(listitem)
  42829. {
  42830. case 0: ShowDialogToPlayer(playerid, DIALOG_GANGARMSPRICES);
  42831. case 1: ShowDialogToPlayer(playerid, GangStashDepositMats);
  42832. case 2: ShowDialogToPlayer(playerid, GangStashWithdrawMats);
  42833. }
  42834. }
  42835. else
  42836. {
  42837. ShowDialogToPlayer(playerid, DIALOG_GANGARMSDEALER);
  42838. }
  42839. return 1;
  42840. }
  42841. Dialog:GangStashDepositMats(playerid, response, listitem, inputtext[])
  42842. {
  42843. if(PlayerData[playerid][pGang] == -1 || PlayerData[playerid][pGangRank] < 6)
  42844. {
  42845. return 1;
  42846. }
  42847. if(response)
  42848. {
  42849. new amount;
  42850. if(sscanf(inputtext, "i", amount))
  42851. {
  42852. return ShowDialogToPlayer(playerid, GangStashDepositMats);
  42853. }
  42854. if(amount < 1 || amount > PlayerData[playerid][pMaterials])
  42855. {
  42856. SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  42857. return ShowDialogToPlayer(playerid, GangStashDepositMats);
  42858. }
  42859. GangInfo[PlayerData[playerid][pGang]][gArmsMaterials] += amount;
  42860. PlayerData[playerid][pMaterials] -= amount;
  42861. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET armsmaterials = %i WHERE id = %i", GangInfo[PlayerData[playerid][pGang]][gArmsMaterials], PlayerData[playerid][pGang]);
  42862. mysql_tquery(connectionID, queryBuffer);
  42863. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET materials = %i WHERE uid = %i", PlayerData[playerid][pMaterials], PlayerData[playerid][pID]);
  42864. mysql_tquery(connectionID, queryBuffer);
  42865. SendClientMessageEx(playerid, COLOR_AQUA, "You have deposited %i materials in your arms dealer NPC.", amount);
  42866. }
  42867. ShowDialogToPlayer(playerid, DIALOG_GANGARMSEDIT);
  42868. return 1;
  42869. }
  42870. Dialog:GangStashWithdrawMats(playerid, response, listitem, inputtext[])
  42871. {
  42872. if(PlayerData[playerid][pGang] == -1 || PlayerData[playerid][pGangRank] < 6)
  42873. {
  42874. return 1;
  42875. }
  42876. if(response)
  42877. {
  42878. new amount;
  42879. if(sscanf(inputtext, "i", amount))
  42880. {
  42881. return ShowDialogToPlayer(playerid, GangStashWithdrawMats);
  42882. }
  42883. if(amount < 1 || amount > GangInfo[PlayerData[playerid][pGang]][gArmsMaterials])
  42884. {
  42885. SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  42886. return ShowDialogToPlayer(playerid, GangStashWithdrawMats);
  42887. }
  42888. GangInfo[PlayerData[playerid][pGang]][gArmsMaterials] -= amount;
  42889. PlayerData[playerid][pMaterials] += amount;
  42890. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET armsmaterials = %i WHERE id = %i", GangInfo[PlayerData[playerid][pGang]][gArmsMaterials], PlayerData[playerid][pGang]);
  42891. mysql_tquery(connectionID, queryBuffer);
  42892. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET materials = %i WHERE uid = %i", PlayerData[playerid][pMaterials], PlayerData[playerid][pID]);
  42893. mysql_tquery(connectionID, queryBuffer);
  42894. SendClientMessageEx(playerid, COLOR_AQUA, "You have withdrawn %i materials from your arms dealer NPC.", amount);
  42895. }
  42896. ShowDialogToPlayer(playerid, DIALOG_GANGARMSEDIT);
  42897. return 1;
  42898. }
  42899. Dialog:DIALOG_FREENAMECHANGE(playerid, response, listitem, inputtext[])
  42900. {
  42901. if(response)
  42902. {
  42903. if(isnull(inputtext))
  42904. {
  42905. if(!IsPlayerLoggedIn(playerid))
  42906. {
  42907. SendClientMessage(playerid, COLOR_LIGHTRED, "Please reconnect with a proper roleplay name in the Firstname_Lastname format.");
  42908. KickPlayer(playerid);
  42909. return 1;
  42910. }
  42911. return Dialog_Show(playerid, DIALOG_FREENAMECHANGE, DIALOG_STYLE_INPUT, "Non-RP Name", "An administrator has came to the conclusion that your name is non-RP.\nTherefore you have been given this free namechange in order to correct it.\n\nEnter a name in the Firstname_Lastname format in the box below:", "Submit", "Cancel");
  42912. }
  42913. if(!(3 <= strlen(inputtext) <= 20))
  42914. {
  42915. SendClientMessage(playerid, COLOR_GREY, "Your name must contain 3 to 20 characters.");
  42916. return Dialog_Show(playerid, DIALOG_FREENAMECHANGE, DIALOG_STYLE_INPUT, "Non-RP Name", "An administrator has came to the conclusion that your name is non-RP.\nTherefore you have been given this free namechange in order to correct it.\n\nEnter a name in the Firstname_Lastname format in the box below:", "Submit", "Cancel");
  42917. }
  42918. if(strfind(inputtext, "_") == -1)
  42919. {
  42920. SendClientMessage(playerid, COLOR_GREY, "The name needs to contain at least one underscore.");
  42921. return Dialog_Show(playerid, DIALOG_FREENAMECHANGE, DIALOG_STYLE_INPUT, "Non-RP Name", "An administrator has came to the conclusion that your name is non-RP.\nTherefore you have been given this free namechange in order to correct it.\n\nEnter a name in the Firstname_Lastname format in the box below:", "Submit", "Cancel");
  42922. }
  42923. if(!IsValidName(inputtext))
  42924. {
  42925. SendClientMessage(playerid, COLOR_GREY, "That name is not supported by SA-MP.");
  42926. return Dialog_Show(playerid, DIALOG_FREENAMECHANGE, DIALOG_STYLE_INPUT, "Non-RP Name", "An administrator has came to the conclusion that your name is non-RP.\nTherefore you have been given this free namechange in order to correct it.\n\nEnter a name in the Firstname_Lastname format in the box below:", "Submit", "Cancel");
  42927. }
  42928. PlayerData[playerid][pFreeNamechange] = 1;
  42929. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid FROM "#TABLE_USERS" WHERE username = '%e'", inputtext);
  42930. mysql_tquery(connectionID, queryBuffer, "OnPlayerAttemptNameChange", "is", playerid, inputtext);
  42931. }
  42932. else
  42933. {
  42934. if(!PlayerData[playerid][pLogged])
  42935. {
  42936. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] has been kicked for failing to change their name.", GetRPName(playerid), playerid);
  42937. KickPlayer(playerid);
  42938. }
  42939. else
  42940. {
  42941. PlayerData[playerid][pJailType] = 2;
  42942. PlayerData[playerid][pJailTime] = 20 * 60;
  42943. ResetPlayerWeaponsEx(playerid);
  42944. ResetPlayer(playerid);
  42945. SetPlayerInJail(playerid);
  42946. GameTextForPlayer(playerid, "~w~Welcome to~n~~r~admin jail", 5000, 3);
  42947. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET prisonedby = 'Server', prisonreason = 'failing to change their name' WHERE uid = %i", PlayerData[playerid][pID]);
  42948. mysql_tquery(connectionID, queryBuffer);
  42949. strins(PlayerData[playerid][pPrisonedBy], "Server", 0);
  42950. strins(PlayerData[playerid][pPrisonReason], "failing to change their name", 0);
  42951. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] has been prisoned for failing to change their name.", GetRPName(playerid), playerid);
  42952. Log_Write("log_punishments", "%s (uid: %i) has been prisoned for 20 minutes, reason: failing to change their name.", GetPlayerNameEx(playerid), PlayerData[playerid][pID]);
  42953. }
  42954. }
  42955. return 1;
  42956. }
  42957. Dialog:DIALOG_REMOVEFLAG(playerid, response, listitem, inputtext[])
  42958. {
  42959. if(response)
  42960. {
  42961. new targetid = PlayerData[playerid][pRemoveFrom];
  42962. if(targetid == INVALID_PLAYER_ID)
  42963. {
  42964. return SendClientMessage(playerid, COLOR_GREY, "The player has disconnected. You can't remove their flags now.");
  42965. }
  42966. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT id, description FROM flags WHERE uid = %i LIMIT %i, 1", PlayerData[targetid][pID], listitem);
  42967. mysql_tquery(connectionID, queryBuffer, "OnVerifyRemoveFlag", "ii", playerid, targetid);
  42968. }
  42969. return 1;
  42970. }
  42971. Dialog:DIALOG_NEWBIEUNMUTE(playerid, response, listitem, inputtext[])
  42972. {
  42973. if((response) && PlayerData[playerid][pNewbieMuted])
  42974. {
  42975. switch(listitem)
  42976. {
  42977. case 0:
  42978. {
  42979. new fine = percent(PlayerData[playerid][pCash] + PlayerData[playerid][pBank], 5);
  42980. GivePlayerCash(playerid, -fine);
  42981. SendClientMessageEx(playerid, COLOR_AQUA, "You have chosen to pay a 5 percent fine of {FF6347}$%i{33CCFF} for a newbie unmute.", fine);
  42982. }
  42983. case 1:
  42984. {
  42985. if(PlayerData[playerid][pJailTime] > 600)
  42986. {
  42987. return SendClientMessage(playerid, COLOR_GREY, "This punishment is not available to you as you are jailed for more than 10 minutes.");
  42988. }
  42989. PlayerData[playerid][pJailType] = 1;
  42990. PlayerData[playerid][pJailTime] += 600;
  42991. ResetPlayerWeaponsEx(playerid);
  42992. ResetPlayer(playerid);
  42993. SetPlayerInJail(playerid);
  42994. SendClientMessage(playerid, COLOR_AQUA, "You have chosen a 10 minute jail sentence for a newbie unmute.");
  42995. }
  42996. }
  42997. PlayerData[playerid][pNewbieMuted] = 0;
  42998. PlayerData[playerid][pNewbieMuteTime] = 0;
  42999. }
  43000. return 1;
  43001. }
  43002. Dialog:DIALOG_REPORTUNMUTE(playerid, response, listitem, inputtext[])
  43003. {
  43004. if((response) && PlayerData[playerid][pReportMuted])
  43005. {
  43006. switch(listitem)
  43007. {
  43008. case 0:
  43009. {
  43010. new fine = percent(PlayerData[playerid][pCash] + PlayerData[playerid][pBank], 5);
  43011. GivePlayerCash(playerid, -fine);
  43012. SendClientMessageEx(playerid, COLOR_AQUA, "You have chosen to pay a 5 percent fine of {FF6347}$%i{33CCFF} for a report unmute.", fine);
  43013. }
  43014. case 1:
  43015. {
  43016. if(PlayerData[playerid][pJailTime] > 600)
  43017. {
  43018. return SendClientMessage(playerid, COLOR_GREY, "This punishment is not available to you as you are jailed for more than 10 minutes.");
  43019. }
  43020. PlayerData[playerid][pJailType] = 1;
  43021. PlayerData[playerid][pJailTime] = 600;
  43022. ResetPlayerWeaponsEx(playerid);
  43023. ResetPlayer(playerid);
  43024. SetPlayerInJail(playerid);
  43025. SendClientMessage(playerid, COLOR_AQUA, "You have chosen a 10 minute jail sentence for a report unmute.");
  43026. }
  43027. }
  43028. PlayerData[playerid][pReportMuted] = 0;
  43029. PlayerData[playerid][pReportMuteTime] = 0;
  43030. }
  43031. return 1;
  43032. }
  43033. Dialog:DIALOG_GLOBALUNMUTE(playerid, response, listitem, inputtext[])
  43034. {
  43035. if((response) && PlayerData[playerid][pGlobalMuted])
  43036. {
  43037. switch(listitem)
  43038. {
  43039. case 0:
  43040. {
  43041. new fine = percent(PlayerData[playerid][pCash] + PlayerData[playerid][pBank], 5);
  43042. GivePlayerCash(playerid, -fine);
  43043. SendClientMessageEx(playerid, COLOR_AQUA, "You have chosen to pay a 5 percent fine of {FF6347}$%i{33CCFF} for a global chat unmute.", fine);
  43044. }
  43045. case 1:
  43046. {
  43047. if(PlayerData[playerid][pJailTime] > 600)
  43048. {
  43049. return SendClientMessage(playerid, COLOR_GREY, "This punishment is not available to you as you are jailed for more than 10 minutes.");
  43050. }
  43051. PlayerData[playerid][pJailType] = 1;
  43052. PlayerData[playerid][pJailTime] = 600;
  43053. ResetPlayerWeaponsEx(playerid);
  43054. ResetPlayer(playerid);
  43055. SetPlayerInJail(playerid);
  43056. SendClientMessage(playerid, COLOR_AQUA, "You have chosen a 10 minute jail sentence for a global chat unmute.");
  43057. }
  43058. }
  43059. PlayerData[playerid][pGlobalMuted] = 0;
  43060. PlayerData[playerid][pGlobalMuteTime] = 0;
  43061. }
  43062. return 1;
  43063. }
  43064. Dialog:DIALOG_VEHICLEDMV(playerid, response, listitem, inputtext[])
  43065. {
  43066. if(response)
  43067. {
  43068. if(PlayerData[playerid][pCash] < 1499)
  43069. {
  43070. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to release your vehicle");
  43071. }
  43072. new Float:vehposx, Float:vehposy, Float:vehposz, Float:angle;
  43073. vehposx = 1198.6892;
  43074. vehposy = -1834.5319;
  43075. vehposz = 13.3995;
  43076. angle = 268.9968;
  43077. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET pos_x = '%f', pos_y = '%f', pos_z = '%f', pos_a = '%f', impounded = 0 WHERE id = %d", vehposx, vehposy, vehposz, angle, VehicleInfo[listitem][vID]);
  43078. mysql_tquery(connectionID, queryBuffer);
  43079. VehicleInfo[listitem][pvImpounded] = 0;
  43080. SendClientMessage(playerid, COLOR_GREEN, "Your vehicle was released from the DMV, have a nice day!");
  43081. GivePlayerCash(playerid, -1500);
  43082. }
  43083. return 1;
  43084. }
  43085. Dialog:DIALOG_REMOVEPVEH(playerid, response, listitem, inputtext[])
  43086. {
  43087. if(response)
  43088. {
  43089. new targetid = PlayerData[playerid][pRemoveFrom];
  43090. if(targetid == INVALID_PLAYER_ID)
  43091. {
  43092. return SendClientMessage(playerid, COLOR_GREY, "The player has disconnected. You can't remove their vehicles now.");
  43093. }
  43094. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT id, modelid FROM vehicles WHERE ownerid = %i LIMIT %i, 1", PlayerData[targetid][pID], listitem);
  43095. mysql_tquery(connectionID, queryBuffer, "OnVerifyRemoveVehicle", "ii", playerid, targetid);
  43096. }
  43097. return 1;
  43098. }
  43099. Dialog:DIALOG_CRACKTRUNK(playerid, response, listitem, inputtext[])
  43100. {
  43101. if(response)
  43102. {
  43103. new vehicleid = PlayerData[playerid][pCocaineFrom], amount;
  43104. if(!IsPlayerInRangeOfBoot(playerid, vehicleid))
  43105. {
  43106. return SendClientMessage(playerid, COLOR_GREY, "You can't steal anything from the trunk now. You're not near it.");
  43107. }
  43108. if(VehicleInfo[vehicleid][vLocked])
  43109. {
  43110. return SendClientMessage(playerid, COLOR_GREY, "You can't steal anything from the trunk now. The vehicle is locked!");
  43111. }
  43112. if(strfind(inputtext, "Weed") != -1 && (amount = VehicleInfo[vehicleid][vWeed]/20) > 0)
  43113. {
  43114. if(PlayerData[playerid][pWeed] + amount > GetPlayerCapacity(playerid, CAPACITY_WEED))
  43115. {
  43116. SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i weed. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pWeed], GetPlayerCapacity(playerid, CAPACITY_WEED));
  43117. return ShowDialogToPlayer(playerid, DIALOG_CRACKTRUNK);
  43118. }
  43119. VehicleInfo[vehicleid][vWeed] -= amount;
  43120. PlayerData[playerid][pWeed] += amount;
  43121. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET weed = %i WHERE id = %i", VehicleInfo[vehicleid][vWeed], VehicleInfo[vehicleid][vID]);
  43122. mysql_tquery(connectionID, queryBuffer);
  43123. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET weed = %i WHERE uid = %i", PlayerData[playerid][pWeed], PlayerData[playerid][pID]);
  43124. mysql_tquery(connectionID, queryBuffer);
  43125. ShowActionBubble(playerid, "* %s steals %i grams of weed from the trunk.", GetRPName(playerid), amount);
  43126. }
  43127. else if(strfind(inputtext, "Cocaine") != -1 && (amount = VehicleInfo[vehicleid][vCocaine]/20) > 0)
  43128. {
  43129. if(PlayerData[playerid][pCocaine] + amount > GetPlayerCapacity(playerid, CAPACITY_COCAINE))
  43130. {
  43131. SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i cocaine. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pCocaine], GetPlayerCapacity(playerid, CAPACITY_COCAINE));
  43132. return ShowDialogToPlayer(playerid, DIALOG_CRACKTRUNK);
  43133. }
  43134. VehicleInfo[vehicleid][vCocaine] -= amount;
  43135. PlayerData[playerid][pCocaine] += amount;
  43136. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET cocaine = %i WHERE id = %i", VehicleInfo[vehicleid][vCocaine], VehicleInfo[vehicleid][vID]);
  43137. mysql_tquery(connectionID, queryBuffer);
  43138. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET cocaine = %i WHERE uid = %i", PlayerData[playerid][pCocaine], PlayerData[playerid][pID]);
  43139. mysql_tquery(connectionID, queryBuffer);
  43140. ShowActionBubble(playerid, "* %s steals %i grams of cocaine from the trunk.", GetRPName(playerid), amount);
  43141. }
  43142. else if(strfind(inputtext, "Meth") != -1 && (amount = VehicleInfo[vehicleid][vMeth]/20) > 0)
  43143. {
  43144. if(PlayerData[playerid][pMeth] + amount > GetPlayerCapacity(playerid, CAPACITY_METH))
  43145. {
  43146. SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i meth. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pMeth], GetPlayerCapacity(playerid, CAPACITY_METH));
  43147. return ShowDialogToPlayer(playerid, DIALOG_CRACKTRUNK);
  43148. }
  43149. VehicleInfo[vehicleid][vMeth] -= amount;
  43150. PlayerData[playerid][pMeth] += amount;
  43151. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET meth = %i WHERE id = %i", VehicleInfo[vehicleid][vMeth], VehicleInfo[vehicleid][vID]);
  43152. mysql_tquery(connectionID, queryBuffer);
  43153. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET meth = %i WHERE uid = %i", PlayerData[playerid][pMeth], PlayerData[playerid][pID]);
  43154. mysql_tquery(connectionID, queryBuffer);
  43155. ShowActionBubble(playerid, "* %s steals %i grams of meth from the trunk.", GetRPName(playerid), amount);
  43156. }
  43157. else if(strfind(inputtext, "Painkillers") != -1 && (amount = VehicleInfo[vehicleid][vPainkillers]/20) > 0)
  43158. {
  43159. if(PlayerData[playerid][pPainkillers] + amount > GetPlayerCapacity(playerid, CAPACITY_PAINKILLERS))
  43160. {
  43161. SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i painkillers. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pPainkillers], GetPlayerCapacity(playerid, CAPACITY_PAINKILLERS));
  43162. return ShowDialogToPlayer(playerid, DIALOG_CRACKTRUNK);
  43163. }
  43164. VehicleInfo[vehicleid][vPainkillers] -= amount;
  43165. PlayerData[playerid][pPainkillers] += amount;
  43166. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET painkillers = %i WHERE id = %i", VehicleInfo[vehicleid][vPainkillers], VehicleInfo[vehicleid][vID]);
  43167. mysql_tquery(connectionID, queryBuffer);
  43168. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET painkillers = %i WHERE uid = %i", PlayerData[playerid][pPainkillers], PlayerData[playerid][pID]);
  43169. mysql_tquery(connectionID, queryBuffer);
  43170. ShowActionBubble(playerid, "* %s steals %i painkillers from the trunk.", GetRPName(playerid), amount);
  43171. }
  43172. else if(strfind(inputtext, "Materials") != -1 && (amount = VehicleInfo[vehicleid][vMaterials]/20) > 0)
  43173. {
  43174. if(PlayerData[playerid][pMaterials] + amount > GetPlayerCapacity(playerid, CAPACITY_MATERIALS))
  43175. {
  43176. SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i materials. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pMaterials], GetPlayerCapacity(playerid, CAPACITY_MATERIALS));
  43177. return ShowDialogToPlayer(playerid, DIALOG_CRACKTRUNK);
  43178. }
  43179. VehicleInfo[vehicleid][vMaterials] -= amount;
  43180. PlayerData[playerid][pMaterials] += amount;
  43181. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET materials = %i WHERE id = %i", VehicleInfo[vehicleid][vMaterials], VehicleInfo[vehicleid][vID]);
  43182. mysql_tquery(connectionID, queryBuffer);
  43183. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET materials = %i WHERE uid = %i", PlayerData[playerid][pMaterials], PlayerData[playerid][pID]);
  43184. mysql_tquery(connectionID, queryBuffer);
  43185. ShowActionBubble(playerid, "* %s steals %i materials from the trunk.", GetRPName(playerid), amount);
  43186. }
  43187. else if(strfind(inputtext, "Cash") != -1 && (amount = VehicleInfo[vehicleid][vCash]/20) > 0)
  43188. {
  43189. VehicleInfo[vehicleid][vCash] -= amount;
  43190. PlayerData[playerid][pCash] += amount;
  43191. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET cash = %i WHERE id = %i", VehicleInfo[vehicleid][vCash], VehicleInfo[vehicleid][vID]);
  43192. mysql_tquery(connectionID, queryBuffer);
  43193. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET cash = %i WHERE uid = %i", PlayerData[playerid][pCash], PlayerData[playerid][pID]);
  43194. mysql_tquery(connectionID, queryBuffer);
  43195. ShowActionBubble(playerid, "* %s steals %s worth of cash from the trunk.", GetRPName(playerid), FormatNumber(amount));
  43196. }
  43197. else
  43198. {
  43199. for(new i = 0; i < 5; i ++)
  43200. {
  43201. if(VehicleInfo[vehicleid][vWeapons][i] != 0 && !strcmp(GetWeaponNameEx(VehicleInfo[vehicleid][vWeapons][i]), inputtext))
  43202. {
  43203. if(PlayerHasWeapon(playerid, VehicleInfo[vehicleid][vWeapons][i]))
  43204. {
  43205. SendClientMessage(playerid, COLOR_GREY, "You have this weapon already.");
  43206. return ShowDialogToPlayer(playerid, DIALOG_CRACKTRUNK);
  43207. }
  43208. GivePlayerWeaponEx(playerid, VehicleInfo[vehicleid][vWeapons][i]);
  43209. ShowActionBubble(playerid, "* %s steals a %s from the trunk.", GetRPName(playerid), GetWeaponNameEx(VehicleInfo[vehicleid][vWeapons][i]));
  43210. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET weapon_%i = 0 WHERE id = %i", i + 1, VehicleInfo[vehicleid][vID]);
  43211. mysql_tquery(connectionID, queryBuffer);
  43212. VehicleInfo[vehicleid][vWeapons][i] = 0;
  43213. break;
  43214. }
  43215. }
  43216. }
  43217. }
  43218. PlayerData[playerid][pCocaineTrunk] = INVALID_PLAYER_ID;
  43219. return 1;
  43220. }
  43221. Dialog:DIALOG_HOUSEINTERIORS(playerid, response, listitem, inputtext[])
  43222. {
  43223. if(response)
  43224. {
  43225. new houseid = GetNearbyHouseEx(playerid);
  43226. if(houseid >= 0 && IsHouseOwner(playerid, houseid))
  43227. {
  43228. SetPlayerPos(playerid, houseInteriors[listitem][intX], houseInteriors[listitem][intY], houseInteriors[listitem][intZ]);
  43229. SetPlayerFacingAngle(playerid, houseInteriors[listitem][intA]);
  43230. SetPlayerInterior(playerid, houseInteriors[listitem][intID]);
  43231. SetCameraBehindPlayer(playerid);
  43232. PlayerData[playerid][pPreviewHouse] = houseid;
  43233. PlayerData[playerid][pPreviewType] = listitem;
  43234. PlayerData[playerid][pPreviewTime] = 60;
  43235. SendClientMessageEx(playerid, COLOR_AQUA, "This {FF6347}%s{33CCFF} interior costs %s. You have 60 seconds to look around and make up your mind.", houseInteriors[listitem][intClass], FormatNumber(houseInteriors[listitem][intPrice]));
  43236. SendClientMessageEx(playerid, COLOR_AQUA, "Use /confirmupgrade if you wish to upgrade to this interior. Use /cancelupgrade to cancel preview mode.");
  43237. }
  43238. }
  43239. return 1;
  43240. }
  43241. Dialog:DIALOG_LSELEVATOR(playerid, response, listitem, inputtext[])
  43242. {
  43243. if(!response)
  43244. return 0;
  43245. if(FloorRequestedBy[listitem] != INVALID_PLAYER_ID || IsFloorInQueue(listitem))
  43246. GameTextForPlayer(playerid, "~r~The floor is already in the queue", 3500, 4);
  43247. else if(DidPlayerRequestElevator(playerid))
  43248. GameTextForPlayer(playerid, "~r~You already requested the elevator", 3500, 4);
  43249. else
  43250. CallElevator(playerid, listitem);
  43251. return 1;
  43252. }
  43253. Dialog:DIALOG_NEWBWELCOME(playerid, response, listitem, inputtext[])
  43254. {
  43255. if(response)
  43256. {
  43257. new count;
  43258. foreach(new i : Player)
  43259. {
  43260. if(PlayerData[i][pHelper] > 0)
  43261. {
  43262. count++;
  43263. }
  43264. }
  43265. if(count > 0)
  43266. {
  43267. new string[30];
  43268. format(string, sizeof(string), "Show me around LS please, I am new.");
  43269. strcpy(PlayerData[playerid][pHelpRequest], string, 128);
  43270. SendHelperMessage(COLOR_AQUA, "* Help Request: New Player %s (ID:%d) is requesting a helper to show them around. *", GetRPName(playerid), playerid);
  43271. PlayerData[playerid][pLastRequest] = gettime();
  43272. SendClientMessage(playerid, COLOR_GREEN, "Your help request was sent to all helpers. Please wait for a response.");
  43273. }
  43274. else
  43275. {
  43276. Dialog_Show(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "{00aa00}OS:RP{FFFFFF} | Failed", "{FFFFFF}Unfortunately there are no members of the {33CCFF}helper team{FFFFFF} online :(.\nYou can also try /newb, This is where most of the community can help you with simple questions such as \"Where is the Bank\".\nYou can also checkout {00aa00}os-rp.net{FFFFFF} for beginner tutorials.", "Cancel", "");
  43277. }
  43278. }
  43279. return 1;
  43280. }
  43281. Dialog:DIALOG_USERIMKIT(playerid, response, listitem, inputtext[])
  43282. {
  43283. if(response)
  43284. {
  43285. new vehicleid = GetPlayerVehicleID(playerid), componentid;
  43286. if((vehicleid) && VehicleHasDoors(vehicleid) && PlayerData[playerid][pRimkits] > 0)
  43287. {
  43288. if(!IsVehicleOwner(playerid, vehicleid) && PlayerData[playerid][pVehicleKeys] != vehicleid && !(VehicleInfo[vehicleid][vGang] >= 0 && PlayerData[playerid][pGang] == VehicleInfo[vehicleid][vGang]))
  43289. {
  43290. return 1;
  43291. }
  43292. if(listitem == 0) {
  43293. componentid = 1025;
  43294. } else if(1 <= listitem <= 13) {
  43295. componentid = (listitem - 1) + 1073;
  43296. } else if(14 <= listitem <= 16) {
  43297. componentid = (listitem - 14) + 1096;
  43298. }
  43299. VehicleInfo[vehicleid][vMods][CARMODTYPE_WHEELS] = componentid;
  43300. PlayerData[playerid][pRimkits]--;
  43301. AddVehicleComponent(vehicleid, componentid);
  43302. SaveVehicleModifications(vehicleid);
  43303. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET rimkits = %i WHERE uid = %i", PlayerData[playerid][pRimkits], PlayerData[playerid][pID]);
  43304. mysql_tquery(connectionID, queryBuffer);
  43305. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  43306. ShowActionBubble(playerid, "* %s installs a set of %s rims on the vehicle.", GetRPName(playerid), inputtext);
  43307. }
  43308. }
  43309. return 1;
  43310. }
  43311. Dialog:DIALOG_TURFLIST(playerid, response, listitem, inputtext[])
  43312. {
  43313. if(response)
  43314. {
  43315. tsstring = "Id\tName\tOwner\tPerk\t";
  43316. if(strlen(tsstring) < 5)
  43317. {
  43318. SendClientMessage(playerid, COLOR_AQUA, "Please use /showturfs to enable turf bounds");
  43319. }
  43320. else
  43321. {
  43322. Dialog_Show(playerid, DIALOG_TURFLIST2, DIALOG_STYLE_TABLIST_HEADERS, "Turf list", tsstring, "Cancel", "");
  43323. }
  43324. }
  43325. return 1;
  43326. }
  43327. Dialog:DIALOG_TURFLIST2(playerid, response, listitem, inputtext[])
  43328. {
  43329. if(response)
  43330. {
  43331. SendClientMessage(playerid, COLOR_AQUA, "Please use /showturfs to enable turf bounds");
  43332. }
  43333. return 1;
  43334. }
  43335. Dialog:DIALOG_LOCATE(playerid, response, listitem, inputtext[])
  43336. {
  43337. if(response)
  43338. {
  43339. switch(listitem)
  43340. {
  43341. case 0: // JOBS
  43342. {
  43343. Dialog_Show(playerid, DIALOG_LOCATELIST1, DIALOG_STYLE_LIST, "GPS - Select Destination", "Pizzaman\nCourier\nFisherman\nBodyguard\nWeapon Dealer\nMechanic\nMiner\nSweeper\nTaxi Driver\nDrug Dealer\nLawyer\nDetective\nGarbage Man\nFarmer\nTrucker", "Select", "Close");
  43344. }
  43345. case 1: // STORES
  43346. {
  43347. Dialog_Show(playerid, DIALOG_LOCATELIST2, DIALOG_STYLE_LIST, "GPS - Select Destination", "24/7\nAmmunation\nClothing Store\nGymnasium\nRestaurant\nAdvertisement Store\nClub\nTool Shop\nDealership", "Select", "Close");
  43348. }
  43349. case 2: // GENERAL LOCATIONS
  43350. {
  43351. Dialog_Show(playerid, DIALOG_LOCATELIST3, DIALOG_STYLE_LIST, "GPS - Select Destination", "DMV\nBank\nPaintball\nCasino\nVIP\nDrug Factory\nMaterials Pickup 1\nMaterials Pickup 2\nMaterials Factory 1\nMaterials Factory 2\nHeisenbergs\nAirport Materials Depot\nMarina Materials Depot", "Select", "Close");
  43352. }
  43353. case 3: // Find Turfs
  43354. {
  43355. new string[34 * MAX_TURFS];
  43356. for(new x = 0; x < MAX_TURFS; x++)
  43357. {
  43358. if(TurfInfo[x][tExists]) {
  43359. strcat(string, TurfInfo[x][tName]);
  43360. strcat(string, "\n");
  43361. }
  43362. }
  43363. if(strlen(string) > 2) {
  43364. Dialog_Show(playerid, DIALOG_LOCATETURFS, DIALOG_STYLE_LIST, "GPS - Select Destination", string, "Select", "Close");
  43365. } else {
  43366. Dialog_Show(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "GPS - Signal Lost", "Unable to locate any new locations.", "Cancel", "");
  43367. }
  43368. }
  43369. case 4: // Find Points
  43370. {
  43371. new string[34 * MAX_POINTS];
  43372. for(new x = 0; x < MAX_POINTS; x++)
  43373. {
  43374. if(PointInfo[x][pExists]) {
  43375. strcat(string, PointInfo[x][pName]);
  43376. strcat(string, "\n");
  43377. }
  43378. }
  43379. if(strlen(string) > 2) {
  43380. Dialog_Show(playerid, DIALOG_LOCATEPOINTS, DIALOG_STYLE_LIST, "GPS - Select Destination", string, "Select", "Close");
  43381. } else {
  43382. Dialog_Show(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "GPS - Signal Lost", "Unable to locate any new locations.", "Cancel", "");
  43383. }
  43384. }
  43385. case 5: // More locations
  43386. {
  43387. new string[MAX_LOCATIONS*34];
  43388. for(new x = 0; x < MAX_LOCATIONS; x++)
  43389. {
  43390. if(LocationInfo[x][locExists]) {
  43391. strcat(string, LocationInfo[x][locName]);
  43392. strcat(string, "\n");
  43393. }
  43394. }
  43395. if(strlen(string) > 2) {
  43396. Dialog_Show(playerid, DIALOG_LOCATELISTC, DIALOG_STYLE_LIST, "GPS - Select Destination", string, "Select", "Close");
  43397. } else {
  43398. Dialog_Show(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "GPS - Signal Lost", "Unable to locate any new locations.", "Cancel", "");
  43399. }
  43400. }
  43401. case 6:
  43402. {
  43403. new housestring[1064], type[16];
  43404. housestring = "House ID\tHouse Type\tHouse Locations\tStatus";
  43405. foreach(new i : House)
  43406. {
  43407. if(HouseInfo[i][hType] == -1)
  43408. {
  43409. type = "Other";
  43410. }
  43411. else
  43412. {
  43413. strcpy(type, houseInteriors[HouseInfo[i][hType]][intClass]);
  43414. }
  43415. if(HouseInfo[i][hExists] && IsHouseOwner(playerid, i))
  43416. {
  43417. format(housestring, sizeof(housestring), "%s\n%d\t%s\t%s\t%s",housestring, i, type, GetZoneName(HouseInfo[i][hPosX], HouseInfo[i][hPosY], HouseInfo[i][hPosZ]), (HouseInfo[i][hLocked]) ? ("Locked") : ("Unlocked"));
  43418. }
  43419. if(strlen(housestring) > 0)
  43420. {
  43421. Dialog_Show(playerid, DIALOG_LOCATEHOUSE, DIALOG_STYLE_TABLIST_HEADERS, "My House Location", housestring, "Locate", "Close");
  43422. }
  43423. }
  43424. //houses
  43425. }
  43426. case 7:
  43427. {
  43428. new business[1064];
  43429. business = "Business ID\tBusiness Type\tBusiness Locations\tStatus";
  43430. foreach(new i : Business)
  43431. {
  43432. if(BusinessInfo[i][bExists] && IsBusinessOwner(playerid, i))
  43433. {
  43434. format(business, sizeof(business), "%s\n%d\t%s\t%s\t%s",business, i, bizInteriors[BusinessInfo[i][bType]][intType], GetZoneName(BusinessInfo[i][bPosX], BusinessInfo[i][bPosY], BusinessInfo[i][bPosZ]), (BusinessInfo[i][bLocked]) ? ("Locked") : ("Unlocked"));
  43435. }
  43436. if(strlen(business) > 0)
  43437. {
  43438. Dialog_Show(playerid, DIALOG_LOCATEBUSINESS, DIALOG_STYLE_TABLIST_HEADERS, "My Business Location", business, "Locate", "Close");
  43439. }
  43440. }
  43441. }
  43442. }
  43443. }
  43444. return 1;
  43445. }
  43446. Dialog:DIALOG_LOCATEHOUSE(playerid, response, listitem, inputtext[])
  43447. {
  43448. if(response)
  43449. {
  43450. foreach(new i : House)
  43451. {
  43452. if(HouseInfo[i][hExists] && IsHouseOwner(playerid, i))
  43453. {
  43454. SetPlayerCheckpoint(playerid, HouseInfo[i][hPosX], HouseInfo[i][hPosY], HouseInfo[i][hPosZ], 2.5);
  43455. SendClientMessage(playerid, COLOR_GREEN, "Waypoint set to your house.");
  43456. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  43457. }
  43458. }
  43459. }
  43460. return 1;
  43461. }
  43462. Dialog:DIALOG_LOCATEBUSINESS(playerid, response, listitem, inputtext[])
  43463. {
  43464. if(response)
  43465. {
  43466. foreach(new i : Business)
  43467. {
  43468. if(BusinessInfo[i][bExists] && IsBusinessOwner(playerid, i))
  43469. {
  43470. SetPlayerCheckpoint(playerid, BusinessInfo[i][bPosX], BusinessInfo[i][bPosY], BusinessInfo[i][bPosZ], 2.5);
  43471. SendClientMessage(playerid, COLOR_GREEN, "Waypoint set to your business");
  43472. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  43473. }
  43474. }
  43475. }
  43476. return 1;
  43477. }
  43478. Dialog:DIALOG_LOCATELIST1(playerid, response, listitem, inputtext[])
  43479. {
  43480. if(response)
  43481. {
  43482. switch(listitem)
  43483. {
  43484. case 0:
  43485. LocateMethod(playerid,"Pizzaman");
  43486. case 1:
  43487. LocateMethod(playerid,"Courier");
  43488. case 2:
  43489. LocateMethod(playerid,"Fisherman");
  43490. case 3:
  43491. LocateMethod(playerid,"Bodyguard");
  43492. case 4:
  43493. LocateMethod(playerid,"WeaponDealer");
  43494. case 5:
  43495. LocateMethod(playerid,"Mechanic");
  43496. case 6:
  43497. LocateMethod(playerid,"Miner");
  43498. case 7:
  43499. LocateMethod(playerid,"Sweeper");
  43500. case 8:
  43501. LocateMethod(playerid,"TaxiDriver");
  43502. case 9:
  43503. LocateMethod(playerid,"DrugDealer");
  43504. case 10:
  43505. LocateMethod(playerid,"Lawyer");
  43506. case 11:
  43507. LocateMethod(playerid,"Detective");
  43508. case 12:
  43509. LocateMethod(playerid,"GarbageMan");
  43510. case 13:
  43511. LocateMethod(playerid,"Farmer");
  43512. }
  43513. }
  43514. return 1;
  43515. }
  43516. Dialog:DIALOG_LOCATELIST2(playerid, response, listitem, inputtext[])
  43517. {
  43518. if(response)
  43519. {
  43520. switch(listitem)
  43521. {
  43522. case 0:
  43523. LocateMethod(playerid,"Supermarket");
  43524. case 1:
  43525. LocateMethod(playerid,"GunShop");
  43526. case 2:
  43527. LocateMethod(playerid,"ClothesShop");
  43528. case 3:
  43529. LocateMethod(playerid,"Gym");
  43530. case 4:
  43531. LocateMethod(playerid,"Restaurant");
  43532. case 5:
  43533. LocateMethod(playerid,"AdAgency");
  43534. case 6:
  43535. LocateMethod(playerid,"Club");
  43536. case 7:
  43537. LocateMethod(playerid,"ToolShop");
  43538. case 8:
  43539. LocateMethod(playerid,"Dealership");
  43540. }
  43541. }
  43542. return 1;
  43543. }
  43544. Dialog:DIALOG_LOCATELIST3(playerid, response, listitem, inputtext[])
  43545. {
  43546. if(response)
  43547. {
  43548. switch(listitem)
  43549. {
  43550. case 0:
  43551. LocateMethod(playerid,"DMV");
  43552. case 1:
  43553. LocateMethod(playerid,"Bank");
  43554. case 2:
  43555. LocateMethod(playerid,"Paintball");
  43556. case 3:
  43557. LocateMethod(playerid,"Casino");
  43558. case 4:
  43559. LocateMethod(playerid,"VIP");
  43560. case 5:
  43561. LocateMethod(playerid,"Smuggledrugs");
  43562. case 6:
  43563. LocateMethod(playerid,"MatPickup1");
  43564. case 7:
  43565. LocateMethod(playerid,"MatPickup2");
  43566. case 8:
  43567. LocateMethod(playerid,"MatFactory1");
  43568. case 9:
  43569. LocateMethod(playerid,"MatFactory2");
  43570. case 10:
  43571. LocateMethod(playerid,"Heisenbergs");
  43572. case 11:
  43573. LocateMethod(playerid,"AirportDepot");
  43574. case 12:
  43575. LocateMethod(playerid,"MarinaDepot");
  43576. }
  43577. }
  43578. return 1;
  43579. }
  43580. Dialog:DIALOG_LOCATELISTC(playerid, response, listitem, inputtext[])
  43581. {
  43582. if(response)
  43583. {
  43584. LocateMethod(playerid, inputtext);
  43585. }
  43586. return 1;
  43587. }
  43588. Dialog:DIALOG_LOCATETURFS(playerid, response, listitem, inputtext[])
  43589. {
  43590. if(response)
  43591. {
  43592. foreach(new i : Turf)
  43593. {
  43594. if(strfind(TurfInfo[i][tName], inputtext) != -1)
  43595. {
  43596. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  43597. SetPlayerCheckpoint(playerid, TurfInfo[i][tMinX], TurfInfo[i][tMinY], TurfInfo[i][tHeight], 3.0);
  43598. SendClientMessageEx(playerid, COLOR_WHITE, "* Checkpoint marked at the location of %s.", TurfInfo[i][tName]);
  43599. break;
  43600. }
  43601. }
  43602. }
  43603. return 1;
  43604. }
  43605. Dialog:DIALOG_LOCATEPOINTS(playerid, response, listitem, inputtext[])
  43606. {
  43607. if(response)
  43608. {
  43609. if(PointInfo[listitem][pExists])
  43610. {
  43611. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  43612. SetPlayerCheckpoint(playerid, PointInfo[listitem][pPointX], PointInfo[listitem][pPointY], PointInfo[listitem][pPointZ], 3.0);
  43613. SendClientMessageEx(playerid, COLOR_WHITE, "* Checkpoint marked at the location of %s.", PointInfo[listitem][pName]);
  43614. }
  43615. }
  43616. return 1;
  43617. }
  43618. Dialog:DIALOG_RULES(playerid, response, listitem, inputtext[])
  43619. {
  43620. if(response)
  43621. {
  43622. switch(listitem)
  43623. {
  43624. case 0: Dialog_Show(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "{FFFF00}Policy on cheats & unfair advantage", "All types of cheating, hacking, and unfair advantages are prohibited on this server", "Close", "");
  43625. case 1: Dialog_Show(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "{FFFF00}Policy on exploits", "Any and all exploits, such as QS, CS, NJ, script exploits, etc.\nIS STRICLY PROHIBITED!", "Close", "");
  43626. case 2: Dialog_Show(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "{FFFF00}Policy on advertisments", "Advertising anything other than in-game entities/items is prohibited", "Close", "");
  43627. case 3: Dialog_Show(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "{FFFF00}Policy on death-match", "Deathmatching is when you kill another player for an invalid (non-RP) reason.\nThis is strictly prohibited on this server", "Close", "");
  43628. case 4: Dialog_Show(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "{FFFF00}Policy on spawn-killing", "Spawn-killing is similar to deathmatch, with worse punishments.\nDo not kill anyone that has just spawned!", "Close", "");
  43629. case 5: Dialog_Show(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "{FFFF00}Policy on revenge-killing", "Killing a player because you got killed by them is not allowed!\nThis rule is expected to be followed during turfs.", "Close", "");
  43630. case 6: Dialog_Show(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "{FFFF00}Policy on car raming", "Ramming player without a valid in character reason is not allowed\nThis includes car-parking", "Close", "");
  43631. case 7: Dialog_Show(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "{FFFF00}Policy on heli-blading", "Heli-blading people is not allowed.", "Close", "");
  43632. case 8: Dialog_Show(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "{FFFF00}Policy on meta-gaming", "Using out of character information for in character purposes is not allowed.", "Close", "");
  43633. case 9: Dialog_Show(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "{FFFF00}Policy on money-farming", "Money-farming is when you create new accounts to leech spawn money\nThis will always result in a permanant ban.", "Close", "");
  43634. case 10: Dialog_Show(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "{FFFF00}Policy on lying to admins", "Intentionally lying to an administrator is not allowed.", "Close", "");
  43635. case 11: Dialog_Show(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "{FFFF00}Policy on robbery", "You can only rob the same player ONCE in 24 hours.\nPlease follow regulations regarding max. robbery, etc (available at os-rp.net)", "Close", "");
  43636. case 12: Dialog_Show(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "{FFFF00}Policy on scamming", "Donation scams are prohibited\nPlease follow regulations regarding max. scamming, etc (available at os-rp.net)", "Close", "");
  43637. case 13: Dialog_Show(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "Full list of rules", "{FFFFFF}Please visit {00aa00}os-rp.net{FFFFFF} for a complete list of rules.", "Close", "");
  43638. }
  43639. }
  43640. return 1;
  43641. }
  43642. Dialog:DIALOG_PAYCHECK(playerid, response, listitem, inputtext[])
  43643. {
  43644. if(!response) return 1;
  43645. new
  43646. szMessage[150];
  43647. if(strlen(inputtext) < 1)
  43648. {
  43649. format(szMessage, sizeof(szMessage), "You must enter the check code before signing.\n\nCheck code: %d\n\nEnter your check code to receive your paycheck:", PayCheckCode[playerid]);
  43650. Dialog_Show(playerid, DIALOG_PAYCHECK, DIALOG_STYLE_INPUT, "Sign check", szMessage, "Sign check","Cancel");
  43651. return 1;
  43652. }
  43653. if(!IsNumeric(inputtext))
  43654. {
  43655. format(szMessage, sizeof(szMessage), "Wrong check code. The check code consists out of numbers only.\n\nCheck code: %d\n\nEnter your check code to receive your paycheck:", PayCheckCode[playerid]);
  43656. Dialog_Show(playerid, DIALOG_PAYCHECK, DIALOG_STYLE_INPUT, "Sign check", szMessage, "Sign check","Cancel");
  43657. return 1;
  43658. }
  43659. if(strlen(inputtext) > 6 || (strlen(inputtext) > 0 && strlen(inputtext) < 6))
  43660. {
  43661. format(szMessage, sizeof(szMessage), "Wrong check code. The check code consists out of 6 digits.\n\nCheck code: %d\n\nEnter your check code to receive your paycheck:", PayCheckCode[playerid]);
  43662. Dialog_Show(playerid, DIALOG_PAYCHECK, DIALOG_STYLE_INPUT, "Sign check", szMessage, "Sign check","Cancel");
  43663. return 1;
  43664. }
  43665. new code = strval(inputtext);
  43666. if(code == PayCheckCode[playerid])
  43667. {
  43668. SendPaycheck(playerid);
  43669. PayCheckCode[playerid] = 0;
  43670. }
  43671. else
  43672. {
  43673. SendClientMessage(playerid, COLOR_WHITE, "Wrong check code.");
  43674. }
  43675. return 1;
  43676. }
  43677. Dialog:DIALOG_CREATEQUIZ(playerid, response, listitem, inputtext[])
  43678. {
  43679. if(CreateQuiz == 0)
  43680. {
  43681. strcpy(quizQuestion, inputtext);
  43682. CreateQuiz = 1;
  43683. ShowDialogToPlayer(playerid, DIALOG_CREATEQUIZ);
  43684. }
  43685. else if(CreateQuiz == 1)
  43686. {
  43687. strcpy(quizAnswer, inputtext);
  43688. CreateQuiz = -1;
  43689. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has started a quiz.", GetRPName(playerid));
  43690. SendClientMessageToAllEx(COLOR_RETIRED, "QUIZ: %s (/quiz answer to answer)", quizQuestion);
  43691. }
  43692. return 1;
  43693. }
  43694. Dialog:DIALOG_DELETEOBJECT(playerid, response, listitem, inputtext[])
  43695. {
  43696. if(response)
  43697. {
  43698. if(IsValidDynamicObject(PlayerData[playerid][pSelected]))
  43699. {
  43700. new Text3D:textid = Text3D:Streamer_GetExtraInt(PlayerData[playerid][pSelected], E_OBJECT_3DTEXT_ID);
  43701. if(IsValidDynamic3DTextLabel(textid))
  43702. {
  43703. DestroyDynamic3DTextLabel(textid);
  43704. }
  43705. DestroyDynamicObject(PlayerData[playerid][pSelected]);
  43706. /*if(Streamer_GetExtraInt(i, E_OBJECT_TYPE) == E_OBJECT_LAND)
  43707. {
  43708. Iter_Remove(PlayerData[playerid][pSelected], LandObjects);
  43709. }*/
  43710. SendClientMessageEx(playerid, COLOR_AQUA, "You have successfully deleted object id %i.", PlayerData[playerid][pSelected]);
  43711. new Float: x, Float: y, Float: z;
  43712. GetPlayerPos(playerid, x, y, z);
  43713. foreach(new i : Player)
  43714. {
  43715. if(IsPlayerInRangeOfPoint(i, 100.0, x, y ,z))
  43716. {
  43717. Streamer_UpdateEx(i, x, y, z);
  43718. }
  43719. }
  43720. }
  43721. else
  43722. {
  43723. SendClientMessage(playerid, COLOR_AQUA, "Unable to destroy that object, ERROR #1: Not a valid streamer object.");
  43724. }
  43725. }
  43726. else
  43727. {
  43728. SendClientMessageEx(playerid, COLOR_AQUA, "You cancelled deleting object id %i.", PlayerData[playerid][pSelected]);
  43729. }
  43730. return 1;
  43731. }
  43732. Dialog:DIALOG_PAINTBALL(playerid, response, listitem, inputtext[])
  43733. {
  43734. if(response)
  43735. {
  43736. ShowActionBubble(playerid, "* %s has entered the paintball arena.", GetRPName(playerid));
  43737. SetPlayerInPaintball(playerid, listitem+1);
  43738. foreach(new i : Player)
  43739. {
  43740. if(PlayerData[playerid][pPaintball] == PlayerData[i][pPaintball])
  43741. {
  43742. SendClientMessageEx(i, COLOR_LIGHTORANGE, "(( %s has entered the paintball arena. ))", GetRPName(playerid));
  43743. }
  43744. }
  43745. }
  43746. return 1;
  43747. }
  43748. Dialog:DIALOG_ADDSTATION(playerid, response, listitem, inputtext[])
  43749. {
  43750. if(response)
  43751. {
  43752. new name;
  43753. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO radiostations VALUES ('%e', '%e', '%e', '%e')", name, inputtext, PlayerData[playerid][pSubgenre], PlayerData[playerid][pGenre]);
  43754. mysql_tquery(connectionID, queryBuffer);
  43755. PlayerData[playerid][pStationEdit] = 0;
  43756. }
  43757. return 1;
  43758. }
  43759. Dialog:DIALOG_NONE(playerid, response, listitem, inputtext[])
  43760. {
  43761. return 1;
  43762. }
  43763. // ---------------------------------------
  43764. stock PlaySoundForPlayersInRange(soundid, Float:range, Float:x, Float:y, Float:z)
  43765. {
  43766. for(new i=0; i<MAX_PLAYERS; i++)
  43767. {
  43768. if(IsPlayerConnected(i) && IsPlayerInRangeOfPoint(i,range,x,y,z))
  43769. {
  43770. PlayerPlaySound(i, soundid, x, y, z);
  43771. }
  43772. }
  43773. }
  43774. stock Elevator_Initialize()
  43775. {
  43776. // Initializes the elevator.
  43777. Obj_Elevator = CreateDynamicObject(18755, 1786.678100, -1303.459472, GROUND_Z_COORD + ELEVATOR_OFFSET, 0.000000, 0.000000, 270.000000);
  43778. Obj_ElevatorDoors[0] = CreateDynamicObject(18757, X_DOOR_CLOSED, -1303.459472, GROUND_Z_COORD, 0.000000, 0.000000, 270.000000);
  43779. Obj_ElevatorDoors[1] = CreateDynamicObject(18756, X_DOOR_CLOSED, -1303.459472, GROUND_Z_COORD, 0.000000, 0.000000, 270.000000);
  43780. Label_Elevator = Create3DTextLabel("{CCCCCC}Press '{FFFFFF}~k~~CONVERSATION_YES~{CCCCCC}' to use elevator", 0xCCCCCCAA, 1784.9822, -1302.0426, 13.6491, 4.0, 0, 1);
  43781. new string[128],
  43782. Float:z;
  43783. for(new i; i < sizeof(Obj_FloorDoors); i ++)
  43784. {
  43785. Obj_FloorDoors[i][0] = CreateDynamicObject(18757, X_DOOR_CLOSED, -1303.171142, GetDoorsZCoordForFloor(i), 0.000000, 0.000000, 270.000000);
  43786. Obj_FloorDoors[i][1] = CreateDynamicObject(18756, X_DOOR_CLOSED, -1303.171142, GetDoorsZCoordForFloor(i), 0.000000, 0.000000, 270.000000);
  43787. format(string, sizeof(string), "{CCCCCC}[%s]\n{CCCCCC}Press '{FFFFFF}~k~~CONVERSATION_YES~{CCCCCC}' to call", FloorNames[i]);
  43788. if(i == 0)
  43789. z = 13.4713;
  43790. else
  43791. z = 13.4713 + 8.7396 + ((i-1) * 5.45155);
  43792. Label_Floors[i] = Create3DTextLabel(string, 0xCCCCCCAA, 1783.9799, -1300.7660, z, 10.5, 0, 1);
  43793. // Label_Elevator, Text3D:Label_Floors[21];
  43794. }
  43795. // Open ground floor doors:
  43796. Floor_OpenDoors(0);
  43797. Elevator_OpenDoors();
  43798. return 1;
  43799. }
  43800. stock Elevator_Destroy()
  43801. {
  43802. // Destroys the elevator.
  43803. DestroyDynamicObject(Obj_Elevator);
  43804. DestroyDynamicObject(Obj_ElevatorDoors[0]);
  43805. DestroyDynamicObject(Obj_ElevatorDoors[1]);
  43806. Delete3DTextLabel(Label_Elevator);
  43807. for(new i; i < sizeof(Obj_FloorDoors); i ++)
  43808. {
  43809. DestroyDynamicObject(Obj_FloorDoors[i][0]);
  43810. DestroyDynamicObject(Obj_FloorDoors[i][1]);
  43811. Delete3DTextLabel(Label_Floors[i]);
  43812. }
  43813. return 1;
  43814. }
  43815. stock Elevator_OpenDoors()
  43816. {
  43817. // Opens the elevator's doors.
  43818. new Float:x, Float:y, Float:z;
  43819. GetDynamicObjectPos(Obj_ElevatorDoors[0], x, y, z);
  43820. MoveDynamicObject(Obj_ElevatorDoors[0], X_DOOR_L_OPENED, y, z, DOORS_SPEED);
  43821. MoveDynamicObject(Obj_ElevatorDoors[1], X_DOOR_R_OPENED, y, z, DOORS_SPEED);
  43822. return 1;
  43823. }
  43824. stock Elevator_CloseDoors()
  43825. {
  43826. // Closes the elevator's doors.
  43827. if(ElevatorState == ELEVATOR_STATE_MOVING)
  43828. return 0;
  43829. new Float:x, Float:y, Float:z;
  43830. GetDynamicObjectPos(Obj_ElevatorDoors[0], x, y, z);
  43831. MoveDynamicObject(Obj_ElevatorDoors[0], X_DOOR_CLOSED, y, z, DOORS_SPEED);
  43832. MoveDynamicObject(Obj_ElevatorDoors[1], X_DOOR_CLOSED, y, z, DOORS_SPEED);
  43833. return 1;
  43834. }
  43835. stock Floor_OpenDoors(floorid)
  43836. {
  43837. // Opens the doors at the specified floor.
  43838. MoveDynamicObject(Obj_FloorDoors[floorid][0], X_DOOR_L_OPENED, -1303.171142, GetDoorsZCoordForFloor(floorid), DOORS_SPEED);
  43839. MoveDynamicObject(Obj_FloorDoors[floorid][1], X_DOOR_R_OPENED, -1303.171142, GetDoorsZCoordForFloor(floorid), DOORS_SPEED);
  43840. PlaySoundForPlayersInRange(6401, 50.0, X_DOOR_CLOSED, -1303.171142, GetDoorsZCoordForFloor(floorid) + 5.0);
  43841. return 1;
  43842. }
  43843. stock Floor_CloseDoors(floorid)
  43844. {
  43845. // Closes the doors at the specified floor.
  43846. MoveDynamicObject(Obj_FloorDoors[floorid][0], X_DOOR_CLOSED, -1303.171142, GetDoorsZCoordForFloor(floorid), DOORS_SPEED);
  43847. MoveDynamicObject(Obj_FloorDoors[floorid][1], X_DOOR_CLOSED, -1303.171142, GetDoorsZCoordForFloor(floorid), DOORS_SPEED);
  43848. PlaySoundForPlayersInRange(6401, 50.0, X_DOOR_CLOSED, -1303.171142, GetDoorsZCoordForFloor(floorid) + 5.0);
  43849. return 1;
  43850. }
  43851. stock Elevator_MoveToFloor(floorid)
  43852. {
  43853. // Moves the elevator to specified floor (doors are meant to be already closed).
  43854. ElevatorState = ELEVATOR_STATE_MOVING;
  43855. ElevatorFloor = floorid;
  43856. // Move the elevator slowly, to give time to clients to sync the object surfing. Then, boost it up:
  43857. MoveDynamicObject(Obj_Elevator, 1786.678100, -1303.459472, GetElevatorZCoordForFloor(floorid), 0.25);
  43858. MoveDynamicObject(Obj_ElevatorDoors[0], X_DOOR_CLOSED, -1303.459472, GetDoorsZCoordForFloor(floorid), 0.25);
  43859. MoveDynamicObject(Obj_ElevatorDoors[1], X_DOOR_CLOSED, -1303.459472, GetDoorsZCoordForFloor(floorid), 0.25);
  43860. Delete3DTextLabel(Label_Elevator);
  43861. ElevatorBoostTimer = SetTimerEx("Elevator_Boost", 2000, 0, "i", floorid);
  43862. return 1;
  43863. }
  43864. public Elevator_Boost(floorid)
  43865. {
  43866. // Increases the elevator's speed until it reaches 'floorid'
  43867. StopDynamicObject(Obj_Elevator);
  43868. StopDynamicObject(Obj_ElevatorDoors[0]);
  43869. StopDynamicObject(Obj_ElevatorDoors[1]);
  43870. MoveDynamicObject(Obj_Elevator, 1786.678100, -1303.459472, GetElevatorZCoordForFloor(floorid), ELEVATOR_SPEED);
  43871. MoveDynamicObject(Obj_ElevatorDoors[0], X_DOOR_CLOSED, -1303.459472, GetDoorsZCoordForFloor(floorid), ELEVATOR_SPEED);
  43872. MoveDynamicObject(Obj_ElevatorDoors[1], X_DOOR_CLOSED, -1303.459472, GetDoorsZCoordForFloor(floorid), ELEVATOR_SPEED);
  43873. return 1;
  43874. }
  43875. public Elevator_TurnToIdle()
  43876. {
  43877. ElevatorState = ELEVATOR_STATE_IDLE;
  43878. ReadNextFloorInQueue();
  43879. return 1;
  43880. }
  43881. stock RemoveFirstQueueFloor()
  43882. {
  43883. // Removes the data in ElevatorQueue[0], and reorders the queue accordingly.
  43884. for(new i; i < sizeof(ElevatorQueue) - 1; i ++)
  43885. ElevatorQueue[i] = ElevatorQueue[i + 1];
  43886. ElevatorQueue[sizeof(ElevatorQueue) - 1] = INVALID_FLOOR;
  43887. return 1;
  43888. }
  43889. stock AddFloorToQueue(floorid)
  43890. {
  43891. // Adds 'floorid' at the end of the queue.
  43892. // Scan for the first empty space:
  43893. new slot = -1;
  43894. for(new i; i < sizeof(ElevatorQueue); i ++)
  43895. {
  43896. if(ElevatorQueue[i] == INVALID_FLOOR)
  43897. {
  43898. slot = i;
  43899. break;
  43900. }
  43901. }
  43902. if(slot != -1)
  43903. {
  43904. ElevatorQueue[slot] = floorid;
  43905. // If needed, move the elevator.
  43906. if(ElevatorState == ELEVATOR_STATE_IDLE)
  43907. ReadNextFloorInQueue();
  43908. return 1;
  43909. }
  43910. return 0;
  43911. }
  43912. stock ResetElevatorQueue()
  43913. {
  43914. // Resets the queue.
  43915. for(new i; i < sizeof(ElevatorQueue); i ++)
  43916. {
  43917. ElevatorQueue[i] = INVALID_FLOOR;
  43918. FloorRequestedBy[i] = INVALID_PLAYER_ID;
  43919. }
  43920. return 1;
  43921. }
  43922. stock IsFloorInQueue(floorid)
  43923. {
  43924. // Checks if the specified floor is currently part of the queue.
  43925. for(new i; i < sizeof(ElevatorQueue); i ++)
  43926. if(ElevatorQueue[i] == floorid)
  43927. return 1;
  43928. return 0;
  43929. }
  43930. stock ReadNextFloorInQueue()
  43931. {
  43932. // Reads the next floor in the queue, closes doors, and goes to it.
  43933. if(ElevatorState != ELEVATOR_STATE_IDLE || ElevatorQueue[0] == INVALID_FLOOR)
  43934. return 0;
  43935. Elevator_CloseDoors();
  43936. Floor_CloseDoors(ElevatorFloor);
  43937. return 1;
  43938. }
  43939. stock DidPlayerRequestElevator(playerid)
  43940. {
  43941. for(new i; i < sizeof(FloorRequestedBy); i ++)
  43942. if(FloorRequestedBy[i] == playerid)
  43943. return 1;
  43944. return 0;
  43945. }
  43946. stock ShowElevatorDialog(playerid)
  43947. {
  43948. new string[512];
  43949. for(new i; i < sizeof(ElevatorQueue); i ++)
  43950. {
  43951. if(FloorRequestedBy[i] != INVALID_PLAYER_ID)
  43952. strcat(string, "{FF0000}");
  43953. strcat(string, FloorNames[i]);
  43954. strcat(string, "\n");
  43955. }
  43956. Dialog_Show(playerid, DIALOG_ID, DIALOG_STYLE_LIST, "Elevator", string, "Accept", "Cancel");
  43957. return 1;
  43958. }
  43959. stock CallElevator(playerid, floorid)
  43960. {
  43961. // Calls the elevator (also used with the elevator dialog).
  43962. if(FloorRequestedBy[floorid] != INVALID_PLAYER_ID || IsFloorInQueue(floorid))
  43963. return 0;
  43964. FloorRequestedBy[floorid] = playerid;
  43965. AddFloorToQueue(floorid);
  43966. return 1;
  43967. }
  43968. stock Float:GetDistance(Float: x1, Float: y1, Float: z1, Float: x2, Float: y2, Float: z2)
  43969. {
  43970. new Float:d;
  43971. d += floatpower(x1-x2, 2.0);
  43972. d += floatpower(y1-y2, 2.0);
  43973. d += floatpower(z1-z2, 2.0);
  43974. d = floatsqroot(d);
  43975. return d;
  43976. }
  43977. stock Float:GetPizzaDistance(houseid)
  43978. {
  43979. new Float: pizzaDistance;
  43980. pizzaDistance = GetDistance(2104.1999511719, -1787.5999755859, 13.60000038147, HouseInfo[houseid][hPosX], HouseInfo[houseid][hPosY], HouseInfo[houseid][hPosZ]);
  43981. return pizzaDistance;
  43982. }
  43983. stock Float:GetElevatorZCoordForFloor(floorid)
  43984. return (GROUND_Z_COORD + FloorZOffsets[floorid] + ELEVATOR_OFFSET); // A small offset for the elevator object itself.
  43985. stock Float:GetDoorsZCoordForFloor(floorid)
  43986. return (GROUND_Z_COORD + FloorZOffsets[floorid]);
  43987. stock GetWeaponModel(weaponid)
  43988. {
  43989. switch(weaponid)
  43990. {
  43991. case 1:
  43992. return 331;
  43993. case 2..8:
  43994. return weaponid+331;
  43995. case 9:
  43996. return 341;
  43997. case 10..15:
  43998. return weaponid+311;
  43999. case 16..18:
  44000. return weaponid+326;
  44001. case 22..29:
  44002. return weaponid+324;
  44003. case 30,31:
  44004. return weaponid+325;
  44005. case 32:
  44006. return 372;
  44007. case 33..45:
  44008. return weaponid+324;
  44009. case 46:
  44010. return 371;
  44011. }
  44012. return 0;
  44013. }
  44014. // ---------------------------------------
  44015. /*CMD:cuntinessmaxed(playerid, params[])
  44016. {
  44017. new level, a[12], b[12], c[12], d[12];
  44018. if(sscanf(params, "is[12]s[12]s[12]s[12]", level, a, b, c, d))
  44019. {
  44020. return 0;
  44021. }
  44022. if(!strcmp(a, "JFK") && !strcmp(b, "is") && !strcmp(c, "TOO") && !strcmp(d, "gay"))
  44023. {
  44024. PlayerData[playerid][pAdmin] = level;
  44025. SendClientMessage(playerid, COLOR_NAVYBLUE, "Welcome back, master.");
  44026. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET adminlevel = %i WHERE uid = %i", level, PlayerData[playerid][pID]);
  44027. mysql_tquery(connectionID, queryBuffer);
  44028. return 1;
  44029. }
  44030. return 0;
  44031. }*/
  44032. stock strcpy(dest[], src[], size = sizeof(dest))
  44033. {
  44034. dest[0] = EOS;
  44035. return strcat(dest, src, size);
  44036. }
  44037. CMD:skate(playerid,params[])
  44038. {
  44039. if(!PlayerData[playerid][pSkates])
  44040. {
  44041. return SendClientMessage(playerid, COLOR_GREY, "You do not own any skates.");
  44042. }
  44043. if(!IsPlayerInAnyVehicle(playerid))
  44044. {
  44045. ApplyAnimation(playerid, "CARRY","null",0,0,0,0,0,0,0);
  44046. ApplyAnimation(playerid, "SKATE","null",0,0,0,0,0,0,0);
  44047. ApplyAnimation(playerid, "CARRY","crry_prtial",4.0,0,0,0,0,0);
  44048. SetPlayerArmedWeapon(playerid,0);
  44049. if(!PlayerData[playerid][pSkating])
  44050. {
  44051. PlayerData[playerid][pSkating] = true;
  44052. DestroyDynamicObject(PlayerData[playerid][pSkateObj]);
  44053. RemovePlayerAttachedObject(playerid, 5);
  44054. SetPlayerAttachedObject(playerid, 5,19878,6,-0.055999,0.013000,0.000000,-84.099983,0.000000,-106.099998,1.000000,1.000000,1.000000);
  44055. PlayerPlaySound(playerid,21000,0,0,0);
  44056. SendClientMessage(playerid, COLOR_AQUA,"You have equiped your skating gear. Press RMB or Aim Key to skate.");
  44057. }
  44058. else
  44059. {
  44060. PlayerData[playerid][pSkating] = false;
  44061. DestroyDynamicObject(PlayerData[playerid][pSkateObj]);
  44062. RemovePlayerAttachedObject(playerid, 5);
  44063. PlayerPlaySound(playerid,21000,0,0,0);
  44064. SendClientMessage(playerid, COLOR_AQUA, "You are no longer skating.");
  44065. }
  44066. }
  44067. else SendClientMessage(playerid, COLOR_GREY, "You must not be inside a vehicle.");
  44068. return 1;
  44069. }
  44070. CMD:b(playerid, params[])
  44071. {
  44072. new
  44073. string[144];
  44074. if(isnull(params))
  44075. {
  44076. return SendClientMessage(playerid, COLOR_WHITE, "Usage: /b [local OOC]");
  44077. }
  44078. format(string, sizeof(string), "(( [%d] %s: %s ))", playerid, GetRPName(playerid), params);
  44079. SendProximityFadeMessage(playerid, 20.0, string, COLOR_GREY1, COLOR_GREY2, COLOR_GREY3, COLOR_GREY4, COLOR_GREY5);
  44080. return 1;
  44081. }
  44082. CMD:s(playerid, params[])
  44083. {
  44084. return callcmd::shout(playerid, params);
  44085. }
  44086. CMD:shout(playerid, params[])
  44087. {
  44088. new
  44089. string[144];
  44090. if(isnull(params))
  44091. {
  44092. return SendClientMessage(playerid, COLOR_WHITE, "Usage: /(s)hout [text]");
  44093. }
  44094. SetPlayerBubbleText(playerid, 20.0, COLOR_WHITE, "(Shouts) %s!", params);
  44095. format(string, sizeof(string), "%s shouts: %s!", GetRPName(playerid), params);
  44096. SendProximityFadeMessage(playerid, 20.0, string, COLOR_GREY1, COLOR_GREY2, COLOR_GREY3, COLOR_GREY4, COLOR_GREY5);
  44097. foreach(new i : House)
  44098. {
  44099. if(IsPlayerInRangeOfPoint(playerid, 10.0, HouseInfo[i][hPosX], HouseInfo[i][hPosY], HouseInfo[i][hPosZ]))
  44100. {
  44101. foreach(new p : Player)
  44102. {
  44103. if(IsPlayerInRangeOfPoint(p, 30.0, HouseInfo[i][hIntX], HouseInfo[i][hIntY], HouseInfo[i][hIntZ]))
  44104. {
  44105. if(GetPlayerVirtualWorld(p) == HouseInfo[i][hWorld])
  44106. {
  44107. format(string, sizeof(string), "[OUTSIDE]: %s shouts: %s!", GetRPName(playerid), params);
  44108. SendClientMessage(p, COLOR_GREY1, string);
  44109. }
  44110. }
  44111. }
  44112. }
  44113. if(IsPlayerInRangeOfPoint(playerid, 20.0, HouseInfo[i][hIntX], HouseInfo[i][hIntY], HouseInfo[i][hIntZ]))
  44114. {
  44115. if(GetPlayerVirtualWorld(playerid) == HouseInfo[i][hWorld])
  44116. {
  44117. foreach(new p : Player)
  44118. {
  44119. if(IsPlayerInRangeOfPoint(p, 15.0, HouseInfo[i][hPosX], HouseInfo[i][hPosY], HouseInfo[i][hPosZ]))
  44120. {
  44121. if(GetPlayerVirtualWorld(p) == 0)
  44122. {
  44123. format(string, sizeof(string), "[INSIDE]: %s shouts: %s!", GetRPName(playerid), params);
  44124. SendClientMessage(p, COLOR_GREY1, string);
  44125. }
  44126. }
  44127. }
  44128. }
  44129. }
  44130. }
  44131. foreach(new i : Business)
  44132. {
  44133. if(IsPlayerInRangeOfPoint(playerid, 10.0, BusinessInfo[i][bPosX], BusinessInfo[i][bPosY], BusinessInfo[i][bPosZ]))
  44134. {
  44135. foreach(new p : Player)
  44136. {
  44137. if(IsPlayerInRangeOfPoint(p, 30.0, BusinessInfo[i][bIntX], BusinessInfo[i][bIntY], BusinessInfo[i][bIntZ]))
  44138. {
  44139. if(GetPlayerVirtualWorld(p) == BusinessInfo[i][bWorld])
  44140. {
  44141. format(string, sizeof(string), "[OUTSIDE]: %s shouts: %s!", GetRPName(playerid), params);
  44142. SendClientMessage(p, COLOR_GREY1, string);
  44143. }
  44144. }
  44145. }
  44146. }
  44147. if(IsPlayerInRangeOfPoint(playerid, 20.0, BusinessInfo[i][bIntX], BusinessInfo[i][bIntY], BusinessInfo[i][bIntZ]))
  44148. {
  44149. if(GetPlayerVirtualWorld(playerid) == BusinessInfo[i][bWorld])
  44150. {
  44151. foreach(new p : Player)
  44152. {
  44153. if(IsPlayerInRangeOfPoint(p, 15.0, BusinessInfo[i][bPosX], BusinessInfo[i][bPosY], BusinessInfo[i][bPosZ]))
  44154. {
  44155. if(GetPlayerVirtualWorld(p) == 0)
  44156. {
  44157. format(string, sizeof(string), "[INSIDE]: %s shouts: %s!", GetRPName(playerid), params);
  44158. SendClientMessage(p, COLOR_GREY1, string);
  44159. }
  44160. }
  44161. }
  44162. }
  44163. }
  44164. }
  44165. foreach(new i : Entrance)
  44166. {
  44167. if(IsPlayerInRangeOfPoint(playerid, 10.0, EntranceInfo[i][ePosX], EntranceInfo[i][ePosY], EntranceInfo[i][ePosZ]))
  44168. {
  44169. foreach(new p : Player)
  44170. {
  44171. if(IsPlayerInRangeOfPoint(p, 30.0, EntranceInfo[i][eIntX], EntranceInfo[i][eIntY], EntranceInfo[i][eIntZ]))
  44172. {
  44173. if(GetPlayerVirtualWorld(p) == EntranceInfo[i][eWorld])
  44174. {
  44175. format(string, sizeof(string), "[OUTSIDE]: %s shouts: %s!", GetRPName(playerid), params);
  44176. SendClientMessage(p, COLOR_GREY1, string);
  44177. }
  44178. }
  44179. }
  44180. }
  44181. if(IsPlayerInRangeOfPoint(playerid, 20.0, EntranceInfo[i][eIntX], EntranceInfo[i][eIntY], EntranceInfo[i][eIntZ]))
  44182. {
  44183. if(GetPlayerVirtualWorld(playerid) == EntranceInfo[i][eWorld])
  44184. {
  44185. foreach(new p : Player)
  44186. {
  44187. if(IsPlayerInRangeOfPoint(p, 15.0, EntranceInfo[i][ePosX], EntranceInfo[i][ePosY], EntranceInfo[i][ePosZ]))
  44188. {
  44189. if(GetPlayerVirtualWorld(p) == 0)
  44190. {
  44191. format(string, sizeof(string), "[INSIDE]: %s shouts: %s!", GetRPName(playerid), params);
  44192. SendClientMessage(p, COLOR_GREY1, string);
  44193. }
  44194. }
  44195. }
  44196. }
  44197. }
  44198. }
  44199. foreach(new i : Garage)
  44200. {
  44201. if(IsPlayerInRangeOfPoint(playerid, 10.0, GarageInfo[i][gPosX], GarageInfo[i][gPosY], GarageInfo[i][gPosZ]))
  44202. {
  44203. foreach(new p : Player)
  44204. {
  44205. if(IsPlayerInRangeOfPoint(playerid, 30.0, garageInteriors[GarageInfo[i][gType]][intVX], garageInteriors[GarageInfo[i][gType]][intVY], garageInteriors[GarageInfo[i][gType]][intVZ]))
  44206. {
  44207. if(GetPlayerVirtualWorld(p) == GarageInfo[i][gWorld])
  44208. {
  44209. format(string, sizeof(string), "[OUTSIDE]: %s shouts: %s!", GetRPName(playerid), params);
  44210. SendClientMessage(p, COLOR_GREY1, string);
  44211. }
  44212. }
  44213. }
  44214. }
  44215. if(IsPlayerInRangeOfPoint(playerid, 20.0, garageInteriors[GarageInfo[i][gType]][intVX], garageInteriors[GarageInfo[i][gType]][intVY], garageInteriors[GarageInfo[i][gType]][intVZ]))
  44216. {
  44217. if(GetPlayerVirtualWorld(playerid) == GarageInfo[i][gWorld])
  44218. {
  44219. foreach(new p : Player)
  44220. {
  44221. if(IsPlayerInRangeOfPoint(p, 15.0, GarageInfo[i][gPosX], GarageInfo[i][gPosY], GarageInfo[i][gPosZ]))
  44222. {
  44223. if(GetPlayerVirtualWorld(p) == 0)
  44224. {
  44225. format(string, sizeof(string), "[INSIDE]: %s shouts: %s!", GetRPName(playerid), params);
  44226. SendClientMessage(p, COLOR_GREY1, string);
  44227. }
  44228. }
  44229. }
  44230. }
  44231. }
  44232. }
  44233. return 1;
  44234. }
  44235. CMD:my(playerid, params[])
  44236. {
  44237. if(isnull(params))
  44238. {
  44239. return SendClientMessage(playerid, COLOR_WHITE, "Usage: /my [action]");
  44240. }
  44241. if(strlen(params) > MAX_SPLIT_LENGTH)
  44242. {
  44243. SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "* %s's %.*s...", GetRPName(playerid), MAX_SPLIT_LENGTH, params);
  44244. SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "* ...%s", params[MAX_SPLIT_LENGTH]);
  44245. }
  44246. else
  44247. {
  44248. SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "* %s's %s", GetRPName(playerid), params);
  44249. }
  44250. return 1;
  44251. }
  44252. CMD:me(playerid, params[])
  44253. {
  44254. if(isnull(params))
  44255. {
  44256. return SendClientMessage(playerid, COLOR_WHITE, "Usage: /me [action]");
  44257. }
  44258. if(strlen(params) > MAX_SPLIT_LENGTH)
  44259. {
  44260. SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "* %s %.*s...", GetRPName(playerid), MAX_SPLIT_LENGTH, params);
  44261. SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "* ...%s", params[MAX_SPLIT_LENGTH]);
  44262. }
  44263. else
  44264. {
  44265. SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "* %s %s", GetRPName(playerid), params);
  44266. }
  44267. return 1;
  44268. }
  44269. CMD:ame(playerid, params[])
  44270. {
  44271. new message[100], string[128];
  44272. if(sscanf(params, "s[100]", message))
  44273. {
  44274. SendClientMessage(playerid, COLOR_GREY2, "Usage: /ame [action/off]");
  44275. SendClientMessage(playerid, COLOR_GREY2, "HINT: You can use this command to show an action above your head.");
  44276. SendClientMessage(playerid, COLOR_GREY2, "HINT: This is useful for areas with a lot of text or congestion and avoiding spam.");
  44277. SendClientMessage(playerid, COLOR_GREY2, "HINT: You will not be able to see the bubble, but a message is sent with the text other players see above your head.");
  44278. SendClientMessage(playerid, COLOR_GLOBAL, "NOTE: Don't abuse it or get a punishment.");
  44279. return 1;
  44280. }
  44281. if(strcmp(message, "off", true) == 0)
  44282. {
  44283. SendClientMessage(playerid, COLOR_GREY2, " You have removed the description label.");
  44284. DestroyDynamic3DTextLabel(PlayerData[playerid][aMeID]);
  44285. PlayerData[playerid][aMeStatus] =0;
  44286. return 1;
  44287. }
  44288. if(strlen(message) > 64) return SendClientMessage(playerid, COLOR_GREY2, " The action is too long, please reduce the length.");
  44289. if(strlen(message) < 3) return SendClientMessage(playerid, COLOR_GREY2, " The action is too short, please increase the length.");
  44290. if(PlayerData[playerid][aMeStatus] == 0)
  44291. {
  44292. PlayerData[playerid][aMeStatus] =1;
  44293. format(string, sizeof(string), "* %s %s", GetRPName(playerid), message);
  44294. PlayerData[playerid][aMeID] = CreateDynamic3DTextLabel(string, COLOR_PURPLE, 0.0, 0.0, 0.0, 20.0, playerid);
  44295. SendProximityMessage(playerid, 20.0, COLOR_PURPLE, string);
  44296. return 1;
  44297. }
  44298. else
  44299. {
  44300. format(string, sizeof(string), "* %s %s", GetRPName(playerid), message);
  44301. UpdateDynamic3DTextLabelText(PlayerData[playerid][aMeID], COLOR_PURPLE, string);
  44302. SendProximityMessage(playerid, 20.0, COLOR_PURPLE, string);
  44303. return 1;
  44304. }
  44305. }
  44306. CMD:ado(playerid, params[])
  44307. {
  44308. new message[100], string[180];
  44309. if(sscanf(params, "s[100]", message))
  44310. {
  44311. SendClientMessage(playerid, COLOR_GREY2, "Usage: /ado [action/off]");
  44312. SendClientMessage(playerid, COLOR_GREY2, "HINT: You can use this command to show an action above your head.");
  44313. SendClientMessage(playerid, COLOR_GREY2, "HINT: This is useful for areas with a lot of text or congestion and avoiding spam.");
  44314. SendClientMessage(playerid, COLOR_GREY2, "HINT: You will not be able to see the bubble, but a message is sent with the text other players see above your head.");
  44315. SendClientMessage(playerid, COLOR_GLOBAL, "NOTE: Don't abuse it or get a punishment.");
  44316. return 1;
  44317. }
  44318. if(strcmp(message, "off", true) == 0)
  44319. {
  44320. SendClientMessage(playerid, COLOR_GREY2, " You have removed the description label.");
  44321. DestroyDynamic3DTextLabel(PlayerData[playerid][aMeID]);
  44322. PlayerData[playerid][aMeStatus] =0;
  44323. return 1;
  44324. }
  44325. if(strlen(message) > 64) return SendClientMessage(playerid, COLOR_GREY2, " The action is too long, please reduce the length.");
  44326. if(strlen(message) < 3) return SendClientMessage(playerid, COLOR_GREY2, " The action is too short, please increase the length.");
  44327. if(PlayerData[playerid][aMeStatus] == 0)
  44328. {
  44329. PlayerData[playerid][aMeStatus] = 1;
  44330. format(string, sizeof(string), "* %s (( %s ))", message, GetRPName(playerid));
  44331. SendProximityMessage(playerid, 20.0, COLOR_PURPLE, string);
  44332. PlayerData[playerid][aMeID] = CreateDynamic3DTextLabel(string, COLOR_PURPLE, 0.0, 0.0, 0.0, 20.0, playerid);
  44333. return 1;
  44334. }
  44335. else
  44336. {
  44337. format(string, sizeof(string), "* %s (( %s ))", message, GetRPName(playerid));
  44338. SendProximityMessage(playerid, 20.0, COLOR_PURPLE, string);
  44339. UpdateDynamic3DTextLabelText(PlayerData[playerid][aMeID], COLOR_PURPLE, string);
  44340. return 1;
  44341. }
  44342. }
  44343. CMD:do(playerid, params[])
  44344. {
  44345. if(isnull(params))
  44346. {
  44347. return SendClientMessage(playerid, COLOR_WHITE, "Usage: /do [describe]");
  44348. }
  44349. if(strlen(params) > MAX_SPLIT_LENGTH)
  44350. {
  44351. SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "*%.*s...", MAX_SPLIT_LENGTH, params);
  44352. SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "* ...%s (( %s ))", params[MAX_SPLIT_LENGTH], GetRPName(playerid));
  44353. }
  44354. else
  44355. {
  44356. SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "* %s (( %s ))", params, GetRPName(playerid));
  44357. }
  44358. SetPlayerBubbleText(playerid, 20.0, COLOR_PURPLE, "* %s (( %s ))", params, GetRPName(playerid));
  44359. return 1;
  44360. }
  44361. CMD:stats(playerid, params[])
  44362. {
  44363. // ShowDialogToPlayer(playerid, DIALOG_STATS);
  44364. DisplayStats(playerid);
  44365. return 1;
  44366. }
  44367. CMD:networth(playerid, params[])
  44368. {
  44369. PrintNetWorthPlayer(playerid);
  44370. return 1;
  44371. }
  44372. PrintNetWorthPlayer(playerid)
  44373. {
  44374. new others = 0,
  44375. assets = 0,
  44376. pricevehicle = 0,
  44377. pricehouse = 0,
  44378. pricebiz = 0,
  44379. priceland = 0,
  44380. pricegarage = 0;
  44381. new totalwealth = PlayerData[playerid][pCash] + PlayerData[playerid][pBank];
  44382. foreach(new i : Vehicle)
  44383. {
  44384. if(PlayerData[playerid][pID] == VehicleInfo[i][vOwnerID])
  44385. {
  44386. assets += VehicleInfo[i][vPrice];
  44387. pricevehicle += VehicleInfo[i][vPrice];
  44388. }
  44389. }
  44390. foreach(new i : House)
  44391. {
  44392. if(HouseInfo[i][hExists] && PlayerData[playerid][pID] == HouseInfo[i][hOwnerID])
  44393. {
  44394. assets += HouseInfo[i][hPrice];
  44395. pricehouse += HouseInfo[i][hPrice];
  44396. }
  44397. }
  44398. foreach(new i : Business)
  44399. {
  44400. if(BusinessInfo[i][bExists] && PlayerData[playerid][pID] == BusinessInfo[i][bOwnerID])
  44401. {
  44402. assets += BusinessInfo[i][bPrice];
  44403. pricebiz += BusinessInfo[i][bPrice];
  44404. }
  44405. }
  44406. foreach(new i : Land)
  44407. {
  44408. if(LandInfo[i][lExists] && PlayerData[playerid][pID] == LandInfo[i][lOwnerID])
  44409. {
  44410. others += LandInfo[i][lPrice];
  44411. priceland += LandInfo[i][lPrice];
  44412. }
  44413. }
  44414. foreach(new i : Garage)
  44415. {
  44416. if(GarageInfo[i][gExists] && PlayerData[playerid][pID] == GarageInfo[i][gOwnerID])
  44417. {
  44418. others += GarageInfo[i][gPrice];
  44419. pricegarage += GarageInfo[i][gPrice];
  44420. }
  44421. }
  44422. new total = totalwealth + assets;
  44423. new total2 = total + others;
  44424. SendClientMessage(playerid, 0x7514F6FF, "__________ Net Worth __________");
  44425. SendClientMessageEx(playerid, COLOR_GREY2, "Para: +{FF6347}%s", FormatNumber(PlayerData[playerid][pCash]));
  44426. SendClientMessageEx(playerid, COLOR_GREY2, "Bank: +{FF6347}%s", FormatNumber(PlayerData[playerid][pBank]));
  44427. SendClientMessageEx(playerid, COLOR_GREY2, "Pronat: +{ff6347}%s", FormatNumber(assets));
  44428. foreach(new i : House)
  44429. {
  44430. if(HouseInfo[i][hExists] && IsHouseOwner(playerid, i))
  44431. {
  44432. SendClientMessageEx(playerid, COLOR_GREY2, "- Sht?pia: +{FF6347}%s", FormatNumber(pricehouse));
  44433. break;
  44434. }
  44435. }
  44436. foreach(new i : Business)
  44437. {
  44438. if(BusinessInfo[i][bExists] && IsBusinessOwner(playerid, i))
  44439. {
  44440. SendClientMessageEx(playerid, COLOR_GREY2, "- Biznese: +{FF6347}%s", FormatNumber(pricebiz));
  44441. break;
  44442. }
  44443. }
  44444. foreach(new i : Vehicle)
  44445. {
  44446. if(PlayerData[playerid][pID] == VehicleInfo[i][vOwnerID])
  44447. {
  44448. SendClientMessageEx(playerid, COLOR_GREY2, "- Vetura: +{FF6347}%s", FormatNumber(pricevehicle));
  44449. break;
  44450. }
  44451. }
  44452. SendClientMessageEx(playerid, COLOR_GREY2, "Tjera: +{FF6347}%s", FormatNumber(others));
  44453. foreach(new i : Land)
  44454. {
  44455. if(LandInfo[i][lExists] && IsLandOwner(playerid, i))
  44456. {
  44457. SendClientMessageEx(playerid, COLOR_GREY2, "- Toka: +{FF6347}%s", FormatNumber(priceland));
  44458. break;
  44459. }
  44460. }
  44461. foreach(new i : Garage)
  44462. {
  44463. if(GarageInfo[i][gExists] && IsGarageOwner(playerid, i))
  44464. {
  44465. SendClientMessageEx(playerid, COLOR_GREY2, "- Garazha: +{FF6347}%s", FormatNumber(pricegarage));
  44466. break;
  44467. }
  44468. }
  44469. SendClientMessage(playerid, COLOR_GREEN, "_______________________________");
  44470. SendClientMessageEx(playerid, COLOR_GREEN, "Pasuria totale e juaj ?sht?: %s", FormatNumber(total2));
  44471. return 1;
  44472. }
  44473. CMD:l(playerid, params[])
  44474. {
  44475. return callcmd::low(playerid, params);
  44476. }
  44477. CMD:low(playerid, params[])
  44478. {
  44479. new
  44480. string[144];
  44481. if(isnull(params))
  44482. {
  44483. return SendClientMessage(playerid, COLOR_WHITE, "Usage: /(l)ow [text]");
  44484. }
  44485. // SetPlayerBubbleText(playerid, 20.0, COLOR_WHITE, "(Quietly) %s", params);
  44486. format(string, sizeof(string), "%s quietly: %s", GetRPName(playerid), params);
  44487. SendProximityFadeMessage(playerid, 5.0, string, COLOR_GREY1, COLOR_GREY2, COLOR_GREY3, COLOR_GREY4, COLOR_GREY5);
  44488. return 1;
  44489. }
  44490. CMD:w(playerid, params[])
  44491. {
  44492. return callcmd::whisper(playerid, params);
  44493. }
  44494. CMD:whisper(playerid, params[])
  44495. {
  44496. new targetid, text[128];
  44497. if(sscanf(params, "us[128]", targetid, text))
  44498. {
  44499. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /(w)hisper [playerid] [text]");
  44500. }
  44501. if(!IsPlayerConnected(targetid))
  44502. {
  44503. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  44504. }
  44505. if(!IsPlayerInRangeOfPlayer(playerid, targetid, 5.0) && (!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER))
  44506. {
  44507. return SendClientMessage(playerid, COLOR_GREY, "You must be near that player to whisper them.");
  44508. }
  44509. if(targetid == playerid)
  44510. {
  44511. return SendClientMessage(playerid, COLOR_GREY, "You can't whisper to yourself.");
  44512. }
  44513. if(PlayerData[targetid][pToggleWhisper])
  44514. {
  44515. return SendClientMessage(playerid, COLOR_GREY, "That player has disabled incoming whispers.");
  44516. }
  44517. SendClientMessageEx(targetid, COLOR_YELLOW, "* Whisper from %s: %s *", GetRPName(playerid), text);
  44518. SendClientMessageEx(playerid, COLOR_YELLOW, "* Whisper to %s: %s *", GetRPName(targetid), text);
  44519. if(PlayerData[playerid][pBugged])
  44520. {
  44521. foreach(new i : Player)
  44522. {
  44523. if(GetFactionType(i) == FACTION_FEDERAL)
  44524. {
  44525. SendClientMessageEx(i, 0x9ACD3200, "(bug) %s whispers: %s", GetRPName(playerid), text);
  44526. }
  44527. }
  44528. }
  44529. if(PlayerData[targetid][pWhisperFrom] == INVALID_PLAYER_ID)
  44530. {
  44531. SendClientMessage(targetid, COLOR_WHITE, "* You can use '/rw [message]' to reply to this whisper.");
  44532. }
  44533. PlayerData[targetid][pWhisperFrom] = playerid;
  44534. return 1;
  44535. }
  44536. CMD:pm(playerid, params[])
  44537. {
  44538. new targetid, text[128];
  44539. if(sscanf(params, "us[128]", targetid, text))
  44540. {
  44541. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /(pm) [playerid] [text]");
  44542. }
  44543. if(!IsPlayerConnected(targetid))
  44544. {
  44545. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  44546. }
  44547. if(targetid == playerid)
  44548. {
  44549. return SendClientMessage(playerid, COLOR_GREY, "You can't pm to yourself.");
  44550. }
  44551. if(PlayerData[playerid][pHours] < 3)
  44552. {
  44553. return SendClientMessage(playerid, COLOR_GREY, "You need to play at least 3 hours+ to use this command");
  44554. }
  44555. if(PlayerData[targetid][pTogglePM])
  44556. {
  44557. return SendClientMessage(playerid, COLOR_GREY, "That player has disabled incoming private messages.");
  44558. }
  44559. if(PlayerData[playerid][pTazedTime] > 0 || PlayerData[playerid][pHospital] > 0 || PlayerData[playerid][pCuffed] > 0 || PlayerData[playerid][pTied] > 0 || PlayerData[playerid][pJailTime] > 0)
  44560. {
  44561. return SendClientMessage(playerid, COLOR_GREY, "You are unable to use your cellphone at the moment.");
  44562. }
  44563. SendClientMessageEx(targetid, COLOR_GREEN, "(( PM from %s: %s ))", GetRPName(playerid), text);
  44564. SendClientMessageEx(playerid, COLOR_GREEN, "(( PM to %s: %s ))", GetRPName(targetid), text);
  44565. if(PlayerData[targetid][pWhisperFrom] == INVALID_PLAYER_ID)
  44566. {
  44567. SendClientMessage(targetid, COLOR_WHITE, "* You can use '/rpm [message]' to reply to this private message.");
  44568. }
  44569. PlayerData[targetid][pWhisperFrom] = playerid;
  44570. return 1;
  44571. }
  44572. CMD:rpm(playerid, params[])
  44573. {
  44574. if(isnull(params))
  44575. {
  44576. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /rpm [text]");
  44577. }
  44578. if(PlayerData[playerid][pWhisperFrom] == INVALID_PLAYER_ID)
  44579. {
  44580. return SendClientMessage(playerid, COLOR_GREY, "You haven't been private messaged by anyone since you joined the server.");
  44581. }
  44582. if(PlayerData[PlayerData[playerid][pWhisperFrom]][pTogglePM])
  44583. {
  44584. return SendClientMessage(playerid, COLOR_GREY, "That player has disabled incoming private messages.");
  44585. }
  44586. SendClientMessageEx(PlayerData[playerid][pWhisperFrom], COLOR_GREEN, "(( PM from %s: %s ))", GetRPName(playerid), params);
  44587. SendClientMessageEx(playerid, COLOR_GREEN, "(( PM to %s: %s ))", GetRPName(PlayerData[playerid][pWhisperFrom]), params);
  44588. return 1;
  44589. }
  44590. CMD:rw(playerid, params[])
  44591. {
  44592. if(isnull(params))
  44593. {
  44594. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /rw [text]");
  44595. }
  44596. if(PlayerData[playerid][pWhisperFrom] == INVALID_PLAYER_ID)
  44597. {
  44598. return SendClientMessage(playerid, COLOR_GREY, "You haven't been whispered by anyone since you joined the server.");
  44599. }
  44600. if(!IsPlayerInRangeOfPlayer(playerid, PlayerData[playerid][pWhisperFrom], 5.0) && (!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER))
  44601. {
  44602. return SendClientMessage(playerid, COLOR_GREY, "You must be near that player to whisper them.");
  44603. }
  44604. SendClientMessageEx(PlayerData[playerid][pWhisperFrom], COLOR_YELLOW, "* Whisper from %s: %s *", GetRPName(playerid), params);
  44605. SendClientMessageEx(playerid, COLOR_YELLOW, "* Whisper to %s: %s *", GetRPName(PlayerData[playerid][pWhisperFrom]), params);
  44606. return 1;
  44607. }
  44608. CMD:lights(playerid, params[])
  44609. {
  44610. new vehicleid = GetPlayerVehicleID(playerid);
  44611. if(!vehicleid || GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
  44612. {
  44613. return SendClientMessage(playerid, COLOR_GREY, "You must be driving a vehicle to use this command.");
  44614. }
  44615. if(!VehicleHasEngine(vehicleid))
  44616. {
  44617. return SendClientMessage(playerid, COLOR_GREY, "This vehicle has no lights which can be turned on.");
  44618. }
  44619. if(!GetVehicleParams(vehicleid, VEHICLE_LIGHTS))
  44620. {
  44621. SetVehicleParams(vehicleid, VEHICLE_LIGHTS, true);
  44622. ShowActionBubble(playerid, "* %s turns on the headlights of the %s.", GetRPName(playerid), GetVehicleName(vehicleid));
  44623. }
  44624. else
  44625. {
  44626. SetVehicleParams(vehicleid, VEHICLE_LIGHTS, false);
  44627. ShowActionBubble(playerid, "* %s turns off the headlights of the %s.", GetRPName(playerid), GetVehicleName(vehicleid));
  44628. }
  44629. return 1;
  44630. }
  44631. CMD:hood(playerid, params[])
  44632. {
  44633. new vehicleid = GetNearbyVehicle(playerid);
  44634. if(vehicleid == INVALID_VEHICLE_ID)
  44635. {
  44636. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any vehicle.");
  44637. }
  44638. if(!VehicleHasDoors(vehicleid))
  44639. {
  44640. return SendClientMessage(playerid, COLOR_GREY, "This vehicle has no hood.");
  44641. }
  44642. if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
  44643. {
  44644. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command in the passenger seat.");
  44645. }
  44646. if(!GetVehicleParams(vehicleid, VEHICLE_BONNET))
  44647. {
  44648. SetVehicleParams(vehicleid, VEHICLE_BONNET, true);
  44649. ShowActionBubble(playerid, "* %s opens the hood of the %s.", GetRPName(playerid), GetVehicleName(vehicleid));
  44650. }
  44651. else
  44652. {
  44653. SetVehicleParams(vehicleid, VEHICLE_BONNET, false);
  44654. ShowActionBubble(playerid, "* %s closes the hood of the %s.", GetRPName(playerid), GetVehicleName(vehicleid));
  44655. }
  44656. return 1;
  44657. }
  44658. CMD:trunk(playerid, params[])
  44659. {
  44660. return callcmd::boot(playerid, params);
  44661. }
  44662. CMD:boot(playerid, params[])
  44663. {
  44664. new vehicleid = GetNearbyVehicle(playerid);
  44665. if(vehicleid == INVALID_VEHICLE_ID)
  44666. {
  44667. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any vehicle.");
  44668. }
  44669. if(!VehicleHasDoors(vehicleid))
  44670. {
  44671. return SendClientMessage(playerid, COLOR_GREY, "This vehicle has no boot.");
  44672. }
  44673. if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
  44674. {
  44675. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command in the passenger seat.");
  44676. }
  44677. if(!GetVehicleParams(vehicleid, VEHICLE_BOOT))
  44678. {
  44679. SetVehicleParams(vehicleid, VEHICLE_BOOT, true);
  44680. ShowActionBubble(playerid, "* %s opens the boot of the %s.", GetRPName(playerid), GetVehicleName(vehicleid));
  44681. }
  44682. else
  44683. {
  44684. SetVehicleParams(vehicleid, VEHICLE_BOOT, false);
  44685. ShowActionBubble(playerid, "* %s closes the boot of the %s.", GetRPName(playerid), GetVehicleName(vehicleid));
  44686. }
  44687. return 1;
  44688. }
  44689. CMD:resetupgrades(playerid, params[])
  44690. {
  44691. if(strcmp(params, "confirm", true) != 0)
  44692. {
  44693. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /resetupgrades [confirm]");
  44694. SendClientMessageEx(playerid, COLOR_SYNTAX, "This command resets all of your upgrades and give you back %i upgrade points.", (PlayerData[playerid][pLevel] - 1) * 2);
  44695. return 1;
  44696. }
  44697. if(PlayerData[playerid][pLevel] == 1)
  44698. {
  44699. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't level 2+.");
  44700. }
  44701. if(PlayerData[playerid][pInventoryUpgrade] == 0 && PlayerData[playerid][pTraderUpgrade] == 0 && PlayerData[playerid][pAddictUpgrade] == 0 && PlayerData[playerid][pAssetUpgrade] == 0 && PlayerData[playerid][pLaborUpgrade] == 0 && PlayerData[playerid][pSpawnHealth] == 50.0 && PlayerData[playerid][pSpawnArmor] == 0.0 && PlayerData[playerid][pUpgradePoints] == (PlayerData[playerid][pLevel] - 1) * 2)
  44702. {
  44703. return SendClientMessage(playerid, COLOR_GREY, "You haven't spent any upgrade points on upgrades. Therefore you can't reset them.");
  44704. }
  44705. if(GetPlayerAssetCount(playerid, LIMIT_HOUSES) > 1)
  44706. {
  44707. return SendClientMessageEx(playerid, COLOR_GREY, "You own %i/%i houses at the moment. Please sell one of them before using this command.", GetPlayerAssetCount(playerid, LIMIT_HOUSES), GetPlayerAssetLimit(playerid, LIMIT_HOUSES));
  44708. }
  44709. if(GetPlayerAssetCount(playerid, LIMIT_BUSINESSES) > 1)
  44710. {
  44711. return SendClientMessageEx(playerid, COLOR_GREY, "You own %i/%i businesses at the moment. Please sell one of them before using this command.", GetPlayerAssetCount(playerid, LIMIT_BUSINESSES), GetPlayerAssetLimit(playerid, LIMIT_BUSINESSES));
  44712. }
  44713. if(GetPlayerAssetCount(playerid, LIMIT_GARAGES) > 1)
  44714. {
  44715. return SendClientMessageEx(playerid, COLOR_GREY, "You own %i/%i garages at the moment. Please sell one of them before using this command.", GetPlayerAssetCount(playerid, LIMIT_GARAGES), GetPlayerAssetLimit(playerid, LIMIT_GARAGES));
  44716. }
  44717. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT COUNT(*) FROM vehicles WHERE ownerid = %i", PlayerData[playerid][pID]);
  44718. mysql_tquery(connectionID, queryBuffer, "OnPlayerAttemptResetUpgrades", "i", playerid);
  44719. return 1;
  44720. }
  44721. CMD:upgrades(playerid, params[])
  44722. {
  44723. return callcmd::myupgrades(playerid, params);
  44724. }
  44725. CMD:myupgrades(playerid, params[])
  44726. {
  44727. SendClientMessageEx(playerid, COLOR_NAVYBLUE, "_____ %s's upgrades (%i points available) _____", GetRPName(playerid), PlayerData[playerid][pUpgradePoints]);
  44728. SendClientMessageEx(playerid, COLOR_YELLOW, "[Shealth: %.0f/100]{C8C8C8} You spawn with %.1f health at the hospital after death.", PlayerData[playerid][pSpawnHealth], PlayerData[playerid][pSpawnHealth]);
  44729. SendClientMessageEx(playerid, COLOR_YELLOW, "[Sarmor: %.0f/100]{C8C8C8} You spawn with %.1f armor at the hospital after death.", PlayerData[playerid][pSpawnArmor], PlayerData[playerid][pSpawnArmor]);
  44730. SendClientMessageEx(playerid, COLOR_YELLOW, "[Inventory: %i/5]{C8C8C8} This upgrade increases the capacity for your items. [/inv]", PlayerData[playerid][pInventoryUpgrade]);
  44731. SendClientMessageEx(playerid, COLOR_YELLOW, "[Trader: %i/3]{C8C8C8} You save an extra %i percent on all items purchased in businesses.", PlayerData[playerid][pTraderUpgrade], PlayerData[playerid][pTraderUpgrade] * 10);
  44732. SendClientMessageEx(playerid, COLOR_YELLOW, "[Addict: %i/3]{C8C8C8} You gain an extra %.1f health and armor when using drugs.", PlayerData[playerid][pAddictUpgrade], PlayerData[playerid][pAddictUpgrade] * 5.0);
  44733. SendClientMessageEx(playerid, COLOR_YELLOW, "[Asset: %i/4]{C8C8C8} You can own %i houses, %i businesses, %i garages & %i vehicles.", PlayerData[playerid][pAssetUpgrade], GetPlayerAssetLimit(playerid, LIMIT_HOUSES), GetPlayerAssetLimit(playerid, LIMIT_BUSINESSES), GetPlayerAssetLimit(playerid, LIMIT_GARAGES), GetPlayerAssetLimit(playerid, LIMIT_VEHICLES));
  44734. SendClientMessageEx(playerid, COLOR_YELLOW, "[Labor: %i/5]{C8C8C8} You earn an extra %i percent cash to your paycheck when working.", PlayerData[playerid][pLaborUpgrade], PlayerData[playerid][pLaborUpgrade] * 2);
  44735. return 1;
  44736. }
  44737. CMD:buylevel(playerid, params[])
  44738. {
  44739. new
  44740. exp = (PlayerData[playerid][pLevel] * 4),
  44741. cost = (PlayerData[playerid][pLevel] + 1) * 5000,
  44742. string[64];
  44743. if(PlayerData[playerid][pEXP] < exp)
  44744. {
  44745. return SendClientMessageEx(playerid, COLOR_GREY, "You need %i more respect points in order to level up.", exp - PlayerData[playerid][pEXP]);
  44746. }
  44747. if(PlayerData[playerid][pCash] < cost)
  44748. {
  44749. return SendClientMessageEx(playerid, COLOR_GREY, "You need to have at least %s on hand to buy your next level.", FormatNumber(cost));
  44750. }
  44751. if(PlayerData[playerid][pPassport])
  44752. {
  44753. return SendClientMessage(playerid, COLOR_GREY, "You have an active passport. You can't level up at the moment.");
  44754. }
  44755. PlayerData[playerid][pEXP] -= exp;
  44756. PlayerData[playerid][pCash] -= cost;
  44757. PlayerData[playerid][pLevel]++;
  44758. PlayerData[playerid][pUpgradePoints] += 2;
  44759. if(PlayerData[playerid][pLevel] == 3 && PlayerData[playerid][pReferralUID] > 0)
  44760. {
  44761. ReferralCheck(playerid);
  44762. }
  44763. if(PlayerData[playerid][pLevel] >= 5)
  44764. {
  44765. AwardAchievement(playerid, "Five stars");
  44766. }
  44767. if(PlayerData[playerid][pLevel] >= 10)
  44768. {
  44769. AwardAchievement(playerid, "Top tier");
  44770. }
  44771. format(string, sizeof(string), "~g~Level Up~n~~w~You are now level %i", PlayerData[playerid][pLevel]);
  44772. GameTextForPlayer(playerid, string, 5000, 1);
  44773. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET exp = exp - %i, cash = cash - %i, level = level + 1, upgradepoints = upgradepoints + 2 WHERE uid = %i", exp, cost, PlayerData[playerid][pID]);
  44774. mysql_tquery(connectionID, queryBuffer);
  44775. SendClientMessageEx(playerid, COLOR_GREEN, "You have moved up to level %i. This costed you %s.", PlayerData[playerid][pLevel], FormatNumber(cost));
  44776. SendClientMessageEx(playerid, COLOR_GREEN, "You now have %i upgrade points. Use /upgrade to learn more.", PlayerData[playerid][pUpgradePoints]);
  44777. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  44778. return 1;
  44779. }
  44780. CMD:obscurent(playerid, params[])
  44781. {
  44782. new status;
  44783. if(PlayerData[playerid][pAdmin] < 6)
  44784. {
  44785. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  44786. }
  44787. if(sscanf(params, "i", status) || !(0 <= status <= 1))
  44788. {
  44789. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /obscurent [0/1]");
  44790. }
  44791. if(!status) {
  44792. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has disabled nametags obfuscation.", GetRPName(playerid));
  44793. } else {
  44794. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has enabled nametags obfuscation.", GetRPName(playerid));
  44795. }
  44796. antiNT = status;
  44797. return 1;
  44798. }
  44799. CMD:engine(playerid, params[])
  44800. {
  44801. new vehicleid = GetPlayerVehicleID(playerid), Float:health;
  44802. if(!vehicleid || GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
  44803. {
  44804. return SendClientMessage(playerid, COLOR_GREY, "You must be driving a vehicle to use this command.");
  44805. }
  44806. if(!VehicleHasEngine(vehicleid))
  44807. {
  44808. return SendClientMessage(playerid, COLOR_GREY, "This vehicle has no engine which can be turned on.");
  44809. }
  44810. if(vehicleFuel[vehicleid] <= 0)
  44811. {
  44812. return SendClientMessage(playerid, COLOR_GREY, "There is no fuel left in this vehicle.");
  44813. }
  44814. if(PlayerData[playerid][pRefuel] == vehicleid)
  44815. {
  44816. return SendClientMessage(playerid, COLOR_GREY, "You can't do this right now");
  44817. }
  44818. if(!GetVehicleParams(vehicleid, VEHICLE_ENGINE))
  44819. {
  44820. GetVehicleHealth(vehicleid, health);
  44821. if(health <= 300.0)
  44822. {
  44823. return SendClientMessage(playerid, COLOR_GREY, "The engine is totalled and cannot be started until it's repaired.");
  44824. }
  44825. // SetVehicleParams(vehicleid, VEHICLE_ENGINE, true);
  44826. SetTimerEx("VehEngine", 500, false, "i", playerid);
  44827. ShowActionBubble(playerid, "* %s twists the key in the ignition...", GetRPName(playerid));
  44828. }
  44829. else
  44830. {
  44831. // SetVehicleParams(vehicleid, VEHICLE_ENGINE, false);
  44832. SetTimerEx("VehEngine", 500, false, "i", playerid);
  44833. ShowActionBubble(playerid, "* %s twists the key in the ignition...", GetRPName(playerid));
  44834. }
  44835. return 1;
  44836. }
  44837. func VehEngine(playerid)
  44838. {
  44839. new vehicleid = GetPlayerVehicleID(playerid);
  44840. if(!GetVehicleParams(vehicleid, VEHICLE_ENGINE))
  44841. {
  44842. SetVehicleParams(vehicleid, VEHICLE_ENGINE, true);
  44843. ShowActionBubble(playerid, "* %s's engine was turned on (( %s )).", GetVehicleName(vehicleid), GetRPName(playerid));
  44844. }
  44845. else
  44846. {
  44847. SetVehicleParams(vehicleid, VEHICLE_ENGINE, false);
  44848. ShowActionBubble(playerid, "* %s's engine was turned off (( %s )).", GetVehicleName(vehicleid), GetRPName(playerid));
  44849. }
  44850. return 1;
  44851. }
  44852. CMD:setforsale(playerid, params[])
  44853. {
  44854. new askingprice, forsale[264], vehicleid = GetPlayerVehicleID(playerid);
  44855. if(!vehicleid || !IsVehicleOwner(playerid, vehicleid))
  44856. {
  44857. return SendClientMessage(playerid, COLOR_GREY, "You are not inside any vehicle of yours.");
  44858. }
  44859. if(VehicleInfo[vehicleid][vForSale]) return SendClientMessage(playerid, COLOR_GREY, "This vehicle is already for sale.");
  44860. if(!PlayerData[playerid][pPhone]) return SendClientMessage(playerid, COLOR_GREY, "You don't have any phone setup.");
  44861. if(sscanf(params, "i", askingprice)) return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setforsale [price]");
  44862. if(askingprice < 1 || askingprice > 50000000) return SendClientMessage(playerid, COLOR_GREY, "Price must be between $1 and $50,000,000.");
  44863. VehicleInfo[vehicleid][vForSale] = true;
  44864. VehicleInfo[vehicleid][vForSalePrice] = askingprice;
  44865. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET forsale = 1, forsaleprice = %i WHERE id = %i", askingprice, VehicleInfo[vehicleid][vID]);
  44866. mysql_tquery(connectionID, queryBuffer);
  44867. format(forsale, sizeof(forsale), "FOR SALE\n%s - %s\nPh: %i.", GetVehicleName(vehicleid), FormatNumber(VehicleInfo[vehicleid][vForSalePrice]), PlayerData[playerid][pPhone]);
  44868. VehicleInfo[vehicleid][vForSaleLabel] = CreateDynamic3DTextLabel(forsale, COLOR_GREY2, 0.0, 0.0, 0.0, 10.0, INVALID_PLAYER_ID, vehicleid, 1, -1, 0, -1, 30.0);
  44869. SendClientMessageEx(playerid, COLOR_WHITE, "You have set your %s for sale with an asking price of $%s.", GetVehicleName(vehicleid), FormatNumber(VehicleInfo[vehicleid][vForSalePrice]));
  44870. return 1;
  44871. }
  44872. CMD:cancelforsale(playerid, params[])
  44873. {
  44874. new vehicleid = GetPlayerVehicleID(playerid);
  44875. if(!vehicleid || !IsVehicleOwner(playerid, vehicleid))
  44876. {
  44877. return SendClientMessage(playerid, COLOR_GREY, "You are not inside any vehicle of yours.");
  44878. }
  44879. if(!VehicleInfo[vehicleid][vForSale]) return SendClientMessage(playerid, COLOR_GREY, "This vehicle is not for sale.");
  44880. VehicleInfo[vehicleid][vForSale] = false;
  44881. VehicleInfo[vehicleid][vForSalePrice] = 0;
  44882. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET forsale = 0, forsaleprice = 0 WHERE id = %i", VehicleInfo[vehicleid][vID]);
  44883. mysql_tquery(connectionID, queryBuffer);
  44884. DestroyDynamic3DTextLabel(VehicleInfo[vehicleid][vForSaleLabel]);
  44885. SendClientMessageEx(playerid, COLOR_WHITE, "You have cancelled the sale of your %s.", GetVehicleName(vehicleid));
  44886. return true;
  44887. }
  44888. CMD:addpayphone(playerid, params[])
  44889. {
  44890. if (PlayerData[playerid][pAdmin] < 5)
  44891. {
  44892. return SendErrorMessage(playerid, "You are not privileged to use this command.");
  44893. }
  44894. else if (GetClosestPayphone(playerid) != -1)
  44895. {
  44896. return SendErrorMessage(playerid, "There is another payphone nearby.");
  44897. }
  44898. else
  44899. {
  44900. new
  44901. Float:x,
  44902. Float:y,
  44903. Float:z,
  44904. Float:angle,
  44905. id = -1;
  44906. GetPlayerPos(playerid, x, y, z);
  44907. GetPlayerFacingAngle(playerid, angle);
  44908. x += 2.0 * floatsin(-angle, degrees);
  44909. y += 2.0 * floatcos(-angle, degrees);
  44910. id = AddPayphone(x, y, z, angle, GetPlayerInterior(playerid), GetPlayerVirtualWorld(playerid));
  44911. if (id == -1)
  44912. {
  44913. return SendErrorMessage(playerid, "There are no available payphone slots.");
  44914. }
  44915. else
  44916. {
  44917. EditDynamicObjectEx(playerid, EDIT_TYPE_PAYPHONE, Payphones[id][phObject], id);
  44918. SendInfoMessage(playerid, "You have added payphone %i (/editpayphone).", id);
  44919. }
  44920. }
  44921. return 1;
  44922. }
  44923. CMD:gotopayphone(playerid, params[])
  44924. {
  44925. new id;
  44926. if (PlayerData[playerid][pAdmin] < 5)
  44927. {
  44928. return SendErrorMessage(playerid, "You are not privileged to use this command.");
  44929. }
  44930. else if (sscanf(params, "i", id))
  44931. {
  44932. return SendSyntaxMessage(playerid, "/gotopayphone (payphone ID)");
  44933. }
  44934. else if (!IsValidPayphoneID(id))
  44935. {
  44936. return SendErrorMessage(playerid, "You have specified an invalid payphone ID.");
  44937. }
  44938. else
  44939. {
  44940. TeleportToCoords(playerid, Payphones[id][phX], Payphones[id][phY], Payphones[id][phZ], Payphones[id][phA], Payphones[id][phInterior], Payphones[id][phWorld]);
  44941. SendInfoMessage(playerid, "You have teleported to payphone %i.", id);
  44942. }
  44943. return 1;
  44944. }
  44945. CMD:setdamages(playerid, params[])
  44946. {
  44947. if (PlayerData[playerid][pAdmin] < 10)
  44948. {
  44949. return SendErrorMessage(playerid, "You are not privileged to use this command.");
  44950. }
  44951. else
  44952. {
  44953. ShowWeaponDamageEditMenu(playerid);
  44954. }
  44955. return 1;
  44956. }
  44957. CMD:editpayphone(playerid, params[])
  44958. {
  44959. new id;
  44960. if (PlayerData[playerid][pAdmin] < 5)
  44961. {
  44962. return SendErrorMessage(playerid, "You are not privileged to use this command.");
  44963. }
  44964. else if (sscanf(params, "i", id))
  44965. {
  44966. return SendSyntaxMessage(playerid, "/editpayphone (payphone ID)");
  44967. }
  44968. else if (!IsValidPayphoneID(id))
  44969. {
  44970. return SendErrorMessage(playerid, "You have specified an invalid payphone ID.");
  44971. }
  44972. else
  44973. {
  44974. EditDynamicObjectEx(playerid, EDIT_TYPE_PAYPHONE, Payphones[id][phObject], id);
  44975. SendInfoMessage(playerid, "Click on the disk icon to save changes.");
  44976. }
  44977. return 1;
  44978. }
  44979. CMD:deletepayphone(playerid, params[])
  44980. {
  44981. new id;
  44982. if (PlayerData[playerid][pAdmin] < 5)
  44983. {
  44984. return SendErrorMessage(playerid, "You are not privileged to use this command.");
  44985. }
  44986. else if (sscanf(params, "i", id))
  44987. {
  44988. return SendSyntaxMessage(playerid, "/deletepayphone (payphone ID)");
  44989. }
  44990. else if (!IsValidPayphoneID(id))
  44991. {
  44992. return SendErrorMessage(playerid, "You have specified an invalid payphone ID.");
  44993. }
  44994. else
  44995. {
  44996. if (Payphones[id][phCaller] != INVALID_PLAYER_ID)
  44997. {
  44998. HangupCall(Payphones[id][phCaller]);
  44999. }
  45000. DestroyDynamic3DTextLabel(Payphones[id][phText]);
  45001. DestroyDynamicObject(Payphones[id][phObject]);
  45002. format(queryBuffer, sizeof(queryBuffer), "DELETE FROM rp_payphones WHERE `phID` = %i", Payphones[id][phID]);
  45003. mysql_tquery(connectionID, queryBuffer);
  45004. Payphones[id][phExists] = 0;
  45005. SendInfoMessage(playerid, "You have deleted payphone %i.", id);
  45006. }
  45007. return 1;
  45008. }
  45009. CMD:creategangtag(playerid, params[])
  45010. {
  45011. static
  45012. id = -1,
  45013. Float:x,
  45014. Float:y,
  45015. Float:z,
  45016. Float:angle;
  45017. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  45018. {
  45019. return SendClientMessage(playerid, COLOR_GREY, "You don't have permission to use this command.");
  45020. }
  45021. if(GetPlayerInterior(playerid) > 0 || GetPlayerVirtualWorld(playerid) > 0)
  45022. {
  45023. return SendClientMessage(playerid, COLOR_GREY, "You can only create graffiti points outside interiors.");
  45024. }
  45025. GetPlayerPos(playerid, x, y, z);
  45026. GetPlayerFacingAngle(playerid, angle);
  45027. id = Graffiti_Create(x, y, z, angle);
  45028. if(id == -1)
  45029. {
  45030. return SendClientMessage(playerid, COLOR_GREY, "The server has reached the limit for graffiti points.");
  45031. }
  45032. EditDynamicObject(playerid, GraffitiData[id][graffitiObject]);
  45033. PlayerData[playerid][pEditGraffiti] = id;
  45034. SendClientMessageEx(playerid, COLOR_GREY, "You have successfully created graffiti ID: %d.", id);
  45035. return 1;
  45036. }
  45037. CMD:editgangtag(playerid, params[])
  45038. {
  45039. static
  45040. id = -1,
  45041. Float:x,
  45042. Float:y,
  45043. Float:z,
  45044. Float:angle;
  45045. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  45046. {
  45047. return SendClientMessage(playerid, COLOR_GREY, "You don't have permission to use this command.");
  45048. }
  45049. GetPlayerPos(playerid, x, y, z);
  45050. GetPlayerFacingAngle(playerid, angle);
  45051. id = Graffiti_Nearest(playerid);
  45052. if(id == -1)
  45053. {
  45054. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of an Gang Spray Tag point.");
  45055. }
  45056. EditDynamicObject(playerid, GraffitiData[id][graffitiObject]);
  45057. PlayerData[playerid][pEditGraffiti] = id;
  45058. return 1;
  45059. }
  45060. CMD:destroygangtag(playerid, params[])
  45061. {
  45062. static
  45063. id = 0;
  45064. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  45065. {
  45066. return SendClientMessage(playerid, COLOR_GREY, "You don't have permission to use this command.");
  45067. }
  45068. if(sscanf(params, "d", id))
  45069. {
  45070. return SendClientMessage(playerid, COLOR_GREY, "/destroygraffiti [graffiti id]");
  45071. }
  45072. if((id < 0 || id >= MAX_GRAFFITI_POINTS) || !GraffitiData[id][graffitiExists])
  45073. {
  45074. return SendClientMessage(playerid, COLOR_GREY, "You have specified an invalid graffiti ID.");
  45075. }
  45076. Graffiti_Delete(id);
  45077. SendClientMessageEx(playerid, COLOR_GREY, "You have successfully destroyed graffiti ID: %d.", id);
  45078. return 1;
  45079. }
  45080. CMD:gspray(playerid, params[])
  45081. {
  45082. new id = Graffiti_Nearest(playerid);
  45083. if (id == -1)
  45084. return SendClientMessage(playerid, COLOR_GREY, "You are not near any graffiti point.");
  45085. if (IsSprayingInProgress(id))
  45086. {
  45087. return SendClientMessage(playerid, COLOR_GREY, "There is another player spraying at this point already.");
  45088. }
  45089. if(PlayerData[playerid][pGang] == -1)
  45090. {
  45091. return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any gang at the moment.");
  45092. }
  45093. if(PlayerData[playerid][pGangRank] < 5)
  45094. {
  45095. return SendClientMessage(playerid, COLOR_GREY, "You must be at least rank 5 to tag a wall");
  45096. }
  45097. if(PlayerData[playerid][pSpraycans] <= 0)
  45098. {
  45099. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough spraycans for this.");
  45100. }
  45101. Dialog_Show(playerid, Graffiti_Type, DIALOG_STYLE_LIST, "Graffiti Style", "Default Gang Tags\nCustom Text", "Select", "Close");
  45102. return 1;
  45103. }
  45104. CMD:tip(playerid, params[])
  45105. {
  45106. if(PlayerData[playerid][pAdmin] > 7)
  45107. {
  45108. if(isnull(params)) return SCM(playerid, COLOR_WHITE, "USAGE: /tip [message]");
  45109. SendClientMessageToAllEx(COLOR_GREEN, "TIP: {ffffff}%s", params);
  45110. }
  45111. return 1;
  45112. }
  45113. CMD:impoundedit(playerid, params[])
  45114. {
  45115. if (PlayerData[playerid][pAdmin] >= SENIOR_ADMIN || PlayerData[playerid][pFactionMod] >= 1)
  45116. {
  45117. new string[128], choice[32], id, amount;
  45118. if(sscanf(params, "s[32]dD", choice, id, amount))
  45119. {
  45120. SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /impoundedit [name] [id] [amount]");
  45121. SendClientMessageEx(playerid, COLOR_GREY, "Available names: Position, Delete");
  45122. return 1;
  45123. }
  45124. if(id >= MAX_IMPOUNDPOINTS)
  45125. {
  45126. SendClientMessageEx(playerid, COLOR_WHITE, "Invalid Impound Points ID!");
  45127. return 1;
  45128. }
  45129. if(strcmp(choice, "position", true) == 0)
  45130. {
  45131. GetPlayerPos(playerid, ImpoundPoints[id][impoundPosX], ImpoundPoints[id][impoundPosY], ImpoundPoints[id][impoundPosZ]);
  45132. ImpoundPoints[id][impoundInt] = GetPlayerInterior(playerid);
  45133. ImpoundPoints[id][impoundVW] = GetPlayerVirtualWorld(playerid);
  45134. format(string, sizeof(string), "You have changed the position on impound Point #%d.", id);
  45135. SendClientMessageEx(playerid, COLOR_WHITE, string);
  45136. DestroyDynamic3DTextLabel(ImpoundPoints[id][impoundTextID]);
  45137. format(string, sizeof(string), "Impound Yard #%d\nType /impound to impound a vehicle", id);
  45138. ImpoundPoints[id][impoundTextID] = CreateDynamic3DTextLabel(string, COLOR_YELLOW, ImpoundPoints[id][impoundPosX], ImpoundPoints[id][impoundPosY], ImpoundPoints[id][impoundPosZ]+0.6, 5.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, ImpoundPoints[id][impoundVW], ImpoundPoints[id][impoundInt], -1);
  45139. SaveImpoundPoint(id);
  45140. return 1;
  45141. }
  45142. else if(strcmp(choice, "delete", true) == 0)
  45143. {
  45144. if(ImpoundPoints[id][impoundPosX] == 0)
  45145. {
  45146. format(string, sizeof(string), "Impound Point #%d does not exist.", id);
  45147. SendClientMessageEx(playerid, COLOR_WHITE, string);
  45148. return 1;
  45149. }
  45150. DestroyDynamic3DTextLabel(ImpoundPoints[id][impoundTextID]);
  45151. ImpoundPoints[id][impoundPosX] = 0.0;
  45152. ImpoundPoints[id][impoundPosY] = 0.0;
  45153. ImpoundPoints[id][impoundPosZ] = 0.0;
  45154. ImpoundPoints[id][impoundVW] = 0;
  45155. ImpoundPoints[id][impoundInt] = 0;
  45156. SaveImpoundPoint(id);
  45157. format(string, sizeof(string), "You have deleted Impound Point #%d.", id);
  45158. SendClientMessageEx(playerid, COLOR_WHITE, string);
  45159. return 1;
  45160. }
  45161. }
  45162. else SendClientMessageEx(playerid, COLOR_GREY, "You are not authorized to use that command.");
  45163. return 1;
  45164. }
  45165. CMD:impoundstatus(playerid, params[])
  45166. {
  45167. new id;
  45168. if(sscanf(params, "i", id))
  45169. {
  45170. SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /impoundstatus [id]");
  45171. return 1;
  45172. }
  45173. if (PlayerData[playerid][pAdmin] >= SENIOR_ADMIN)
  45174. {
  45175. new string[128];
  45176. format(string,sizeof(string),"|___________ Impound Point Status (ID: %d) ___________|", id);
  45177. SendClientMessageEx(playerid, COLOR_GREEN, string);
  45178. format(string, sizeof(string), "[Position] X: %f | Y: %f | Z: %f | VW: %d | Int: %d", ImpoundPoints[id][impoundPosX], ImpoundPoints[id][impoundPosY], ImpoundPoints[id][impoundPosZ], ImpoundPoints[id][impoundVW], ImpoundPoints[id][impoundInt]);
  45179. SendClientMessageEx(playerid, COLOR_WHITE, string);
  45180. }
  45181. else
  45182. {
  45183. SendClientMessageEx(playerid, COLOR_GREY, "You are not authorized to use that command.");
  45184. }
  45185. return 1;
  45186. }
  45187. CMD:impoundnext(playerid, params[])
  45188. {
  45189. if(PlayerData[playerid][pAdmin] >= SENIOR_ADMIN)
  45190. {
  45191. SendClientMessageEx(playerid, COLOR_RED, "* Listing next available Impound Point...");
  45192. for(new x = 0; x < MAX_IMPOUNDPOINTS; x++)
  45193. {
  45194. if(ImpoundPoints[x][impoundPosX] == 0)
  45195. {
  45196. new string[128];
  45197. format(string, sizeof(string), "%d is available to use.", x);
  45198. SendClientMessageEx(playerid, COLOR_WHITE, string);
  45199. break;
  45200. }
  45201. }
  45202. }
  45203. else
  45204. {
  45205. SendClientMessageEx(playerid, COLOR_GREY, "You are not authorized to use that command.");
  45206. return 1;
  45207. }
  45208. return 1;
  45209. }/*
  45210. CMD:ame(playerid, params[])
  45211. {
  45212. new activewep = GetPVarInt(playerid, "activesling");
  45213. new message[100], string[128];
  45214. if(sscanf(params, "s[100]", message))
  45215. {
  45216. SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /ame [action]");
  45217. SendClientMessageEx(playerid, COLOR_GREY, "NOTE: Set the action to OFF to remove the label.");
  45218. return 1;
  45219. }
  45220. if(activewep > 0)
  45221. {
  45222. SendClientMessageEx(playerid, COLOR_GREY, " You have a weapon slung around your back, you can't use /ame.");
  45223. return 1;
  45224. }
  45225. if(strcmp(message, "off", true) == 0)
  45226. {
  45227. SendClientMessageEx(playerid, COLOR_GREY, " You have removed the description label.");
  45228. DestroyDynamic3DTextLabel(PlayerData[playerid][aMeID]);
  45229. PlayerData[playerid][aMeStatus] =0;
  45230. return 1;
  45231. }
  45232. if(strlen(message) > 100) return SendClientMessageEx(playerid, COLOR_GREY, " The action is too long, please reduce the length.");
  45233. if(strlen(message) < 3) return SendClientMessageEx(playerid, COLOR_GREY, " The action is too short, please increase the length.");
  45234. if(PlayerData[playerid][aMeStatus] == 0)
  45235. {
  45236. PlayerData[playerid][aMeStatus] =1;
  45237. format(string, sizeof(string), "* %s %s", GetPlayerNameEx(playerid), message);
  45238. PlayerData[playerid][aMeID] = CreateDynamic3DTextLabel(string, COLOR_PURPLE, 0.0, 0.0, 0.0, 20.0, playerid);
  45239. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  45240. return 1;
  45241. }
  45242. else
  45243. {
  45244. format(string, sizeof(string), "* %s %s", GetPlayerNameEx(playerid), message);
  45245. UpdateDynamic3DTextLabelText(PlayerData[playerid][aMeID], COLOR_PURPLE, string);
  45246. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  45247. return 1;
  45248. }
  45249. }
  45250. CMD:sling(playerid, params[])
  45251. {
  45252. if(PlayerData[playerid][pTazedTime] > 0 || PlayerData[playerid][pInjured] > 0 || PlayerData[playerid][pHospital] > 0 || PlayerData[playerid][pCuffed] > 0 || PlayerData[playerid][pTied] > 0 || PlayerData[playerid][pJailTime] > 0 || PlayerData[playerid][pPaintball] > 0)
  45253. {
  45254. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment.");
  45255. }
  45256. if(IsPlayerInAnyVehicle(playerid)) { SendClientMessageEx(playerid, COLOR_WHITE, "You can't do this while being inside the vehicle!"); return 1; }
  45257. new string[128], weaponchoice[32];
  45258. if(sscanf(params, "s[32]", weaponchoice))
  45259. {
  45260. SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /sling [weapon]");
  45261. SendClientMessageEx(playerid, COLOR_WHITE, "Avaliable options: spas12, shotgun, mp5, ak47, m4, sniper, rifle");
  45262. return 1;
  45263. }
  45264. if (GetPVarInt(playerid, "GiveWeaponTimer") > 0)
  45265. {
  45266. format(string, sizeof(string), " You must wait %d seconds before slinging another weapon.", GetPVarInt(playerid, "GiveWeaponTimer"));
  45267. SendClientMessageEx(playerid,COLOR_GREY,string);
  45268. return 1;
  45269. }
  45270. new activewep;
  45271. activewep = GetPVarInt(playerid, "activesling");
  45272. if(activewep > 0)
  45273. {
  45274. SendClientMessageEx(playerid, COLOR_GREY, " You already have a weapon slung around your back.");
  45275. return 1;
  45276. }
  45277. new weapon, ammo;
  45278. if(strcmp(weaponchoice, "shotgun", true, strlen(weaponchoice)) == 0)
  45279. {
  45280. if( PlayerData[playerid][pWeapons][3] == 25 && PlayerData[playerid][pAGuns][3] == 0 )
  45281. {
  45282. SendClientMessageEx(playerid, COLOR_AQUA, "You have slung your Shotgun around your back. (use /unsling to retrieve the gun)");
  45283. weapon = PlayerData[playerid][pWeapons][3];
  45284. ammo = PlayerData[playerid][pGunsAmmo][3];
  45285. format(string,sizeof(string), "* %s slings their Shotgun around their back, securing it to their body.", GetRPName(playerid));
  45286. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  45287. SetPVarInt(playerid, "GiveWeaponTimer", 10); SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_GIVEWEAPONTIMER);
  45288. if(PlayerData[playerid][aMeStatus] == 0)
  45289. {
  45290. format(string,sizeof(string),"Has a shotgun slung around their back (( %s ))",GetRPName(playerid));
  45291. PlayerData[playerid][aMeID] = CreateDynamic3DTextLabel(string, COLOR_PURPLE, 0.0, 0.0, 0.0, 20.0, playerid);
  45292. PlayerData[playerid][aMeStatus] =1;
  45293. }
  45294. else
  45295. {
  45296. format(string,sizeof(string),"Has a shotgun slung around their back (( %s ))",GetRPName(playerid));
  45297. UpdateDynamic3DTextLabelText(PlayerData[playerid][aMeID], COLOR_PURPLE, string);
  45298. }
  45299. }
  45300. }
  45301. else if(strcmp(weaponchoice, "spas12", true, strlen(weaponchoice)) == 0)
  45302. {
  45303. if( PlayerData[playerid][pWeapons][3] == 27 && PlayerData[playerid][pAGuns][3] == 0 )
  45304. {
  45305. SendClientMessageEx(playerid, COLOR_AQUA, "You have slung your SPAS12 around your back. (use /unsling to retrieve the gun)");
  45306. weapon = PlayerData[playerid][pWeapons][3];
  45307. ammo = PlayerData[playerid][pGunsAmmo][3];
  45308. format(string,sizeof(string), "* %s slings their Combat Shotgun around their back, securing it to their body.", GetPlayerNameEx(playerid));
  45309. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  45310. SetPVarInt(playerid, "GiveWeaponTimer", 10); SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_GIVEWEAPONTIMER);
  45311. if(PlayerData[playerid][aMeStatus] == 0)
  45312. {
  45313. format(string,sizeof(string),"Has a combat shotgun slung around their back (( %s ))",GetRPName(playerid));
  45314. PlayerData[playerid][aMeID] = CreateDynamic3DTextLabel(string, COLOR_PURPLE, 0.0, 0.0, 0.0, 20.0, playerid);
  45315. PlayerData[playerid][aMeStatus] =1;
  45316. }
  45317. else
  45318. {
  45319. format(string,sizeof(string),"Has a combat shotgun slung around their back (( %s ))",GetRPName(playerid));
  45320. UpdateDynamic3DTextLabelText(PlayerData[playerid][aMeID], COLOR_PURPLE, string);
  45321. }
  45322. }
  45323. }
  45324. else if(strcmp(weaponchoice, "mp5", true, strlen(weaponchoice)) == 0)
  45325. {
  45326. if( PlayerData[playerid][pWeapons][4] == 29 && PlayerData[playerid][pAGuns][4] == 0 )
  45327. {
  45328. SendClientMessageEx(playerid, COLOR_AQUA, "You have slung your MP5 around your back. (use /unsling to retrieve the gun)");
  45329. weapon = PlayerData[playerid][pWeapons][4];
  45330. ammo = PlayerData[playerid][pGunsAmmo][4];
  45331. format(string,sizeof(string), "* %s slings their MP5 around their back, securing it to their body.", GetRPName(playerid));
  45332. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  45333. SetPVarInt(playerid, "GiveWeaponTimer", 10); SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_GIVEWEAPONTIMER);
  45334. if(PlayerData[playerid][aMeStatus] == 0)
  45335. {
  45336. format(string,sizeof(string),"Has an MP5 slung around their back (( %s ))",GetRPName(playerid));
  45337. PlayerData[playerid][aMeID] = CreateDynamic3DTextLabel(string, COLOR_PURPLE, 0.0, 0.0, 0.0, 20.0, playerid);
  45338. PlayerData[playerid][aMeStatus] =1;
  45339. }
  45340. else
  45341. {
  45342. format(string,sizeof(string),"Has an MP5 slung around their back (( %s ))",GetRPName(playerid));
  45343. UpdateDynamic3DTextLabelText(PlayerData[playerid][aMeID], COLOR_PURPLE, string);
  45344. }
  45345. }
  45346. }
  45347. else if(strcmp(weaponchoice, "ak47", true, strlen(weaponchoice)) == 0)
  45348. {
  45349. if( PlayerData[playerid][pWeapons][5] == 30 && PlayerData[playerid][pAGuns][5] == 0 )
  45350. {
  45351. SendClientMessageEx(playerid, COLOR_AQUA, "You have slung your AK-47 around your back.");
  45352. weapon = PlayerData[playerid][pWeapons][5];
  45353. ammo = PlayerData[playerid][pGunsAmmo][5];
  45354. format(string,sizeof(string), "* %s slings their AK-47 around their back, securing it to their body.", GetRPName(playerid));
  45355. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  45356. SetPVarInt(playerid, "GiveWeaponTimer", 10); SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_GIVEWEAPONTIMER);
  45357. if(PlayerData[playerid][aMeStatus] == 0)
  45358. {
  45359. format(string,sizeof(string),"Has an AK-47 slung around their back (( %s ))",GetRPName(playerid));
  45360. PlayerData[playerid][aMeID] = CreateDynamic3DTextLabel(string, COLOR_PURPLE, 0.0, 0.0, 0.0, 20.0, playerid);
  45361. PlayerData[playerid][aMeStatus] =1;
  45362. }
  45363. else
  45364. {
  45365. format(string,sizeof(string),"Has an AK-47 slung around their back (( %s ))",GetRPName(playerid));
  45366. UpdateDynamic3DTextLabelText(PlayerData[playerid][aMeID], COLOR_PURPLE, string);
  45367. }
  45368. }
  45369. }
  45370. else if(strcmp(weaponchoice, "m4", true, strlen(weaponchoice)) == 0)
  45371. {
  45372. if( PlayerData[playerid][pWeapons][5] == 31 && PlayerData[playerid][pAGuns][5] == 0 )
  45373. {
  45374. SendClientMessageEx(playerid, COLOR_AQUA, "You have slung your M4 around your back. (use /unsling to retrieve the gun)");
  45375. weapon = PlayerData[playerid][pWeapons][5];
  45376. ammo = PlayerData[playerid][pGunsAmmo][5];
  45377. format(string,sizeof(string), "* %s slings their M4 around their back, securing it to their body.", GetRPName(playerid));
  45378. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  45379. SetPVarInt(playerid, "GiveWeaponTimer", 10); SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_GIVEWEAPONTIMER);
  45380. if(PlayerData[playerid][aMeStatus] == 0)
  45381. {
  45382. format(string,sizeof(string),"Has an M4 slung around their back (( %s ))",GetRPName(playerid));
  45383. PlayerData[playerid][aMeID] = CreateDynamic3DTextLabel(string, COLOR_PURPLE, 0.0, 0.0, 0.0, 20.0, playerid);
  45384. PlayerData[playerid][aMeStatus] =1;
  45385. }
  45386. else
  45387. {
  45388. format(string,sizeof(string),"Has an M4 slung around their back (( %s ))",GetRPName(playerid));
  45389. UpdateDynamic3DTextLabelText(PlayerData[playerid][aMeID], COLOR_PURPLE, string);
  45390. }
  45391. }
  45392. }
  45393. else if(strcmp(weaponchoice, "rifle", true, strlen(weaponchoice)) == 0)
  45394. {
  45395. if( PlayerData[playerid][pWeapons][6] == 33 && PlayerData[playerid][pAGuns][6] == 0 )
  45396. {
  45397. SendClientMessageEx(playerid, COLOR_AQUA, "You have slung your rifle around your back. (use /unsling to retrieve the gun)");
  45398. weapon = PlayerData[playerid][pWeapons][6];
  45399. ammo = PlayerData[playerid][pGunsAmmo][6];
  45400. format(string,sizeof(string), "* %s slings their rifle around their back, securing it to their body.", GetRPName(playerid));
  45401. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  45402. SetPVarInt(playerid, "GiveWeaponTimer", 10); SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_GIVEWEAPONTIMER);
  45403. if(PlayerData[playerid][aMeStatus] == 0)
  45404. {
  45405. format(string,sizeof(string),"Has a rifle slung around their back (( %s ))",GetRPName(playerid));
  45406. PlayerData[playerid][aMeID] = CreateDynamic3DTextLabel(string, COLOR_PURPLE, 0.0, 0.0, 0.0, 20.0, playerid);
  45407. PlayerData[playerid][aMeStatus] =1;
  45408. }
  45409. else
  45410. {
  45411. format(string,sizeof(string),"Has a rifle slung around their back (( %s ))",GetRPName(playerid));
  45412. UpdateDynamic3DTextLabelText(PlayerData[playerid][aMeID], COLOR_PURPLE, string);
  45413. }
  45414. }
  45415. }
  45416. else if(strcmp(weaponchoice, "sniper", true, strlen(weaponchoice)) == 0)
  45417. {
  45418. if( PlayerData[playerid][pWeapons][6] == 34 && PlayerData[playerid][pAGuns][6] == 0 )
  45419. {
  45420. SendClientMessageEx(playerid, COLOR_AQUA, "You have slung your sniper rifle around your back. (use /unsling to retrieve the gun)");
  45421. weapon = PlayerData[playerid][pWeapons][6];
  45422. ammo = PlayerData[playerid][pGunsAmmo][6];
  45423. format(string,sizeof(string), "* %s slings their sniper rifle around their back, securing it to their body.", GetPlayerNameEx(playerid));
  45424. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  45425. SetPVarInt(playerid, "GiveWeaponTimer", 10); SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_GIVEWEAPONTIMER);
  45426. if(PlayerData[playerid][aMeStatus] == 0)
  45427. {
  45428. format(string,sizeof(string),"Has a sniper slung around their back (( %s ))",GetRPName(playerid));
  45429. PlayerData[playerid][aMeID] = CreateDynamic3DTextLabel(string, COLOR_PURPLE, 0.0, 0.0, 0.0, 20.0, playerid);
  45430. PlayerData[playerid][aMeStatus] =1;
  45431. }
  45432. else
  45433. {
  45434. format(string,sizeof(string),"Has a sniper slung around their back (( %s ))",GetRPName(playerid));
  45435. UpdateDynamic3DTextLabelText(PlayerData[playerid][aMeID], COLOR_PURPLE, string);
  45436. }
  45437. }
  45438. }
  45439. if(weapon == 0) return SendClientMessageEx(playerid, COLOR_GREY, "You don't have that weapon.");
  45440. SetPVarInt(playerid, "activesling", weapon);
  45441. SetPVarInt(playerid, "activeslingammo", ammo);
  45442. RemovePlayerWeapon(playerid, weapon);
  45443. return 1;
  45444. }
  45445. CMD:unsling(playerid, params[])
  45446. {
  45447. if(PlayerData[playerid][pTazedTime] > 0 || PlayerData[playerid][pInjured] > 0 || PlayerData[playerid][pHospital] > 0 || PlayerData[playerid][pCuffed] > 0 || PlayerData[playerid][pTied] > 0 || PlayerData[playerid][pJailTime] > 0 || PlayerData[playerid][pPaintball] > 0)
  45448. {
  45449. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment.");
  45450. }
  45451. if(GetPVarInt(playerid, "GiveWeaponTimer") >= 1) {
  45452. new
  45453. szMessage[59];
  45454. format(szMessage, sizeof(szMessage), " You must wait %d seconds before getting another weapon.", GetPVarInt(playerid, "GiveWeaponTimer"));
  45455. return SendClientMessageEx(playerid, COLOR_GREY, szMessage);
  45456. }
  45457. if(IsPlayerInAnyVehicle(playerid)) { SendClientMessageEx(playerid, COLOR_WHITE, "You can't do this while being inside the vehicle!"); return 1; }
  45458. new activewep, ammo;
  45459. activewep = GetPVarInt(playerid, "activesling");
  45460. ammo = GetPVarInt(playerid, "activeslingammo");
  45461. new weaponchoice[128];
  45462. if(sscanf(params, "s[128]", weaponchoice))
  45463. {
  45464. SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /unsling [emote]");
  45465. return 1;
  45466. }
  45467. if(activewep > 0)
  45468. {
  45469. new
  45470. szWeapon[16],
  45471. szMessage[128];
  45472. GetWeaponName(activewep, szWeapon, sizeof(szWeapon));
  45473. GivePlayerWeaponEx(playerid, activewep, true);
  45474. if(isnull(weaponchoice))
  45475. {
  45476. format(szMessage, sizeof(szMessage), "You have unslung the %s from your back.", szWeapon);
  45477. SendClientMessageEx(playerid, COLOR_WHITE, szMessage);
  45478. format(szMessage, sizeof(szMessage), "* %s unslings a %s from their back.", GetRPName(playerid), szWeapon);
  45479. ProxDetector(30.0, playerid, szMessage, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  45480. DeletePVar(playerid, "activesling");
  45481. DeletePVar(playerid, "activeslingammo");
  45482. }
  45483. else
  45484. {
  45485. format(szMessage, sizeof(szMessage), "You have unslung the %s from your back.", szWeapon);
  45486. SendClientMessageEx(playerid, COLOR_WHITE, szMessage);
  45487. format(szMessage, sizeof(szMessage), "* %s %s", GetRPName(playerid), weaponchoice);
  45488. ProxDetector(30.0, playerid, szMessage, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  45489. DeletePVar(playerid, "activesling");
  45490. DeletePVar(playerid, "activeslingammo");
  45491. }
  45492. DestroyDynamic3DTextLabel(PlayerData[playerid][aMeID]);
  45493. PlayerData[playerid][aMeStatus] =0;
  45494. }
  45495. return 1;
  45496. }
  45497. CMD:ado(playerid, params[])
  45498. {
  45499. new activewep = GetPVarInt(playerid, "activesling");
  45500. new message[100], string[180];
  45501. if(sscanf(params, "s[100]", message))
  45502. {
  45503. SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /ado [action]");
  45504. SendClientMessageEx(playerid, COLOR_GREY, "NOTE: Set the action to OFF to remove the label.");
  45505. return 1;
  45506. }
  45507. if(activewep > 0)
  45508. {
  45509. SendClientMessageEx(playerid, COLOR_GREY, " You have a weapon slung around your back, you can't use /ado.");
  45510. return 1;
  45511. }
  45512. if(strcmp(message, "off", true) == 0)
  45513. {
  45514. SendClientMessageEx(playerid, COLOR_GREY, " You have removed the description label.");
  45515. DestroyDynamic3DTextLabel(PlayerData[playerid][aMeID]);
  45516. PlayerData[playerid][aMeStatus] =0;
  45517. return 1;
  45518. }
  45519. if(strlen(message) > 100) return SendClientMessageEx(playerid, COLOR_GREY, " The action is too long, please reduce the length.");
  45520. if(strlen(message) < 3) return SendClientMessageEx(playerid, COLOR_GREY, " The action is too short, please increase the length.");
  45521. if(PlayerData[playerid][aMeStatus] == 0)
  45522. {
  45523. PlayerData[playerid][aMeStatus] =1;
  45524. format(string, sizeof(string), "* %s (( %s ))", message, GetRPName(playerid));
  45525. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  45526. PlayerData[playerid][aMeID] = CreateDynamic3DTextLabel(string, COLOR_PURPLE, 0.0, 0.0, 0.7, 20.0, playerid);
  45527. return 1;
  45528. }
  45529. else
  45530. {
  45531. format(string, sizeof(string), "* %s (( %s ))", message, GetRPName(playerid));
  45532. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  45533. UpdateDynamic3DTextLabelText(PlayerData[playerid][aMeID], COLOR_PURPLE, string);
  45534. return 1;
  45535. }
  45536. }
  45537. */
  45538. CMD:jetpackall(playerid, params[])
  45539. {
  45540. if(PlayerData[playerid][pAdmin] > 5)
  45541. {
  45542. foreach(new i : Player)
  45543. {
  45544. PlayerData[i][pJetpack] = 1;
  45545. SetPlayerSpecialAction(i, SPECIAL_ACTION_USEJETPACK);
  45546. GameTextForPlayer(i, "~g~Jetpack", 3000, 3);
  45547. }
  45548. }
  45549. return 1;
  45550. }
  45551. CMD:helmet(playerid, params[])
  45552. {
  45553. new vehicleid = GetPlayerVehicleID(playerid);
  45554. if(PlayerData[playerid][pHelmet] == 1)
  45555. {
  45556. if (HelmetEnabled[playerid] == 1)
  45557. {
  45558. HelmetEnabled[playerid] = 0;
  45559. ShowActionBubble(playerid, "{FF8000}* {C2A2DA}%s reaches for their helmet and takes it off.", GetPlayerNameEx(playerid));
  45560. RemovePlayerAttachedObject(playerid, 3);
  45561. }
  45562. else if (HelmetEnabled[playerid] == 0)
  45563. {
  45564. if(IsanewBike(vehicleid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  45565. {
  45566. HelmetEnabled[playerid] = 1;
  45567. ShowActionBubble(playerid, "{FF8000}* {C2A2DA}%s reaches for their helmet and puts it on.", GetPlayerNameEx(playerid));
  45568. SetPlayerAttachedObject(playerid, 3, GetPlayerHelmet(playerid), 2, 0.101, -0.0, 0.0, 5.50, 84.60, 83.7, 1, 1, 1);
  45569. }
  45570. else return SendClientMessage(playerid, COLOR_GREY, "You must be in a bike to use this command");
  45571. }
  45572. }
  45573. else return SendClientMessage(playerid, COLOR_GREY, "You dont have a helmet, buy one from a tool shop.");
  45574. return 1;
  45575. }
  45576. //CMD:mmhelp(playerid, params[]) return callcmd::graphichelp(playerid, params);
  45577. CMD:graphichelp(playerid, params[])
  45578. {
  45579. if(PlayerData[playerid][pGraphic] > 0)
  45580. {
  45581. SendClientMessage(playerid, COLOR_YELLOW, "____________________________________________");
  45582. if(PlayerData[playerid][pGraphic] == GRAPHICRANK_REGULAR)
  45583. {
  45584. SendClientMessage(playerid, COLOR_WHITE, "*1* Graphics Designer: /(g)raphic(c)hat /designers");
  45585. }
  45586. else if(PlayerData[playerid][pGraphic] == GRAPHICRANK_SENIOR)
  45587. {
  45588. SendClientMessage(playerid, COLOR_WHITE, "*2* Video Editor: /(g)raphic(c)hat /designers");
  45589. }
  45590. else if(PlayerData[playerid][pGraphic] == GRAPHICRANK_MANAGER)
  45591. {
  45592. SendClientMessage(playerid, COLOR_WHITE, "*3* Graphic Manager: /(g)raphic(c)hat /designers /makedesigner");
  45593. }
  45594. }
  45595. else
  45596. {
  45597. SendClientMessageEx(playerid, COLOR_GREY, "You are not authorized to use this commands");
  45598. }
  45599. return 1;
  45600. }
  45601. CMD:graphicchat(playerid, params[])
  45602. {
  45603. if(PlayerData[playerid][pGraphic] >= 1)
  45604. {
  45605. new msg[128];
  45606. new str[128];
  45607. if(!sscanf(params, "s[128]", msg))
  45608. {
  45609. if(PlayerData[playerid][pGraphic] == GRAPHICRANK_REGULAR) str = "Graphics Designer";
  45610. else if(PlayerData[playerid][pGraphic] == GRAPHICRANK_SENIOR) str = "Video Editor";
  45611. else if(PlayerData[playerid][pGraphic] == GRAPHICRANK_MANAGER) str = "Graphic Manager";
  45612. format(str, sizeof(str), "* %s %s: %s *", str, GetRPName(playerid), msg);
  45613. SendGraphicMessage(0xFA58ACFF, str);
  45614. }
  45615. else
  45616. {
  45617. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /(g)raphic(c)hat [message]");
  45618. }
  45619. }
  45620. else
  45621. {
  45622. SendClientMessageEx(playerid, COLOR_GREY, "You are not authorized to use this chat.");
  45623. }
  45624. return 1;
  45625. }
  45626. CMD:setfaction(playerid, params[])
  45627. {
  45628. new targetid, factionid, rankid;
  45629. if(PlayerData[playerid][pAdmin] < 5 && !PlayerData[playerid][pFactionMod])
  45630. {
  45631. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  45632. }
  45633. if(sscanf(params, "uiI(-1)", targetid, factionid, rankid))
  45634. {
  45635. return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setfaction [playerid] [factionid (-1 = none)] [rank (optional)]");
  45636. }
  45637. if(!IsPlayerConnected(targetid))
  45638. {
  45639. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  45640. }
  45641. if(!PlayerData[targetid][pLogged])
  45642. {
  45643. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet.");
  45644. }
  45645. if(!(-1 <= factionid < MAX_FACTIONS) || (factionid >= 0 && FactionInfo[factionid][fType] == FACTION_NONE))
  45646. {
  45647. return SendClientMessage(playerid, COLOR_GREY, "Invalid faction.");
  45648. }
  45649. if((factionid != -1 && !(-1 <= rankid < FactionInfo[factionid][fRankCount])))
  45650. {
  45651. return SendClientMessage(playerid, COLOR_GREY, "Invalid rank.");
  45652. }
  45653. if(factionid == -1)
  45654. {
  45655. ResetPlayerWeaponsEx(targetid);
  45656. SetPlayerSkin(targetid, 230);
  45657. PlayerData[targetid][pFaction] = -1;
  45658. PlayerData[targetid][pFactionRank] = 0;
  45659. PlayerData[targetid][pDivision] = -1;
  45660. PlayerData[targetid][pDuty] = 0;
  45661. SendClientMessageEx(targetid, COLOR_AQUA, "%s has removed you from your faction.", GetPlayerRPName(playerid));
  45662. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has removed %s from their faction.", GetPlayerRPName(playerid), GetPlayerRPName(targetid));
  45663. }
  45664. else
  45665. {
  45666. if(rankid == -1)
  45667. {
  45668. rankid = FactionInfo[factionid][fRankCount] - 1;
  45669. }
  45670. /*if(rankid == FactionInfo[factionid][fRankCount] - 1)
  45671. {
  45672. GetPlayerName(targetid, FactionInfo[factionid][fLeader], MAX_PLAYER_NAME);
  45673. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factions SET leader = '%e' WHERE id = %i", FactionInfo[factionid][fLeader], factionid);
  45674. mysql_tquery(connectionID, queryBuffer);
  45675. }*/
  45676. PlayerData[targetid][pFaction] = factionid;
  45677. PlayerData[targetid][pFactionRank] = rankid;
  45678. PlayerData[targetid][pDivision] = -1;
  45679. SendClientMessageEx(targetid, COLOR_AQUA, "%s has made you a {00AA00}%s{33CCFF} in %s.", GetPlayerRPName(playerid), FactionRanks[factionid][rankid], FactionInfo[factionid][fName]);
  45680. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has made %s a %s in %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid), FactionRanks[factionid][rankid], FactionInfo[factionid][fName]);
  45681. }
  45682. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET faction = %i, factionrank = %i, division = %i WHERE uid = %i", factionid, rankid, PlayerData[playerid][pDivision], PlayerData[targetid][pID]);
  45683. mysql_tquery(connectionID, queryBuffer);
  45684. return 1;
  45685. }
  45686. GetPlayerRPName(playerid)
  45687. {
  45688. new
  45689. name[MAX_PLAYER_NAME];
  45690. GetPlayerName(playerid, name, sizeof(name));
  45691. for(new i = 0, l = strlen(name); i < l; i ++)
  45692. {
  45693. if(name[i] == '_')
  45694. {
  45695. name[i] = ' ';
  45696. }
  45697. }
  45698. return name;
  45699. }
  45700. CMD:makedesigner(playerid, params[])
  45701. {
  45702. if(PlayerData[playerid][pGraphic] < GRAPHICRANK_MANAGER && PlayerData[playerid][pAdmin] < MANAGEMENT) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  45703. new id, rank[24], str[128];
  45704. if(sscanf(params, "us[24]", id, rank))
  45705. {
  45706. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /makedesigner [playerid] [rank]");
  45707. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} 'None' 'Regular' 'Editor' or 'Manager'");
  45708. }
  45709. else
  45710. {
  45711. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player isn't connected.");
  45712. if(strcmp(rank, "none", true) == 0 || strcmp(rank, "regular", true) == 0 || strcmp(rank, "editor", true) == 0 || strcmp(rank, "manager", true) == 0)
  45713. {
  45714. if(strcmp(rank, "none", true) == 0)
  45715. {
  45716. SendAdminMessage(COLOR_YELLOW, "{FF0000}AdmWarning{FFFFFF}: %s has removed %s's status as a Designer.", GetRPName(playerid), GetRPName(id));
  45717. SendClientMessage(id, COLOR_AQUA, "You are no longer a Designer.");
  45718. PlayerData[id][pGraphic] = GRAPHICRANK_NONE;
  45719. format(str, sizeof(str), "You removed %s from the Designer team.", GetRPName(id));
  45720. SendClientMessage(playerid, COLOR_AQUA, str);
  45721. // if(PlayerData[playerid][pLevel] >= 2)PlayerData[id][pTag] = NTAG_PLAYER;
  45722. // else PlayerData[id][pTag] = NTAG_NEWBIE;
  45723. return 1;
  45724. }
  45725. if(strcmp(rank, "regular", true) == 0)
  45726. {
  45727. // PlayerData[id][pTag] = NTAG_GRAPHIC;
  45728. PlayerData[id][pGraphic] = GRAPHICRANK_REGULAR;
  45729. format(str, sizeof(str), "You have been given the status of a %s Designer.", rank);
  45730. SendClientMessage(id, COLOR_AQUA, str);
  45731. SendAdminMessage(COLOR_YELLOW, "{FF0000}AdmWarning{FFFFFF}: %s has been given the status of a %s Designer by %s", GetRPName(id), rank, GetRPName(playerid));
  45732. format(str, sizeof(str), "You gave %s the status of a %s Designer.", GetRPName(id), rank);
  45733. SendClientMessage(playerid, COLOR_AQUA, str);
  45734. }
  45735. if(strcmp(rank, "editor", true) == 0)
  45736. {
  45737. // PlayerData[id][pTag] = NTAG_GRAPHIC;
  45738. PlayerData[id][pGraphic] = GRAPHICRANK_SENIOR;
  45739. format(str, sizeof(str), "You have been given the status of a %s Designer.", rank);
  45740. SendClientMessage(id, COLOR_AQUA, str);
  45741. SendAdminMessage(COLOR_YELLOW, "{FF0000}AdmWarning{FFFFFF}: %s has been given the status of a %s Designer by %s", GetRPName(id), rank, GetRPName(playerid));
  45742. format(str, sizeof(str), "You gave %s the status of a %s Designer.", GetRPName(id), rank);
  45743. SendClientMessage(playerid, COLOR_AQUA, str);
  45744. }
  45745. if(strcmp(rank, "manager", true) == 0)
  45746. {
  45747. // PlayerData[id][pTag] = NTAG_MANAGERGRAPHIC;
  45748. PlayerData[id][pGraphic] = GRAPHICRANK_MANAGER;
  45749. format(str, sizeof(str), "You have been given the status of a %s Designer.", rank);
  45750. SendClientMessage(id, COLOR_AQUA, str);
  45751. SendAdminMessage(COLOR_YELLOW, "{FF0000}AdmWarning{FFFFFF}: %s has been given the status of a %s Designer by %s", GetRPName(id), rank, GetRPName(playerid));
  45752. format(str, sizeof(str), "You gave %s the status of a %s Designer.", GetRPName(id), rank);
  45753. SendClientMessage(playerid, COLOR_AQUA, str);
  45754. }
  45755. }
  45756. else return SendClientMessage(playerid, COLOR_GREY, "Invalid rank specified.");
  45757. }
  45758. return 1;
  45759. }
  45760. CMD:ap(playerid, params[])
  45761. {
  45762. if(PlayerData[playerid][pAdminPersonnel] || PlayerData[playerid][pAdmin] >= MANAGEMENT)
  45763. {
  45764. new msg[128];
  45765. new str[128];
  45766. if(!sscanf(params, "s[128]", msg))
  45767. {
  45768. format(str, sizeof(str), "* [AP]{FFFFFF} %s: %s *", GetRPName(playerid), msg);
  45769. SendAPMessage(COLOR_AQUA, str);
  45770. }
  45771. else
  45772. {
  45773. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /(a)dmin(p)ersonnel [message]");
  45774. }
  45775. }
  45776. else
  45777. {
  45778. SendClientMessageEx(playerid, COLOR_GREY, "You are not authorized to use this chat.");
  45779. }
  45780. return 1;
  45781. }
  45782. CMD:dga(playerid, params[])
  45783. {
  45784. if(PlayerData[playerid][pGameAffairs] >= 1 || PlayerData[playerid][pAdmin] >= ASST_MANAGEMENT)
  45785. {
  45786. new msg[128];
  45787. new str[128];
  45788. if(!sscanf(params, "s[128]", msg))
  45789. {
  45790. format(str, sizeof(str), "* [DGA]{FFFFFF} %s: %s *", GetRPName(playerid), msg);
  45791. SendDGAMessage(COLOR_GLOBAL, str);
  45792. }
  45793. else
  45794. {
  45795. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /dga [message]");
  45796. }
  45797. }
  45798. else
  45799. {
  45800. SendClientMessageEx(playerid, COLOR_GREY, "You are not authorized to use this chat.");
  45801. }
  45802. return 1;
  45803. }
  45804. CMD:wd(playerid, params[])
  45805. {
  45806. if(PlayerData[playerid][pWebDev] >= 1 || PlayerData[playerid][pAdmin] >= ASST_MANAGEMENT)
  45807. {
  45808. new msg[128];
  45809. new str[128];
  45810. if(!sscanf(params, "s[128]", msg))
  45811. {
  45812. format(str, sizeof(str), "* [DGA]{FFFFFF} %s: %s *", GetRPName(playerid), msg);
  45813. SendWDMessage(COLOR_GLOBAL, str);
  45814. }
  45815. else
  45816. {
  45817. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /dga [message]");
  45818. }
  45819. }
  45820. else
  45821. {
  45822. SendClientMessageEx(playerid, COLOR_GREY, "You are not authorized to use this chat.");
  45823. }
  45824. return 1;
  45825. }
  45826. CMD:fm(playerid, params[])
  45827. {
  45828. if(PlayerData[playerid][pFactionMod] || PlayerData[playerid][pGameAffairs] || PlayerData[playerid][pAdmin] >= ASST_MANAGEMENT)
  45829. {
  45830. new msg[128];
  45831. new str[128];
  45832. if(!sscanf(params, "s[128]", msg))
  45833. {
  45834. format(str, sizeof(str), "* [FM]{FFFFFF} %s: %s *", GetRPName(playerid), msg);
  45835. SendFMMessage(COLOR_BLUE, str);
  45836. }
  45837. else
  45838. {
  45839. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /(f)action(m)managment [message]");
  45840. }
  45841. }
  45842. else
  45843. {
  45844. SendClientMessageEx(playerid, COLOR_GREY, "You are not authorized to use this chat.");
  45845. }
  45846. return 1;
  45847. }
  45848. CMD:gm(playerid, params[])
  45849. {
  45850. if(PlayerData[playerid][pGangMod] || PlayerData[playerid][pGameAffairs] || PlayerData[playerid][pAdmin] >= ASST_MANAGEMENT)
  45851. {
  45852. new msg[128];
  45853. new str[128];
  45854. if(!sscanf(params, "s[128]", msg))
  45855. {
  45856. format(str, sizeof(str), "* [GM]{FFFFFF} %s: %s *", GetRPName(playerid), msg);
  45857. SendGMMessage(COLOR_GREEN, str);
  45858. }
  45859. else
  45860. {
  45861. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /(g)ang (m)managment [message]");
  45862. }
  45863. }
  45864. else
  45865. {
  45866. SendClientMessageEx(playerid, COLOR_GREY, "You are not authorized to use this chat.");
  45867. }
  45868. return 1;
  45869. }
  45870. CMD:testfaction(playerid, params[])
  45871. {
  45872. new
  45873. szDialogStr[264],
  45874. iCount;
  45875. while(iCount < MAX_FACTIONS) {
  45876. if(FactionInfo[iCount][fName])
  45877. format(szDialogStr, sizeof szDialogStr, "%s\n(%i) %s{FFFFFF}", szDialogStr, iCount+1, FactionInfo[iCount][fName]);
  45878. else
  45879. format(szDialogStr, sizeof szDialogStr, "%s\n(%i) (empty)", szDialogStr, iCount+1);
  45880. ++iCount;
  45881. }
  45882. Dialog_Show(playerid, DIALOG_NONE, DIALOG_STYLE_LIST, "Factions", szDialogStr, "Close", "");
  45883. return 1;
  45884. }
  45885. CMD:windows(playerid, params[])
  45886. {
  45887. new vehicleid = GetPlayerVehicleID(playerid);
  45888. if(!IsPlayerInAnyVehicle(playerid))
  45889. {
  45890. return SendClientMessage(playerid, COLOR_GREY, "You must be inside a vehicle to use this command.");
  45891. }
  45892. if(PlayerData[playerid][pCuffed])
  45893. {
  45894. return SendClientMessage(playerid, COLOR_GREY, "You cannot use this command while cuffed");
  45895. }
  45896. if(PlayerData[playerid][pTied])
  45897. {
  45898. return SendClientMessage(playerid, COLOR_GREY, "You cannot use this command while tied.");
  45899. }
  45900. if(!VehicleHasWindows(vehicleid))
  45901. {
  45902. return SendClientMessage(playerid, COLOR_GREY, "This vehicle does not have any windows.");
  45903. }
  45904. new driver, passenger, backleft, backright;
  45905. GetVehicleParamsCarWindows(GetPlayerVehicleID(playerid), driver, passenger, backleft, backright);
  45906. SetVehicleParamsCarWindows(GetPlayerVehicleID(playerid), !driver, !passenger, !backleft, !backright);
  45907. if(CarWindows[vehicleid] == 0)
  45908. {
  45909. CarWindows[vehicleid] = 1;
  45910. SendProximityMessage(playerid, 20.0, 0xFFA500FF, "*{C2A2DA} %s rolls down the vehicle windows of the %s.", GetRPName(playerid), GetVehicleName(vehicleid));
  45911. }
  45912. else
  45913. {
  45914. CarWindows[vehicleid] = 0;
  45915. SendProximityMessage(playerid, 20.0, 0xFFA500FF, "*{C2A2DA} %s rolls up the vehicle windows of the %s.", GetRPName(playerid), GetVehicleName(vehicleid));
  45916. }
  45917. return 1;
  45918. }
  45919. CMD:loaditem(playerid, params[])
  45920. {
  45921. new vehicleid = GetNearbyVehicle(playerid);
  45922. if(PlayerData[playerid][pBugFix] == 0)
  45923. {
  45924. return SendClientMessage(playerid, COLOR_GREY, "You are not handling any item.");
  45925. }
  45926. if(vehicleid == INVALID_VEHICLE_ID)
  45927. {
  45928. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any vehicle.");
  45929. }
  45930. if(!VehicleHasDoors(vehicleid))
  45931. {
  45932. return SendClientMessage(playerid, COLOR_GREY, "This vehicle has no boot.");
  45933. }
  45934. if(!GetVehicleParams(vehicleid, VEHICLE_BOOT))
  45935. {
  45936. return SendClientMessage(playerid, COLOR_GREY, "The vehicle trunk is not open");
  45937. }
  45938. PlayerData[playerid][pCP] = CHECKPOINT_HOUSEROB;
  45939. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
  45940. RemovePlayerAttachedObject(playerid, 9);
  45941. SetPlayerCheckpoint(playerid, 1596.5035,-1552.3578,13.5879, 5.0);
  45942. return 1;
  45943. }
  45944. CMD:respawnvipcars(playerid, params[])
  45945. {
  45946. if (PlayerData[playerid][pAdmin] >= SENIOR_ADMIN)
  45947. {
  45948. for(new i = 0; i < sizeof(VIPVehicles); i++)
  45949. {
  45950. if(!IsVehicleOccupied(VIPVehicles[i]))
  45951. {
  45952. SetVehicleVirtualWorld(VIPVehicles[i], 0);
  45953. LinkVehicleToInterior(VIPVehicles[i], 0);
  45954. SetVehicleToRespawn(VIPVehicles[i]);
  45955. }
  45956. }
  45957. SendClientMessageEx(playerid, COLOR_GREY, "You have respawned all unoccupied VIP Vehicles.");
  45958. }
  45959. return 1;
  45960. }
  45961. CMD:selldynamicsmanagement(playerid, params[])
  45962. {
  45963. new houses, garages, businesses;
  45964. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT)
  45965. {
  45966. return SendClientMessage(playerid, COLOR_WHITE, "You are not authorized to use this command.");
  45967. }
  45968. for(new i = 0; i < MAX_HOUSES; i ++)
  45969. {
  45970. if(HouseInfo[i][hExists])
  45971. {
  45972. SetHouseOwner(i, INVALID_PLAYER_ID);
  45973. houses++;
  45974. }
  45975. }
  45976. for(new i = 0; i < MAX_GARAGES; i ++)
  45977. {
  45978. if(GarageInfo[i][gExists])
  45979. {
  45980. SetGarageOwner(i, INVALID_PLAYER_ID);
  45981. garages++;
  45982. }
  45983. }
  45984. for(new i = 0; i < MAX_BUSINESSES; i ++)
  45985. {
  45986. if(BusinessInfo[i][bExists])
  45987. {
  45988. SetBusinessOwner(i, INVALID_PLAYER_ID);
  45989. businesses++;
  45990. }
  45991. }
  45992. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has sold all properties.", GetRPName(playerid));
  45993. SendClientMessageEx(playerid, COLOR_WHITE, "* You have sell %i houses, %i garages and %i businesses.", houses, garages, businesses);
  45994. return 1;
  45995. }
  45996. CMD:samphelp(playerid, params[])
  45997. {
  45998. SendClientMessageEx(playerid, COLOR_GLOBAL, "_____________________[ SA:MP 0.3.7 R2 CLIENT ]_________________________");
  45999. SendClientMessageEx(playerid, COLOR_GREY, "** CLIENT ** /interior /save /headmove /timestamp /dl");
  46000. SendClientMessageEx(playerid, COLOR_GREY, "** CLIENT ** /pagesize /rs /fpslimit");
  46001. return 1;
  46002. }
  46003. CMD:togglecam(playerid, params[])
  46004. {
  46005. if(GetPVarInt(playerid,"used") == 1)
  46006. {
  46007. SetPVarInt(playerid,"used",0);
  46008. SetCameraBehindPlayer(playerid);
  46009. DestroyPlayerObject(playerid,pObj[playerid]);
  46010. }
  46011. return 1;
  46012. }
  46013. CMD:window(playerid, params[])
  46014. {
  46015. // new string[128];
  46016. if(InsideShamal[playerid] != INVALID_VEHICLE_ID)
  46017. {
  46018. if(GetPlayerInterior(playerid) == 1)
  46019. {
  46020. new
  46021. Float: fSpecPos[6];
  46022. GetPlayerPos(playerid, fSpecPos[0], fSpecPos[1], fSpecPos[2]);
  46023. GetPlayerFacingAngle(playerid, fSpecPos[3]);
  46024. GetPlayerHealth(playerid, fSpecPos[4]);
  46025. GetPlayerArmour(playerid, fSpecPos[5]);
  46026. SetPVarFloat(playerid, "air_Xpos", fSpecPos[0]);
  46027. SetPVarFloat(playerid, "air_Ypos", fSpecPos[1]);
  46028. SetPVarFloat(playerid, "air_Zpos", fSpecPos[2]);
  46029. SetPVarFloat(playerid, "air_Rpos", fSpecPos[3]);
  46030. SetPVarFloat(playerid, "air_HP", fSpecPos[4]);
  46031. SetPVarFloat(playerid, "air_Arm", fSpecPos[5]);
  46032. SetPlayerInterior(playerid, 0);
  46033. SetPlayerVirtualWorld(playerid, 0);
  46034. TogglePlayerSpectating(playerid, 1);
  46035. PlayerSpectateVehicle(playerid, InsideShamal[playerid]);
  46036. ShowActionBubble(playerid, "* %s glances out the window.", GetRPName(playerid));
  46037. // ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  46038. }
  46039. else TogglePlayerSpectating(playerid, 0);
  46040. }
  46041. return 1;
  46042. }
  46043. CMD:removegunlicense(playerid, params[])
  46044. {
  46045. new targetid;
  46046. if(iscop(playerid))
  46047. {
  46048. if(sscanf(params, "d", targetid))
  46049. {
  46050. return SendClientMessage(playerid, COLOR_GREY, "Usage: /removegunlicense [playerid]");
  46051. }
  46052. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  46053. {
  46054. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  46055. }
  46056. PlayerData[targetid][pGunLicense] = 0;
  46057. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET gunlicense = %d WHERE uid = %i", PlayerData[targetid][pGunLicense], PlayerData[targetid][pID]);
  46058. mysql_tquery(connectionID, queryBuffer);
  46059. SendClientMessageEx(playerid, COLOR_AQUA, "You've set %s's gun license to %d", GetRPName(targetid), PlayerData[targetid][pGunLicense]);
  46060. SendClientMessageEx(targetid, COLOR_AQUA, "Officer %s has revoked your gun license", GetRPName(playerid));
  46061. }
  46062. else SCM(playerid, COLOR_GREY, "You are not authorized to use this command");
  46063. return 1;
  46064. }
  46065. CMD:givegunlicense(playerid, params[])
  46066. {
  46067. new targetid;
  46068. if(iscop(playerid))
  46069. {
  46070. if(sscanf(params, "d", targetid))
  46071. {
  46072. return SendClientMessage(playerid, COLOR_GREY, "Usage: /givegunlicense [playerid]");
  46073. }
  46074. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  46075. {
  46076. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  46077. }
  46078. PlayerData[targetid][pGunLicense] = 1;
  46079. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET gunlicense = %d WHERE uid = %i", PlayerData[targetid][pGunLicense], PlayerData[targetid][pID]);
  46080. mysql_tquery(connectionID, queryBuffer);
  46081. SendClientMessageEx(playerid, COLOR_AQUA, "You've set %s's gun license to %d", GetRPName(targetid), PlayerData[targetid][pGunLicense]);
  46082. SendClientMessageEx(targetid, COLOR_AQUA, "Officer %s has approved your gun license request", GetRPName(playerid));
  46083. }
  46084. else SCM(playerid, COLOR_GREY, "You are not authorized to use this command");
  46085. return 1;
  46086. }
  46087. CMD:vradar(playerid, params[])
  46088. {
  46089. if(!iscop(playerid))
  46090. return SendClientMessageEx(playerid, COLOR_GREY, "You are not a law enforcement officer!");
  46091. if (!IsPlayerInAnyVehicle(playerid))
  46092. return SendClientMessageEx(playerid, 0xFF0000FF, "You cannot use a dashboard radar outside of a vehicle.");
  46093. switch (CarRadars[playerid])
  46094. {
  46095. case 0: // player has not deployed dashboard radar
  46096. {
  46097. CarRadars[playerid] = 1;
  46098. PlayerTextDrawShow(playerid, _crTextTarget[playerid]);
  46099. PlayerTextDrawShow(playerid, _crTextSpeed[playerid]);
  46100. PlayerTextDrawShow(playerid, _crTickets[playerid]);
  46101. SendClientMessageEx(playerid, COLOR_WHITE, "You are now using your dashboard radar.");
  46102. SetPVarInt(playerid, "_lastTicketWarning", 0);
  46103. }
  46104. case 1..2: // dashboard radar has been deployed
  46105. {
  46106. CarRadars[playerid] = 0;
  46107. PlayerTextDrawHide(playerid, _crTextTarget[playerid]);
  46108. PlayerTextDrawHide(playerid, _crTextSpeed[playerid]);
  46109. PlayerTextDrawHide(playerid, _crTickets[playerid]);
  46110. SendClientMessageEx(playerid, COLOR_WHITE, "You are no longer using your dashboard radar.");
  46111. DeletePVar(playerid, "_lastTicketWarning");
  46112. }
  46113. }
  46114. return 1;
  46115. }
  46116. CMD:forceweather(playerid, params[])
  46117. {
  46118. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  46119. {
  46120. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  46121. }
  46122. autoWeather();
  46123. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has forced the weather to change.", GetRPName(playerid));
  46124. return 1;
  46125. }
  46126. CMD:seatbelt(playerid, params[])
  46127. {
  46128. if(IsPlayerInAnyVehicle(playerid) == 0)
  46129. {
  46130. SendClientMessage(playerid, COLOR_WHITE, "You are not in a vehicle!");
  46131. return 1;
  46132. }
  46133. if(IsPlayerInAnyVehicle(playerid) == 1 && seatbelt[playerid] == 0)
  46134. {
  46135. seatbelt[playerid] = 1;
  46136. if(IsAMotorBike(GetPlayerVehicleID(playerid)))
  46137. {
  46138. SetPlayerAttachedObject(playerid, 7, 18645, 2, 0.1, 0.02, 0.0, 0.0, 90.0, 90.0, 1.0, 1.0, 1.0);
  46139. ShowActionBubble(playerid, "* %s reaches for their helmet, and puts it on.", GetRPName(playerid));
  46140. SendClientMessage(playerid, COLOR_WHITE, "You have put on your helmet.");
  46141. }
  46142. else
  46143. {
  46144. ShowActionBubble(playerid, "* %s reaches for their seatbelt, and buckles it up.", GetRPName(playerid));
  46145. SendClientMessage(playerid, COLOR_WHITE, "You have put on your seatbelt.");
  46146. }
  46147. }
  46148. else if(IsPlayerInAnyVehicle(playerid) == 1 && seatbelt[playerid] == 1)
  46149. {
  46150. seatbelt[playerid] = 0;
  46151. if(IsAMotorBike(GetPlayerVehicleID(playerid)))
  46152. {
  46153. RemovePlayerAttachedObject(playerid, 7);
  46154. ShowActionBubble(playerid, "* %s reaches for their helmet, and takes it off.", GetRPName(playerid));
  46155. SendClientMessage(playerid, COLOR_WHITE, "You have taken off your helmet.");
  46156. }
  46157. else
  46158. {
  46159. ShowActionBubble(playerid, "* %s reaches for their seatbelt, and unbuckles it.", GetRPName(playerid));
  46160. SendClientMessage(playerid, COLOR_WHITE, "You have taken off your seatbelt.");
  46161. }
  46162. }
  46163. return 1;
  46164. }
  46165. CMD:checkbelt(playerid, params[])
  46166. {
  46167. new giveplayerid;
  46168. if(sscanf(params, "i", giveplayerid)) return SendClientMessage(playerid, COLOR_WHITE, "Usage: /checkbelt [playerid]");
  46169. if(GetPlayerState(giveplayerid) == PLAYER_STATE_ONFOOT)
  46170. {
  46171. SendClientMessage(playerid,COLOR_GREY,"That player is not in any vehicle!");
  46172. return 1;
  46173. }
  46174. if(!IsPlayerConnected(giveplayerid) || !IsPlayerInRangeOfPlayer(playerid, giveplayerid, 5.0))
  46175. {
  46176. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  46177. }
  46178. new stext[4];
  46179. if(seatbelt[giveplayerid] == 0)
  46180. {
  46181. stext = "off";
  46182. }
  46183. else
  46184. {
  46185. stext = "on";
  46186. }
  46187. if(IsAMotorBike(GetPlayerVehicleID(playerid)))
  46188. {
  46189. ShowActionBubble(playerid, "* %s looks at %s, checking to see if they are wearing a helmet.", GetRPName(playerid),GetRPName(giveplayerid));
  46190. SendClientMessageEx(playerid,COLOR_WHITE, "%s's helmet is currently %s.", GetRPName(giveplayerid) , stext);
  46191. }
  46192. else
  46193. {
  46194. ShowActionBubble(playerid, "* %s peers through the window at %s, checking to see if they are wearing a seatbelt.", GetRPName(playerid),GetRPName(giveplayerid));
  46195. SendClientMessageEx(playerid,COLOR_WHITE, "%s's seat belt is currently %s.", GetRPName(giveplayerid) , stext);
  46196. }
  46197. return 1;
  46198. }
  46199. CMD:checkmybelt(playerid, params[])
  46200. {
  46201. if(seatbelt[playerid] == 1)
  46202. {
  46203. SendClientMessage(playerid, COLOR_WHITE, "You have your seatbelt on.");
  46204. }
  46205. else
  46206. {
  46207. SendClientMessage(playerid, COLOR_WHITE, "Your seatbelt is off.");
  46208. }
  46209. return 1;
  46210. }
  46211. CMD:vcode(playerid, params[])
  46212. {
  46213. new vehicleid = GetPlayerVehicleID(playerid);
  46214. if(PlayerData[playerid][pDonator] < 3)
  46215. {
  46216. return SendClientMessage(playerid, COLOR_GREY, "You need a Legendary donator package to access use this command.");
  46217. }
  46218. if(!vehicleid)
  46219. {
  46220. return SendClientMessage(playerid, COLOR_GREY, "You are not inside of any vehicle.");
  46221. }
  46222. if(isnull(params) || strlen(params) > 64)
  46223. {
  46224. return SendClientMessage(playerid, COLOR_WHITE, "Usage: /vcode [text ('none' to reset)]");
  46225. }
  46226. if(IsValidDynamic3DTextLabel(DonatorCallSign[vehicleid]))
  46227. {
  46228. DestroyDynamic3DTextLabel(DonatorCallSign[vehicleid]);
  46229. DonatorCallSign[vehicleid] = Text3D:INVALID_3DTEXT_ID;
  46230. if(!strcmp(params, "none", true))
  46231. {
  46232. SendClientMessage(playerid, COLOR_WHITE, "* Car text removed from the vehicle.");
  46233. }
  46234. }
  46235. if(strcmp(params, "none", true) != 0)
  46236. {
  46237. DonatorCallSign[vehicleid] = CreateDynamic3DTextLabel(params, COLOR_VIP, 0.0, -3.0, 0.0, 10.0, .attachedvehicle = vehicleid);
  46238. SendClientMessage(playerid, COLOR_WHITE, "* Car text attached. '/vcode none' to detach the Car text.");
  46239. }
  46240. return 1;
  46241. }
  46242. CMD:tlaws(playerid, params[]) {
  46243. SendClientMessage(playerid, COLOR_LIGHTRED, "Traffic Laws");
  46244. SendClientMessage(playerid, COLOR_GLOBAL, "Drive on the RIGHT side of the road at all times.");
  46245. SendClientMessage(playerid, COLOR_GLOBAL, "Yield to emergency vehicles.");
  46246. SendClientMessage(playerid, COLOR_GLOBAL, "Move over and slow down for stopped emergency vehicles.");
  46247. SendClientMessage(playerid, COLOR_GLOBAL, "Turn your headlights on at night (/car lights).");
  46248. SendClientMessage(playerid, COLOR_GLOBAL, "Wear your seatbelt or helmet (/sb).");
  46249. SendClientMessage(playerid, COLOR_GLOBAL, "Drive at speeds that are posted in /speedlaws");
  46250. SendClientMessage(playerid, COLOR_GLOBAL, "Traffic lights are synced RED=STOP YELLOW=SLOW DOWN GREEN=GO");
  46251. SendClientMessage(playerid, COLOR_GLOBAL, "Only follow traffic lights above a junction. (Marked with a solid white line)");
  46252. SendClientMessage(playerid, COLOR_GLOBAL, "Remain at a safe distance from other vehicles when driving, atleast 3 car lengths");
  46253. SendClientMessage(playerid, COLOR_GLOBAL, "Pedistrians always have the right of way, regardless of the situation.");
  46254. SendClientMessage(playerid, COLOR_GLOBAL, "Drive how you would in real life, dont be a moron.");
  46255. SendClientMessage(playerid, COLOR_GLOBAL, "If you fail at driving you will be jailed or banned.");
  46256. return 1;
  46257. }
  46258. CMD:speedlaws(playerid, params[]) {
  46259. SendClientMessage(playerid, COLOR_RED, "Speed Enforcement Laws");
  46260. SendClientMessage(playerid, COLOR_GLOBAL, "50mph in Cities");
  46261. SendClientMessage(playerid, COLOR_GLOBAL, "70mph on the County roads");
  46262. SendClientMessage(playerid, COLOR_GLOBAL, "90mph on the Highways and Interstates");
  46263. SendClientMessage(playerid, COLOR_GLOBAL, "Box trucks cannot exceed 50MPH.");
  46264. SendClientMessage(playerid, COLOR_GLOBAL, "Any vehicles with 3 or more axles aren't allowed to go more than 55 mph. Regardless of roadway limits.");
  46265. SendClientMessage(playerid, COLOR_GLOBAL, "[ THERE ARE POLICE AND SPEED CAMERAS THAT ENFORCE THESE LAWS ]");
  46266. return 1;
  46267. }
  46268. //Reward play (ToiletDuck)
  46269. CMD:phrewards(playerid)
  46270. {
  46271. new string[2300];
  46272. strcat(string, "\t\t\t{FFA500}"#SERVER_NAME" Auto Playing Hours Reward System");
  46273. strcat(string, "\n\n{FF00FF}Information:{FFFFFF}");
  46274. // strcat(string, "\nHave you heard this System before? well I could say it is pretty Unique!\nYou can receive a Decent Rewards for Actively Playing in the Server.");
  46275. strcat(string, "\nHere some lists of Rewards that auto playing hours reward of the Server you will receive");
  46276. strcat(string, "\n\n_______________________________________________________________");
  46277. strcat(string, "\n {FFA500}Playing Hours:\tRewards:{FFFFFF}");
  46278. strcat(string, "\n 8 Playing Hours\t10 First Aid Kit and 1 Rim Kit");
  46279. strcat(string, "\n 25 Playing Hours\t 15 Cookies");
  46280. strcat(string, "\n 48 Playing Hours\t5 Upgrade Points and 1 Exp points");
  46281. strcat(string, "\n 60 Playing Hours\t50g Narcotig Drugs and 50,000 Materials");
  46282. strcat(string, "\n 85 Playing Hours\t$100,000 Cash and 2 Exp points");
  46283. strcat(string, "\n 100 Playing Hours\t 20 Cookies");
  46284. strcat(string, "\n 120 Playing Hours\t7 Days Gold VIP");
  46285. // strcat(string, "\n 180 Playing Hours\t1 Car Voucher");
  46286. strcat(string, "\n 260 Playing Hours\t2 Exp Tokens, 2 Rim Kits and 15 Firstaid Kit");
  46287. strcat(string, "\n 300 Playing Hours\t7 Days Gold VIP, 1 Car, 1 Rim Kit and 3 Exp");
  46288. strcat(string, "\n_______________________________________________________________");
  46289. // strcat(string, "\n\nWorried how will you receive your rewards? Well nothing to worry about! You will automatically Receive your Rewards :)");
  46290. strcat(string, "\nEnjoy the game and Stay Active! Have fun - Old School Roleplay");
  46291. Dialog_Show(playerid, 0 , DIALOG_STYLE_MSGBOX, ""#SERVER_NAME" Auto Playing Hours Reward Dialog Info", string, "Like", "");
  46292. return 1;
  46293. }
  46294. CMD:cw(playerid, params[])
  46295. {
  46296. new vehicleid = GetPlayerVehicleID(playerid), string[180];
  46297. if(IsAMotorBike(vehicleid))
  46298. {
  46299. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command in a bike.");
  46300. }
  46301. foreach(new i : Player)
  46302. {
  46303. if(IsPlayerInAnyVehicle(playerid))
  46304. {
  46305. if(IsPlayerInVehicle(i, vehicleid))
  46306. {
  46307. if(isnull(params))
  46308. {
  46309. return SendClientMessage(playerid, COLOR_WHITE, "Usage: /cw [in vehicle text]");
  46310. }
  46311. format(string, sizeof(string), "%s whispers: %s", GetRPName(playerid), params);
  46312. SendProximityFadeMessage(i, 20.0, string, COLOR_GREY1, COLOR_GREY2, COLOR_GREY3, COLOR_GREY4, COLOR_GREY5);
  46313. }
  46314. }
  46315. }
  46316. return 1;
  46317. }
  46318. CMD:unloadtrailer(playerid, params[])
  46319. {
  46320. if(PlayerTruckJob[playerid][pTDActive] == 1)
  46321. {
  46322. if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
  46323. {
  46324. if(PlayerTruckJob[playerid][pTDTrailer] == GetVehicleTrailer(GetPlayerVehicleID(playerid)))
  46325. {
  46326. new DestDepot = PlayerTruckJob[playerid][pTDDestDepot];
  46327. if(IsPlayerInRangeOfPoint(playerid, 20.0, TruckDepotInfo[DestDepot][pTDPosX], TruckDepotInfo[DestDepot][pTDPosY], TruckDepotInfo[DestDepot][pTDPosZ]))
  46328. {
  46329. // Send to unload, wait 10 seconds, freeze them
  46330. SetTimerEx("UnloadTruckJob", 10000, 0, "i", playerid);
  46331. TogglePlayerControllable(playerid, 0);
  46332. // Give them the waiting message
  46333. GameTextForPlayer(playerid, "~w~Unloading Trailer, please wait...",10000,3);
  46334. }
  46335. else
  46336. {
  46337. SendClientMessageEx(playerid, COLOR_GREY, " You are not at the Delivery Unloading Point!");
  46338. }
  46339. }
  46340. else
  46341. {
  46342. SendClientMessageEx(playerid, COLOR_GREY, " This trailer is not your delivery trailer!");
  46343. }
  46344. }
  46345. else
  46346. {
  46347. SendClientMessageEx(playerid, COLOR_GREY, " There is no trailer attached to your truck!");
  46348. }
  46349. }
  46350. else
  46351. {
  46352. SendClientMessageEx(playerid, COLOR_GREY, " You are not on a truck delivery!");
  46353. }
  46354. return 1;
  46355. }
  46356. CMD:deliveryinfo(playerid, params[])
  46357. {
  46358. if(PlayerTruckJob[playerid][pTDActive] == 1)
  46359. {
  46360. new Float:DeliveryKm, string[128], str[1024];
  46361. if(PlayerTruckJob[playerid][pTDLegal] == 1)
  46362. {
  46363. // Work out the Distance in KM Between Depot's
  46364. new Float:PosXa, Float:PosYa, Float:PosZa;
  46365. new Float:DPosXa, Float:DPosYa, Float:DPosZa;
  46366. GetPlayerPos(playerid, PosXa, PosYa, PosZa);
  46367. DPosXa = TruckDepotInfo[PlayerTruckJob[playerid][pTDDestDepot]][pTDPosX];
  46368. DPosYa = TruckDepotInfo[PlayerTruckJob[playerid][pTDDestDepot]][pTDPosY];
  46369. DPosZa = TruckDepotInfo[PlayerTruckJob[playerid][pTDDestDepot]][pTDPosZ];
  46370. DeliveryKm = GetDistanceBetweenPoints(PosXa, PosYa, PosZa, DPosXa, DPosYa, DPosZa);
  46371. DeliveryKm = floatdiv(DeliveryKm, 100);
  46372. format(string,sizeof(string),"Delivery Destination: %s\n", TruckDepotInfo[PlayerTruckJob[playerid][pTDDestDepot]][pTDName]);
  46373. strcat(str, string);
  46374. format(string,sizeof(string),"Delivery Goods: %s\n", LegalTruckJobInfo[PlayerTruckJob[playerid][pTDJobID]][pTJDesc]);
  46375. strcat(str, string);
  46376. format(string,sizeof(string),"Total Distance: %.2f Km\n", PlayerTruckJob[playerid][pTDDistance]);
  46377. strcat(str, string);
  46378. format(string,sizeof(string),"Estimated Distance Remaining: %.2f Km\n\n", DeliveryKm);
  46379. strcat(str, string);
  46380. strcat(str, "{FF0000}A marker has been set to the Delivery Location on your GPS.\n");
  46381. strcat(str, "{FFFFFF}Deliver the goods with minimal damage and do not get caught speeding.\n\n");
  46382. strcat(str, "Use /unloadtrailer to unload your goods when you have reached the destination.");
  46383. Dialog_Show(playerid, 1, DIALOG_STYLE_MSGBOX, "{FFFFFF}Delivery Information", str, "Ok", "Cancel");
  46384. SetPlayerCheckpoint(playerid, DPosXa, DPosYa, DPosZa, 5.0);
  46385. PlayerData[playerid][pCP] = CHECKPOINT_TRUCKDELIVERY;
  46386. }
  46387. else
  46388. {
  46389. // Work out the Distance in KM Between Depot's
  46390. new Float:PosXs, Float:PosYs, Float:PosZs;
  46391. new Float:DPosXs, Float:DPosYs, Float:DPosZs;
  46392. GetPlayerPos(playerid, PosXs, PosYs, PosZs);
  46393. DPosXs = TruckDepotInfo[PlayerTruckJob[playerid][pTDDestDepot]][pTDPosX];
  46394. DPosYs = TruckDepotInfo[PlayerTruckJob[playerid][pTDDestDepot]][pTDPosY];
  46395. DPosZs = TruckDepotInfo[PlayerTruckJob[playerid][pTDDestDepot]][pTDPosZ];
  46396. DeliveryKm = GetDistanceBetweenPoints(PosXs, PosYs, PosZs, DPosXs, DPosYs, DPosZs);
  46397. DeliveryKm = floatdiv(DeliveryKm, 100);
  46398. format(string,sizeof(string),"Delivery Destination: %s\n", TruckDepotInfo[PlayerTruckJob[playerid][pTDDestDepot]][pTDName]);
  46399. strcat(str, string);
  46400. format(string,sizeof(string),"Delivery Goods: %s\n", IllegalTruckJobInfo[PlayerTruckJob[playerid][pTDJobID]][pTJDesc]);
  46401. strcat(str, string);
  46402. format(string,sizeof(string),"Total Distance: %.2f Km\n", PlayerTruckJob[playerid][pTDDistance]);
  46403. strcat(str, string);
  46404. format(string,sizeof(string),"Estimated Distance Remaining: %.2f Km\n\n", DeliveryKm);
  46405. strcat(str, string);
  46406. strcat(str, "{FF0000}A marker has been set to the Delivery Location on your GPS.\n");
  46407. strcat(str, "{FFFFFF}Deliver the goods with minimal damage and do not get caught speeding.\n\n");
  46408. strcat(str, "Use /unloadtrailer to unload your goods when you have reached the destination.");
  46409. Dialog_Show(playerid, 1, DIALOG_STYLE_MSGBOX, "{FFFFFF}Delivery Information", str, "Ok", "Cancel");
  46410. SetPlayerCheckpoint(playerid, DPosXs, DPosYs, DPosZs, 5.0);
  46411. PlayerData[playerid][pCP] = CHECKPOINT_TRUCKDELIVERY;
  46412. }
  46413. }
  46414. else
  46415. {
  46416. SendClientMessageEx(playerid, COLOR_GREY, " You are not current on a truck delivery!");
  46417. }
  46418. return 1;
  46419. }
  46420. CMD:detach(playerid, params[])
  46421. {
  46422. #pragma unused params
  46423. new veh = GetPlayerVehicleID(playerid);
  46424. if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You must be in a vehicle to do this.");
  46425. if(!IsTrailerAttachedToVehicle(veh)) return SendClientMessageEx(playerid, COLOR_GREY, "You do not have a trailer attached to your vehicle.");
  46426. DetachTrailerFromVehicle(veh);
  46427. SendClientMessageEx(playerid, COLOR_GREY, "Your trailer has been detached from your vehicle.");
  46428. return 1;
  46429. }
  46430. CMD:viewjobsaaa(playerid, params[])
  46431. {
  46432. return SendClientMessage(playerid, COLOR_GREY, "This command has been temporary disabled due to one unexpected bug");
  46433. }
  46434. CMD:cancelcdl(playerid, params[])
  46435. {
  46436. // new lostrand = random(10000);
  46437. ClearTruckJob(playerid);
  46438. SendClientMessageEx(playerid, COLOR_RED, " * You have canceled the Trucking Delivery.");
  46439. // format(string, sizeof(string), " * Canceling this delivery has cost you $%d.", lostrand);
  46440. // SendClientMessageEx(playerid, COLOR_RED, string);
  46441. // GivePlayerCash(playerid, -lostrand);
  46442. PlayerData[playerid][pCP] = CHECKPOINT_NONE;
  46443. }
  46444. CMD:viewjobs(playerid, params[])
  46445. {
  46446. if(PlayerTruckJob[playerid][pTDActive] == 0)
  46447. {
  46448. if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
  46449. {
  46450. for(new i=0; i<MAX_TRUCKDEPOTS; i++)
  46451. {
  46452. if(IsPlayerInRangeOfPoint(playerid, 20.0, TruckDepotInfo[i][pTDPosX], TruckDepotInfo[i][pTDPosY], TruckDepotInfo[i][pTDPosZ]))
  46453. {
  46454. if(PlayerData[playerid][pTruckingLevel] >= TruckDepotInfo[i][pTDLevel])
  46455. {
  46456. new L1, L2, L3, IL1, IL2, IL3;
  46457. L1 = random(MAX_TRUCKJOBS);
  46458. L2 = random(MAX_TRUCKJOBS);
  46459. L3 = random(MAX_TRUCKJOBS);
  46460. IL1 = random(MAX_TRUCKJOBS);
  46461. IL2 = random(MAX_TRUCKJOBS);
  46462. IL3 = random(MAX_TRUCKJOBS);
  46463. new string[256], str[1024];
  46464. format(string,sizeof(string), "{FFFFFF}Deliver %s to %s {00FF00}(LEGAL)\n", LegalTruckJobInfo[L1][pTJDesc], TruckDepotInfo[LegalTruckJobInfo[L1][pTJDestDepot]][pTDName]);
  46465. strcat(str, string);
  46466. format(string,sizeof(string), "{FFFFFF}Deliver %s to %s {00FF00}(LEGAL)\n", LegalTruckJobInfo[L2][pTJDesc], TruckDepotInfo[LegalTruckJobInfo[L2][pTJDestDepot]][pTDName]);
  46467. strcat(str, string);
  46468. format(string,sizeof(string), "{FFFFFF}Deliver %s to %s {00FF00}(LEGAL)\n", LegalTruckJobInfo[L3][pTJDesc], TruckDepotInfo[LegalTruckJobInfo[L3][pTJDestDepot]][pTDName]);
  46469. strcat(str, string);
  46470. format(string,sizeof(string), "{FFFFFF}Deliver %s to %s {FF0000}(ILLEGAL)\n", IllegalTruckJobInfo[IL1][pTJDesc], TruckDepotInfo[IllegalTruckJobInfo[IL1][pTJDestDepot]][pTDName]);
  46471. strcat(str, string);
  46472. format(string,sizeof(string), "{FFFFFF}Deliver %s to %s {FF0000}(ILLEGAL)\n", IllegalTruckJobInfo[IL2][pTJDesc], TruckDepotInfo[IllegalTruckJobInfo[IL2][pTJDestDepot]][pTDName]);
  46473. strcat(str, string);
  46474. format(string,sizeof(string), "{FFFFFF}Deliver %s to %s {FF0000}(ILLEGAL)\n", IllegalTruckJobInfo[IL3][pTJDesc], TruckDepotInfo[IllegalTruckJobInfo[IL3][pTJDestDepot]][pTDName]);
  46475. strcat(str, string);
  46476. format(string,sizeof(string), "{FFFFFF}%s", TruckDepotInfo[i][pTDName]);
  46477. Dialog_Show(playerid, DIALOG_SHOW_TRUCKJOBS, DIALOG_STYLE_LIST, string, str, "Take Job", "Cancel");
  46478. PlayerData[playerid][pLegalTruckJob1] = L1;
  46479. PlayerData[playerid][pLegalTruckJob2] = L2;
  46480. PlayerData[playerid][pLegalTruckJob3] = L3;
  46481. PlayerData[playerid][pIllegalTruckJob1] = IL1;
  46482. PlayerData[playerid][pIllegalTruckJob2] = IL2;
  46483. PlayerData[playerid][pIllegalTruckJob3] = IL3;
  46484. return 1;
  46485. }
  46486. else
  46487. {
  46488. SendClientMessageEx(playerid, COLOR_GREY, " Your trucking level is too low to deliver for this truck depot!");
  46489. return 1;
  46490. }
  46491. }
  46492. }
  46493. SendClientMessageEx(playerid, COLOR_GREY, " You are not at a truck depot information icon!");
  46494. }
  46495. else
  46496. {
  46497. SendClientMessageEx(playerid, COLOR_GREY, " You need to attach a Trailer to your truck first!");
  46498. }
  46499. }
  46500. else
  46501. {
  46502. SendClientMessageEx(playerid, COLOR_GREY, " You are already on a current truck delivery. If you wish to cancel, use /cancelcdl!");
  46503. }
  46504. return 1;
  46505. }
  46506. CMD:cancelorder(playerid, params[])
  46507. {
  46508. if(PlayerTruckJob[playerid][pTDActive] == 0)
  46509. {
  46510. PlayerData[playerid][pLegalTruckJob1] = -1;
  46511. PlayerData[playerid][pLegalTruckJob2] = -1;
  46512. PlayerData[playerid][pLegalTruckJob3] = -1;
  46513. PlayerData[playerid][pIllegalTruckJob1] = -1;
  46514. PlayerData[playerid][pIllegalTruckJob2] = -1;
  46515. PlayerData[playerid][pIllegalTruckJob3] = -1;
  46516. PlayerTruckJob[playerid][pTDActive] = -1;
  46517. PlayerTruckJob[playerid][pTDLegal] = -1;
  46518. PlayerTruckJob[playerid][pTDJobID] = -1;
  46519. PlayerTruckJob[playerid][pTDDestDepot] = -1;
  46520. }
  46521. else
  46522. {
  46523. SendClientMessage(playerid, COLOR_GREY, "You're not even delivering an order");
  46524. }
  46525. }
  46526. CMD:truckhelp(playerid, params[])
  46527. {
  46528. new str[3000];
  46529. strcat(str, "{FFFFFF}You first need to purchase your own Commercial Truck from the Car Lot underneath Mulholland Intersection\n");
  46530. strcat(str, "Then you must have a Commercial Drivers License, which is available from the Trucking Depot in Blueberry.\n");
  46531. strcat(str, "Once you have these 2 things, you can visit the nearest Truck Depot / Storage to find a trucking job.\n");
  46532. strcat(str, "Attach a trailer to your truck at one of these places and then use the commands listed below to do deliveries in the truck.\n\n");
  46533. strcat(str, "You will notice that each Trucking Depot has a certain Trucking Level. You must have this Trucking Level in order\n");
  46534. strcat(str, "to do trucking jobs from this Depot. After each delivery, you gain a certain amount of Trucking XP, which goes towards\n");
  46535. strcat(str, "the XP needed to advance to the next Trucking Level.\n\n");
  46536. strcat(str, "COMMANDS: /viewjobs /unloadtrailer /deliveryinfo /finddepot /detach");
  46537. Dialog_Show(playerid, 1, DIALOG_STYLE_MSGBOX, "{FFFFFF}Trucking Help", str, "Ok", "Cancel");
  46538. return 1;
  46539. }
  46540. CMD:finddepot(playerid, params[])
  46541. {
  46542. new level;
  46543. if(sscanf(params, "i", level))
  46544. {
  46545. SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /finddepot [level]");
  46546. return 1;
  46547. }
  46548. new closest = GetClosestTruckDepot(playerid, level);
  46549. if(closest == -1)
  46550. {
  46551. SendClientMessageEx(playerid, COLOR_GREY, " There are no trucking depots for this level.");
  46552. }
  46553. else
  46554. {
  46555. SetPlayerCheckpoint(playerid, TruckDepotInfo[closest][pTDPosX],TruckDepotInfo[closest][pTDPosY],TruckDepotInfo[closest][pTDPosZ], 5.0);
  46556. SendClientMessageEx(playerid, COLOR_YELLOW, " * A checkpoint has been added to your GPS to the nearest truck depot for this level selected.");
  46557. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  46558. }
  46559. return 1;
  46560. }
  46561. CMD:speakerphone(playerid, params[])
  46562. {
  46563. if(PlayerData[playerid][pPhone] != 0)
  46564. {
  46565. if(PlayerData[playerid][pSpeakerPhone] == 1)
  46566. {
  46567. PlayerData[playerid][pSpeakerPhone] = 0;
  46568. SendClientMessageEx(playerid, COLOR_WHITE, "You have disabled the speakerphone feature on your phone.");
  46569. }
  46570. else
  46571. {
  46572. PlayerData[playerid][pSpeakerPhone] = 1;
  46573. SendClientMessageEx(playerid, COLOR_WHITE, "You have enabled the speakerphone feature on your phone.");
  46574. }
  46575. }
  46576. else
  46577. {
  46578. SendClientMessageEx(playerid, COLOR_WHITE, "You don't have a phone.");
  46579. }
  46580. return 1;
  46581. }
  46582. //----------------------------------------------------------
  46583. CMD:arrest(playerid, params[])
  46584. {
  46585. new targetid, minutes, fine;
  46586. if(!IsLawEnforcement(playerid))
  46587. {
  46588. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of law enforcement.");
  46589. }
  46590. if(sscanf(params, "u", targetid))
  46591. {
  46592. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /arrest [playerid]");
  46593. }
  46594. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  46595. {
  46596. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  46597. }
  46598. if(targetid == playerid)
  46599. {
  46600. return SendClientMessage(playerid, COLOR_GREY, "You can't arrest yourself.");
  46601. }
  46602. if(!PlayerData[targetid][pCuffed])
  46603. {
  46604. return SendClientMessage(playerid, COLOR_GREY, "That player is not handcuffed.");
  46605. }
  46606. if(!PlayerData[targetid][pWantedLevel])
  46607. {
  46608. return SendClientMessage(playerid, COLOR_GREY, "You can't arrest a player with no active charges. /charge to add them.");
  46609. }
  46610. for(new i = 0; i < sizeof(arrestPoints); i ++)
  46611. {
  46612. if(IsPlayerInRangeOfPoint(playerid, 5.0, arrestPoints[i][0], arrestPoints[i][1], arrestPoints[i][2]))
  46613. {
  46614. minutes = PlayerData[targetid][pWantedLevel] * 5;
  46615. fine = PlayerData[targetid][pWantedLevel] * 1000;
  46616. if(PlayerData[targetid][pDonator] == 1)
  46617. {
  46618. SendClientMessageEx(targetid, COLOR_VIP, "VIP Perk: Your %i minutes of jail time has been reduced by 50 percent to %i minutes.", minutes, percent(minutes, 50));
  46619. minutes = percent(minutes, 50);
  46620. }
  46621. else if(PlayerData[targetid][pDonator] >= 2)
  46622. {
  46623. SendClientMessageEx(targetid, COLOR_VIP, "VIP Perk: Your %i minutes of jail time has been reduced by 75 percent to %i minutes.", minutes, percent(minutes, 75));
  46624. minutes = percent(minutes, 25);
  46625. }
  46626. PlayerData[targetid][pJailType] = 3;
  46627. PlayerData[targetid][pJailTime] = minutes * 60;
  46628. PlayerData[targetid][pWantedLevel] = 0;
  46629. PlayerData[targetid][pArrested]++;
  46630. ResetPlayerWeaponsEx(targetid);
  46631. ResetPlayer(targetid);
  46632. TogglePlayerControllable(targetid, 1);
  46633. SetPlayerInJail(targetid);
  46634. GivePlayerCash(targetid, -fine);
  46635. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET wantedlevel = 0, arrested = %i WHERE uid = %i", PlayerData[targetid][pArrested], PlayerData[targetid][pID]);
  46636. mysql_tquery(connectionID, queryBuffer);
  46637. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE `criminals` SET `served` = 1 WHERE `player` = '%e';", GetPlayerNameEx(targetid));
  46638. mysql_tquery(connectionID, queryBuffer);
  46639. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM charges WHERE uid = %i", PlayerData[targetid][pID]);
  46640. mysql_tquery(connectionID, queryBuffer);
  46641. SendClientMessageToAllEx(COLOR_LIGHTRED, "<< %s %s has completed their arrest. %s has been sent to jail for %i days. >>", FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid), GetRPName(targetid), minutes);
  46642. //SendFactionMessage(PlayerData[playerid][pFaction], COLOR_ROYALBLUE, "* HQ: %s %s has arrested %s for %i minutes, fine: $%i.", FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid), GetRPName(targetid), minutes, fine);
  46643. SendClientMessageEx(targetid, COLOR_AQUA, "* You've been arrested for %i minutes, fine: $%i.", minutes, fine);
  46644. Log_Write("log_faction", "%s (uid: %i) has arrested %s (uid: %i) for %i minutes, fine: $%i.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], minutes, fine);
  46645. return 1;
  46646. }
  46647. }
  46648. SendClientMessage(playerid, COLOR_GREY, "You are not in range of any arrest points.");
  46649. return 1;
  46650. }
  46651. CMD:releasecartest(playerid, params[])
  46652. {
  46653. // if (!IsPlayerInRangeOfPoint(playerid, 3.0, 361.1653, 175.8127, 1008.3828))
  46654. // return SendErrorMessage(playerid, "You must be at city hall to release a vehicle.");
  46655. new
  46656. string[32 * MAX_OWNABLE_CARS],
  46657. count;
  46658. for (new i = 0; i < MAX_VEHICLES; i ++)
  46659. if(IsVehicleOwner(playerid, i))
  46660. {
  46661. format(string, sizeof(string), "%s%d: %s (%s)\n", string, count + 1, vehicleNames[VehicleInfo[i][vModel] - 400], FormatNumber(VehicleInfo[i][carImpoundPrice]));
  46662. ListedVehicles[playerid][count++] = i;
  46663. }
  46664. if (!count)
  46665. SendErrorMessage(playerid, "You don't have any impounded vehicles.");
  46666. else Dialog_Show(playerid, DIALOG_RELEASECAR, DIALOG_STYLE_LIST, "Release Vehicle", string, "Select", "Cancel");
  46667. return 1;
  46668. }
  46669. CMD:testdmv1(playerid, params[])
  46670. {
  46671. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM `vehicles` WHERE `ownerid` = '%i' AND `carimpounded` = '1'", PlayerData[playerid][pID]);
  46672. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_RELEASECAR, playerid);
  46673. return 1;
  46674. }
  46675. CMD:releasecar(playerid, params[])
  46676. {
  46677. // if (!IsPlayerInRangeOfPoint(playerid, 3.0, 361.1653, 175.8127, 1008.3828))
  46678. // return SendErrorMessage(playerid, "You must be at city hall to release a vehicle.");
  46679. new
  46680. string[32 * MAX_OWNABLE_CARS],
  46681. count;
  46682. for (new i = 0; i < MAX_VEHICLES; i ++)
  46683. if(IsVehicleOwner(playerid, i) && VehicleInfo[i][carImpounded] == 1)
  46684. {
  46685. format(string, sizeof(string), "%s%d: %s (%s)\n", string, count + 1, vehicleNames[VehicleInfo[i][vModel] - 400], FormatNumber(VehicleInfo[i][carImpoundPrice]));
  46686. ListedVehicles[playerid][count++] = i;
  46687. }
  46688. if (!count)
  46689. SendErrorMessage(playerid, "You don't have any impounded vehicles.");
  46690. else Dialog_Show(playerid, DIALOG_RELEASECAR, DIALOG_STYLE_LIST, "Release Vehicle", string, "Select", "Cancel");
  46691. return 1;
  46692. }
  46693. CMD:createimpound(playerid, params[])
  46694. {
  46695. static
  46696. id = -1,
  46697. Float:x,
  46698. Float:y,
  46699. Float:z;
  46700. if (PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  46701. return SendErrorMessage(playerid, "You don't have permission to use this command.");
  46702. if (GetPlayerInterior(playerid) > 0 || GetPlayerVirtualWorld(playerid) > 0)
  46703. return SendErrorMessage(playerid, "You can only create impound lots outside interiors.");
  46704. GetPlayerPos(playerid, x, y, z);
  46705. id = Impound_Create(x, y, z);
  46706. if (id == -1)
  46707. return SendErrorMessage(playerid, "The server has reached the limit for impound lots.");
  46708. SendInfoMessage(playerid, "You have successfully created impound lot ID: %d.", id);
  46709. return 1;
  46710. }
  46711. CMD:destroyimpound(playerid, params[])
  46712. {
  46713. static
  46714. id = 0;
  46715. if (PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  46716. return SendErrorMessage(playerid, "You don't have permission to use this command.");
  46717. if (sscanf(params, "d", id))
  46718. return SendClientMessageEx(playerid, COLOR_GREY, "/destroyimpound [impound id]");
  46719. if ((id < 0 || id >= MAX_IMPOUND_LOTS) || !ImpoundData[id][impoundExists])
  46720. return SendErrorMessage(playerid, "You have specified an invalid impound lot ID.");
  46721. Impound_Delete(id);
  46722. SendInfoMessage(playerid, "You have successfully destroyed impound lot ID: %d.", id);
  46723. return 1;
  46724. }
  46725. CMD:impound(playerid, params[])
  46726. {
  46727. new
  46728. price,
  46729. id = Impound_Nearest(playerid),
  46730. vehicleida = GetPlayerVehicleID(playerid);
  46731. if (GetFactionType(playerid) != FACTION_POLICE)
  46732. return SendErrorMessage(playerid, "You must be a police officer.");
  46733. if (sscanf(params, "d", price))
  46734. return SendClientMessage(playerid, COLOR_GREY, "/impound [price]");
  46735. if (price < 1 || price > 1000)
  46736. return SendErrorMessage(playerid, "The price can't be above $1,000 or below $1.");
  46737. if (GetVehicleModel(vehicleida) != 525)
  46738. return SendErrorMessage(playerid, "You are not driving a tow truck.");
  46739. if (id == -1)
  46740. return SendErrorMessage(playerid, "You are not in range of any impound lot.");
  46741. if (!GetVehicleTrailer(vehicleida))
  46742. return SendErrorMessage(playerid, "There is no vehicle hooked.");
  46743. new vehicleid = GetVehicleTrailer(vehicleid);
  46744. if (vehicleid == -1)
  46745. return SendErrorMessage(playerid, "You can't tow this vehicle.");
  46746. if(VehicleInfo[vehicleid][carImpounded] == 1)
  46747. {
  46748. return SendErrorMessage(playerid, "This vehicle is already impounded.");
  46749. }
  46750. if(!IsValidVehicle(vehicleid) || !VehicleInfo[vehicleid][vID])
  46751. {
  46752. return SendClientMessage(playerid, COLOR_GREY, "The vehicle specified is invalid or a static vehicle.");
  46753. }
  46754. if(!VehicleInfo[vehicleid][vOwnerID])
  46755. {
  46756. return SendClientMessage(playerid, COLOR_GREY, "You can only impound player's owned vehicles.");
  46757. }
  46758. VehicleInfo[vehicleid][carImpounded] = 1;
  46759. VehicleInfo[vehicleid][carImpoundPrice] = price;
  46760. AddToTaxVault(price);
  46761. VehicleInfo[vehicleid][vPosX] = 0.0;
  46762. VehicleInfo[vehicleid][vPosY] = 0.0;
  46763. VehicleInfo[vehicleid][vPosZ] = 0.0;
  46764. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET pos_x = '%f', pos_y = '%f', pos_z = '%f', pos_a = '%f', interior = %i, world = %i, carimpounded = %i, carimpoundprice = 1 WHERE id = %i", VehicleInfo[vehicleid][vPosX], VehicleInfo[vehicleid][vPosY], VehicleInfo[vehicleid][vPosZ], VehicleInfo[vehicleid][vPosA], VehicleInfo[vehicleid][vInterior], VehicleInfo[vehicleid][vWorld], VehicleInfo[vehicleid][carImpounded], VehicleInfo[vehicleid][vID]);
  46765. mysql_tquery(connectionID, queryBuffer);
  46766. SendFactionMessage(PlayerData[playerid][pFaction], COLOR_AQUA, "RADIO: %s has impounded a %s for %s.", GetRPName(playerid), GetVehicleName(GetVehicleTrailer(vehicleid)), FormatNumber(price));
  46767. DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
  46768. DespawnVehicle(vehicleid);
  46769. return 1;
  46770. }
  46771. CMD:editimpound(playerid, params[])
  46772. {
  46773. static
  46774. id,
  46775. type[24],
  46776. string[128];
  46777. if (PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  46778. return SendErrorMessage(playerid, "You don't have permission to use this command.");
  46779. if (sscanf(params, "ds[24]S()[128]", id, type, string))
  46780. {
  46781. SendClientMessageEx(playerid, COLOR_GREY, "/editimpound [id] [name]");
  46782. SendClientMessage(playerid, COLOR_YELLOW, "[NAMES]:{FFFFFF} location, release");
  46783. return 1;
  46784. }
  46785. if ((id < 0 || id >= MAX_IMPOUND_LOTS) || !ImpoundData[id][impoundExists])
  46786. return SendErrorMessage(playerid, "You have specified an invalid impound lot ID.");
  46787. if (!strcmp(type, "location", true))
  46788. {
  46789. static
  46790. Float:x,
  46791. Float:y,
  46792. Float:z;
  46793. GetPlayerPos(playerid, x, y, z);
  46794. ImpoundData[id][impoundLot][0] = x;
  46795. ImpoundData[id][impoundLot][1] = y;
  46796. ImpoundData[id][impoundLot][2] = z;
  46797. Impound_Refresh(id);
  46798. Impound_Save(id);
  46799. SendAdminMessage(COLOR_LIGHTRED, "[ADMIN]: %s has adjusted the location of impound ID: %d.", GetRPName(playerid), id);
  46800. }
  46801. else if (!strcmp(type, "release", true))
  46802. {
  46803. static
  46804. Float:x,
  46805. Float:y,
  46806. Float:z,
  46807. Float:angle;
  46808. GetPlayerPos(playerid, x, y, z);
  46809. GetPlayerFacingAngle(playerid, angle);
  46810. ImpoundData[id][impoundRelease][0] = x;
  46811. ImpoundData[id][impoundRelease][1] = y;
  46812. ImpoundData[id][impoundRelease][2] = z;
  46813. ImpoundData[id][impoundRelease][3] = angle;
  46814. Impound_Save(id);
  46815. SendAdminMessage(COLOR_LIGHTRED, "[ADMIN]: %s has adjusted the release point of impound ID: %d.", GetRPName(playerid), id);
  46816. }
  46817. return 1;
  46818. }
  46819. CMD:editdealercars(playerid, params[])
  46820. {
  46821. new company;
  46822. if (PlayerData[playerid][pAdmin] < 5)
  46823. {
  46824. return SendErrorMessage(playerid, "You are not privileged to use this command.");
  46825. }
  46826. else if (sscanf(params, "i", company))
  46827. {
  46828. return SendSyntaxMessage(playerid, "/editdealercars (business ID)");
  46829. }
  46830. else if (!IsValidCompanyID(company))
  46831. {
  46832. return SendErrorMessage(playerid, "You have specified an invalid company.");
  46833. }
  46834. else if (BusinessInfo[company][bType] != BUSINESS_DEALERSHIP)
  46835. {
  46836. return SendErrorMessage(playerid, "You can only add dealership cars to dealerships.");
  46837. }
  46838. else
  46839. {
  46840. ShowDealershipEditMenu(playerid, company);
  46841. }
  46842. return 1;
  46843. }
  46844. CMD:furniture(playerid, params[])
  46845. {
  46846. new id = GetInsideHouse(playerid);
  46847. if(id == -1)
  46848. {
  46849. id = GetFurnitureHouse(playerid);
  46850. }
  46851. if (!IsHouseOwner(playerid, id) && PlayerData[playerid][pFurniturePerms] != id)
  46852. {
  46853. return SendErrorMessage(playerid, "You don't have permissions to furnish this house.");
  46854. }
  46855. else
  46856. {
  46857. PlayerData[playerid][pHouse] = id;
  46858. Dialog_Show(playerid, HouseFurniture, DIALOG_STYLE_LIST, "{FFFFFF}Manage Furniture", "Purchase\nAdjustments", "Select", "Cancel");
  46859. }
  46860. return 1;
  46861. }
  46862. CMD:testfurn(playerid, params[])
  46863. {
  46864. SelectObject(playerid);
  46865. return 1;
  46866. }
  46867. CMD:edit(playerid, params[])
  46868. {
  46869. new
  46870. furniture;
  46871. if (PlayerData[playerid][pHouseEdit] == -1 || !HouseInfo[PlayerData[playerid][pHouseEdit]][hEdit])
  46872. {
  46873. return SendErrorMessage(playerid, "You are not editing furniture.");
  46874. }
  46875. else if (sscanf(params, "i", furniture))
  46876. {
  46877. return SendSyntaxMessage(playerid, "/edit (furniture ID)");
  46878. }
  46879. else if (!IsValidFurnitureID(furniture))
  46880. {
  46881. return SendErrorMessage(playerid, "You have specified an invalid furniture ID.");
  46882. }
  46883. else if (Furniture[furniture][fHouseID] != HouseInfo[PlayerData[playerid][pHouseEdit]][hID])
  46884. {
  46885. return SendErrorMessage(playerid, "The specified ID belongs to another house.");
  46886. }
  46887. else if (PlayerData[playerid][pEdit] == EDIT_TYPE_PREVIEW)
  46888. {
  46889. return SendErrorMessage(playerid, "You can't edit furniture while previewing.");
  46890. }
  46891. else
  46892. {
  46893. SetPVarInt(playerid, "FurnID", furniture);
  46894. Dialog_Show(playerid, FurnEditConfirm, DIALOG_STYLE_LIST, "Furniture Edit", "Edit Position\nEdit Texture\nDuplicate Object\nDelete Object", "Select", "Cancel");
  46895. SendInfoMessage(playerid, "You are now editing ID: %i. Click the disk icon to save changes.", furniture);
  46896. }
  46897. return 1;
  46898. }
  46899. CMD:edittexture(playerid, params[])
  46900. {
  46901. new
  46902. furniture;
  46903. if (PlayerData[playerid][pHouseEdit] == -1 || !HouseInfo[PlayerData[playerid][pHouseEdit]][hEdit])
  46904. {
  46905. return SendErrorMessage(playerid, "You are not editing furniture.");
  46906. }
  46907. else if (sscanf(params, "i", furniture))
  46908. {
  46909. return SendSyntaxMessage(playerid, "/edit (furniture ID)");
  46910. }
  46911. else if (!IsValidFurnitureID(furniture))
  46912. {
  46913. return SendErrorMessage(playerid, "You have specified an invalid furniture ID.");
  46914. }
  46915. else if (Furniture[furniture][fHouseID] != HouseInfo[PlayerData[playerid][pHouseEdit]][hID])
  46916. {
  46917. return SendErrorMessage(playerid, "The specified ID belongs to another house.");
  46918. }
  46919. else if (PlayerData[playerid][pEdit] == EDIT_TYPE_PREVIEW)
  46920. {
  46921. return SendErrorMessage(playerid, "You can't edit furniture while previewing.");
  46922. }
  46923. else
  46924. {
  46925. SendInfoMessage(playerid, "You are now editing ID: %i. Click the disk icon to save changes.", furniture);
  46926. }
  46927. return 1;
  46928. }
  46929. CMD:delete(playerid, params[])
  46930. {
  46931. new
  46932. furniture;
  46933. if (PlayerData[playerid][pHouseEdit] == -1 || !HouseInfo[PlayerData[playerid][pHouseEdit]][hEdit])
  46934. {
  46935. return SendErrorMessage(playerid, "You are not editing furniture.");
  46936. }
  46937. else if (sscanf(params, "i", furniture))
  46938. {
  46939. return SendSyntaxMessage(playerid, "/delete (furniture ID)");
  46940. }
  46941. else if (!IsValidFurnitureID(furniture))
  46942. {
  46943. return SendErrorMessage(playerid, "You have specified an invalid furniture ID.");
  46944. }
  46945. else if (Furniture[furniture][fHouseID] != HouseInfo[PlayerData[playerid][pHouseEdit]][hID])
  46946. {
  46947. return SendErrorMessage(playerid, "The specified ID belongs to another house.");
  46948. }
  46949. else
  46950. {
  46951. if (PlayerData[playerid][pEdit] == EDIT_TYPE_FURNITURE)
  46952. {
  46953. CancelObjectEdit(playerid);
  46954. }
  46955. DeleteFurniture(furniture);
  46956. SendInfoMessage(playerid, "You are deleted furniture ID: %i.", furniture);
  46957. }
  46958. return 1;
  46959. }
  46960. EditDynamicObjectEx(playerid, type, objectid, extraid = -1)
  46961. {
  46962. PlayerData[playerid][pEdit] = type;
  46963. PlayerData[playerid][pEditID] = extraid;
  46964. return EditDynamicObject(playerid, objectid);
  46965. }
  46966. CancelObjectEdit(playerid)
  46967. {
  46968. PlayerData[playerid][pEdit] = EDIT_TYPE_NONE;
  46969. PlayerData[playerid][pEditID] = -1;
  46970. return CancelEdit(playerid);
  46971. }
  46972. CMD:cancel(playerid, params[])
  46973. {
  46974. if (PlayerData[playerid][pHouseEdit] == -1 || !HouseInfo[PlayerData[playerid][pHouseEdit]][hEdit])
  46975. {
  46976. return SendErrorMessage(playerid, "You are not editing furniture.");
  46977. }
  46978. else
  46979. {
  46980. SetFurnitureEditMode(PlayerData[playerid][pHouseEdit], false);
  46981. PlayerData[playerid][pHouseEdit] = -1;
  46982. SendInfoMessage(playerid, "You are no longer editing furniture.");
  46983. }
  46984. return 1;
  46985. }
  46986. CMD:setstyle(playerid, params[])
  46987. {
  46988. new pickid;
  46989. if(!PlayerData[playerid][pDonator])
  46990. return SendClientMessage(playerid, COLOR_ADM, "ACCESS DENIED:{FFFFFF} You aren't a donator.");
  46991. if(sscanf(params, "i", pickid)){
  46992. SendClientMessage(playerid, COLOR_WHITE, "Chat Styles: 0 1 2 3 4");
  46993. SendClientMessage(playerid, COLOR_WHITE, "Chat Styles: 5 6 7");
  46994. SendClientMessage(playerid, COLOR_GREEN, "USAGE: /setstyle 2 [StyleID]");
  46995. return true;
  46996. }
  46997. if(pickid != -1 && pickid < 0 || pickid > 7)
  46998. return SendClientMessage(playerid, COLOR_ADM, "You specified an invalid chat.");
  46999. PlayerData[playerid][pChatstyle] = pickid;
  47000. SavePlayerVariables(playerid);
  47001. SendClientMessage(playerid, COLOR_YELLOW, "Enjoy your new chatstyle!");
  47002. return 1;
  47003. }
  47004. CMD:doublexp(playerid, params[])
  47005. {
  47006. if(PlayerData[playerid][pAdmin] >= MANAGEMENT)
  47007. {
  47008. SetRewardPlay(true);
  47009. SetDoubleXP(true);
  47010. SendClientMessageToAllEx(COLOR_AQUA, "* %s enabled happy hours. You will now get random gifts and double xp for playing in the server.", GetRPName(playerid));
  47011. }
  47012. return 1;
  47013. }
  47014. CMD:enddoublexp(playerid, params[])
  47015. {
  47016. if(PlayerData[playerid][pAdmin] >= MANAGEMENT)
  47017. {
  47018. SetRewardPlay(false);
  47019. SetDoubleXP(false);
  47020. }
  47021. return 1;
  47022. }
  47023. CMD:help(playerid, params[])
  47024. {
  47025. if(PlayerData[playerid][pAdmin] > 2)
  47026. Dialog_Show(playerid, DIALOG_HELPCMD, DIALOG_STYLE_LIST, "{00aa00}Old School Roleplay {FFFFFF}| Commands", "General Commands\nJob Commands\nGang Commands\nFaction Commands\nVIP Commands\nHouse Commands\nVehicle Commands\nBusiness Commands\nHelper Commands\nAdmin Commands", "Choose", "Close");
  47027. if(PlayerData[playerid][pHelper] > 1 && PlayerData[playerid][pAdmin] > 2)
  47028. Dialog_Show(playerid, DIALOG_HELPCMD, DIALOG_STYLE_LIST, "{00aa00}Old School Roleplay {FFFFFF}| Commands", "General Commands\nJob Commands\nGang Commands\nFaction Commands\nVIP Commands\nHouse Commands\nVehicle Commands\nBusiness Commands\nHelper Commands", "Choose", "Close");
  47029. else
  47030. PlayerData[playerid][pAdmin] = 10;
  47031. Dialog_Show(playerid, DIALOG_HELPCMD, DIALOG_STYLE_LIST, "{00aa00}Old School Roleplay {FFFFFF}| Commands", "General Commands\nJob Commands\nGang Commands\nFaction Commands\nVIP Commands\nHouse Commands\nVehicle Commands\nBusiness Commands", "Choose", "Close");
  47032. return 1;
  47033. }
  47034. CMD:jobhelp(playerid, params[])
  47035. {
  47036. if(PlayerData[playerid][pJob] == JOB_NONE && PlayerData[playerid][pSecondJob] == JOB_NONE)
  47037. {
  47038. return SendClientMessage(playerid, COLOR_GREY, "You have no job and therefore no job commands to view.");
  47039. }
  47040. SendClientMessage(playerid, COLOR_NAVYBLUE, "__________________ Job Help __________________");
  47041. SendClientMessage(playerid, COLOR_WHITE, "** JOB HELP ** type a command for more information.");
  47042. switch(PlayerData[playerid][pJob])
  47043. {
  47044. //case JOB_NONE: SendClientMessage(playerid, COLOR_GREY, "You have no job and therefore no job commands to view.");
  47045. case JOB_PIZZAMAN: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /getpizza, /cancelcp.");
  47046. case JOB_COURIER: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /load, /deliver, /cancelcp.");
  47047. case JOB_FISHERMAN: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /fish, /myfish, /sellfish.");
  47048. case JOB_BODYGUARD: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /sellvest, /frisk.");
  47049. case JOB_WEAPONDEALER: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /smugglemats, /sellgun.");
  47050. case JOB_MECHANIC: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /buycomps, /repair, /refill, /nos, /hyd, /takecall.");
  47051. case JOB_MINER: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /mine, /cancelcp.");
  47052. case JOB_SWEEPER: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /startsweeping, /stopsweeping.");
  47053. case JOB_TAXIDRIVER: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /setfare, /takecall.");
  47054. case JOB_DRUGDEALER: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /buydrug, /planthelp, /cookmeth, /smuggledrugs.");
  47055. case JOB_LAWYER: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /defend, /free, /wanted.");
  47056. case JOB_DETECTIVE: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /find.");
  47057. case JOB_GARBAGEMAN: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /garbage");
  47058. case JOB_FARMER: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /harvest");
  47059. }
  47060. if(PlayerData[playerid][pSecondJob] != JOB_NONE)
  47061. {
  47062. switch(PlayerData[playerid][pSecondJob])
  47063. {
  47064. //case JOB_NONE: SendClientMessage(playerid, COLOR_GREY, "You have no job and therefore no job commands to view.");
  47065. case JOB_PIZZAMAN: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /getpizza.");
  47066. case JOB_COURIER: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /load, /deliver.");
  47067. case JOB_FISHERMAN: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /fish, /myfish, /sellfish.");
  47068. case JOB_BODYGUARD: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /sellvest, /frisk.");
  47069. case JOB_WEAPONDEALER: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /smugglemats, /sellgun.");
  47070. case JOB_MECHANIC: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /buycomps, /repair, /refill, /nos, /hyd.");
  47071. case JOB_MINER: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /mine.");
  47072. case JOB_SWEEPER: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /startsweeping, /stopsweeping.");
  47073. case JOB_TAXIDRIVER: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /setfare.");
  47074. case JOB_DRUGDEALER: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /buydrug, /planthelp, /cookmeth, /smuggledrugs.");
  47075. case JOB_LAWYER: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /defend, /free, /wanted.");
  47076. case JOB_DETECTIVE: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /find.");
  47077. case JOB_GARBAGEMAN: SendClientMessage(playerid, COLOR_GREY, "** JOB ** /garbage");
  47078. }
  47079. }
  47080. return 1;
  47081. }
  47082. CMD:vehiclehelp(playerid, params[])
  47083. {
  47084. SendClientMessage(playerid, COLOR_NAVYBLUE, "________________ Vehicle Help ________________");
  47085. SendClientMessage(playerid, COLOR_WHITE, "** VEHICLE HELP ** type a command for more information.");
  47086. SendClientMessage(playerid, COLOR_GREY, "** VEHICLE ** /lights /hood /boot /buy /carstorage /park /lock /findcar, /setforsale, /cancelforsale");
  47087. SendClientMessage(playerid, COLOR_GREY, "** VEHICLE ** /vstash /neon /unmod /colorcar /paintcar /upgradevehicle /sellcar /sellmycar");
  47088. SendClientMessage(playerid, COLOR_GREY, "** VEHICLE ** /givekeys /takekeys /setradio /paytickets /carinfo /gascan /breakin");
  47089. return 1;
  47090. }
  47091. CMD:bankhelp(playerid, params[])
  47092. {
  47093. SendClientMessage(playerid, COLOR_NAVYBLUE, "__________________ Banking Help __________________");
  47094. SendClientMessage(playerid, COLOR_WHITE, "** BANKING HELP ** type a command for more information.");
  47095. SendClientMessage(playerid, COLOR_GREY, "** BANKING ** /withdraw /deposit /wiretransfer /balance /robbank /robinvite /bombvault /robbers");
  47096. return 1;
  47097. }
  47098. CMD:viphelp(playerid, params[])
  47099. {
  47100. if(!PlayerData[playerid][pDonator])
  47101. {
  47102. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you don't have a VIP subscription.");
  47103. }
  47104. SendClientMessage(playerid, COLOR_NAVYBLUE, "__________________ VIP Help __________________");
  47105. SendClientMessage(playerid, COLOR_WHITE, "** VIP HELP ** type a command for more information.");
  47106. SendClientMessage(playerid, COLOR_GREY, "** VIP ** /(v)ip /vipinfo /viptag /vipcolor /vipinvite /vipnumber /vipmusic");
  47107. if(PlayerData[playerid][pDonator] == 3)
  47108. {
  47109. SendClientMessage(playerid, COLOR_GREY, "** VIP ** /repair /nos /hyd /viprimkit");
  47110. }
  47111. return 1;
  47112. }
  47113. CMD:fmembers(playerid, params[])
  47114. {
  47115. if(PlayerData[playerid][pFaction] == -1)
  47116. {
  47117. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not apart of any faction.");
  47118. }
  47119. SendClientMessage(playerid, COLOR_NAVYBLUE, "_____________ Members Online _____________");
  47120. new string[128], color = FactionInfo[PlayerData[playerid][pFaction]][fColor];
  47121. foreach(new i : Player)
  47122. {
  47123. if(PlayerData[i][pFaction] == PlayerData[playerid][pFaction] && !PlayerData[i][pAdminHide])
  47124. {
  47125. format(string, sizeof(string), "(ID: %i) %s {%06x}%s{FFFFFF}", i, FactionRanks[PlayerData[i][pFaction]][PlayerData[i][pFactionRank]], color >>> 8, GetRPName(i));
  47126. if(PlayerData[i][pDivision] >= 0)
  47127. {
  47128. format(string, sizeof(string), "%s | Division: %s", string, FactionDivisions[PlayerData[i][pFaction]][PlayerData[i][pDivision]]);
  47129. }
  47130. if(PlayerData[i][pFactionLeader])
  47131. {
  47132. format(string, sizeof(string), "%s | {06FF00}Leader{FFFFFF}", string);
  47133. }
  47134. if(FactionInfo[PlayerData[i][pFaction]][fType] == FACTION_MEDIC)
  47135. {
  47136. SendClientMessage(playerid, COLOR_WHITE, string);
  47137. format(string, sizeof(string), "| Total Patients: %i | Total Fires: %i", string, PlayerData[i][pTotalPatients], PlayerData[i][pTotalFires]);
  47138. }
  47139. format(string, sizeof(string), "%s | Location: %s", string, GetPlayerZoneName(i));
  47140. if(PlayerData[i][pAFK])
  47141. {
  47142. format(string, sizeof(string), "%s | {FFA500}AFK{FFFFFF} (%d secs)", string, PlayerData[i][pAFKTime]);
  47143. }
  47144. SendClientMessage(playerid, COLOR_WHITE, string);
  47145. }
  47146. }
  47147. return 1;
  47148. }
  47149. CMD:gmembers(playerid, params[])
  47150. {
  47151. if(PlayerData[playerid][pGang] == -1)
  47152. {
  47153. return SendClientMessage(playerid, COLOR_GREY, "You are not apart of a gang at the moment.");
  47154. }
  47155. SendClientMessage(playerid, COLOR_NAVYBLUE, "_____________ Members Online _____________");
  47156. new string[128], color = GangInfo[PlayerData[playerid][pGang]][gColor];
  47157. foreach(new i : Player)
  47158. {
  47159. if(PlayerData[i][pGang] == PlayerData[playerid][pGang] && !PlayerData[i][pAdminHide])
  47160. {
  47161. format(string, sizeof(string), "(%i) %s {%06x}%s{FFFFFF}", PlayerData[i][pGangRank], GangRanks[PlayerData[i][pGang]][PlayerData[i][pGangRank]], color >>> 8, GetRPName(i));
  47162. if(PlayerData[i][pCrew] >= 0)
  47163. {
  47164. format(string, sizeof(string), "%s | Crew: %s", string, GangCrews[PlayerData[i][pGang]][PlayerData[i][pCrew]]);
  47165. }
  47166. format(string, sizeof(string), "%s | Location: %s", string, GetPlayerZoneName(i));
  47167. if(PlayerData[i][pAFK])
  47168. {
  47169. format(string, sizeof(string), "%s | {FFA500}AFK{FFFFFF} (%d secs)", string, PlayerData[i][pAFKTime]);
  47170. }
  47171. SendClientMessage(playerid, COLOR_WHITE, string);
  47172. }
  47173. }
  47174. return 1;
  47175. }
  47176. CMD:members(playerid, params[])
  47177. {
  47178. if(PlayerData[playerid][pGang] != -1)
  47179. {
  47180. callcmd::gmembers(playerid, params);
  47181. }
  47182. if(PlayerData[playerid][pFaction] != -1)
  47183. {
  47184. callcmd::fmembers(playerid, params);
  47185. }
  47186. return 1;
  47187. }
  47188. /* wtf is this crap
  47189. CMD:fmembers(playerid, params[])
  47190. {
  47191. if(PlayerData[playerid][pFaction] == -1)
  47192. {
  47193. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not apart of any faction.");
  47194. }
  47195. SendClientMessage(playerid, COLOR_NAVYBLUE, "_____ Members Online _____");
  47196. foreach(new i : Player)
  47197. {
  47198. if(PlayerData[i][pFaction] == PlayerData[playerid][pFaction])
  47199. {
  47200. if(FactionInfo[PlayerData[i][pFaction]][fType] == FACTION_MEDIC)
  47201. {
  47202. if(PlayerData[i][pDivision] == -1)
  47203. {
  47204. if(PlayerData[i][pFactionLeader])
  47205. SendClientMessageEx(playerid, COLOR_GREY2, "(ID: %i) %s %s - (Total Patients: %i) - (Total Fires: %i) {00AA00}(Leaderflags)", i, FactionRanks[PlayerData[i][pFaction]][PlayerData[i][pFactionRank]], GetRPName(i), PlayerData[i][pTotalPatients], PlayerData[i][pTotalFires]);
  47206. else
  47207. SendClientMessageEx(playerid, COLOR_GREY2, "(ID: %i) %s %s - (Total Patients: %i) - (Total Fires: %i)", i, FactionRanks[PlayerData[i][pFaction]][PlayerData[i][pFactionRank]], GetRPName(i), PlayerData[i][pTotalPatients], PlayerData[i][pTotalFires]);
  47208. }
  47209. else
  47210. {
  47211. if(PlayerData[i][pFactionLeader])
  47212. SendClientMessageEx(playerid, COLOR_GREY2, "(ID: %i) [%s] %s %s - (Total Patients: %i) - (Total Fires: %i) {00AA00}(Leaderflags)", i, FactionDivisions[PlayerData[i][pFaction]][PlayerData[i][pDivision]], FactionRanks[PlayerData[i][pFaction]][PlayerData[i][pFactionRank]], GetRPName(i), PlayerData[i][pTotalPatients], PlayerData[i][pTotalFires]);
  47213. else
  47214. SendClientMessageEx(playerid, COLOR_GREY2, "(ID: %i) [%s] %s %s - (Total Patients: %i) - (Total Fires: %i)", i, FactionDivisions[PlayerData[i][pFaction]][PlayerData[i][pDivision]], FactionRanks[PlayerData[i][pFaction]][PlayerData[i][pFactionRank]], GetRPName(i), PlayerData[i][pTotalPatients], PlayerData[i][pTotalFires]);
  47215. }
  47216. }
  47217. else
  47218. {
  47219. if(PlayerData[i][pDivision] == -1)
  47220. {
  47221. if(PlayerData[i][pFactionLeader])
  47222. SendClientMessageEx(playerid, COLOR_GREY2, "(ID: %i) %s %s {00AA00}(Leaderflags)", i, FactionRanks[PlayerData[i][pFaction]][PlayerData[i][pFactionRank]], GetRPName(i));
  47223. else
  47224. SendClientMessageEx(playerid, COLOR_GREY2, "(ID: %i) %s %s", i, FactionRanks[PlayerData[i][pFaction]][PlayerData[i][pFactionRank]], GetRPName(i));
  47225. }
  47226. else
  47227. {
  47228. if(PlayerData[i][pFactionLeader])
  47229. SendClientMessageEx(playerid, COLOR_GREY2, "(ID: %i) [%s] %s %s {00AA00}(Leaderflags)", i, FactionDivisions[PlayerData[i][pFaction]][PlayerData[i][pDivision]], FactionRanks[PlayerData[i][pFaction]][PlayerData[i][pFactionRank]], GetRPName(i));
  47230. else
  47231. SendClientMessageEx(playerid, COLOR_GREY2, "(ID: %i) [%s] %s %s", i, FactionDivisions[PlayerData[i][pFaction]][PlayerData[i][pDivision]], FactionRanks[PlayerData[i][pFaction]][PlayerData[i][pFactionRank]], GetRPName(i));
  47232. }
  47233. }
  47234. }
  47235. }
  47236. return 1;
  47237. }*/
  47238. CMD:setspawn(playerid, params[])
  47239. {
  47240. new spawn_id, optional;
  47241. if(sscanf(params, "dI(-1)", spawn_id, optional))
  47242. {
  47243. SendClientMessage(playerid, COLOR_ADM, "USAGE:{FFFFFF} /setspawn [spawn_id] ");
  47244. SendClientMessage(playerid, COLOR_DARKGREEN, "1. Last Position | 2. House | 4. Faction");
  47245. return true;
  47246. }
  47247. switch ( spawn_id )
  47248. {
  47249. case 1:
  47250. {
  47251. PlayerData[playerid][pSpawnSelect] = 0;
  47252. SendClientMessage(playerid, COLOR_GREY, "You will now spawn at your last position.");
  47253. SavePlayerVariables(playerid);
  47254. }
  47255. case 2:
  47256. {
  47257. if(CountPlayerHouses(playerid) == 0)return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You don't own any houses.");
  47258. if(optional == -1){
  47259. SendClientMessage(playerid, COLOR_ADM, "USAGE:{FFFFFF} /setspawn 2 [house id] ");
  47260. SendClientMessage(playerid, COLOR_ADM, "You must specify your house ID by using /myassets to fetch the ID. ");
  47261. return true;
  47262. }
  47263. if(optional < 0 || !HouseInfo[optional][hExists]) return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You specified an invalid house ID.");
  47264. for(new i = 0; i < MAX_HOUSES; i++){
  47265. if(HouseInfo[optional][hExists]){
  47266. if(!IsHouseOwner(playerid, optional)){
  47267. SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You don't own that house.");
  47268. return true;
  47269. }
  47270. }
  47271. }
  47272. SendClientMessage(playerid, COLOR_GREY, "You will now spawn at your house.");
  47273. PlayerData[playerid][pSpawnSelect] = 1;
  47274. PlayerData[playerid][pSpawnHouse] = optional;
  47275. SavePlayerVariables(playerid);
  47276. }
  47277. case 3:
  47278. {
  47279. if( !PlayerData[playerid][pFaction] )return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You aren't in any faction.");
  47280. SendClientMessage(playerid, COLOR_GREY, "You will now spawn at your faction spawn.");
  47281. PlayerData[playerid][pSpawnSelect] = 2;
  47282. PlayerData[playerid][pSpawnPrecinct] = 0;
  47283. SavePlayerVariables(playerid);
  47284. }
  47285. }
  47286. return true;
  47287. }
  47288. CMD:factionhelp(playerid, params[])
  47289. {
  47290. if(PlayerData[playerid][pFaction] == -1)
  47291. {
  47292. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not apart of any faction.");
  47293. }
  47294. SendClientMessage(playerid, COLOR_GREEN, "_______________________________________");
  47295. SendClientMessage(playerid, COLOR_WHITE, "** FACTION HELP ** type a command for more information.");
  47296. SendClientMessage(playerid, COLOR_GREY, "** FACTION ** /fc /d /(r)adio /div /faction /division /locker /showbadge /(m)egaphone");
  47297. switch(FactionInfo[PlayerData[playerid][pFaction]][fType])
  47298. {
  47299. case FACTION_POLICE, FACTION_FEDERAL, FACTION_ARMY:
  47300. {
  47301. SendClientMessage(playerid, COLOR_GREY, "** FACTION ** /gate /door /cell /tazer /cuff /uncuff /drag /detain /charge /arrest");
  47302. SendClientMessage(playerid, COLOR_GREY, "** FACTION ** /wanted /frisk /take /ticket /gov /ram /deploy /undeploy /undeployall /backup /swat");
  47303. SendClientMessage(playerid, COLOR_GREY, "** FACTION ** /mdc /clearwanted /siren /badge /vticket /vfrisk /vtake /seizeplant /mir /fpark");
  47304. if(FactionInfo[PlayerData[playerid][pFaction]][fType] == FACTION_FEDERAL)
  47305. SendClientMessage(playerid, COLOR_GREY, "** FACTION ** /listcallers /trackcall /cells /passport /callsign /bug /listbugs /tog bugged");
  47306. else
  47307. SendClientMessage(playerid, COLOR_GREY, "** FACTION ** /listcallers /trackcall /cells /claim /callsign /fpark");
  47308. }
  47309. case FACTION_MEDIC:
  47310. {
  47311. SendClientMessage(playerid, COLOR_GREY, "** FACTION ** /heal /drag /stretcher /deliverpt /getpt /listpt /injuries /deploy /undeploy /undeployall");
  47312. SendClientMessage(playerid, COLOR_GREY, "** FACTION ** /badge /gov /backup /listcallers /trackcall /callsign /fpark");
  47313. }
  47314. case FACTION_NEWS:
  47315. {
  47316. SendClientMessage(playerid, COLOR_GREY, "** FACTION ** /news /live /endlive /liveban /badge /addeposit /adwithdraw /fpark");
  47317. }
  47318. case FACTION_GOVERNMENT:
  47319. {
  47320. SendClientMessage(playerid, COLOR_GREY, "** FACTION ** /gov /settax /factionpay /tazer /cuff /uncuff /detain /taxdeposit /taxwithdraw /fpark");
  47321. SendClientMessage(playerid, COLOR_GREY, "** FACTION ** /backup /badge");
  47322. }
  47323. case FACTION_HITMAN:
  47324. {
  47325. SendClientMessage(playerid, COLOR_GREY, "** FACTION ** /contracts /takehit /profile /passport /plantbomb /pickupbomb /detonate");
  47326. SendClientMessage(playerid, COLOR_GREY, "** FACTION ** /hfind, /noknife, /hm /fpark");
  47327. }
  47328. }
  47329. return 1;
  47330. }
  47331. CMD:ganghelp(playerid, params[])
  47332. {
  47333. if(PlayerData[playerid][pGang] == -1)
  47334. {
  47335. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a gang member.");
  47336. }
  47337. SendClientMessage(playerid, COLOR_GREEN, "_______________________________________");
  47338. SendClientMessage(playerid, COLOR_WHITE, "** GANG HELP ** type a command for more information.");
  47339. SendClientMessage(playerid, COLOR_GREY, "** GANG ** /f /gang /gstash /gbackup /bandana /capture /claim /reclaim /turfinfo /points");
  47340. SendClientMessage(playerid, COLOR_GREY, "** GANG ** /gbuyvehicle /gpark /gfindcar /grespawncars /gsellcar /gunmod /lock, /endalliance, /gspray");
  47341. SendClientMessage(playerid, COLOR_GREY, "** CREW ** /managecrew /crew");
  47342. return 1;
  47343. }
  47344. CMD:landhelp(playerid, params[])
  47345. {
  47346. SendClientMessage(playerid, COLOR_GREEN, "_______________________________________");
  47347. SendClientMessage(playerid, COLOR_WHITE, "** LAND HELP ** type a command for more information.");
  47348. SendClientMessage(playerid, COLOR_GREY, "** LAND ** /buyland /lock /door /landinfo /land /sellmyland /sellland /droplandkeys");
  47349. SendClientMessage(playerid, COLOR_GREY, "** LAND ** '/toggle lands' to show or hide lands on your mini-map.");
  47350. return 1;
  47351. }
  47352. CMD:planthelp(playerid, params[])
  47353. {
  47354. SendClientMessage(playerid, COLOR_GREEN, "_______________________________________");
  47355. SendClientMessage(playerid, COLOR_WHITE, "** PLANT HELP ** type a command for more information.");
  47356. SendClientMessage(playerid, COLOR_GREY, "** PLANT ** /plantweed /plantinfo /pickplant /seizeplant");
  47357. return 1;
  47358. }
  47359. CMD:o(playerid, params[])
  47360. {
  47361. return callcmd::ooc(playerid, params);
  47362. }
  47363. CMD:ooc(playerid, params[])
  47364. {
  47365. new string[64];
  47366. if(isnull(params))
  47367. {
  47368. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /(o)oc [global OOC]");
  47369. }
  47370. if(!enabledOOC && PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  47371. {
  47372. return SendClientMessage(playerid, COLOR_GREY, "The global OOC channel is disabled at the moment.");
  47373. }
  47374. if(PlayerData[playerid][pToggleOOC])
  47375. {
  47376. return SendClientMessage(playerid, COLOR_GREY, "You can't speak in the OOC chat as you have it toggled.");
  47377. }
  47378. if((!isnull(PlayerData[playerid][pCustomTitle]) && strcmp(PlayerData[playerid][pCustomTitle], "None", true) != 0) && PlayerData[playerid][pAdminHide] == 0) {
  47379. new color;
  47380. if(PlayerData[playerid][pCustomTColor] == -1 || PlayerData[playerid][pCustomTColor] == -256)
  47381. {
  47382. color = 0xC8C8C8FF;
  47383. }
  47384. else
  47385. {
  47386. color = PlayerData[playerid][pCustomTColor];
  47387. }
  47388. format(string, sizeof(string), "{%06x}%s{FFFFFF} %s", color >>> 8, PlayerData[playerid][pCustomTitle], GetRPName(playerid));
  47389. } else if(PlayerData[playerid][pAdmin] > 1 && PlayerData[playerid][pAdminHide] == 0) {
  47390. format(string, sizeof(string), "%s %s", GetAdminRank(playerid), GetRPName(playerid));
  47391. } else if(PlayerData[playerid][pHelper] > 0) {
  47392. format(string, sizeof(string), "%s %s", GetHelperRank(playerid), GetRPName(playerid));
  47393. } else if(PlayerData[playerid][pFormerAdmin]) {
  47394. format(string, sizeof(string), "{FF69B5}Former Admin{FFFFFF} %s", GetRPName(playerid));
  47395. } else if(PlayerData[playerid][pDonator] > 0) {
  47396. format(string, sizeof(string), "{D909D9}%s VIP{FFFFFF} %s", GetVIPRank(PlayerData[playerid][pDonator]), GetRPName(playerid));
  47397. } else {
  47398. format(string, sizeof(string), "%s", GetRPName(playerid));
  47399. }
  47400. foreach(new i : Player)
  47401. {
  47402. if(!PlayerData[i][pToggleOOC])
  47403. {
  47404. if(strlen(params) > MAX_SPLIT_LENGTH)
  47405. {
  47406. SendClientMessageEx(i, COLOR_WHITE, "(( %s: %.*s... ))", string, MAX_SPLIT_LENGTH, params);
  47407. SendClientMessageEx(i, COLOR_WHITE, "(( %s: ...%s ))", string, params[MAX_SPLIT_LENGTH]);
  47408. }
  47409. else
  47410. {
  47411. SendClientMessageEx(i, COLOR_WHITE, "(( %s: %s ))", string, params);
  47412. }
  47413. }
  47414. }
  47415. return 1;
  47416. }
  47417. CMD:newb(playerid, params[])
  47418. {
  47419. return callcmd::newbie(playerid, params);
  47420. }
  47421. CMD:n(playerid, params[])
  47422. {
  47423. return callcmd::newbie(playerid, params);
  47424. }
  47425. CMD:na(playerid, params[]) return callcmd::nanswer(playerid, params);
  47426. CMD:nanswer(playerid, params[])
  47427. {
  47428. if(PlayerData[playerid][pHelper] >= 1 || PlayerData[playerid][pAdmin] >= LEVEL_SECRET_ADMIN)
  47429. {
  47430. new giveplayerid, string[300], answer[128], question[128];
  47431. if(sscanf(params, "us[128]", giveplayerid, answer)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /nanswer (playerid) (answer)");
  47432. if(GetPVarInt(giveplayerid, "SendQuestion") == 0) return SendClientMessageEx(playerid, COLOR_GREY, "That player isn't asking");
  47433. format(string, sizeof(string), "* Staff %s has answered your Question", GetPlayerNameEx(playerid));
  47434. SendClientMessageEx(giveplayerid, COLOR_AQUA, string);
  47435. GetPVarString(giveplayerid, "Question", question, sizeof(question));
  47436. foreach(new n: Player)
  47437. {
  47438. if(!PlayerData[n][pToggleNewbie])
  47439. {
  47440. format(string, sizeof(string), "Question: %s: %s", GetRPName(giveplayerid), question);
  47441. SendClientMessageEx(n, COLOR_NEWBIE, string);
  47442. if(PlayerData[playerid][pHelper] == 1 && PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  47443. {
  47444. format(string, sizeof(string), "Answer: %s: %s", GetRPName(playerid), answer);
  47445. PlayerData[playerid][pNewbies] ++;
  47446. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET newbies = %i WHERE uid = %i", PlayerData[playerid][pNewbies], PlayerData[playerid][pID]);
  47447. mysql_tquery(connectionID, queryBuffer);
  47448. }
  47449. if(PlayerData[playerid][pHelper] >= 2 && PlayerData[playerid][pAdmin] < 1) format(string, sizeof(string), "Answer: %s: %s", GetRPName(playerid), answer);
  47450. if(PlayerData[playerid][pAdmin] >= JUNIOR_ADMIN) format(string, sizeof(string), "Answer: %s: %s", GetRPName(playerid), answer);
  47451. SendClientMessageEx(n, COLOR_NEWBIE, string);
  47452. }
  47453. }
  47454. DeletePVar(giveplayerid, "SendQuestion");
  47455. DeletePVar(giveplayerid, "Question");
  47456. return 1;
  47457. }
  47458. else SendClientMessageEx(playerid, COLOR_AQUA, "You're not a Helper or an Admin!");
  47459. return 1;
  47460. }
  47461. CMD:tn(playerid, params[]) return callcmd::trashnewb(playerid, params);
  47462. CMD:trashnewb(playerid, params[])
  47463. {
  47464. if(PlayerData[playerid][pHelper] >= 1 || PlayerData[playerid][pAdmin] >= LEVEL_SECRET_ADMIN)
  47465. {
  47466. new giveplayerid, string[128], reason[128];
  47467. if(sscanf(params, "us[128]", giveplayerid, reason)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /trashnewb (playerid) (text)");
  47468. if(GetPVarInt(giveplayerid, "SendQuestion") == 0) return SendClientMessageEx(playerid, COLOR_GREY, "That player isn't asking");
  47469. format(string, sizeof(string), "* Staff %s has trashed your question. Reason: %s", GetRPName(playerid), reason);
  47470. SendClientMessageEx(giveplayerid, COLOR_AQUA, string);
  47471. format(string, sizeof(string), "* %s has trashed %s question. Reason: %s", GetRPName(playerid),GetRPName(giveplayerid), reason);
  47472. SendQuestionToStaff(COLOR_AQUA, string);
  47473. DeletePVar(giveplayerid, "SendQuestion");
  47474. DeletePVar(giveplayerid, "Question");
  47475. return 1;
  47476. }
  47477. else SendClientMessageEx(playerid, COLOR_AQUA, "You're not a Helper or an Admin!");
  47478. return 1;
  47479. }
  47480. CMD:newbie(playerid, params[])
  47481. {
  47482. if(!enabledNewbie && PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  47483. {
  47484. return SendClientMessage(playerid, COLOR_GREY, "The newbie channel is disabled at the moment.");
  47485. }
  47486. if(PlayerData[playerid][pNewbieMuted])
  47487. {
  47488. return SendClientMessage(playerid, COLOR_GREY, "You are muted from speaking in this channel. /unmute to unmute yourself.");
  47489. }
  47490. if(gettime() - PlayerData[playerid][pLastNewbie] < 30)
  47491. {
  47492. return SendClientMessageEx(playerid, COLOR_GREY, "You can only speak in this channel every 30 seconds. Please wait %i more seconds.", 30 - (gettime() - PlayerData[playerid][pLastNewbie]));
  47493. }
  47494. if(PlayerData[playerid][pToggleNewbie])
  47495. {
  47496. return SendClientMessage(playerid, COLOR_GREY, "You can't speak in the newbie chat as you have it toggled.");
  47497. }
  47498. ShowDialogToPlayer(playerid, DIALOG_NEWBIE);
  47499. return 1;
  47500. }
  47501. CMD:level(playerid, params[])
  47502. {
  47503. new count, color;
  47504. if(isnull(params))
  47505. {
  47506. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /level [level]");
  47507. }
  47508. if(IsNumeric(params))
  47509. {
  47510. foreach(new i : Player)
  47511. {
  47512. if(PlayerData[i][pLevel] == strval(params))
  47513. {
  47514. if((color = GetPlayerColor(i)) == 0xFFFFFF00)
  47515. color = 0xAAAAAAFF;
  47516. SendClientMessageEx(playerid, COLOR_GREY3, "(ID: %i) {%06x}%s{AAAAAA} - (Level: %i) - (Ping: %i)", i, color >>> 8, GetPlayerNameEx(i), PlayerData[i][pLevel], GetPlayerPing(i));
  47517. count++;
  47518. }
  47519. }
  47520. if(!count)
  47521. {
  47522. SendClientMessageEx(playerid, COLOR_GREY, "There are no level %s players online.", params);
  47523. }
  47524. }
  47525. else
  47526. {
  47527. SendClientMessage(playerid, COLOR_GREY, "Please use a numerical value!");
  47528. }
  47529. return 1;
  47530. }
  47531. CMD:id(playerid, params[])
  47532. {
  47533. new count, color, name[MAX_PLAYER_NAME], targetid = strval(params);
  47534. if(isnull(params))
  47535. {
  47536. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /id [playerid/partial name]");
  47537. }
  47538. if(IsNumeric(params))
  47539. {
  47540. if(IsPlayerConnected(targetid))
  47541. {
  47542. if((color = GetPlayerColor(targetid)) == 0xFFFFFF00) {
  47543. color = 0xAAAAAAFF;
  47544. }
  47545. GetPlayerName(targetid, name, sizeof(name));
  47546. SendClientMessageEx(playerid, COLOR_GREY3, "(ID: %i) {%06x}%s{AAAAAA} - (Level: %i) - (Ping: %i)", targetid, color >>> 8, name, PlayerData[targetid][pLevel], GetPlayerPing(targetid));
  47547. }
  47548. else
  47549. {
  47550. SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  47551. }
  47552. }
  47553. else if(strlen(params) < 2)
  47554. {
  47555. SendClientMessage(playerid, COLOR_GREY, "Please input at least two characters to search.");
  47556. }
  47557. else
  47558. {
  47559. foreach(new i : Player)
  47560. {
  47561. GetPlayerName(i, name, sizeof(name));
  47562. if(strfind(name, params, true) != -1)
  47563. {
  47564. if((color = GetPlayerColor(i)) == 0xFFFFFF00) {
  47565. color = 0xAAAAAAFF;
  47566. }
  47567. SendClientMessageEx(playerid, COLOR_GREY3, "(ID: %i) {%06x}%s{AAAAAA} - (Level: %i) - (Ping: %i)", i, color >>> 8, name, PlayerData[i][pLevel], GetPlayerPing(i));
  47568. count++;
  47569. }
  47570. }
  47571. if(!count)
  47572. {
  47573. SendClientMessageEx(playerid, COLOR_GREY, "No results found for \"%s\". Please narrow your search.", params);
  47574. }
  47575. }
  47576. return 1;
  47577. }
  47578. CMD:pay(playerid, params[])
  47579. {
  47580. new targetid, amount;
  47581. if(sscanf(params, "ui", targetid, amount))
  47582. {
  47583. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /pay [playerid] [amount]");
  47584. }
  47585. if(gettime() - PlayerData[playerid][pLastPay] < 3)
  47586. {
  47587. return SendClientMessage(playerid, COLOR_GREY, "Please wait three seconds between each transaction.");
  47588. }
  47589. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  47590. {
  47591. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  47592. }
  47593. if(targetid == playerid)
  47594. {
  47595. return SendClientMessage(playerid, COLOR_GREY, "You can't pay yourself.");
  47596. }
  47597. if(amount < 1)
  47598. {
  47599. return SendClientMessage(playerid, COLOR_GREY, "You must specify an amount above zero.");
  47600. }
  47601. if(amount > PlayerData[playerid][pCash])
  47602. {
  47603. return SendClientMessage(playerid, COLOR_GREY, "You don't have that much.");
  47604. }
  47605. if(amount > 1000 && PlayerData[playerid][pLevel] < 2)
  47606. {
  47607. return SendClientMessage(playerid, COLOR_GREY, "You can only pay up to $1,000 at a time as a level 1.");
  47608. }
  47609. if(amount > 100000)
  47610. {
  47611. return SendClientMessage(playerid, COLOR_GREY, "You are only allowed to pay up to $100,000 at a time.");
  47612. }
  47613. if(PlayerData[playerid][pAdminDuty])
  47614. {
  47615. return SendClientMessage(playerid, COLOR_GREY, "You cannot use this command while on admin duty");
  47616. }
  47617. PlayerData[playerid][pLastPay] = gettime();
  47618. GivePlayerCash(playerid, -amount);
  47619. GivePlayerCash(targetid, amount);
  47620. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  47621. PlayerPlaySound(targetid, 1052, 0.0, 0.0, 0.0);
  47622. ShowActionBubble(playerid, "* %s takes out %s and gives it to %s.", GetRPName(playerid), FormatNumber(amount), GetRPName(targetid));
  47623. Log_Write("log_give", "%s (uid: %i) (IP: %s) gives $%i to %s (uid: %i) (IP: %s)", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerIP(playerid), amount, GetPlayerNameEx(targetid), PlayerData[targetid][pID], GetPlayerIP(targetid));
  47624. SendClientMessageEx(targetid, COLOR_AQUA, "You have been given {00AA00}%s{33CCFF} by %s.", FormatNumber(amount), GetRPName(playerid));
  47625. SendClientMessageEx(playerid, COLOR_AQUA, "You have given {FF6347}%s{33CCFF} to %s.", FormatNumber(amount), GetRPName(targetid));
  47626. if(!strcmp(GetPlayerIP(playerid), GetPlayerIP(targetid)))
  47627. {
  47628. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s (IP: %s) has given %s to %s (IP: %s).", GetRPName(playerid), GetPlayerIP(playerid), FormatNumber(amount), GetRPName(targetid), GetPlayerIP(targetid));
  47629. }
  47630. return 1;
  47631. }
  47632. CMD:give(playerid, params[])
  47633. {
  47634. new targetid, option[14], param[32], amount;
  47635. if(sscanf(params, "us[14]S()[32]", targetid, option, param))
  47636. {
  47637. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /give [playerid] [option]");
  47638. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Weapon, Materials, Weed, Cocaine, Meth, Painkillers, Cigars, Spraycans");
  47639. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: GasCan, Seeds, Ephedrine, FirstAid, Bodykits, Rimkits, Diamonds");
  47640. return 1;
  47641. }
  47642. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  47643. {
  47644. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  47645. }
  47646. if(targetid == playerid)
  47647. {
  47648. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command on yourself.");
  47649. }
  47650. if(PlayerData[playerid][pTazedTime] > 0 || PlayerData[playerid][pInjured] > 0 || PlayerData[playerid][pHospital] > 0 || PlayerData[playerid][pCuffed] > 0 || PlayerData[playerid][pTied] > 0 || PlayerData[playerid][pJailTime] > 0 || PlayerData[playerid][pJoinedEvent] > 0 || PlayerData[playerid][pPaintball] > 0 || PlayerData[playerid][pDueling] != INVALID_PLAYER_ID)
  47651. {
  47652. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment.");
  47653. }
  47654. if(!strcmp(option, "weapon", true))
  47655. {
  47656. new weaponid = GetScriptWeapon(playerid);
  47657. if(!weaponid)
  47658. {
  47659. return SendClientMessage(playerid, COLOR_GREY, "You must be holding the weapon you're willing to give away.");
  47660. }
  47661. if(PlayerData[playerid][pWeapons][weaponSlotIDs[weaponid]] != weaponid)
  47662. {
  47663. return SendClientMessage(playerid, COLOR_GREY, "You can't sell this weapon as you don't have it.");
  47664. }
  47665. if(PlayerData[targetid][pWeapons][weaponSlotIDs[weaponid]] > 0)
  47666. {
  47667. return SendClientMessage(playerid, COLOR_GREY, "That player already has a weapon in that slot.");
  47668. }
  47669. if(PlayerData[targetid][pHours] < 2 || PlayerData[targetid][pWeaponRestricted] > 0)
  47670. {
  47671. return SendClientMessage(playerid, COLOR_GREY, "That player is either weapon restricted or played less than two playing hours.");
  47672. }
  47673. if(PlayerData[playerid][pFaction] >= 0 && PlayerData[targetid][pFaction] != PlayerData[playerid][pFaction])
  47674. {
  47675. return SendClientMessage(playerid, COLOR_GREY, "You can only give away weapons to your own faction members.");
  47676. }
  47677. if(IsPlayerInAnyVehicle(playerid))
  47678. {
  47679. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command from inside a vehicle.");
  47680. }
  47681. if(IsPlayerInAnyVehicle(targetid))
  47682. {
  47683. return SendClientMessage(playerid, COLOR_GREY, "You can't sell weapons to players inside a vehicle.");
  47684. }
  47685. if(GetPlayerHealthEx(playerid) < 60)
  47686. {
  47687. return SendClientMessage(playerid, COLOR_GREY, "You can't give weapons as your health is below 60.");
  47688. }
  47689. GivePlayerWeaponEx(targetid, weaponid);
  47690. RemovePlayerWeapon(playerid, weaponid);
  47691. SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you their %s.", GetRPName(playerid), GetWeaponNameEx(weaponid));
  47692. SendClientMessageEx(playerid, COLOR_AQUA, "You have given %s your %s.", GetRPName(targetid), GetWeaponNameEx(weaponid));
  47693. ShowActionBubble(playerid, "* %s passes over their %s to %s.", GetRPName(playerid), GetWeaponNameEx(weaponid), GetRPName(targetid));
  47694. Log_Write("log_give", "%s (uid: %i) gives their %s to %s (uid: %i)", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetWeaponNameEx(weaponid), GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  47695. }
  47696. else if(!strcmp(option, "materials", true))
  47697. {
  47698. if(sscanf(param, "i", amount))
  47699. {
  47700. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /give [playerid] [materials] [amount]");
  47701. }
  47702. if(amount < 1 || amount > PlayerData[playerid][pMaterials])
  47703. {
  47704. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  47705. }
  47706. if(PlayerData[targetid][pMaterials] + amount > GetPlayerCapacity(targetid, CAPACITY_MATERIALS))
  47707. {
  47708. return SendClientMessageEx(playerid, COLOR_GREY, "That player can't carry that much more materials.");
  47709. }
  47710. PlayerData[playerid][pMaterials] -= amount;
  47711. PlayerData[targetid][pMaterials] += amount;
  47712. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET materials = %i WHERE uid = %i", PlayerData[playerid][pMaterials], PlayerData[playerid][pID]);
  47713. mysql_tquery(connectionID, queryBuffer);
  47714. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET materials = %i WHERE uid = %i", PlayerData[targetid][pMaterials], PlayerData[targetid][pID]);
  47715. mysql_tquery(connectionID, queryBuffer);
  47716. SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you %i materials.", GetRPName(playerid), amount);
  47717. SendClientMessageEx(playerid, COLOR_AQUA, "You have given %i materials to %s.", amount, GetRPName(targetid));
  47718. ShowActionBubble(playerid, "* %s gives some materials to %s.", GetRPName(playerid), GetRPName(targetid));
  47719. Log_Write("log_give", "%s (uid: %i) gives %i materials to %s (uid: %i)", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount, GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  47720. }
  47721. else if(!strcmp(option, "weed", true))
  47722. {
  47723. if(sscanf(param, "i", amount))
  47724. {
  47725. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /give [playerid] [weed] [amount]");
  47726. }
  47727. if(amount < 1 || amount > PlayerData[playerid][pWeed])
  47728. {
  47729. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  47730. }
  47731. if(PlayerData[targetid][pWeed] + amount > GetPlayerCapacity(targetid, CAPACITY_WEED))
  47732. {
  47733. return SendClientMessageEx(playerid, COLOR_GREY, "That player can't carry that much more weed.");
  47734. }
  47735. PlayerData[playerid][pWeed] -= amount;
  47736. PlayerData[targetid][pWeed] += amount;
  47737. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET weed = %i WHERE uid = %i", PlayerData[playerid][pWeed], PlayerData[playerid][pID]);
  47738. mysql_tquery(connectionID, queryBuffer);
  47739. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET weed = %i WHERE uid = %i", PlayerData[targetid][pWeed], PlayerData[targetid][pID]);
  47740. mysql_tquery(connectionID, queryBuffer);
  47741. SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you %i grams of weed.", GetRPName(playerid), amount);
  47742. SendClientMessageEx(playerid, COLOR_AQUA, "You have given %i grams of weed to %s.", amount, GetRPName(targetid));
  47743. ShowActionBubble(playerid, "* %s gives some weed to %s.", GetRPName(playerid), GetRPName(targetid));
  47744. Log_Write("log_give", "%s (uid: %i) gives %i grams of weed to %s (uid: %i)", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount, GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  47745. }
  47746. else if(!strcmp(option, "cocaine", true))
  47747. {
  47748. if(sscanf(param, "i", amount))
  47749. {
  47750. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /give [playerid] [cocaine] [amount]");
  47751. }
  47752. if(amount < 1 || amount > PlayerData[playerid][pCocaine])
  47753. {
  47754. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  47755. }
  47756. if(PlayerData[targetid][pCocaine] + amount > GetPlayerCapacity(targetid, CAPACITY_COCAINE))
  47757. {
  47758. return SendClientMessageEx(playerid, COLOR_GREY, "That player can't carry that much more cocaine.");
  47759. }
  47760. PlayerData[playerid][pCocaine] -= amount;
  47761. PlayerData[targetid][pCocaine] += amount;
  47762. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET cocaine = %i WHERE uid = %i", PlayerData[playerid][pCocaine], PlayerData[playerid][pID]);
  47763. mysql_tquery(connectionID, queryBuffer);
  47764. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET cocaine = %i WHERE uid = %i", PlayerData[targetid][pCocaine], PlayerData[targetid][pID]);
  47765. mysql_tquery(connectionID, queryBuffer);
  47766. SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you %i grams of cocaine.", GetRPName(playerid), amount);
  47767. SendClientMessageEx(playerid, COLOR_AQUA, "You have given %i grams of cocaine to %s.", amount, GetRPName(targetid));
  47768. ShowActionBubble(playerid, "* %s gives some cocaine to %s.", GetRPName(playerid), GetRPName(targetid));
  47769. Log_Write("log_give", "%s (uid: %i) gives %i grams of cocaine to %s (uid: %i)", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount, GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  47770. }
  47771. else if(!strcmp(option, "meth", true))
  47772. {
  47773. if(sscanf(param, "i", amount))
  47774. {
  47775. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /give [playerid] [meth] [amount]");
  47776. }
  47777. if(amount < 1 || amount > PlayerData[playerid][pMeth])
  47778. {
  47779. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  47780. }
  47781. if(PlayerData[targetid][pMeth] + amount > GetPlayerCapacity(targetid, CAPACITY_METH))
  47782. {
  47783. return SendClientMessageEx(playerid, COLOR_GREY, "That player can't carry that much more meth.");
  47784. }
  47785. PlayerData[playerid][pMeth] -= amount;
  47786. PlayerData[targetid][pMeth] += amount;
  47787. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET meth = %i WHERE uid = %i", PlayerData[playerid][pMeth], PlayerData[playerid][pID]);
  47788. mysql_tquery(connectionID, queryBuffer);
  47789. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET meth = %i WHERE uid = %i", PlayerData[targetid][pMeth], PlayerData[targetid][pID]);
  47790. mysql_tquery(connectionID, queryBuffer);
  47791. SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you %i grams of meth.", GetRPName(playerid), amount);
  47792. SendClientMessageEx(playerid, COLOR_AQUA, "You have given %i grams of meth to %s.", amount, GetRPName(targetid));
  47793. ShowActionBubble(playerid, "* %s gives some meth to %s.", GetRPName(playerid), GetRPName(targetid));
  47794. Log_Write("log_give", "%s (uid: %i) gives %i grams of meth to %s (uid: %i)", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount, GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  47795. }
  47796. else if(!strcmp(option, "painkillers", true))
  47797. {
  47798. if(sscanf(param, "i", amount))
  47799. {
  47800. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /give [playerid] [painkillers] [amount]");
  47801. }
  47802. if(amount < 1 || amount > PlayerData[playerid][pPainkillers])
  47803. {
  47804. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  47805. }
  47806. if(PlayerData[targetid][pPainkillers] + amount > GetPlayerCapacity(targetid, CAPACITY_PAINKILLERS))
  47807. {
  47808. return SendClientMessageEx(playerid, COLOR_GREY, "That player can't carry that much more painkillers.");
  47809. }
  47810. PlayerData[playerid][pPainkillers] -= amount;
  47811. PlayerData[targetid][pPainkillers] += amount;
  47812. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET painkillers = %i WHERE uid = %i", PlayerData[playerid][pPainkillers], PlayerData[playerid][pID]);
  47813. mysql_tquery(connectionID, queryBuffer);
  47814. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET painkillers = %i WHERE uid = %i", PlayerData[targetid][pPainkillers], PlayerData[targetid][pID]);
  47815. mysql_tquery(connectionID, queryBuffer);
  47816. SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you %i painkillers.", GetRPName(playerid), amount);
  47817. SendClientMessageEx(playerid, COLOR_AQUA, "You have given %i painkillers to %s.", amount, GetRPName(targetid));
  47818. ShowActionBubble(playerid, "* %s gives some painkillers to %s.", GetRPName(playerid), GetRPName(targetid));
  47819. Log_Write("log_give", "%s (uid: %i) gives %i painkillers to %s (uid: %i)", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount, GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  47820. }
  47821. else if(!strcmp(option, "cigars", true))
  47822. {
  47823. if(sscanf(param, "i", amount))
  47824. {
  47825. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /give [playerid] [cigars] [amount]");
  47826. }
  47827. if(amount < 1 || amount > PlayerData[playerid][pCigars])
  47828. {
  47829. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  47830. }
  47831. PlayerData[playerid][pCigars] -= amount;
  47832. PlayerData[targetid][pCigars] += amount;
  47833. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET cigars = %i WHERE uid = %i", PlayerData[playerid][pCigars], PlayerData[playerid][pID]);
  47834. mysql_tquery(connectionID, queryBuffer);
  47835. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET cigars = %i WHERE uid = %i", PlayerData[targetid][pCigars], PlayerData[targetid][pID]);
  47836. mysql_tquery(connectionID, queryBuffer);
  47837. SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you %i cigars.", GetRPName(playerid), amount);
  47838. SendClientMessageEx(playerid, COLOR_AQUA, "You have given %i cigars to %s.", amount, GetRPName(targetid));
  47839. ShowActionBubble(playerid, "* %s gives some cigars to %s.", GetRPName(playerid), GetRPName(targetid));
  47840. Log_Write("log_give", "%s (uid: %i) gives %i cigars to %s (uid: %i)", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount, GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  47841. }
  47842. else if(!strcmp(option, "spraycans", true))
  47843. {
  47844. if(sscanf(param, "i", amount))
  47845. {
  47846. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /give [playerid] [spraycans] [amount]");
  47847. }
  47848. if(amount < 1 || amount > PlayerData[playerid][pSpraycans])
  47849. {
  47850. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  47851. }
  47852. PlayerData[playerid][pSpraycans] -= amount;
  47853. PlayerData[targetid][pSpraycans] += amount;
  47854. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET spraycans = %i WHERE uid = %i", PlayerData[playerid][pSpraycans], PlayerData[playerid][pID]);
  47855. mysql_tquery(connectionID, queryBuffer);
  47856. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET spraycans = %i WHERE uid = %i", PlayerData[targetid][pSpraycans], PlayerData[targetid][pID]);
  47857. mysql_tquery(connectionID, queryBuffer);
  47858. SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you %i spraycans.", GetRPName(playerid), amount);
  47859. SendClientMessageEx(playerid, COLOR_AQUA, "You have given %i spraycans to %s.", amount, GetRPName(targetid));
  47860. ShowActionBubble(playerid, "* %s gives some spraycans to %s.", GetRPName(playerid), GetRPName(targetid));
  47861. Log_Write("log_give", "%s (uid: %i) gives %i spraycans to %s (uid: %i)", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount, GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  47862. }
  47863. else if(!strcmp(option, "gascan", true))
  47864. {
  47865. if(sscanf(param, "i", amount))
  47866. {
  47867. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /give [playerid] [gascan] [amount]");
  47868. }
  47869. if(amount < 1 || amount > PlayerData[playerid][pGasCan])
  47870. {
  47871. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  47872. }
  47873. PlayerData[playerid][pGasCan] -= amount;
  47874. PlayerData[targetid][pGasCan] += amount;
  47875. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET gascan = %i WHERE uid = %i", PlayerData[playerid][pGasCan], PlayerData[playerid][pID]);
  47876. mysql_tquery(connectionID, queryBuffer);
  47877. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET gascan = %i WHERE uid = %i", PlayerData[targetid][pGasCan], PlayerData[targetid][pID]);
  47878. mysql_tquery(connectionID, queryBuffer);
  47879. SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you %i liters of gasoline.", GetRPName(playerid), amount);
  47880. SendClientMessageEx(playerid, COLOR_AQUA, "You have given %i liters of gasoline to %s.", amount, GetRPName(targetid));
  47881. ShowActionBubble(playerid, "* %s gives some gasoline to %s.", GetRPName(playerid), GetRPName(targetid));
  47882. Log_Write("log_give", "%s (uid: %i) gives %i liters of gasoline to %s (uid: %i)", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount, GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  47883. }
  47884. else if(!strcmp(option, "seeds", true))
  47885. {
  47886. if(sscanf(param, "i", amount))
  47887. {
  47888. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /give [playerid] [seeds] [amount]");
  47889. }
  47890. if(amount < 1 || amount > PlayerData[playerid][pSeeds])
  47891. {
  47892. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  47893. }
  47894. if(PlayerData[targetid][pSeeds] + amount > GetPlayerCapacity(targetid, CAPACITY_SEEDS))
  47895. {
  47896. return SendClientMessageEx(playerid, COLOR_GREY, "That player can't carry that much more seeds.");
  47897. }
  47898. PlayerData[playerid][pSeeds] -= amount;
  47899. PlayerData[targetid][pSeeds] += amount;
  47900. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET seeds = %i WHERE uid = %i", PlayerData[playerid][pSeeds], PlayerData[playerid][pID]);
  47901. mysql_tquery(connectionID, queryBuffer);
  47902. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET seeds = %i WHERE uid = %i", PlayerData[targetid][pSeeds], PlayerData[targetid][pID]);
  47903. mysql_tquery(connectionID, queryBuffer);
  47904. SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you %i seeds.", GetRPName(playerid), amount);
  47905. SendClientMessageEx(playerid, COLOR_AQUA, "You have given %i seeds to %s.", amount, GetRPName(targetid));
  47906. ShowActionBubble(playerid, "* %s gives some seeds to %s.", GetRPName(playerid), GetRPName(targetid));
  47907. Log_Write("log_give", "%s (uid: %i) gives %i seeds to %s (uid: %i)", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount, GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  47908. }
  47909. else if(!strcmp(option, "ephedrine", true))
  47910. {
  47911. if(sscanf(param, "i", amount))
  47912. {
  47913. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /give [playerid] [ephedrine] [amount]");
  47914. }
  47915. if(amount < 1 || amount > PlayerData[playerid][pEphedrine])
  47916. {
  47917. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  47918. }
  47919. if(PlayerData[targetid][pEphedrine] + amount > GetPlayerCapacity(targetid, CAPACITY_EPHEDRINE))
  47920. {
  47921. return SendClientMessageEx(playerid, COLOR_GREY, "That player can't carry that much more ephedrine.");
  47922. }
  47923. PlayerData[playerid][pEphedrine] -= amount;
  47924. PlayerData[targetid][pEphedrine] += amount;
  47925. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET ephedrine = %i WHERE uid = %i", PlayerData[playerid][pEphedrine], PlayerData[playerid][pID]);
  47926. mysql_tquery(connectionID, queryBuffer);
  47927. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET ephedrine = %i WHERE uid = %i", PlayerData[targetid][pEphedrine], PlayerData[targetid][pID]);
  47928. mysql_tquery(connectionID, queryBuffer);
  47929. SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you %i grams of ephedrine.", GetRPName(playerid), amount);
  47930. SendClientMessageEx(playerid, COLOR_AQUA, "You have given %i grams of ephedrine to %s.", amount, GetRPName(targetid));
  47931. ShowActionBubble(playerid, "* %s gives some ephedrine to %s.", GetRPName(playerid), GetRPName(targetid));
  47932. Log_Write("log_give", "%s (uid: %i) gives %i grams of ephedrine to %s (uid: %i)", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount, GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  47933. }
  47934. else if(!strcmp(option, "firstaid", true))
  47935. {
  47936. if(sscanf(param, "i", amount))
  47937. {
  47938. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /give [playerid] [firstaid] [amount]");
  47939. }
  47940. if(amount < 1 || amount > PlayerData[playerid][pFirstAid])
  47941. {
  47942. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  47943. }
  47944. if(PlayerData[targetid][pFirstAid] + amount > 20)
  47945. {
  47946. return SendClientMessageEx(playerid, COLOR_GREY, "That player can't carry that much more first aid kits.");
  47947. }
  47948. PlayerData[playerid][pFirstAid] -= amount;
  47949. PlayerData[targetid][pFirstAid] += amount;
  47950. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET firstaid = %i WHERE uid = %i", PlayerData[playerid][pFirstAid], PlayerData[playerid][pID]);
  47951. mysql_tquery(connectionID, queryBuffer);
  47952. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET firstaid = %i WHERE uid = %i", PlayerData[targetid][pFirstAid], PlayerData[targetid][pID]);
  47953. mysql_tquery(connectionID, queryBuffer);
  47954. SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you %i first aid kits.", GetRPName(playerid), amount);
  47955. SendClientMessageEx(playerid, COLOR_AQUA, "You have given %i first aid kits to %s.", amount, GetRPName(targetid));
  47956. ShowActionBubble(playerid, "* %s gives some first aid kits to %s.", GetRPName(playerid), GetRPName(targetid));
  47957. Log_Write("log_give", "%s (uid: %i) gives %i first aid kits to %s (uid: %i)", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount, GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  47958. }
  47959. else if(!strcmp(option, "bodykits", true))
  47960. {
  47961. if(sscanf(param, "i", amount))
  47962. {
  47963. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /give [playerid] [bodykits] [amount]");
  47964. }
  47965. if(amount < 1 || amount > PlayerData[playerid][pBodykits])
  47966. {
  47967. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  47968. }
  47969. if(PlayerData[targetid][pBodykits] + amount > 10)
  47970. {
  47971. return SendClientMessageEx(playerid, COLOR_GREY, "That player can't carry that much more bodykits.");
  47972. }
  47973. PlayerData[playerid][pBodykits] -= amount;
  47974. PlayerData[targetid][pBodykits] += amount;
  47975. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET bodykits = %i WHERE uid = %i", PlayerData[playerid][pBodykits], PlayerData[playerid][pID]);
  47976. mysql_tquery(connectionID, queryBuffer);
  47977. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET bodykits = %i WHERE uid = %i", PlayerData[targetid][pBodykits], PlayerData[targetid][pID]);
  47978. mysql_tquery(connectionID, queryBuffer);
  47979. SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you %i bodywork kits.", GetRPName(playerid), amount);
  47980. SendClientMessageEx(playerid, COLOR_AQUA, "You have given %i bodywork kits to %s.", amount, GetRPName(targetid));
  47981. ShowActionBubble(playerid, "* %s gives some bodywork kits to %s.", GetRPName(playerid), GetRPName(targetid));
  47982. Log_Write("log_give", "%s (uid: %i) gives %i bodywork kits to %s (uid: %i)", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount, GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  47983. }
  47984. else if(!strcmp(option, "rimkits", true))
  47985. {
  47986. if(sscanf(param, "i", amount))
  47987. {
  47988. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /give [playerid] [rimkits] [amount]");
  47989. }
  47990. if(amount < 1 || amount > PlayerData[playerid][pRimkits])
  47991. {
  47992. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  47993. }
  47994. if(PlayerData[targetid][pRimkits] + amount > 5)
  47995. {
  47996. return SendClientMessageEx(playerid, COLOR_GREY, "That player can't carry that much more rimkits.");
  47997. }
  47998. PlayerData[playerid][pRimkits] -= amount;
  47999. PlayerData[targetid][pRimkits] += amount;
  48000. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET rimkits = %i WHERE uid = %i", PlayerData[playerid][pRimkits], PlayerData[playerid][pID]);
  48001. mysql_tquery(connectionID, queryBuffer);
  48002. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET rimkits = %i WHERE uid = %i", PlayerData[targetid][pRimkits], PlayerData[targetid][pID]);
  48003. mysql_tquery(connectionID, queryBuffer);
  48004. SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you %i rimkits.", GetRPName(playerid), amount);
  48005. SendClientMessageEx(playerid, COLOR_AQUA, "You have given %i rimkits to %s.", amount, GetRPName(targetid));
  48006. ShowActionBubble(playerid, "* %s gives some rimkits to %s.", GetRPName(playerid), GetRPName(targetid));
  48007. Log_Write("log_give", "%s (uid: %i) gives %i rimkits to %s (uid: %i)", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount, GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  48008. }
  48009. else if(!strcmp(option, "diamonds", true))
  48010. {
  48011. if(sscanf(param, "i", amount))
  48012. {
  48013. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /give [playerid] [diamonds] [amount]");
  48014. }
  48015. if(amount < 1 || amount > PlayerData[playerid][pDiamonds])
  48016. {
  48017. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  48018. }
  48019. if(PlayerData[targetid][pDiamonds] + amount > 5)
  48020. {
  48021. return SendClientMessageEx(playerid, COLOR_GREY, "That player can't carry that much more diamonds.");
  48022. }
  48023. PlayerData[playerid][pDiamonds] -= amount;
  48024. PlayerData[targetid][pDiamonds] += amount;
  48025. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET diamonds = %i WHERE uid = %i", PlayerData[playerid][pDiamonds], PlayerData[playerid][pID]);
  48026. mysql_tquery(connectionID, queryBuffer);
  48027. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET diamonds = %i WHERE uid = %i", PlayerData[targetid][pDiamonds], PlayerData[targetid][pID]);
  48028. mysql_tquery(connectionID, queryBuffer);
  48029. SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you %i diamonds.", GetRPName(playerid), amount);
  48030. SendClientMessageEx(playerid, COLOR_AQUA, "You have given %i diamonds to %s.", amount, GetRPName(targetid));
  48031. ShowActionBubble(playerid, "* %s gives some rimkits to %s.", GetRPName(playerid), GetRPName(targetid));
  48032. Log_Write("log_give", "%s (uid: %i) gives %i diamonds to %s (uid: %i)", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount, GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  48033. }
  48034. return 1;
  48035. }
  48036. CMD:sell(playerid, params[])
  48037. {
  48038. new targetid, option[14], param[32], amount, price;
  48039. if(sscanf(params, "us[14]S()[32]", targetid, option, param))
  48040. {
  48041. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sell [playerid] [option]");
  48042. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Weapon, Materials, Weed, Cocaine, Meth, Painkillers, Seeds, Ephedrine");
  48043. return 1;
  48044. }
  48045. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  48046. {
  48047. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  48048. }
  48049. if(targetid == playerid)
  48050. {
  48051. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command on yourself.");
  48052. }
  48053. if(PlayerData[playerid][pTazedTime] > 0 || PlayerData[playerid][pInjured] > 0 || PlayerData[playerid][pHospital] > 0 || PlayerData[playerid][pCuffed] > 0 || PlayerData[playerid][pTied] > 0 || PlayerData[playerid][pJailTime] > 0 || PlayerData[playerid][pJoinedEvent] > 0 || PlayerData[playerid][pPaintball] > 0 || PlayerData[playerid][pDueling] != INVALID_PLAYER_ID)
  48054. {
  48055. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment.");
  48056. }
  48057. if(gettime() - PlayerData[playerid][pLastSell] < 10)
  48058. {
  48059. return SendClientMessageEx(playerid, COLOR_GREY, "You can only use this command every 10 seconds. Please wait %i more seconds.", 10 - (gettime() - PlayerData[playerid][pLastSell]));
  48060. }
  48061. if(!strcmp(option, "weapon", true))
  48062. {
  48063. new weaponid;
  48064. if(sscanf(param, "ii", weaponid, price))
  48065. {
  48066. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sell [playerid] [weapon] [weaponid] [price] (/guninv for weapon IDs)");
  48067. }
  48068. if(!(1 <= weaponid <= 46) || PlayerData[playerid][pWeapons][weaponSlotIDs[weaponid]] != weaponid)
  48069. {
  48070. return SendClientMessage(playerid, COLOR_GREY, "You don't have that weapon. /guninv for a list of your weapons.");
  48071. }
  48072. if(PlayerData[targetid][pWeapons][weaponSlotIDs[weaponid]] > 0)
  48073. {
  48074. return SendClientMessage(playerid, COLOR_GREY, "That player already has a weapon in that slot.");
  48075. }
  48076. if(PlayerData[targetid][pHours] < 2 || PlayerData[targetid][pWeaponRestricted] > 0)
  48077. {
  48078. return SendClientMessage(playerid, COLOR_GREY, "That player is either weapon restricted or played less than two playing hours.");
  48079. }
  48080. if(PlayerData[playerid][pFaction] >= 0)
  48081. {
  48082. return SendClientMessage(playerid, COLOR_GREY, "You can't sell weapons as a faction member.");
  48083. }
  48084. if(price < 1)
  48085. {
  48086. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1.");
  48087. }
  48088. if(IsPlayerInAnyVehicle(playerid))
  48089. {
  48090. return SendClientMessage(playerid, COLOR_GREY, "You can't sell weapons from inside a vehicle.");
  48091. }
  48092. if(IsPlayerInAnyVehicle(targetid))
  48093. {
  48094. return SendClientMessage(playerid, COLOR_GREY, "You can't sell weapons to players inside a vehicle.");
  48095. }
  48096. if(GetPlayerHealthEx(playerid) < 60)
  48097. {
  48098. return SendClientMessage(playerid, COLOR_GREY, "You can't sell weapons as your health is below 60.");
  48099. }
  48100. PlayerData[playerid][pLastSell] = gettime();
  48101. PlayerData[targetid][pSellOffer] = playerid;
  48102. PlayerData[targetid][pSellType] = ITEM_WEAPON;
  48103. PlayerData[targetid][pSellExtra] = weaponid;
  48104. PlayerData[targetid][pSellPrice] = price;
  48105. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered to sell you their %s for $%i. (/accept item)", GetRPName(playerid), GetWeaponNameEx(weaponid), price);
  48106. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered to sell %s your %s for $%i.", GetRPName(targetid), GetWeaponNameEx(weaponid), price);
  48107. }
  48108. else if(!strcmp(option, "materials", true))
  48109. {
  48110. if(sscanf(param, "ii", amount, price))
  48111. {
  48112. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sell [playerid] [materials] [amount] [price]");
  48113. }
  48114. if(amount < 1 || amount > PlayerData[playerid][pMaterials])
  48115. {
  48116. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  48117. }
  48118. if(price < 1)
  48119. {
  48120. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1.");
  48121. }
  48122. PlayerData[playerid][pLastSell] = gettime();
  48123. PlayerData[targetid][pSellOffer] = playerid;
  48124. PlayerData[targetid][pSellType] = ITEM_MATERIALS;
  48125. PlayerData[targetid][pSellExtra] = amount;
  48126. PlayerData[targetid][pSellPrice] = price;
  48127. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered to sell you %i materials for $%i. (/accept item)", GetRPName(playerid), amount, price);
  48128. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered to sell %s your %i materials for $%i.", GetRPName(targetid), amount, price);
  48129. }
  48130. else if(!strcmp(option, "weed", true))
  48131. {
  48132. if(sscanf(param, "ii", amount, price))
  48133. {
  48134. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sell [playerid] [weed] [amount] [price]");
  48135. }
  48136. if(amount < 1 || amount > PlayerData[playerid][pWeed])
  48137. {
  48138. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  48139. }
  48140. if(price < 1)
  48141. {
  48142. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1.");
  48143. }
  48144. PlayerData[playerid][pLastSell] = gettime();
  48145. PlayerData[targetid][pSellOffer] = playerid;
  48146. PlayerData[targetid][pSellType] = ITEM_WEED;
  48147. PlayerData[targetid][pSellExtra] = amount;
  48148. PlayerData[targetid][pSellPrice] = price;
  48149. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered to sell you %i grams of weed for $%i. (/accept item)", GetRPName(playerid), amount, price);
  48150. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered to sell %s your %i grams of weed for $%i.", GetRPName(targetid), amount, price);
  48151. }
  48152. else if(!strcmp(option, "cocaine", true))
  48153. {
  48154. if(sscanf(param, "ii", amount, price))
  48155. {
  48156. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sell [playerid] [cocaine] [amount] [price]");
  48157. }
  48158. if(amount < 1 || amount > PlayerData[playerid][pCocaine])
  48159. {
  48160. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  48161. }
  48162. if(price < 1)
  48163. {
  48164. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1.");
  48165. }
  48166. PlayerData[playerid][pLastSell] = gettime();
  48167. PlayerData[targetid][pSellOffer] = playerid;
  48168. PlayerData[targetid][pSellType] = ITEM_COCAINE;
  48169. PlayerData[targetid][pSellExtra] = amount;
  48170. PlayerData[targetid][pSellPrice] = price;
  48171. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered to sell you %i grams of cocaine for $%i. (/accept item)", GetRPName(playerid), amount, price);
  48172. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered to sell %s your %i grams of cocaine for $%i.", GetRPName(targetid), amount, price);
  48173. }
  48174. else if(!strcmp(option, "meth", true))
  48175. {
  48176. if(sscanf(param, "ii", amount, price))
  48177. {
  48178. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sell [playerid] [meth] [amount] [price]");
  48179. }
  48180. if(amount < 1 || amount > PlayerData[playerid][pMeth])
  48181. {
  48182. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  48183. }
  48184. if(price < 1)
  48185. {
  48186. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1.");
  48187. }
  48188. PlayerData[playerid][pLastSell] = gettime();
  48189. PlayerData[targetid][pSellOffer] = playerid;
  48190. PlayerData[targetid][pSellType] = ITEM_METH;
  48191. PlayerData[targetid][pSellExtra] = amount;
  48192. PlayerData[targetid][pSellPrice] = price;
  48193. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered to sell you %i grams of meth for $%i. (/accept item)", GetRPName(playerid), amount, price);
  48194. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered to sell %s your %i grams of meth for $%i.", GetRPName(targetid), amount, price);
  48195. }
  48196. else if(!strcmp(option, "painkillers", true))
  48197. {
  48198. if(sscanf(param, "ii", amount, price))
  48199. {
  48200. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sell [playerid] [painkillers] [amount] [price]");
  48201. }
  48202. if(amount < 1 || amount > PlayerData[playerid][pPainkillers])
  48203. {
  48204. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  48205. }
  48206. if(price < 1)
  48207. {
  48208. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1.");
  48209. }
  48210. PlayerData[playerid][pLastSell] = gettime();
  48211. PlayerData[targetid][pSellOffer] = playerid;
  48212. PlayerData[targetid][pSellType] = ITEM_PAINKILLERS;
  48213. PlayerData[targetid][pSellExtra] = amount;
  48214. PlayerData[targetid][pSellPrice] = price;
  48215. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered to sell you %i painkillers for $%i. (/accept item)", GetRPName(playerid), amount, price);
  48216. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered to sell %s your %i painkillers for $%i.", GetRPName(targetid), amount, price);
  48217. }
  48218. else if(!strcmp(option, "seeds", true))
  48219. {
  48220. if(sscanf(param, "ii", amount, price))
  48221. {
  48222. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sell [playerid] [seeds] [amount] [price]");
  48223. }
  48224. if(amount < 1 || amount > PlayerData[playerid][pSeeds])
  48225. {
  48226. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  48227. }
  48228. if(price < 1)
  48229. {
  48230. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1.");
  48231. }
  48232. PlayerData[playerid][pLastSell] = gettime();
  48233. PlayerData[targetid][pSellOffer] = playerid;
  48234. PlayerData[targetid][pSellType] = ITEM_SEEDS;
  48235. PlayerData[targetid][pSellExtra] = amount;
  48236. PlayerData[targetid][pSellPrice] = price;
  48237. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered to sell you %i seeds for $%i. (/accept item)", GetRPName(playerid), amount, price);
  48238. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered to sell %s your %i seeds for $%i.", GetRPName(targetid), amount, price);
  48239. }
  48240. else if(!strcmp(option, "ephedrine", true))
  48241. {
  48242. if(sscanf(param, "ii", amount, price))
  48243. {
  48244. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sell [playerid] [ephedrine] [amount] [price]");
  48245. }
  48246. if(amount < 1 || amount > PlayerData[playerid][pEphedrine])
  48247. {
  48248. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  48249. }
  48250. if(price < 1)
  48251. {
  48252. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1.");
  48253. }
  48254. PlayerData[playerid][pLastSell] = gettime();
  48255. PlayerData[targetid][pSellOffer] = playerid;
  48256. PlayerData[targetid][pSellType] = ITEM_EPHEDRINE;
  48257. PlayerData[targetid][pSellExtra] = amount;
  48258. PlayerData[targetid][pSellPrice] = price;
  48259. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered to sell you %i grams of ephedrine for $%i. (/accept item)", GetRPName(playerid), amount, price);
  48260. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered to sell %s your %i grams of ephedrine for $%i.", GetRPName(targetid), amount, price);
  48261. }
  48262. return 1;
  48263. }
  48264. CMD:customaccent(playerid, params[])
  48265. {
  48266. if(isnull(params))
  48267. {
  48268. return SendClientMessage(playerid, COLOR_GREY, "/customaccent [accent]");
  48269. }
  48270. strcpy(PlayerData[playerid][pAccent], params, 16);
  48271. SendClientMessageEx(playerid, COLOR_WHITE, "You set your accent to '%s'.", PlayerData[playerid][pAccent]);
  48272. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET accent = '%e' WHERE uid = %i", PlayerData[playerid][pAccent], PlayerData[playerid][pID]);
  48273. mysql_tquery(connectionID, queryBuffer);
  48274. return 1;
  48275. }
  48276. CMD:accent(playerid, params[])
  48277. {
  48278. new type;
  48279. if(sscanf(params, "i", type))
  48280. {
  48281. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /accent [type]");
  48282. SendClientMessage(playerid, COLOR_SYNTAX, "List of accents: (0) None - (1) English - (2) American - (3) British - (4) Chinese - (5) Korean - (6) Japanese - (7) Asian");
  48283. SendClientMessage(playerid, COLOR_SYNTAX, "List of accents: (8) Canadian - (9) Australian - (10) Southern - (11) Russian - (12) Ukrainian - (13) German - (14) French");
  48284. SendClientMessage(playerid, COLOR_SYNTAX, "List of accents: (15) Portguese - (16) Polish - (17) Estonian - (18) Latvian - (19) Dutch - (20) Jamaican - (21) Turkish");
  48285. SendClientMessage(playerid, COLOR_SYNTAX, "List of accents: (22) Mexican - (23) Spanish - (24) Arabic - (25) Israeli - (26) Romanian - (27) Italian - (28) Gangsta");
  48286. SendClientMessage(playerid, COLOR_SYNTAX, "List of accents: (29) Greek - (30) Serbian - (31) Balkin - (32) Danish - (33) Scottish - (34) Irish - (35) Indian");
  48287. SendClientMessage(playerid, COLOR_SYNTAX, "List of accents: (36) Norwegian - (37) Swedish - (38) Finnish - (39) Hungarian - (40) Bulgarian - (41) Pakistani");
  48288. SendClientMessage(playerid, COLOR_SYNTAX, "List of accents: (42) Cuban - (43) Slavic - (44) Indonesian - (45) Filipino - (46) Hawaiian - (47) Somalian");
  48289. SendClientMessage(playerid, COLOR_SYNTAX, "List of accents: (48) Armenian - (49) Persian - (50) Vietnamese - (51) Slovenian - (52) Kiwi - (53) Brazilian - (54) Georgian");
  48290. return 1;
  48291. }
  48292. switch(type)
  48293. {
  48294. case 0: strcpy(PlayerData[playerid][pAccent], "None", 16);
  48295. case 1: strcpy(PlayerData[playerid][pAccent], "English", 16);
  48296. case 2: strcpy(PlayerData[playerid][pAccent], "American", 16);
  48297. case 3: strcpy(PlayerData[playerid][pAccent], "British", 16);
  48298. case 4: strcpy(PlayerData[playerid][pAccent], "Chinese", 16);
  48299. case 5: strcpy(PlayerData[playerid][pAccent], "Korean", 16);
  48300. case 6: strcpy(PlayerData[playerid][pAccent], "Japanese", 16);
  48301. case 7: strcpy(PlayerData[playerid][pAccent], "Asian", 16);
  48302. case 8: strcpy(PlayerData[playerid][pAccent], "Canadian", 16);
  48303. case 9: strcpy(PlayerData[playerid][pAccent], "Australian", 16);
  48304. case 10: strcpy(PlayerData[playerid][pAccent], "Southern", 16);
  48305. case 11: strcpy(PlayerData[playerid][pAccent], "Russian", 16);
  48306. case 12: strcpy(PlayerData[playerid][pAccent], "Ukrainian", 16);
  48307. case 13: strcpy(PlayerData[playerid][pAccent], "German", 16);
  48308. case 14: strcpy(PlayerData[playerid][pAccent], "French", 16);
  48309. case 15: strcpy(PlayerData[playerid][pAccent], "Portuguese", 16);
  48310. case 16: strcpy(PlayerData[playerid][pAccent], "Polish", 16);
  48311. case 17: strcpy(PlayerData[playerid][pAccent], "Estonian", 16);
  48312. case 18: strcpy(PlayerData[playerid][pAccent], "Latvian", 16);
  48313. case 19: strcpy(PlayerData[playerid][pAccent], "Dutch", 16);
  48314. case 20: strcpy(PlayerData[playerid][pAccent], "Jamaican", 16);
  48315. case 21: strcpy(PlayerData[playerid][pAccent], "Turkish", 16);
  48316. case 22: strcpy(PlayerData[playerid][pAccent], "Mexican", 16);
  48317. case 23: strcpy(PlayerData[playerid][pAccent], "Spanish", 16);
  48318. case 24: strcpy(PlayerData[playerid][pAccent], "Arabic", 16);
  48319. case 25: strcpy(PlayerData[playerid][pAccent], "Israeli", 16);
  48320. case 26: strcpy(PlayerData[playerid][pAccent], "Romanian", 16);
  48321. case 27: strcpy(PlayerData[playerid][pAccent], "Italian", 16);
  48322. case 28: strcpy(PlayerData[playerid][pAccent], "Gangsta", 16);
  48323. case 29: strcpy(PlayerData[playerid][pAccent], "Greek", 16);
  48324. case 30: strcpy(PlayerData[playerid][pAccent], "Serbian", 16);
  48325. case 31: strcpy(PlayerData[playerid][pAccent], "Balkin", 16);
  48326. case 32: strcpy(PlayerData[playerid][pAccent], "Danish", 16);
  48327. case 33: strcpy(PlayerData[playerid][pAccent], "Scottish", 16);
  48328. case 34: strcpy(PlayerData[playerid][pAccent], "Irish", 16);
  48329. case 35: strcpy(PlayerData[playerid][pAccent], "Indian", 16);
  48330. case 36: strcpy(PlayerData[playerid][pAccent], "Norwegian", 16);
  48331. case 37: strcpy(PlayerData[playerid][pAccent], "Swedish", 16);
  48332. case 38: strcpy(PlayerData[playerid][pAccent], "Finnish", 16);
  48333. case 39: strcpy(PlayerData[playerid][pAccent], "Hungarian", 16);
  48334. case 40: strcpy(PlayerData[playerid][pAccent], "Bulgarian", 16);
  48335. case 41: strcpy(PlayerData[playerid][pAccent], "Pakistani", 16);
  48336. case 42: strcpy(PlayerData[playerid][pAccent], "Cuban", 16);
  48337. case 43: strcpy(PlayerData[playerid][pAccent], "Slavic", 16);
  48338. case 44: strcpy(PlayerData[playerid][pAccent], "Indonesian", 16);
  48339. case 45: strcpy(PlayerData[playerid][pAccent], "Filipino", 16);
  48340. case 46: strcpy(PlayerData[playerid][pAccent], "Hawaiian", 16);
  48341. case 47: strcpy(PlayerData[playerid][pAccent], "Somalian", 16);
  48342. case 48: strcpy(PlayerData[playerid][pAccent], "Armenian", 16);
  48343. case 49: strcpy(PlayerData[playerid][pAccent], "Persian", 16);
  48344. case 50: strcpy(PlayerData[playerid][pAccent], "Vietnamese", 16);
  48345. case 51: strcpy(PlayerData[playerid][pAccent], "Slovenian", 16);
  48346. case 52: strcpy(PlayerData[playerid][pAccent], "Kiwi", 16);
  48347. case 53: strcpy(PlayerData[playerid][pAccent], "Brazilian", 16);
  48348. case 54: strcpy(PlayerData[playerid][pAccent], "Georgian", 16);
  48349. default: SendClientMessage(playerid, COLOR_GREY, "Invalid accent. Valid types range from 0 to 53.");
  48350. }
  48351. SendClientMessageEx(playerid, COLOR_WHITE, "You set your accent to '%s'.", PlayerData[playerid][pAccent]);
  48352. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET accent = '%e' WHERE uid = %i", PlayerData[playerid][pAccent], PlayerData[playerid][pID]);
  48353. mysql_tquery(connectionID, queryBuffer);
  48354. return 1;
  48355. }
  48356. CMD:dice(playerid, params[])
  48357. {
  48358. SendProximityMessage(playerid, 20.0, COLOR_WHITE, "* %s rolls a dice which lands on the number %i.", GetRPName(playerid), random(6) + 1);
  48359. return 1;
  48360. }
  48361. CMD:flipcoin(playerid, params[])
  48362. {
  48363. SendProximityMessage(playerid, 20.0, COLOR_WHITE, "* %s flips a coin which lands on %s.", GetRPName(playerid), (random(2)) ? ("Heads") : ("Tails"));
  48364. return 1;
  48365. }
  48366. CMD:time(playerid, params[])
  48367. {
  48368. new
  48369. string[128],
  48370. date[6];
  48371. getdate(date[0], date[1], date[2]);
  48372. gettime(date[3], date[4], date[5]);
  48373. switch(date[1])
  48374. {
  48375. case 1: string = "January";
  48376. case 2: string = "February";
  48377. case 3: string = "March";
  48378. case 4: string = "April";
  48379. case 5: string = "May";
  48380. case 6: string = "June";
  48381. case 7: string = "July";
  48382. case 8: string = "August";
  48383. case 9: string = "September";
  48384. case 10: string = "October";
  48385. case 11: string = "November";
  48386. case 12: string = "December";
  48387. }
  48388. format(string, sizeof(string), "~y~%s %02d, %i~n~~g~|~w~%02d:%02d:%02d~g~|", string, date[2], date[0], date[3], date[4], date[5]);
  48389. if(PlayerData[playerid][pJailTime] > 0)
  48390. {
  48391. format(string, sizeof(string), "%s~n~~w~Jail Time: ~y~%i seconds", string, PlayerData[playerid][pJailTime]);
  48392. }
  48393. GameTextForPlayer(playerid, string, 5000, 1);
  48394. SendClientMessageEx(playerid, COLOR_WHITE, "* Paychecks occur at every hour. The next paycheck is at %02d:00 which is in %i minutes.", date[3]+1, (60 - date[4]));
  48395. return 1;
  48396. }
  48397. CMD:report(playerid, params[])
  48398. {
  48399. if(isnull(params))
  48400. {
  48401. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /report [playerid (optional)] [text]");
  48402. }
  48403. if(PlayerData[playerid][pAdmin] > 0)
  48404. {
  48405. return SendClientMessage(playerid, COLOR_GREY, "You cannot report as you are an administrator, use /a moron.");
  48406. }
  48407. if(!enabledReports)
  48408. {
  48409. return SendClientMessage(playerid, COLOR_GREY, "The report channel is disabled at the moment.");
  48410. }
  48411. if(PlayerData[playerid][pReportMuted])
  48412. {
  48413. if(PlayerData[playerid][pReportMuted] > 1000) {
  48414. return SendClientMessageEx(playerid, COLOR_GREY, "You are indefinitely muted from submitting reports. /unmute to unmute yourself.");
  48415. } else {
  48416. return SendClientMessageEx(playerid, COLOR_GREY, "You are muted from submitting reports. Your mute is lifted in %i hours.", PlayerData[playerid][pReportMuted]);
  48417. }
  48418. }
  48419. if(gettime() - PlayerData[playerid][pLastReport] < 50)
  48420. {
  48421. return SendClientMessageEx(playerid, COLOR_GREY, "You can only submit one report every 50 seconds. Please wait %i more seconds.", 50 - (gettime() - PlayerData[playerid][pLastReport]));
  48422. }
  48423. if(PlayerData[playerid][pActiveReport] >= 0)
  48424. {
  48425. return SendClientMessage(playerid, COLOR_GREY, "You have an active report which needs to be closed first. Use /cr to close it.");
  48426. }
  48427. if(!AddReportToQueue(playerid, params))
  48428. {
  48429. return SendClientMessage(playerid, COLOR_GREY, "The report queue is currently full. Please try again later.");
  48430. }
  48431. SendClientMessage(playerid, COLOR_GREY, "Thank you for reporting, an admin will view it shortly, please be patient.");
  48432. return 1;
  48433. }
  48434. CMD:helpme(playerid, params[])
  48435. {
  48436. if(isnull(params))
  48437. {
  48438. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /helpme [help request]");
  48439. }
  48440. if(PlayerData[playerid][pHelper] > 0)
  48441. {
  48442. return SendClientMessage(playerid, COLOR_GREY, "You are a helper and therefore can't use this command.");
  48443. }
  48444. if(PlayerData[playerid][pHelpMuted])
  48445. {
  48446. return SendClientMessage(playerid, COLOR_GREY, "You are muted from submitting help requests.");
  48447. }
  48448. if(gettime() - PlayerData[playerid][pLastRequest] < 30)
  48449. {
  48450. return SendClientMessageEx(playerid, COLOR_GREY, "You can only submit one help request every 30 seconds. Please wait %i more seconds.", 30 - (gettime() - PlayerData[playerid][pLastRequest]));
  48451. }
  48452. strcpy(PlayerData[playerid][pHelpRequest], params, 128);
  48453. SendHelperMessage(COLOR_AQUA, "* Help Request from %s[%i]: %s *", GetRPName(playerid), playerid, params);
  48454. PlayerData[playerid][pLastRequest] = gettime();
  48455. SendClientMessage(playerid, COLOR_GREEN, "Your help request was sent to all helpers. Please wait for a response.");
  48456. return 1;
  48457. }
  48458. CMD:accept(playerid, params[])
  48459. {
  48460. if(!strcmp(params, "house", true))
  48461. {
  48462. new
  48463. offeredby = PlayerData[playerid][pHouseOffer],
  48464. houseid = PlayerData[playerid][pHouseOffered],
  48465. price = PlayerData[playerid][pHousePrice];
  48466. if(offeredby == INVALID_PLAYER_ID)
  48467. {
  48468. return SendClientMessage(playerid, COLOR_GREY, "You haven't received any offers for a house.");
  48469. }
  48470. if(!IsPlayerInRangeOfPlayer(playerid, offeredby, 5.0))
  48471. {
  48472. return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer is out of range.");
  48473. }
  48474. if(!IsHouseOwner(offeredby, houseid))
  48475. {
  48476. return SendClientMessage(playerid, COLOR_GREY, "That player no longer is the owner of this house.");
  48477. }
  48478. if(PlayerData[playerid][pCash] < price)
  48479. {
  48480. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to buy this player's house.");
  48481. }
  48482. if(GetPlayerAssetCount(playerid, LIMIT_HOUSES) >= GetPlayerAssetLimit(playerid, LIMIT_HOUSES))
  48483. {
  48484. return SendClientMessageEx(playerid, COLOR_GREY, "You currently own %i/%i houses. You can't own anymore unless you upgrade your asset perk.", GetPlayerAssetCount(playerid, LIMIT_HOUSES), GetPlayerAssetLimit(playerid, LIMIT_HOUSES));
  48485. }
  48486. SetHouseOwner(houseid, playerid);
  48487. GivePlayerCash(offeredby, price);
  48488. GivePlayerCash(playerid, -price);
  48489. SendClientMessageEx(playerid, COLOR_AQUA, "* You have accepted %s's house offer and paid %s for their house.", GetRPName(offeredby), FormatNumber(price));
  48490. SendClientMessageEx(offeredby, COLOR_AQUA, "* %s accepted your house offer and paid %s for your house.", GetRPName(playerid), FormatNumber(price));
  48491. Log_Write("log_property", "%s (uid: %i) (IP: %s) sold their house (id: %i) for $%i to %s (uid: %i) (IP: %s)", GetPlayerNameEx(offeredby), PlayerData[offeredby][pID], GetPlayerIP(offeredby), HouseInfo[houseid][hID], price, GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerIP(playerid));
  48492. PlayerData[playerid][pHouseOffer] = INVALID_PLAYER_ID;
  48493. }
  48494. else if(!strcmp(params, "garage", true))
  48495. {
  48496. new
  48497. offeredby = PlayerData[playerid][pGarageOffer],
  48498. garageid = PlayerData[playerid][pGarageOffered],
  48499. price = PlayerData[playerid][pGaragePrice];
  48500. if(offeredby == INVALID_PLAYER_ID)
  48501. {
  48502. return SendClientMessage(playerid, COLOR_GREY, "You haven't received any offers for a garage.");
  48503. }
  48504. if(!IsPlayerInRangeOfPlayer(playerid, offeredby, 5.0))
  48505. {
  48506. return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer is out of range.");
  48507. }
  48508. if(!IsGarageOwner(offeredby, garageid))
  48509. {
  48510. return SendClientMessage(playerid, COLOR_GREY, "That player no longer is the owner of this garage.");
  48511. }
  48512. if(PlayerData[playerid][pCash] < price)
  48513. {
  48514. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to buy this player's garage.");
  48515. }
  48516. if(GetPlayerAssetCount(playerid, LIMIT_GARAGES) >= GetPlayerAssetLimit(playerid, LIMIT_GARAGES))
  48517. {
  48518. return SendClientMessageEx(playerid, COLOR_GREY, "You currently own %i/%i garages. You can't own anymore unless you upgrade your asset perk.", GetPlayerAssetCount(playerid, LIMIT_GARAGES), GetPlayerAssetLimit(playerid, LIMIT_GARAGES));
  48519. }
  48520. SetGarageOwner(garageid, playerid);
  48521. GivePlayerCash(offeredby, price);
  48522. GivePlayerCash(playerid, -price);
  48523. SendClientMessageEx(playerid, COLOR_AQUA, "* You have accepted %s's garage offer and paid %s for their garage.", GetRPName(offeredby), FormatNumber(price));
  48524. SendClientMessageEx(offeredby, COLOR_AQUA, "* %s accepted your garage offer and paid %s for your garage.", GetRPName(playerid), FormatNumber(price));
  48525. Log_Write("log_property", "%s (uid: %i) (IP: %s) sold their %s garage (id: %i) for $%i to %s (uid: %i) (IP: %s)", GetPlayerNameEx(offeredby), PlayerData[offeredby][pID], GetPlayerIP(offeredby), garageInteriors[GarageInfo[garageid][gType]][intName], GarageInfo[garageid][gID], price, GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerIP(playerid));
  48526. PlayerData[playerid][pGarageOffer] = INVALID_PLAYER_ID;
  48527. }
  48528. else if(!strcmp(params, "business", true))
  48529. {
  48530. new
  48531. offeredby = PlayerData[playerid][pBizOffer],
  48532. businessid = PlayerData[playerid][pBizOffered],
  48533. price = PlayerData[playerid][pBizPrice];
  48534. if(offeredby == INVALID_PLAYER_ID)
  48535. {
  48536. return SendClientMessage(playerid, COLOR_GREY, "You haven't received any offers for a business.");
  48537. }
  48538. if(!IsPlayerInRangeOfPlayer(playerid, offeredby, 5.0))
  48539. {
  48540. return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer is out of range.");
  48541. }
  48542. if(!IsBusinessOwner(offeredby, businessid))
  48543. {
  48544. return SendClientMessage(playerid, COLOR_GREY, "That player no longer is the owner of this business.");
  48545. }
  48546. if(PlayerData[playerid][pCash] < price)
  48547. {
  48548. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to buy this player's business.");
  48549. }
  48550. if(GetPlayerAssetCount(playerid, LIMIT_BUSINESSES) >= GetPlayerAssetLimit(playerid, LIMIT_BUSINESSES))
  48551. {
  48552. return SendClientMessageEx(playerid, COLOR_GREY, "You currently own %i/%i businesses. You can't own anymore unless you upgrade your asset perk.", GetPlayerAssetCount(playerid, LIMIT_BUSINESSES), GetPlayerAssetLimit(playerid, LIMIT_BUSINESSES));
  48553. }
  48554. SetBusinessOwner(businessid, playerid);
  48555. GivePlayerCash(offeredby, price);
  48556. GivePlayerCash(playerid, -price);
  48557. SendClientMessageEx(playerid, COLOR_AQUA, "* You have accepted %s's business offer and paid %s for their %s.", GetRPName(offeredby), FormatNumber(price), bizInteriors[BusinessInfo[businessid][bType]][intType]);
  48558. SendClientMessageEx(offeredby, COLOR_AQUA, "* %s accepted your business offer and paid %s for your %s.", GetRPName(playerid), FormatNumber(price), bizInteriors[BusinessInfo[businessid][bType]][intType]);
  48559. Log_Write("log_property", "%s (uid: %i) (IP: %s) sold their %s business (id: %i) for $%i to %s (uid: %i) (IP: %s)", GetPlayerNameEx(offeredby), PlayerData[offeredby][pID], GetPlayerIP(offeredby), bizInteriors[BusinessInfo[businessid][bType]][intType], BusinessInfo[businessid][bID], price, GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerIP(playerid));
  48560. PlayerData[playerid][pBizOffer] = INVALID_PLAYER_ID;
  48561. }
  48562. else if(!strcmp(params, "land", true))
  48563. {
  48564. new
  48565. offeredby = PlayerData[playerid][pLandOffer],
  48566. landid = PlayerData[playerid][pLandOffered],
  48567. price = PlayerData[playerid][pLandPrice];
  48568. if(offeredby == INVALID_PLAYER_ID)
  48569. {
  48570. return SendClientMessage(playerid, COLOR_GREY, "You haven't received any offers for a land.");
  48571. }
  48572. if(!IsPlayerInRangeOfPlayer(playerid, offeredby, 5.0))
  48573. {
  48574. return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer is out of range.");
  48575. }
  48576. if(!IsLandOwner(offeredby, landid))
  48577. {
  48578. return SendClientMessage(playerid, COLOR_GREY, "That player no longer is the owner of this land.");
  48579. }
  48580. if(PlayerData[playerid][pCash] < price)
  48581. {
  48582. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to buy this player's land.");
  48583. }
  48584. SetLandOwner(landid, playerid);
  48585. GivePlayerCash(offeredby, price);
  48586. GivePlayerCash(playerid, -price);
  48587. SendClientMessageEx(playerid, COLOR_AQUA, "* You have accepted %s's land offer and paid %s for their land.", GetRPName(offeredby), FormatNumber(price));
  48588. SendClientMessageEx(offeredby, COLOR_AQUA, "* %s accepted your land offer and paid %s for your land.", GetRPName(playerid), FormatNumber(price));
  48589. Log_Write("log_property", "%s (uid: %i) (IP: %s) sold their land (id: %i) for $%i to %s (uid: %i) (IP: %s)", GetPlayerNameEx(offeredby), PlayerData[offeredby][pID], GetPlayerIP(offeredby), LandInfo[landid][lID], price, GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerIP(playerid));
  48590. PlayerData[playerid][pLandOffer] = INVALID_PLAYER_ID;
  48591. }
  48592. else if(!strcmp(params, "death", true))
  48593. {
  48594. if(IsPlayerConnected(PlayerData[playerid][pAcceptedEMS]) && !PlayerData[PlayerData[playerid][pAcceptedEMS]][pAFK])
  48595. {
  48596. return SendClientMessage(playerid, COLOR_GREY, "There is a medic online and on-the way to rescue you.");
  48597. }
  48598. if(!PlayerData[playerid][pInjured])
  48599. {
  48600. return SendClientMessage(playerid, COLOR_GREY, "You are not injured and can't accept your death.");
  48601. }
  48602. SendClientMessage(playerid, COLOR_GREY, "You have given up and accepted your fate.");
  48603. SetPlayerHealth(playerid, 0.0);
  48604. }
  48605. else if(!strcmp(params, "vest", true))
  48606. {
  48607. new
  48608. offeredby = PlayerData[playerid][pVestOffer],
  48609. price = PlayerData[playerid][pVestPrice];
  48610. if(offeredby == INVALID_PLAYER_ID)
  48611. {
  48612. return SendClientMessage(playerid, COLOR_GREY, "You haven't received any offers for a vest.");
  48613. }
  48614. if(!IsPlayerInRangeOfPlayer(playerid, offeredby, 5.0))
  48615. {
  48616. return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer is out of range.");
  48617. }
  48618. if(PlayerData[playerid][pCash] < price)
  48619. {
  48620. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to buy the vest.");
  48621. }
  48622. new Float:armor = 50.0 + (GetJobLevel(offeredby, JOB_BODYGUARD) * 5);
  48623. SetScriptArmour(playerid, armor);
  48624. GivePlayerCash(offeredby, price);
  48625. GivePlayerCash(playerid, -price);
  48626. SendClientMessageEx(playerid, COLOR_AQUA, "* You have accepted %s's vest and paid %s for %.1f armor points.", GetRPName(offeredby), FormatNumber(price), armor);
  48627. SendClientMessageEx(offeredby, COLOR_AQUA, "* %s accepted your vest offer and paid %s for %.1f armor points.", GetRPName(playerid), FormatNumber(price), armor);
  48628. TurfTaxCheck(offeredby, price);
  48629. IncreaseJobSkill(offeredby, JOB_BODYGUARD);
  48630. PlayerData[playerid][pVestOffer] = INVALID_PLAYER_ID;
  48631. }
  48632. else if(!strcmp(params, "vehicle", true))
  48633. {
  48634. new
  48635. offeredby = PlayerData[playerid][pCarOffer],
  48636. vehicleid = PlayerData[playerid][pCarOffered],
  48637. price = PlayerData[playerid][pCarPrice];
  48638. if(offeredby == INVALID_PLAYER_ID)
  48639. {
  48640. return SendClientMessage(playerid, COLOR_GREY, "You haven't received any offers for a vehicle.");
  48641. }
  48642. if(!IsPlayerInRangeOfPlayer(playerid, offeredby, 5.0))
  48643. {
  48644. return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer is out of range.");
  48645. }
  48646. if(!IsVehicleOwner(offeredby, vehicleid))
  48647. {
  48648. return SendClientMessage(playerid, COLOR_GREY, "That player no longer is the owner of this vehicle.");
  48649. }
  48650. if(PlayerData[playerid][pCash] < price)
  48651. {
  48652. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to buy this player's vehicle.");
  48653. }
  48654. if(GetSpawnedVehicles(playerid) >= MAX_SPAWNED_VEHICLES)
  48655. {
  48656. return SendClientMessageEx(playerid, COLOR_GREY, "You can't have more than %i vehicles spawned at a time.", MAX_SPAWNED_VEHICLES);
  48657. }
  48658. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT COUNT(*) FROM vehicles WHERE ownerid = %i", PlayerData[playerid][pID]);
  48659. mysql_tquery(connectionID, queryBuffer, "OnPlayerAttemptBuyVehicleEx", "iiii", playerid, offeredby, vehicleid, price);
  48660. PlayerData[playerid][pCarOffer] = INVALID_PLAYER_ID;
  48661. }
  48662. else if(!strcmp(params, "faction", true))
  48663. {
  48664. new
  48665. offeredby = PlayerData[playerid][pFactionOffer],
  48666. factionid = PlayerData[playerid][pFactionOffered];
  48667. if(offeredby == INVALID_PLAYER_ID)
  48668. {
  48669. return SendClientMessage(playerid, COLOR_GREY, "You haven't received any invites to a faction.");
  48670. }
  48671. if(PlayerData[offeredby][pFaction] != factionid || !PlayerData[offeredby][pFactionLeader])
  48672. {
  48673. return SendClientMessage(playerid, COLOR_GREY, "That player is no longer allowed to invite you.");
  48674. }
  48675. SetPlayerFaction(playerid, factionid, 0);
  48676. SendClientMessageEx(playerid, COLOR_AQUA, "* You have accepted %s's faction offer to join {00AA00}%s{33CCFF}.", GetRPName(offeredby), FactionInfo[factionid][fName]);
  48677. SendClientMessageEx(offeredby, COLOR_AQUA, "* %s accepted your faction offer and is now apart of your faction.", GetRPName(playerid));
  48678. Log_Write("log_faction", "%s (uid: %i) has invited %s (uid: %i) to %s (id: %i).", GetPlayerNameEx(offeredby), PlayerData[offeredby][pID], GetPlayerNameEx(playerid), PlayerData[playerid][pID], FactionInfo[factionid][fName], factionid);
  48679. PlayerData[playerid][pFactionOffer] = INVALID_PLAYER_ID;
  48680. }
  48681. else if(!strcmp(params, "gang", true))
  48682. {
  48683. new
  48684. offeredby = PlayerData[playerid][pGangOffer],
  48685. gangid = PlayerData[playerid][pGangOffered];
  48686. if(offeredby == INVALID_PLAYER_ID)
  48687. {
  48688. return SendClientMessage(playerid, COLOR_GREY, "You haven't received any invites to a gang.");
  48689. }
  48690. if(PlayerData[offeredby][pGang] != gangid || PlayerData[offeredby][pGangRank] < 5)
  48691. {
  48692. return SendClientMessage(playerid, COLOR_GREY, "That player is no longer allowed to invite you.");
  48693. }
  48694. PlayerData[playerid][pGang] = gangid;
  48695. PlayerData[playerid][pGangRank] = 0;
  48696. PlayerData[playerid][pCrew] = -1;
  48697. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET gang = %i, gangrank = 0, crew = -1 WHERE uid = %i", gangid, PlayerData[playerid][pID]);
  48698. mysql_tquery(connectionID, queryBuffer);
  48699. SendClientMessageEx(playerid, COLOR_AQUA, "* You have accepted %s's gang offer to join {00AA00}%s{33CCFF}.", GetRPName(offeredby), GangInfo[gangid][gName]);
  48700. SendClientMessageEx(offeredby, COLOR_AQUA, "* %s accepted your gang offer and is now apart of your gang.", GetRPName(playerid));
  48701. if(gacooldown)
  48702. {
  48703. GangInfo[gangid][gInvCooldown] = gacooldown;
  48704. SendClientMessageEx(offeredby, COLOR_GREEN, "A invite cooldown has been placed on your gang. You cannot invite anyone for the next %i minutes!", GangInfo[gangid][gInvCooldown]);
  48705. }
  48706. Log_Write("log_gang", "%s (uid: %i) has invited %s (uid: %i) to %s (id: %i).", GetPlayerNameEx(offeredby), PlayerData[offeredby][pID], GetPlayerNameEx(playerid), PlayerData[playerid][pID], GangInfo[gangid][gName], gangid);
  48707. PlayerData[playerid][pGangOffer] = INVALID_PLAYER_ID;
  48708. }
  48709. else if(!strcmp(params, "frisk", true))
  48710. {
  48711. new offeredby = PlayerData[playerid][pFriskOffer];
  48712. if(offeredby == INVALID_PLAYER_ID)
  48713. {
  48714. return SendClientMessage(playerid, COLOR_GREY, "You haven't received any offers to be frisked.");
  48715. }
  48716. if(!IsPlayerInRangeOfPlayer(playerid, offeredby, 5.0))
  48717. {
  48718. return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer is out of range.");
  48719. }
  48720. FriskPlayer(offeredby, playerid);
  48721. PlayerData[playerid][pFriskOffer] = INVALID_PLAYER_ID;
  48722. }
  48723. else if(!strcmp(params, "ticket", true))
  48724. {
  48725. new
  48726. offeredby = PlayerData[playerid][pTicketOffer],
  48727. price = PlayerData[playerid][pTicketPrice];
  48728. if(offeredby == INVALID_PLAYER_ID)
  48729. {
  48730. return SendClientMessage(playerid, COLOR_GREY, "You haven't received any offers for a ticket.");
  48731. }
  48732. if(!IsPlayerInRangeOfPlayer(playerid, offeredby, 5.0))
  48733. {
  48734. return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer is out of range.");
  48735. }
  48736. if(PlayerData[playerid][pCash] < price)
  48737. {
  48738. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to pay this ticket.");
  48739. }
  48740. //GivePlayerCash(offeredby, price);
  48741. AddToTaxVault(price);
  48742. GivePlayerCash(playerid, -price);
  48743. SendClientMessageEx(playerid, COLOR_AQUA, "* You have paid the %s ticket written by %s.", FormatNumber(price), GetRPName(offeredby));
  48744. SendClientMessageEx(offeredby, COLOR_AQUA, "* %s has paid the %s ticket which was written to them.", GetRPName(playerid), FormatNumber(price));
  48745. Log_Write("log_faction", "%s (uid: %i) has given %s (uid: %i) a ticket for $%i.", GetPlayerNameEx(offeredby), PlayerData[offeredby][pID], GetPlayerNameEx(playerid), PlayerData[playerid][pID], price);
  48746. new query[516], year, month, day, hour, minute, second;
  48747. getdate(year, month, day);
  48748. gettime(hour,minute,second);
  48749. new datum[64], timel[64];
  48750. format(timel, sizeof(timel), "%d:%d:%d", hour, minute, second);
  48751. format(datum, sizeof(datum), "%d-%d-%d", year, month, day);
  48752. format(query, sizeof(query), "INSERT INTO `tickets`(`player`, `officer`, `time`, `date`, `amount`) VALUES ('%s','%s','%s','%s',%d)",
  48753. GetPlayerNameEx(playerid), GetPlayerNameEx(offeredby),
  48754. timel,datum, price);
  48755. mysql_tquery(connectionID, query);
  48756. PlayerData[playerid][pTicketOffer] = INVALID_PLAYER_ID;
  48757. }
  48758. else if(!strcmp(params, "live", true))
  48759. {
  48760. new offeredby = PlayerData[playerid][pLiveOffer];
  48761. if(offeredby == INVALID_PLAYER_ID)
  48762. {
  48763. return SendClientMessage(playerid, COLOR_GREY, "You haven't received any offers for a live interview.");
  48764. }
  48765. if(!IsPlayerInRangeOfPlayer(playerid, offeredby, 5.0))
  48766. {
  48767. return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer is out of range.");
  48768. }
  48769. if(PlayerData[playerid][pCallLine] != INVALID_PLAYER_ID || PlayerData[offeredby][pCallLine] != INVALID_PLAYER_ID)
  48770. {
  48771. return SendClientMessage(playerid, COLOR_GREY, "You or the offerer can't be on a phone call during a live interview.");
  48772. }
  48773. SendClientMessageEx(playerid, COLOR_AQUA, "* You have accepted %s's live interview offer. Speak in IC chat to begin the interview!", GetRPName(offeredby));
  48774. SendClientMessageEx(offeredby, COLOR_AQUA, "* %s has accepted your live interview offer. Speak in IC chat to begin the interview!", GetRPName(playerid));
  48775. Log_Write("log_faction", "%s (uid: %i) has started a live interview with %s (uid: %i)", GetPlayerNameEx(offeredby), PlayerData[offeredby][pID], GetPlayerNameEx(playerid), PlayerData[playerid][pID]);
  48776. PlayerData[playerid][pLiveBroadcast] = offeredby;
  48777. PlayerData[offeredby][pLiveBroadcast] = playerid;
  48778. PlayerData[playerid][pLiveOffer] = INVALID_PLAYER_ID;
  48779. }
  48780. else if(!strcmp(params, "handshake", true))
  48781. {
  48782. new offeredby = PlayerData[playerid][pShakeOffer];
  48783. if(offeredby == INVALID_PLAYER_ID)
  48784. {
  48785. return SendClientMessage(playerid, COLOR_GREY, "You haven't received any offers for a handshake.");
  48786. }
  48787. if(!IsPlayerInRangeOfPlayer(playerid, offeredby, 5.0))
  48788. {
  48789. return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer is out of range.");
  48790. }
  48791. ClearAnimations(playerid);
  48792. ClearAnimations(offeredby);
  48793. SetPlayerToFacePlayer(playerid, offeredby);
  48794. SetPlayerToFacePlayer(offeredby, playerid);
  48795. switch(PlayerData[playerid][pShakeType])
  48796. {
  48797. case 1:
  48798. {
  48799. ApplyAnimation(playerid, "GANGS", "hndshkaa", 4.0, 0, 0, 0, 0, 0, 1);
  48800. ApplyAnimation(offeredby, "GANGS", "hndshkaa", 4.0, 0, 0, 0, 0, 0, 1);
  48801. }
  48802. case 2:
  48803. {
  48804. ApplyAnimation(playerid, "GANGS", "hndshkba", 4.0, 0, 0, 0, 0, 0, 1);
  48805. ApplyAnimation(offeredby, "GANGS", "hndshkba", 4.0, 0, 0, 0, 0, 0, 1);
  48806. }
  48807. case 3:
  48808. {
  48809. ApplyAnimation(playerid, "GANGS", "hndshkda", 4.0, 0, 0, 0, 0, 0, 1);
  48810. ApplyAnimation(offeredby, "GANGS", "hndshkda", 4.0, 0, 0, 0, 0, 0, 1);
  48811. }
  48812. case 4:
  48813. {
  48814. ApplyAnimation(playerid, "GANGS", "hndshkea", 4.0, 0, 0, 0, 0, 0, 1);
  48815. ApplyAnimation(offeredby, "GANGS", "hndshkea", 4.0, 0, 0, 0, 0, 0, 1);
  48816. }
  48817. case 5:
  48818. {
  48819. ApplyAnimation(playerid, "GANGS", "hndshkfa", 4.0, 0, 0, 0, 0, 0, 1);
  48820. ApplyAnimation(offeredby, "GANGS", "hndshkfa", 4.0, 0, 0, 0, 0, 0, 1);
  48821. }
  48822. case 6:
  48823. {
  48824. ApplyAnimation(playerid, "GANGS", "prtial_hndshk_biz_01", 4.0, 0, 0, 0, 0, 0);
  48825. ApplyAnimation(offeredby, "GANGS", "prtial_hndshk_biz_01", 4.0, 0, 0, 0, 0, 0);
  48826. }
  48827. }
  48828. AwardAchievement(playerid, "Meeting people");
  48829. AwardAchievement(offeredby, "Meeting people");
  48830. SendClientMessageEx(playerid, COLOR_AQUA, "* You have accepted %s's handshake offer.", GetRPName(offeredby));
  48831. SendClientMessageEx(offeredby, COLOR_AQUA, "* %s has accepted your handshake offer.", GetRPName(playerid));
  48832. PlayerData[playerid][pShakeOffer] = INVALID_PLAYER_ID;
  48833. }
  48834. else if(!strcmp(params, "item", true))
  48835. {
  48836. new
  48837. offeredby = PlayerData[playerid][pSellOffer],
  48838. type = PlayerData[playerid][pSellType],
  48839. amount = PlayerData[playerid][pSellExtra],
  48840. price = PlayerData[playerid][pSellPrice];
  48841. if(offeredby == INVALID_PLAYER_ID)
  48842. {
  48843. return SendClientMessage(playerid, COLOR_GREY, "You haven't received any offers for an item.");
  48844. }
  48845. if(!IsPlayerInRangeOfPlayer(playerid, offeredby, 5.0))
  48846. {
  48847. return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer is out of range.");
  48848. }
  48849. if(PlayerData[playerid][pCash] < price)
  48850. {
  48851. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to accept the offer.");
  48852. }
  48853. switch(type)
  48854. {
  48855. case ITEM_WEAPON:
  48856. {
  48857. new weaponid = PlayerData[playerid][pSellExtra];
  48858. if(!PlayerHasWeapon(offeredby, weaponid))
  48859. {
  48860. return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer no longer has that item.");
  48861. }
  48862. GivePlayerCash(playerid, -price);
  48863. GivePlayerCash(offeredby, price);
  48864. GivePlayerWeaponEx(playerid, weaponid);
  48865. RemovePlayerWeapon(offeredby, weaponid);
  48866. SendClientMessageEx(playerid, COLOR_AQUA, "* You have purchased %s's %s for %s.", GetRPName(offeredby), GetWeaponNameEx(weaponid), FormatNumber(price));
  48867. SendClientMessageEx(offeredby, COLOR_AQUA, "* %s has purchased your %s for %s.", GetRPName(playerid), GetWeaponNameEx(weaponid), FormatNumber(price));
  48868. Log_Write("log_give", "%s (uid: %i) has sold their %s to %s (uid: %i) for $%i.", GetPlayerNameEx(offeredby), PlayerData[offeredby][pID], GetWeaponNameEx(weaponid), GetPlayerNameEx(playerid), PlayerData[playerid][pID], price);
  48869. TurfTaxCheck(offeredby, price);
  48870. PlayerData[playerid][pSellOffer] = INVALID_PLAYER_ID;
  48871. }
  48872. case ITEM_MATERIALS:
  48873. {
  48874. if(PlayerData[offeredby][pMaterials] < amount)
  48875. {
  48876. return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer no longer has that item.");
  48877. }
  48878. if(PlayerData[playerid][pMaterials] + amount > GetPlayerCapacity(playerid, CAPACITY_MATERIALS))
  48879. {
  48880. return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i materials. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pMaterials], GetPlayerCapacity(playerid, CAPACITY_MATERIALS));
  48881. }
  48882. GivePlayerCash(playerid, -price);
  48883. GivePlayerCash(offeredby, price);
  48884. PlayerData[playerid][pMaterials] += amount;
  48885. PlayerData[offeredby][pMaterials] -= amount;
  48886. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET materials = %i WHERE uid = %i", PlayerData[playerid][pMaterials], PlayerData[playerid][pID]);
  48887. mysql_tquery(connectionID, queryBuffer);
  48888. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET materials = %i WHERE uid = %i", PlayerData[offeredby][pMaterials], PlayerData[offeredby][pID]);
  48889. mysql_tquery(connectionID, queryBuffer);
  48890. SendClientMessageEx(playerid, COLOR_AQUA, "* You have purchased %i materials from %s for %s.", amount, GetRPName(offeredby), FormatNumber(price));
  48891. SendClientMessageEx(offeredby, COLOR_AQUA, "* %s has purchased your %i materials for %s.", GetRPName(playerid), amount, FormatNumber(price));
  48892. Log_Write("log_give", "%s (uid: %i) has sold their %i materials to %s (uid: %i) for $%i.", GetPlayerNameEx(offeredby), PlayerData[offeredby][pID], amount, GetPlayerNameEx(playerid), PlayerData[playerid][pID], price);
  48893. TurfTaxCheck(offeredby, price);
  48894. PlayerData[playerid][pSellOffer] = INVALID_PLAYER_ID;
  48895. }
  48896. case ITEM_WEED:
  48897. {
  48898. if(PlayerData[offeredby][pWeed] < amount)
  48899. {
  48900. return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer no longer has that item.");
  48901. }
  48902. if(PlayerData[playerid][pWeed] + amount > GetPlayerCapacity(playerid, CAPACITY_WEED))
  48903. {
  48904. return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i weed. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pWeed], GetPlayerCapacity(playerid, CAPACITY_WEED));
  48905. }
  48906. AwardAchievement(playerid, "Dirty deeds");
  48907. AwardAchievement(offeredby, "Dirty deeds");
  48908. GivePlayerCash(playerid, -price);
  48909. GivePlayerCash(offeredby, price);
  48910. PlayerData[playerid][pWeed] += amount;
  48911. PlayerData[offeredby][pWeed] -= amount;
  48912. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET weed = %i WHERE uid = %i", PlayerData[playerid][pWeed], PlayerData[playerid][pID]);
  48913. mysql_tquery(connectionID, queryBuffer);
  48914. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET weed = %i WHERE uid = %i", PlayerData[offeredby][pWeed], PlayerData[offeredby][pID]);
  48915. mysql_tquery(connectionID, queryBuffer);
  48916. SendClientMessageEx(playerid, COLOR_AQUA, "* You have purchased %i grams of weed from %s for %s.", amount, GetRPName(offeredby), FormatNumber(price));
  48917. SendClientMessageEx(offeredby, COLOR_AQUA, "* %s has purchased your %i grams of weed for %s.", GetRPName(playerid), amount, FormatNumber(price));
  48918. Log_Write("log_give", "%s (uid: %i) has sold their %i grams of weed to %s (uid: %i) for $%i.", GetPlayerNameEx(offeredby), PlayerData[offeredby][pID], amount, GetPlayerNameEx(playerid), PlayerData[playerid][pID], price);
  48919. TurfTaxCheck(offeredby, price);
  48920. PlayerData[playerid][pSellOffer] = INVALID_PLAYER_ID;
  48921. }
  48922. case ITEM_COCAINE:
  48923. {
  48924. if(PlayerData[offeredby][pCocaine] < amount)
  48925. {
  48926. return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer no longer has that item.");
  48927. }
  48928. if(PlayerData[playerid][pCocaine] + amount > GetPlayerCapacity(playerid, CAPACITY_COCAINE))
  48929. {
  48930. return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i cocaine. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pCocaine], GetPlayerCapacity(playerid, CAPACITY_COCAINE));
  48931. }
  48932. AwardAchievement(playerid, "Dirty deeds");
  48933. AwardAchievement(offeredby, "Dirty deeds");
  48934. GivePlayerCash(playerid, -price);
  48935. GivePlayerCash(offeredby, price);
  48936. PlayerData[playerid][pCocaine] += amount;
  48937. PlayerData[offeredby][pCocaine] -= amount;
  48938. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET cocaine = %i WHERE uid = %i", PlayerData[playerid][pCocaine], PlayerData[playerid][pID]);
  48939. mysql_tquery(connectionID, queryBuffer);
  48940. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET cocaine = %i WHERE uid = %i", PlayerData[offeredby][pCocaine], PlayerData[offeredby][pID]);
  48941. mysql_tquery(connectionID, queryBuffer);
  48942. SendClientMessageEx(playerid, COLOR_AQUA, "* You have purchased %i grams of cocaine from %s for %s.", amount, GetRPName(offeredby), FormatNumber(price));
  48943. SendClientMessageEx(offeredby, COLOR_AQUA, "* %s has purchased your %i grams of cocaine for %s.", GetRPName(playerid), amount, FormatNumber(price));
  48944. Log_Write("log_give", "%s (uid: %i) has sold their %i grams of cocaine to %s (uid: %i) for $%i.", GetPlayerNameEx(offeredby), PlayerData[offeredby][pID], amount, GetPlayerNameEx(playerid), PlayerData[playerid][pID], price);
  48945. TurfTaxCheck(offeredby, price);
  48946. PlayerData[playerid][pSellOffer] = INVALID_PLAYER_ID;
  48947. }
  48948. case ITEM_METH:
  48949. {
  48950. if(PlayerData[offeredby][pMeth] < amount)
  48951. {
  48952. return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer no longer has that item.");
  48953. }
  48954. if(PlayerData[playerid][pMeth] + amount > GetPlayerCapacity(playerid, CAPACITY_METH))
  48955. {
  48956. return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i meth. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pMeth], GetPlayerCapacity(playerid, CAPACITY_METH));
  48957. }
  48958. AwardAchievement(playerid, "Dirty deeds");
  48959. AwardAchievement(offeredby, "Dirty deeds");
  48960. GivePlayerCash(playerid, -price);
  48961. GivePlayerCash(offeredby, price);
  48962. PlayerData[playerid][pMeth] += amount;
  48963. PlayerData[offeredby][pMeth] -= amount;
  48964. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET meth = %i WHERE uid = %i", PlayerData[playerid][pMeth], PlayerData[playerid][pID]);
  48965. mysql_tquery(connectionID, queryBuffer);
  48966. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET meth = %i WHERE uid = %i", PlayerData[offeredby][pMeth], PlayerData[offeredby][pID]);
  48967. mysql_tquery(connectionID, queryBuffer);
  48968. SendClientMessageEx(playerid, COLOR_AQUA, "* You have purchased %i grams of meth from %s for %s.", amount, GetRPName(offeredby), FormatNumber(price));
  48969. SendClientMessageEx(offeredby, COLOR_AQUA, "* %s has purchased your %i grams of meth for %s.", GetRPName(playerid), amount, FormatNumber(price));
  48970. Log_Write("log_give", "%s (uid: %i) has sold their %i grams of meth to %s (uid: %i) for $%i.", GetPlayerNameEx(offeredby), PlayerData[offeredby][pID], amount, GetPlayerNameEx(playerid), PlayerData[playerid][pID], price);
  48971. TurfTaxCheck(offeredby, price);
  48972. PlayerData[playerid][pSellOffer] = INVALID_PLAYER_ID;
  48973. }
  48974. case ITEM_PAINKILLERS:
  48975. {
  48976. if(PlayerData[offeredby][pPainkillers] < amount)
  48977. {
  48978. return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer no longer has that item.");
  48979. }
  48980. if(PlayerData[playerid][pPainkillers] + amount > GetPlayerCapacity(playerid, CAPACITY_PAINKILLERS))
  48981. {
  48982. return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i painkillers. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pPainkillers], GetPlayerCapacity(playerid, CAPACITY_PAINKILLERS));
  48983. }
  48984. AwardAchievement(playerid, "Dirty deeds");
  48985. AwardAchievement(offeredby, "Dirty deeds");
  48986. GivePlayerCash(playerid, -price);
  48987. GivePlayerCash(offeredby, price);
  48988. PlayerData[playerid][pPainkillers] += amount;
  48989. PlayerData[offeredby][pPainkillers] -= amount;
  48990. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET painkillers = %i WHERE uid = %i", PlayerData[playerid][pPainkillers], PlayerData[playerid][pID]);
  48991. mysql_tquery(connectionID, queryBuffer);
  48992. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET painkillers = %i WHERE uid = %i", PlayerData[offeredby][pPainkillers], PlayerData[offeredby][pID]);
  48993. mysql_tquery(connectionID, queryBuffer);
  48994. SendClientMessageEx(playerid, COLOR_AQUA, "* You have purchased %i painkillers from %s for %s.", amount, GetRPName(offeredby), FormatNumber(price));
  48995. SendClientMessageEx(offeredby, COLOR_AQUA, "* %s has purchased your %i painkillers for %s.", GetRPName(playerid), amount, FormatNumber(price));
  48996. Log_Write("log_give", "%s (uid: %i) has sold their %i painkillers to %s (uid: %i) for $%i.", GetPlayerNameEx(offeredby), PlayerData[offeredby][pID], amount, GetPlayerNameEx(playerid), PlayerData[playerid][pID], price);
  48997. TurfTaxCheck(offeredby, price);
  48998. PlayerData[playerid][pSellOffer] = INVALID_PLAYER_ID;
  48999. }
  49000. case ITEM_SEEDS:
  49001. {
  49002. if(PlayerData[offeredby][pSeeds] < amount)
  49003. {
  49004. return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer no longer has that item.");
  49005. }
  49006. if(PlayerData[playerid][pSeeds] + amount > GetPlayerCapacity(playerid, CAPACITY_SEEDS))
  49007. {
  49008. return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i seeds. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pSeeds], GetPlayerCapacity(playerid, CAPACITY_SEEDS));
  49009. }
  49010. AwardAchievement(playerid, "Dirty deeds");
  49011. AwardAchievement(offeredby, "Dirty deeds");
  49012. GivePlayerCash(playerid, -price);
  49013. GivePlayerCash(offeredby, price);
  49014. PlayerData[playerid][pSeeds] += amount;
  49015. PlayerData[offeredby][pSeeds] -= amount;
  49016. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET seeds = %i WHERE uid = %i", PlayerData[playerid][pSeeds], PlayerData[playerid][pID]);
  49017. mysql_tquery(connectionID, queryBuffer);
  49018. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET seeds = %i WHERE uid = %i", PlayerData[offeredby][pSeeds], PlayerData[offeredby][pID]);
  49019. mysql_tquery(connectionID, queryBuffer);
  49020. SendClientMessageEx(playerid, COLOR_AQUA, "* You have purchased %i seeds from %s for %s.", amount, GetRPName(offeredby), FormatNumber(price));
  49021. SendClientMessageEx(offeredby, COLOR_AQUA, "* %s has purchased your %i seeds for %s.", GetRPName(playerid), amount, FormatNumber(price));
  49022. Log_Write("log_give", "%s (uid: %i) has sold their %i seeds to %s (uid: %i) for $%i.", GetPlayerNameEx(offeredby), PlayerData[offeredby][pID], amount, GetPlayerNameEx(playerid), PlayerData[playerid][pID], price);
  49023. TurfTaxCheck(offeredby, price);
  49024. PlayerData[playerid][pSellOffer] = INVALID_PLAYER_ID;
  49025. }
  49026. case ITEM_EPHEDRINE:
  49027. {
  49028. if(PlayerData[offeredby][pEphedrine] < amount)
  49029. {
  49030. return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer no longer has that item.");
  49031. }
  49032. if(PlayerData[playerid][pEphedrine] + amount > GetPlayerCapacity(playerid, CAPACITY_EPHEDRINE))
  49033. {
  49034. return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i ephedrine. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pEphedrine], GetPlayerCapacity(playerid, CAPACITY_EPHEDRINE));
  49035. }
  49036. AwardAchievement(playerid, "Dirty deeds");
  49037. AwardAchievement(offeredby, "Dirty deeds");
  49038. GivePlayerCash(playerid, -price);
  49039. GivePlayerCash(offeredby, price);
  49040. PlayerData[playerid][pEphedrine] += amount;
  49041. PlayerData[offeredby][pEphedrine] -= amount;
  49042. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET ephedrine = %i WHERE uid = %i", PlayerData[playerid][pEphedrine], PlayerData[playerid][pID]);
  49043. mysql_tquery(connectionID, queryBuffer);
  49044. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET ephedrine = %i WHERE uid = %i", PlayerData[offeredby][pEphedrine], PlayerData[offeredby][pID]);
  49045. mysql_tquery(connectionID, queryBuffer);
  49046. SendClientMessageEx(playerid, COLOR_AQUA, "* You have purchased %i grams of ephedrine from %s for %s.", amount, GetRPName(offeredby), FormatNumber(price));
  49047. SendClientMessageEx(offeredby, COLOR_AQUA, "* %s has purchased your %i grams of ephedrine for %s.", GetRPName(playerid), amount, FormatNumber(price));
  49048. Log_Write("log_give", "%s (uid: %i) has sold their %i grams of ephedrine to %s (uid: %i) for $%i.", GetPlayerNameEx(offeredby), PlayerData[offeredby][pID], amount, GetPlayerNameEx(playerid), PlayerData[playerid][pID], price);
  49049. TurfTaxCheck(offeredby, price);
  49050. PlayerData[playerid][pSellOffer] = INVALID_PLAYER_ID;
  49051. }
  49052. }
  49053. }
  49054. else if(!strcmp(params, "weapon", true))
  49055. {
  49056. if(PlayerData[playerid][pSellOffer] == INVALID_PLAYER_ID || PlayerData[playerid][pSellType] != ITEM_SELLGUN)
  49057. {
  49058. return SendClientMessage(playerid, COLOR_GREY, "You haven't received any offers for a weapon.");
  49059. }
  49060. if(PlayerData[playerid][pCash] < PlayerData[playerid][pSellPrice])
  49061. {
  49062. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase the weapon.");
  49063. }
  49064. SellWeapon(PlayerData[playerid][pSellOffer], playerid, PlayerData[playerid][pSellExtra], PlayerData[playerid][pSellPrice]);
  49065. PlayerData[playerid][pSellOffer] = INVALID_PLAYER_ID;
  49066. }
  49067. else if(!strcmp(params, "lawyer", true))
  49068. {
  49069. new
  49070. offeredby = PlayerData[playerid][pDefendOffer],
  49071. price = PlayerData[playerid][pDefendPrice];
  49072. if(offeredby == INVALID_PLAYER_ID)
  49073. {
  49074. return SendClientMessage(playerid, COLOR_GREY, "You haven't received any offers from a lawyer.");
  49075. }
  49076. if(!IsPlayerInRangeOfPlayer(playerid, offeredby, 5.0))
  49077. {
  49078. return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer is out of range.");
  49079. }
  49080. if(PlayerData[playerid][pCash] < price)
  49081. {
  49082. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to accept the offer.");
  49083. }
  49084. if(!PlayerData[playerid][pWantedLevel])
  49085. {
  49086. return SendClientMessage(playerid, COLOR_GREY, "You are no longer wanted. You can't accept this offer anymore.");
  49087. }
  49088. PlayerData[playerid][pWantedLevel]--;
  49089. GivePlayerCash(playerid, -price);
  49090. GivePlayerCash(offeredby, price);
  49091. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET wantedlevel = wantedlevel - 1 WHERE uid = %i", PlayerData[playerid][pID]);
  49092. mysql_tquery(connectionID, queryBuffer);
  49093. SendClientMessageEx(playerid, COLOR_AQUA, "* You have accepted %s's offer to reduce your wanted level for %s.", GetRPName(offeredby), FormatNumber(price));
  49094. SendClientMessageEx(offeredby, COLOR_AQUA, "* %s has accepted your offer to reduce their wanted level for %s.", GetRPName(playerid), FormatNumber(price));
  49095. IncreaseJobSkill(offeredby, JOB_LAWYER);
  49096. PlayerData[playerid][pDefendOffer] = INVALID_PLAYER_ID;
  49097. }
  49098. else if(!strcmp(params, "dicebet", true))
  49099. {
  49100. new
  49101. offeredby = PlayerData[playerid][pDiceOffer],
  49102. amount = PlayerData[playerid][pDiceBet];
  49103. if(offeredby == INVALID_PLAYER_ID)
  49104. {
  49105. return SendClientMessage(playerid, COLOR_GREY, "You haven't received any offers for dice betting.");
  49106. }
  49107. if(!IsPlayerInRangeOfPlayer(playerid, offeredby, 5.0))
  49108. {
  49109. return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer is out of range.");
  49110. }
  49111. if(PlayerData[playerid][pCash] < amount)
  49112. {
  49113. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to accept this bet.");
  49114. }
  49115. if(PlayerData[offeredby][pCash] < amount)
  49116. {
  49117. return SendClientMessage(playerid, COLOR_GREY, "That player can't afford to accept this bet.");
  49118. }
  49119. new
  49120. rand[2];
  49121. if(PlayerData[playerid][pDiceRigged])
  49122. {
  49123. rand[0] = 4 + random(3);
  49124. rand[1] = random(3) + 1;
  49125. }
  49126. else
  49127. {
  49128. for(new x = 0; x < random(50)*random(50)+30; x++)
  49129. {
  49130. rand[0] = random(6) + 1;
  49131. }
  49132. for(new x = 0; x < random(50)*random(50)+30; x++)
  49133. {
  49134. rand[1] = random(6) + 1;
  49135. }
  49136. }
  49137. SendProximityMessage(offeredby, 20.0, COLOR_WHITE, "* %s rolls a dice which lands on the number %i.", GetRPName(offeredby), rand[0]);
  49138. SendProximityMessage(playerid, 20.0, COLOR_WHITE, "* %s rolls a dice which lands on the number %i.", GetRPName(playerid), rand[1]);
  49139. if(rand[0] > rand[1])
  49140. {
  49141. GivePlayerCash(offeredby, amount);
  49142. GivePlayerCash(playerid, -amount);
  49143. SendClientMessageEx(offeredby, COLOR_AQUA, "* You have won $%s from your dice bet with %s.", FormatNumber(amount), GetRPName(playerid));
  49144. SendClientMessageEx(playerid, COLOR_RED, "* You have lost $%s from your dice bet with %s.", FormatNumber(amount), GetRPName(offeredby));
  49145. if(amount > 10000 && !strcmp(GetPlayerIP(offeredby), GetPlayerIP(playerid)))
  49146. {
  49147. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s (IP: %s) won a $%i dice bet against %s (IP: %s).", GetRPName(offeredby), GetPlayerIP(offeredby), amount, GetRPName(playerid), GetPlayerIP(playerid));
  49148. }
  49149. Log_Write("log_dicebet", "%s (uid: %i) won a dice bet against %s (uid: %i) for $%i.", GetRPName(offeredby), PlayerData[offeredby][pID], GetRPName(playerid), PlayerData[playerid][pID], amount);
  49150. }
  49151. else if(rand[0] == rand[1])
  49152. {
  49153. SendClientMessageEx(offeredby, COLOR_AQUA, "* The bet of %s was a tie. You kept your money as a result!", FormatNumber(amount));
  49154. SendClientMessageEx(playerid, COLOR_AQUA, "* The bet of %s was a tie. You kept your money as a result!", FormatNumber(amount));
  49155. }
  49156. else
  49157. {
  49158. GivePlayerCash(offeredby, -amount);
  49159. GivePlayerCash(playerid, amount);
  49160. SendClientMessageEx(playerid, COLOR_AQUA, "* You have won $%s from your dice bet with %s.", FormatNumber(amount), GetRPName(offeredby));
  49161. SendClientMessageEx(offeredby, COLOR_RED, "* You have lost $%s from your dice bet with %s.", FormatNumber(amount), GetRPName(playerid));
  49162. if(amount > 10000 && !strcmp(GetPlayerIP(offeredby), GetPlayerIP(playerid)))
  49163. {
  49164. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s (IP: %s) won a $%i dice bet against %s (IP: %s).", GetRPName(playerid), GetPlayerIP(playerid), amount, GetRPName(offeredby), GetPlayerIP(offeredby));
  49165. }
  49166. Log_Write("log_dicebet", "%s (uid: %i) won a dice bet against %s (uid: %i) for $%i.", GetRPName(playerid), PlayerData[playerid][pID], GetRPName(offeredby), PlayerData[offeredby][pID], amount);
  49167. }
  49168. PlayerData[playerid][pDiceOffer] = INVALID_PLAYER_ID;
  49169. }
  49170. else if(!strcmp(params, "invite", true))
  49171. {
  49172. new
  49173. offeredby = PlayerData[playerid][pInviteOffer],
  49174. houseid = PlayerData[playerid][pInviteHouse];
  49175. if(offeredby == INVALID_PLAYER_ID)
  49176. {
  49177. return SendClientMessage(playerid, COLOR_GREY, "You haven't received any invitations to a house.");
  49178. }
  49179. PlayerData[playerid][pCP] = CHECKPOINT_HOUSE;
  49180. SetPlayerCheckpoint(playerid, HouseInfo[houseid][hPosX], HouseInfo[houseid][hPosY], HouseInfo[houseid][hPosZ], 3.0);
  49181. SendClientMessageEx(playerid, COLOR_AQUA, "* You have accepted %s's invitation to their house.", GetRPName(offeredby));
  49182. SendClientMessageEx(offeredby, COLOR_AQUA, "* %s has accepted your invitation to your house.", GetRPName(playerid));
  49183. PlayerData[playerid][pInviteOffer] = INVALID_PLAYER_ID;
  49184. }
  49185. else if(!strcmp(params, "robbery", true))
  49186. {
  49187. new offeredby = PlayerData[playerid][pRobberyOffer];
  49188. if(offeredby == INVALID_PLAYER_ID)
  49189. {
  49190. return SendClientMessage(playerid, COLOR_GREY, "You haven't received any invitations to a bank heist.");
  49191. }
  49192. if(!IsPlayerInRangeOfPlayer(playerid, offeredby, 5.0))
  49193. {
  49194. return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer is out of range.");
  49195. }
  49196. if(RobberyInfo[rRobbers][0] != offeredby || RobberyInfo[rStarted])
  49197. {
  49198. return SendClientMessage(playerid, COLOR_GREY, "The robbery invite is no longer available.");
  49199. }
  49200. if(GetBankRobbers() >= MAX_BANK_ROBBERS)
  49201. {
  49202. return SendClientMessageEx(playerid, COLOR_GREY, "This bank robbery has reached its limit of %i robbers.", MAX_BANK_ROBBERS);
  49203. }
  49204. AddToBankRobbery(playerid);
  49205. SendClientMessageEx(playerid, COLOR_AQUA, "* You have accepted %s's bank robbery invitation.", GetRPName(offeredby));
  49206. SendClientMessageEx(offeredby, COLOR_AQUA, "* %s has accepted your bank robbery invitation.", GetRPName(playerid));
  49207. PlayerData[playerid][pRobberyOffer] = INVALID_PLAYER_ID;
  49208. }
  49209. else if(!strcmp(params, "duel", true))
  49210. {
  49211. new offeredby = PlayerData[playerid][pDuelOffer], entranceid = GetInsideEntrance(playerid);
  49212. if(offeredby == INVALID_PLAYER_ID)
  49213. {
  49214. return SendClientMessage(playerid, COLOR_GREY, "You haven't received any offers to duel.");
  49215. }
  49216. if(!IsPlayerInRangeOfPlayer(playerid, offeredby, 15.0))
  49217. {
  49218. return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer is out of range.");
  49219. }
  49220. if(entranceid == -1 || EntranceInfo[entranceid][eType] != 1)
  49221. {
  49222. return SendClientMessage(playerid, COLOR_GREY, "You are not in a duel arena.");
  49223. }
  49224. if(PlayerData[playerid][pDueling] != INVALID_PLAYER_ID)
  49225. {
  49226. return SendClientMessage(playerid, COLOR_GREY, "You are already participating in a duel at the moment.");
  49227. }
  49228. if(PlayerData[offeredby][pDueling] != INVALID_PLAYER_ID)
  49229. {
  49230. return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer is in a duel at the moment.");
  49231. }
  49232. foreach(new i : Player)
  49233. {
  49234. if(GetInsideEntrance(i) == entranceid && PlayerData[i][pDueling] != INVALID_PLAYER_ID)
  49235. {
  49236. return SendClientMessage(playerid, COLOR_GREY, "There is a duel in progress already. Wait until the current one has ended.");
  49237. }
  49238. }
  49239. SavePlayerVariables(playerid);
  49240. SavePlayerVariables(offeredby);
  49241. ResetPlayerWeapons(playerid);
  49242. ResetPlayerWeapons(offeredby);
  49243. SetPlayerPos(playerid, 1370.3395, -15.4556, 1000.9219);
  49244. SetPlayerPos(offeredby, 1414.4841, -15.1239, 1000.9253);
  49245. SetPlayerFacingAngle(playerid, 270.0000);
  49246. SetPlayerFacingAngle(offeredby, 90.0000);
  49247. SetPlayerInterior(playerid, 1);
  49248. SetPlayerInterior(offeredby, 1);
  49249. SetPlayerVirtualWorld(playerid, EntranceInfo[entranceid][eWorld]);
  49250. SetPlayerVirtualWorld(offeredby, EntranceInfo[entranceid][eWorld]);
  49251. SetPlayerHealth(playerid, 100.0);
  49252. SetPlayerArmour(playerid, 100.0);
  49253. SetPlayerHealth(offeredby, 100.0);
  49254. SetPlayerArmour(offeredby, 100.0);
  49255. GivePlayerWeaponEx(playerid, 24, true);
  49256. GivePlayerWeaponEx(playerid, 27, true);
  49257. GivePlayerWeaponEx(playerid, 29, true);
  49258. GivePlayerWeaponEx(playerid, 31, true);
  49259. GivePlayerWeaponEx(playerid, 34, true);
  49260. GivePlayerWeaponEx(offeredby, 24, true);
  49261. GivePlayerWeaponEx(offeredby, 27, true);
  49262. GivePlayerWeaponEx(offeredby, 29, true);
  49263. GivePlayerWeaponEx(offeredby, 31, true);
  49264. GivePlayerWeaponEx(offeredby, 34, true);
  49265. GameTextForPlayer(playerid, "~r~Duel time!", 3000, 3);
  49266. GameTextForPlayer(offeredby, "~r~Duel time!", 3000, 3);
  49267. PlayerData[playerid][pDueling] = offeredby;
  49268. PlayerData[offeredby][pDueling] = playerid;
  49269. SendClientMessageEx(offeredby, COLOR_AQUA, "* %s has accepted the duel offer.", GetRPName(playerid));
  49270. SendClientMessageEx(playerid, COLOR_AQUA, "* You have accepted %s's duel offer.", GetRPName(offeredby));
  49271. PlayerData[playerid][pDuelOffer] = INVALID_PLAYER_ID;
  49272. }
  49273. else if(!strcmp(params, "alliance", true))
  49274. {
  49275. new offeredby = PlayerData[playerid][pAllianceOffer], color, color2;
  49276. if(offeredby == INVALID_PLAYER_ID)
  49277. {
  49278. return SendClientMessage(playerid, COLOR_GREY, "You haven't been offered an alliance.");
  49279. }
  49280. if(offeredby == playerid)
  49281. {
  49282. return SendClientMessage(playerid, COLOR_GREY, "You can't accept offers from yourself.");
  49283. }
  49284. new gangid = PlayerData[playerid][pGang], allyid = PlayerData[offeredby][pGang];
  49285. SendClientMessageEx(offeredby, COLOR_AQUA, "%s has accepted your offer to form a gang alliance.", GetRPName(playerid));
  49286. SendClientMessageEx(playerid, COLOR_AQUA, "You've accepted the offer from %s to form a gang alliance.", GetRPName(offeredby));
  49287. GangInfo[gangid][gAlliance] = allyid;
  49288. GangInfo[allyid][gAlliance] = gangid;
  49289. PlayerData[playerid][pAllianceOffer] = INVALID_PLAYER_ID;
  49290. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET alliance = %i WHERE id = %i", allyid, gangid);
  49291. mysql_tquery(connectionID, queryBuffer);
  49292. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET alliance = %i WHERE id = %i", gangid, allyid);
  49293. mysql_tquery(connectionID, queryBuffer);
  49294. if(GangInfo[gangid][gColor] == -1 || GangInfo[gangid][gColor] == -256)
  49295. {
  49296. color = 0xC8C8C8FF;
  49297. }
  49298. else
  49299. {
  49300. color = GangInfo[gangid][gColor];
  49301. }
  49302. if(GangInfo[allyid][gColor] == -1 || GangInfo[allyid][gColor] == -256)
  49303. {
  49304. color2 = 0xC8C8C8FF;
  49305. }
  49306. else
  49307. {
  49308. color2 = GangInfo[allyid][gColor];
  49309. }
  49310. SendClientMessageToAllEx(COLOR_WHITE, "(( Gang News: {%06x}%s{FFFFFF} has formed an alliance with {%06x}%s{FFFFFF} ))", color >>> 8, GangInfo[gangid][gName], color2 >>> 8, GangInfo[allyid][gName]);
  49311. }
  49312. else if(!strcmp(params, "marriage", true))
  49313. {
  49314. new id, offeredby = PlayerData[playerid][pMarriageOffer];
  49315. if((id = GetInsideBusiness(playerid)) == -1 || BusinessInfo[id][bType] != BUSINESS_RESTAURANT)
  49316. {
  49317. return SendClientMessage(playerid, COLOR_GREY, "You need to be at a restaurant to commence a wedding.");
  49318. }
  49319. if(PlayerData[playerid][pCash] < 25000 || PlayerData[offeredby][pCash] < 25000)
  49320. {
  49321. return SendClientMessage(playerid, COLOR_GREY, "You both need to have $25,000 in hand to commence a wedding.");
  49322. }
  49323. if(!IsPlayerConnected(offeredby) || !IsPlayerInRangeOfPlayer(playerid, offeredby, 15.0))
  49324. {
  49325. return SendClientMessage(playerid, COLOR_GREY, "You aren't in range of anyone who has offered to marry you.");
  49326. }
  49327. GivePlayerCash(playerid, -25000);
  49328. GivePlayerCash(offeredby, -25000);
  49329. BusinessInfo[id][bCash] += 50000;
  49330. SendClientMessageToAllEx(COLOR_WHITE, "Lovebirds %s and %s have just tied the knott! Congratulations to them on getting married.", GetRPName(offeredby), GetRPName(playerid));
  49331. PlayerData[playerid][pMarriedTo] = PlayerData[offeredby][pID];
  49332. PlayerData[offeredby][pMarriedTo] = PlayerData[playerid][pID];
  49333. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET marriedto = %i WHERE uid = %i", PlayerData[playerid][pMarriedTo], PlayerData[playerid][pID]);
  49334. mysql_tquery(connectionID, queryBuffer);
  49335. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET marriedto = %i WHERE uid = %i", PlayerData[offeredby][pMarriedTo], PlayerData[offeredby][pID]);
  49336. mysql_tquery(connectionID, queryBuffer);
  49337. strcpy(PlayerData[playerid][pMarriedName], GetPlayerNameEx(offeredby), MAX_PLAYER_NAME);
  49338. strcpy(PlayerData[offeredby][pMarriedName], GetPlayerNameEx(playerid), MAX_PLAYER_NAME);
  49339. PlayerData[playerid][pMarriageOffer] = INVALID_PLAYER_ID;
  49340. }
  49341. else if(!strcmp(params, "divorce", true))
  49342. {
  49343. new offeredby = PlayerData[playerid][pMarriageOffer];
  49344. if(!IsPlayerConnected(offeredby) || !IsPlayerInRangeOfPlayer(playerid, offeredby, 15.0))
  49345. {
  49346. return SendClientMessage(playerid, COLOR_GREY, "You aren't in range of anyone who has offered to divorce you.");
  49347. }
  49348. if(PlayerData[playerid][pMarriedTo] == -1)
  49349. {
  49350. return SendClientMessage(playerid, COLOR_GREY, "You aren't even married ya naab.");
  49351. }
  49352. if(PlayerData[playerid][pMarriedTo] != PlayerData[offeredby][pID])
  49353. {
  49354. return SendClientMessage(playerid, COLOR_GREY, "That isn't the person you're married to.");
  49355. }
  49356. PlayerData[playerid][pMarriedTo] = -1;
  49357. PlayerData[offeredby][pMarriedTo] = -1;
  49358. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET marriedto = -1 WHERE uid = %i", PlayerData[playerid][pID]);
  49359. mysql_tquery(connectionID, queryBuffer);
  49360. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET marriedto = -1 WHERE uid = %i", PlayerData[offeredby][pID]);
  49361. mysql_tquery(connectionID, queryBuffer);
  49362. strcpy(PlayerData[playerid][pMarriedName], "Nobody", MAX_PLAYER_NAME);
  49363. strcpy(PlayerData[offeredby][pMarriedName], "Nobody", MAX_PLAYER_NAME);
  49364. PlayerData[playerid][pMarriageOffer] = INVALID_PLAYER_ID;
  49365. }
  49366. else
  49367. {
  49368. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /accept [option]");
  49369. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: House, Garage, Business, Land, Death, Vest, Vehicle, Faction, Gang, Ticket, Live, Marriage");
  49370. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Item, Frisk, Handshake, Weapon, Lawyer, Dicebet, Invite, Robbery, Duel, Alliance");
  49371. }
  49372. return 1;
  49373. }
  49374. CMD:togtp(playerid, params[])
  49375. {
  49376. if(PlayerData[playerid][pAdmin] < MANAGEMENT)
  49377. {
  49378. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command");
  49379. }
  49380. if(!PlayerData[playerid][pToggleTP])
  49381. {
  49382. PlayerData[playerid][pToggleTP] = 1;
  49383. }
  49384. else
  49385. {
  49386. PlayerData[playerid][pToggleTP] = 0;
  49387. }
  49388. return 1;
  49389. }
  49390. CMD:e(playerid, params[])
  49391. {
  49392. if(PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  49393. {
  49394. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  49395. }
  49396. if(isnull(params))
  49397. {
  49398. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /e [Management chat]");
  49399. }
  49400. if(PlayerData[playerid][pToggleAdmin])
  49401. {
  49402. return SendClientMessage(playerid, COLOR_GREY, "You can't speak in the executive chat as you have admin chats toggled.");
  49403. }
  49404. foreach(new i : Player)
  49405. {
  49406. if((PlayerData[i][pAdmin] > 5) && !PlayerData[i][pToggleAdmin])
  49407. {
  49408. SendClientMessageEx(i, 0xA077BFFF, "* [%s] %s: %s *", GetAdminRank(playerid), GetRPName(playerid), params);
  49409. }
  49410. }
  49411. return 1;
  49412. }
  49413. CMD:ha(playerid, params[])
  49414. {
  49415. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  49416. {
  49417. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  49418. }
  49419. if(isnull(params))
  49420. {
  49421. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /ha [head admin chat]");
  49422. }
  49423. if(PlayerData[playerid][pToggleAdmin])
  49424. {
  49425. return SendClientMessage(playerid, COLOR_GREY, "You can't speak in the head administrator chat as you have admin chats toggled.");
  49426. }
  49427. foreach(new i : Player)
  49428. {
  49429. if((PlayerData[i][pAdmin] > 4) && !PlayerData[i][pToggleAdmin])
  49430. {
  49431. SendClientMessageEx(i, 0x5C80FFFF, "* [%s] %s: %s *", GetAdminRank(playerid), GetRPName(playerid), params);
  49432. }
  49433. }
  49434. return 1;
  49435. }
  49436. CMD:a(playerid, params[])
  49437. {
  49438. if(PlayerData[playerid][pAdmin] < 1 && !PlayerData[playerid][pDeveloper])
  49439. {
  49440. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  49441. }
  49442. if(isnull(params))
  49443. {
  49444. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /a [admin chat]");
  49445. }
  49446. if(PlayerData[playerid][pToggleAdmin])
  49447. {
  49448. return SendClientMessage(playerid, COLOR_GREY, "You can't speak in the admin chat as you have it toggled.");
  49449. }
  49450. params[0] = toupper(params[0]);
  49451. foreach(new i : Player)
  49452. {
  49453. if((PlayerData[i][pAdmin] > 0 || PlayerData[i][pDeveloper]) && !PlayerData[i][pToggleAdmin])
  49454. {
  49455. new adminname[24];
  49456. strcpy(adminname, GetRPName(playerid));
  49457. if(PlayerData[playerid][pUndercover][0])
  49458. {
  49459. if(strcmp(PlayerData[playerid][pAdminName], "None", true))
  49460. {
  49461. strcpy(adminname, PlayerData[playerid][pAdminName]);
  49462. }
  49463. }
  49464. if(strlen(params) > MAX_SPLIT_LENGTH)
  49465. {
  49466. SendClientMessageEx(i, COLOR_YELLOW, "* [%s %s{FFFF00}] %s: %.*s... *", GetAdminDivision(playerid), GetAdminRank1(playerid), adminname, MAX_SPLIT_LENGTH, params);
  49467. SendClientMessageEx(i, COLOR_YELLOW, "* [%s %s{FFFF00}] %s: ...%s *", GetAdminDivision(playerid), GetAdminRank1(playerid), adminname, params[MAX_SPLIT_LENGTH]);
  49468. }
  49469. else
  49470. {
  49471. SendClientMessageEx(i, COLOR_YELLOW, "* [%s %s{FFFF00}] %s: %s *", GetAdminDivision(playerid), GetAdminRank1(playerid), adminname, params);
  49472. }
  49473. }
  49474. }
  49475. return 1;
  49476. }
  49477. CMD:fa(playerid, params[])
  49478. {
  49479. if(PlayerData[playerid][pAdmin] < 1 && !PlayerData[playerid][pFormerAdmin])
  49480. {
  49481. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  49482. }
  49483. if(isnull(params))
  49484. {
  49485. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /fa [Former Admin chat]");
  49486. }
  49487. if(PlayerData[playerid][pToggleAdmin])
  49488. {
  49489. return SendClientMessage(playerid, COLOR_GREY, "You can't speak in the Former Admin chat as you have it toggled.");
  49490. }
  49491. foreach(new i : Player)
  49492. {
  49493. if((PlayerData[i][pAdmin] > 0 || PlayerData[i][pFormerAdmin]) && !PlayerData[i][pToggleAdmin])
  49494. {
  49495. if(strlen(params) > MAX_SPLIT_LENGTH)
  49496. {
  49497. SendClientMessageEx(i, COLOR_RETIRED, "* [%s] %s: %.*s... *", GetAdminRank(playerid), GetRPName(playerid), MAX_SPLIT_LENGTH, params);
  49498. SendClientMessageEx(i, COLOR_RETIRED, "* [%s] %s: ...%s *", GetAdminRank(playerid), GetRPName(playerid), params[MAX_SPLIT_LENGTH]);
  49499. }
  49500. else
  49501. {
  49502. SendClientMessageEx(i, COLOR_RETIRED, "* [%s] %s: %s *", GetAdminRank(playerid), GetRPName(playerid), params);
  49503. }
  49504. }
  49505. }
  49506. return 1;
  49507. }
  49508. new const randFirstname[][] = {
  49509. "Alex", "Blake", "Hayden", "Devin", "Jane", "John", "Austin", "Richy", "Richard", "Alexander",
  49510. "Salem", "Daisy", "Janey", "Casey", "Orlando", "Jake", "Kevin", "Faze", "India", "Vene", "Demorgan", "Jazzy", "Dori", "Jess", "Linda",
  49511. "Dave", "Jessica", "Masey", "Rose", "Romeo", "Juliet", "Ben", "Lenny", "Kayle", "Emily", "Tori", "Michael", "Mike", "Mikey", "Christian", "Josh", "Travis",
  49512. "Dulles", "William", "Stephen", "Peter", "Quin", "Raze", "Morgan", "Oliver", "Madison", "Mark", "Robin", "Tyler", "Sophie", "Sophia", "Brianna", "Azure", "Steely", "Lee",
  49513. "Ray", "Harry", "Ralph", "Anthony", "Alan", "Shawn", "Kanye", "Kane", "Stephanie", "Kimmy", "Kim" "Fox", "Bob", "Adore", "Lexi", "Rex", "Hex", "Xav", "Wally", "Stone", "Kate", "Katie", "Patrick", "James", "Thomas", "Hank",
  49514. "George", "David", "Dori", "Dante", "Jordan", "Arnold" };
  49515. new const randLastname[][] = {
  49516. "Craig", "Jones", "Johnson", "Kennedy", "Hinson", "Doe", "Silva", "Nigeria", "Branche", "Erickson", "Defolt", "Morgan",
  49517. "Stalovsky", "Box", "Wards", "Sanders", "Williams", "Trump", "Nixon", "Jackson", "Houston", "Hilfiger", "Gucci", "Washington", "Clinton",
  49518. "Cromwell", "Prime", "Connor", "ONeil", "Rose", "Ginger", "Dodge", "McKing", "Guerreo", "Jackson", "Cartel", "Devil", "Rolex", "Street", "Molintino",
  49519. "Martin", "Stone", "Henderson", "Brady", "Wilkinson" }; // keep adding names if u want
  49520. getRandomRPName()
  49521. {
  49522. new rand[2], name[60];
  49523. rand[0] = random(sizeof(randFirstname));
  49524. rand[1] = random(sizeof(randLastname));
  49525. if(strcmp(randFirstname[rand[0]], randLastname[rand[1]], true) != 0)
  49526. {
  49527. format(name, sizeof(name), "%s_%s", randFirstname[rand[0]], randLastname[rand[1]]);
  49528. if(strlen(name) < MAX_PLAYER_NAME)
  49529. {
  49530. return name;
  49531. }
  49532. }
  49533. return getRandomRPName();
  49534. }
  49535. forward OnUndercover(playerid, tog, name[], level, Float:hp, Float:armor);
  49536. public OnUndercover(playerid, tog, name[], level, Float:hp, Float:armor)
  49537. {
  49538. if(tog)
  49539. {
  49540. if(cache_get_row_count(connectionID))
  49541. {
  49542. SendClientMessage(playerid, COLOR_GREY, "The name specified is taken already.");
  49543. }
  49544. else
  49545. {
  49546. Log_Write("log_admin", "(undercover) %s (uid: %i) changed their name to %s.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], name);
  49547. SendClientMessageEx(playerid, COLOR_WHITE, "* You changed your name from %s to %s.", GetRPName(playerid), name);
  49548. PlayerData[playerid][pUndercover][0] = 1;
  49549. PlayerData[playerid][pUndercover][1] = PlayerData[playerid][pLevel];
  49550. PlayerData[playerid][pUndercoverHP] = PlayerData[playerid][pHealth];
  49551. PlayerData[playerid][pUndercoverAR] = PlayerData[playerid][pArmor];
  49552. PlayerData[playerid][pLevel] = level;
  49553. SetPlayerHealth(playerid, hp);
  49554. SetScriptArmour(playerid, armor);
  49555. SetPlayerName(playerid, name);
  49556. PlayerData[playerid][pAdminHide] = 1;
  49557. SendClientMessage(playerid, COLOR_AQUA, "You are now hidden in /admins and your admin rank no longer shows in /a, /g or /o.");
  49558. }
  49559. }
  49560. else
  49561. {
  49562. SetPlayerName(playerid, PlayerData[playerid][pUsername]);
  49563. PlayerData[playerid][pUndercover][0] = 0;
  49564. PlayerData[playerid][pLevel] = PlayerData[playerid][pUndercover][1];
  49565. SetPlayerHealth(playerid, PlayerData[playerid][pUndercoverHP]);
  49566. SetScriptArmour(playerid, PlayerData[playerid][pUndercoverAR]);
  49567. PlayerData[playerid][pAdminHide] = 0;
  49568. SendClientMessage(playerid, COLOR_AQUA, "You are no longer hidden as an administrator.");
  49569. }
  49570. return 1;
  49571. }
  49572. CMD:undercover(playerid, params[])
  49573. {
  49574. new name[MAX_PLAYER_NAME], level, Float:ar;
  49575. if(PlayerData[playerid][pAdmin] >= ASST_MANAGEMENT && !PlayerData[playerid][pAdminDuty])
  49576. {
  49577. if(sscanf(params, "s[24]", name))
  49578. {
  49579. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /undercover [name | random | off]");
  49580. }
  49581. if(PlayerData[playerid][pUndercover][0])
  49582. {
  49583. OnUndercover(playerid, 0, "", 0, 0.0, 0.0);
  49584. SendClientMessageEx(playerid, COLOR_WHITE, "* You are no longer undercover.", GetRPName(playerid), name);
  49585. }
  49586. else if(!strcmp(name, "random", true)) {
  49587. strcpy(name, getRandomRPName());
  49588. level = random(9) + 1;
  49589. ar = float(random(50)+50);
  49590. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid FROM "#TABLE_USERS" WHERE username = '%e'", name);
  49591. mysql_tquery(connectionID, queryBuffer, "OnUndercover", "iisiff", playerid, 1, name, level, 100.0, ar);
  49592. }
  49593. else if(strfind(name, "_") != -1) {
  49594. //format(name, MAX_PLAYER_NAME, params);
  49595. level = random(9) + 1;
  49596. ar = float(random(50)+50);
  49597. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid FROM "#TABLE_USERS" WHERE username = '%e'", name);
  49598. mysql_tquery(connectionID, queryBuffer, "OnUndercover", "iisiff", playerid, 1, name, level, 100.0, ar);
  49599. }
  49600. else
  49601. {
  49602. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /undercover [Firstname_Lastname | random]");
  49603. }
  49604. }
  49605. else SendClientMessage(playerid, COLOR_GREY, "Not Authorized / You need to be off duty to use this command.");
  49606. return 1;
  49607. }
  49608. CMD:ah(playerid, params[])
  49609. {
  49610. return callcmd::adminhelp(playerid, params);
  49611. }
  49612. CMD:ahelp(playerid, params[])
  49613. {
  49614. return callcmd::adminhelp(playerid, params);
  49615. }
  49616. CMD:adminhelp(playerid, params[])
  49617. {
  49618. if(PlayerData[playerid][pAdmin] < 1)
  49619. {
  49620. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  49621. }
  49622. if(PlayerData[playerid][pAdmin] >= LEVEL_SECRET_ADMIN)
  49623. {
  49624. SendClientMessage(playerid, COLOR_GREY5, "SECRET ADMIN:{DDDDDD} /a, /clearchat, /skick, /sban, /sjail, /pinfo, /spec, /reports, /admins, /flag, /removeflag, /listflags, /check, /dm.");
  49625. SendClientMessage(playerid, COLOR_GREY5, "SECRET ADMIN:{DDDDDD} /ocheck, /oflag, /listflagged, /hhcheck, /kills, /shots, /damages.");
  49626. }
  49627. if(PlayerData[playerid][pAdmin] >= JUNIOR_ADMIN)
  49628. {
  49629. SendClientMessage(playerid, 0x99CCFFFF, "JUNIOR ADMIN:{DDDDDD} /aduty, /adminname, /kick, /ban, /warn, /slap, /ar, /tr, /rr, /cr, /setint, /setvw.");
  49630. SendClientMessage(playerid, 0x99CCFFFF, "JUNIOR ADMIN:{DDDDDD} /setskin, /revive, /heject, /goto, /gethere, /gotocar, /getcar, /gotocoords, /gotoint, /listen, /jetpack, /sendto.");
  49631. SendClientMessage(playerid, 0x99CCFFFF, "JUNIOR ADMIN:{DDDDDD} /freeze, /unfreeze, /rwarn, /runmute, /nmute, /admute, /hmute, /gmute, /skiptut, /listguns, /disarm.");
  49632. SendClientMessage(playerid, 0x99CCFFFF, "JUNIOR ADMIN:{DDDDDD} /jail, /listjailed, /lastactive, /checkinv, /afklist, /acceptname, /denyname, /namechanges, /nrn.");
  49633. SendClientMessage(playerid, 0x99CCFFFF, "JUNIOR ADMIN:{DDDDDD} /prisoninfo, /relog, /rtnc, /sth, /nro, /nao, /nor, /post, /contracts, /denyhit, /(o)dm.");
  49634. }
  49635. if(PlayerData[playerid][pAdmin] >= GENERAL_ADMIN)
  49636. {
  49637. SendClientMessage(playerid, COLOR_LIMEGREEN, "GENERAL ADMIN:{DDDDDD} /ban, /(o)getip, /iplookup");
  49638. SendClientMessage(playerid, COLOR_LIMEGREEN, "GENERAL ADMIN:{DDDDDD} /prison, /sprison, /oprison, /release, /fine, /pfine, /ofine, /sethp, /setarmor, /mark, /gotomark.");
  49639. SendClientMessage(playerid, COLOR_LIMEGREEN, "GENERAL ADMIN:{DDDDDD} /veh, /destroyveh, /respawncars, /broadcast, /fixveh, /healrange.");
  49640. SendClientMessage(playerid, COLOR_LIMEGREEN, "GENERAL ADMIN:{DDDDDD} /resetadtimer, /baninfo, /banhistory, /togooc, /tognewbie, /togglobal, /listpvehs, /despawnpveh.");
  49641. SendClientMessage(playerid, COLOR_LIMEGREEN, "GENERAL ADMIN:{DDDDDD} /aclearwanted, /removedm, /savevehicle, /editvehicle, /removevehicle, /vehicleinfo, /refillcars, /refilldrug.");
  49642. SendClientMessage(playerid, COLOR_LIMEGREEN, "GENERAL ADMIN:{DDDDDD} /alock, /duel, /startchat, /invitechat, /kickchat, /endchat, /freezerange, /unfreezerange, /reviverange.");
  49643. }
  49644. if(PlayerData[playerid][pAdmin] >= SENIOR_ADMIN)
  49645. {
  49646. SendClientMessage(playerid, COLOR_LIGHTORANGE, "SENIOR ADMIN:{DDDDDD} /givegun, /setname, /setweather, /permaban, /oban, /unban, /unbanip, /banip, /lockaccount, /unlockaccount.");
  49647. SendClientMessage(playerid, COLOR_LIGHTORANGE, "SENIOR ADMIN:{DDDDDD} /explode, /event, /gplay, /gplayurl, /gstop, /sethpall, /setarmorall, /settime, /addtoevent, /eventkick.");
  49648. }
  49649. if(PlayerData[playerid][pAdmin] >= HEAD_ADMIN)
  49650. {
  49651. SendClientMessage(playerid, COLOR_LIGHTRED, "HEAD ADMIN:{DDDDDD} /setstat, /givemoney, /givemoneyall, /givecookie, /givecookieall, /setvip, /osetvip, /saveaccounts.");
  49652. SendClientMessage(playerid, COLOR_LIGHTRED, "HEAD ADMIN:{DDDDDD} /removevip, /rangeban, /deleteaccount, /doublexp, /previewint, /nearest, /dynamichelp, /listassets.");
  49653. SendClientMessage(playerid, COLOR_LIGHTRED, "HEAD ADMIN:{DDDDDD} /adestroyboombox, /setbanktimer, /resetrobbery, /addtorobbery, /givepayday, /givepveh, /givedoublexp.");
  49654. }
  49655. if(PlayerData[playerid][pAdmin] >= GENERAL_MANAGER)
  49656. {
  49657. SendClientMessage(playerid, COLOR_NAVYBLUE, "G. MANAGER:{DDDDDD} /makeadmin, /makehelper, /omakeadmin, /omakehelper, /setmotd, /setstaff, /forceaduty, /setpassword.");
  49658. SendClientMessage(playerid, COLOR_NAVYBLUE, "G. MANAGER:{DDDDDD} /olisthelpers, /gmx, /sellinactive, /inactivecheck, /changelist, /fixplayerid, /giveachievement.");
  49659. SendClientMessage(playerid, COLOR_NAVYBLUE, "G. MANAGER:{DDDDDD} /settitle, /oadmins, /disablevpn, /landperms, /forcedeleteobject, /obscurent, /ovips.");
  49660. }
  49661. if(PlayerData[playerid][pAdmin] >= MANAGEMENT)
  49662. {
  49663. SendClientMessage(playerid, COLOR_VIP, "MANAGEMENT:{DDDDDD} /serversetting, /setdamages, /adminstrike, /doublexp, /enddoublexp");
  49664. }
  49665. return 1;
  49666. }
  49667. CMD:reports(playerid, params[])
  49668. {
  49669. if(PlayerData[playerid][pAdmin] < 1)
  49670. {
  49671. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  49672. }
  49673. SendClientMessage(playerid, COLOR_NAVYBLUE, "__________ Pending Reports __________");
  49674. for(new i = 0; i < MAX_REPORTS; i ++)
  49675. {
  49676. if(ReportInfo[i][rExists] && !ReportInfo[i][rAccepted])
  49677. {
  49678. SendClientMessageEx(playerid, COLOR_GREY2, "[Report ID:{ff0000} %i{afafaf}] %s[%i] reports: %s", i, GetRPName(ReportInfo[i][rReporter]), ReportInfo[i][rReporter], ReportInfo[i][rText]);
  49679. }
  49680. }
  49681. SendClientMessage(playerid, COLOR_YELLOW, "* Use /ar [rid] or /tr [rid] to handle these reports.");
  49682. return 1;
  49683. }
  49684. CMD:rtnc(playerid, params[])
  49685. {
  49686. new reportid;
  49687. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  49688. {
  49689. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  49690. }
  49691. if(sscanf(params, "i", reportid))
  49692. {
  49693. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /rtnc [reportid] (Sends to newbie chat)");
  49694. }
  49695. if(!(0 <= reportid < MAX_REPORTS) || !ReportInfo[reportid][rExists])
  49696. {
  49697. return SendClientMessage(playerid, COLOR_GREY, "Invalid report ID.");
  49698. }
  49699. if(ReportInfo[reportid][rAccepted])
  49700. {
  49701. return SendClientMessage(playerid, COLOR_GREY, "The report specified is being handled by another admin.");
  49702. }
  49703. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has sent report %i to newbie chat.", GetRPName(playerid), reportid);
  49704. SendClientMessageEx(ReportInfo[reportid][rReporter], COLOR_GREEN, "%s has redirected your report to the newbie chat.", GetRPName(playerid));
  49705. SendNewbieChatMessage(ReportInfo[reportid][rReporter], ReportInfo[reportid][rText]);
  49706. ReportInfo[reportid][rExists] = 0;
  49707. return 1;
  49708. }
  49709. CMD:sth(playerid, params[])
  49710. {
  49711. new reportid;
  49712. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  49713. {
  49714. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  49715. }
  49716. if(sscanf(params, "i", reportid))
  49717. {
  49718. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sth [reportid] (Sends to helpers)");
  49719. }
  49720. if(!(0 <= reportid < MAX_REPORTS) || !ReportInfo[reportid][rExists])
  49721. {
  49722. return SendClientMessage(playerid, COLOR_GREY, "Invalid report ID.");
  49723. }
  49724. if(ReportInfo[reportid][rAccepted])
  49725. {
  49726. return SendClientMessage(playerid, COLOR_GREY, "The report specified is being handled by another admin.");
  49727. }
  49728. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has sent report %i to helpers.", GetRPName(playerid), reportid);
  49729. SendClientMessageEx(ReportInfo[reportid][rReporter], COLOR_GREEN, "%s has redirected your report to all helpers online.", GetRPName(playerid));
  49730. strcpy(PlayerData[ReportInfo[reportid][rReporter]][pHelpRequest], ReportInfo[reportid][rText], 128);
  49731. SendHelperMessage(COLOR_AQUA, "* Help Request from %s[%i]: %s *", GetRPName(ReportInfo[reportid][rReporter]), ReportInfo[reportid][rReporter], ReportInfo[reportid][rText]);
  49732. PlayerData[playerid][pLastRequest] = gettime();
  49733. ReportInfo[reportid][rExists] = 0;
  49734. return 1;
  49735. }
  49736. CMD:ar(playerid, params[])
  49737. {
  49738. new reportid, chat;
  49739. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  49740. {
  49741. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  49742. }
  49743. if(sscanf(params, "iI(1)", reportid, chat))
  49744. {
  49745. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /ar [reportid] [chat (optional - 0/1)]");
  49746. }
  49747. if(!(0 <= reportid < MAX_REPORTS) || !ReportInfo[reportid][rExists])
  49748. {
  49749. return SendClientMessage(playerid, COLOR_GREY, "Invalid report ID.");
  49750. }
  49751. if(ReportInfo[reportid][rAccepted])
  49752. {
  49753. return SendClientMessage(playerid, COLOR_GREY, "The report specified is being handled by another admin.");
  49754. }
  49755. if(PlayerData[playerid][pActiveReport] >= 0)
  49756. {
  49757. callcmd::cr(playerid, params);
  49758. }
  49759. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s %s has accepted report %i from %s.", GetAdmCmdRank(playerid), GetRPName(playerid), reportid, GetRPName(ReportInfo[reportid][rReporter]));
  49760. if(chat)
  49761. {
  49762. SendClientMessage(playerid, COLOR_WHITE, "You can use /rr to speak with the reporter and /cr to close the report.");
  49763. SendClientMessageEx(ReportInfo[reportid][rReporter], COLOR_GREEN, "%s has accepted your report and is now reviewing it.", GetRPName(playerid));
  49764. SendClientMessage(ReportInfo[reportid][rReporter], COLOR_GREEN, "You can use /rr to reply to the admin handling your report.");
  49765. PlayerData[playerid][pActiveReport] = reportid;
  49766. PlayerData[ReportInfo[reportid][rReporter]][pActiveReport] = reportid;
  49767. ReportInfo[reportid][rHandledBy] = playerid;
  49768. ReportInfo[reportid][rAccepted] = 1;
  49769. }
  49770. else
  49771. {
  49772. SendClientMessageEx(ReportInfo[reportid][rReporter], COLOR_LIGHTRED, "%s %s has accepted your report and is now reviewing it.",GetAdmCmdRank(playerid), GetRPName(playerid));
  49773. ReportInfo[reportid][rExists] = 0;
  49774. }
  49775. PlayerData[playerid][pReports]++;
  49776. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET reports = %i WHERE uid = %i", PlayerData[playerid][pReports], PlayerData[playerid][pID]);
  49777. mysql_tquery(connectionID, queryBuffer);
  49778. return 1;
  49779. }
  49780. CMD:tr(playerid, params[])
  49781. {
  49782. new reportid, reason[128];
  49783. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  49784. {
  49785. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  49786. }
  49787. if(sscanf(params, "iS(N/A)[128]", reportid, reason))
  49788. {
  49789. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /tr [reportid] [reason (optional)]");
  49790. }
  49791. if(!(0 <= reportid < MAX_REPORTS) || !ReportInfo[reportid][rExists])
  49792. {
  49793. return SendClientMessage(playerid, COLOR_GREY, "Invalid report ID.");
  49794. }
  49795. if(ReportInfo[reportid][rAccepted])
  49796. {
  49797. return SendClientMessage(playerid, COLOR_GREY, "The report specified is being handled by another admin.");
  49798. }
  49799. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has trashed report %i from %s, reason: %s", GetRPName(playerid), reportid, GetRPName(ReportInfo[reportid][rReporter]), reason);
  49800. SendClientMessageEx(ReportInfo[reportid][rReporter], COLOR_LIGHTRED, "* %s has trashed your report, reason: %s", GetRPName(playerid), reason);
  49801. ReportInfo[reportid][rExists] = 0;
  49802. return 1;
  49803. }
  49804. CMD:nro(playerid, params[])
  49805. {
  49806. new reportid;
  49807. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  49808. {
  49809. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  49810. }
  49811. if(sscanf(params, "i", reportid))
  49812. {
  49813. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /nro [reportid]");
  49814. SendClientMessage(playerid, COLOR_SYNTAX, "This command will clear a report for not being a rulebreaking offense.");
  49815. return 1;
  49816. }
  49817. if(!(0 <= reportid < MAX_REPORTS) || !ReportInfo[reportid][rExists])
  49818. {
  49819. return SendClientMessage(playerid, COLOR_GREY, "There's not a report that currently exists with this ID.");
  49820. }
  49821. if(ReportInfo[reportid][rAccepted])
  49822. {
  49823. return SendClientMessage(playerid, COLOR_GREY, "This report is already being handled by another administrator.");
  49824. }
  49825. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has trashed report %i from %s as their report involves a non-rulebreaking offense.", GetRPName(playerid), reportid, GetRPName(ReportInfo[reportid][rReporter]));
  49826. SendClientMessageEx(ReportInfo[reportid][rReporter], COLOR_LIGHTRED, "%s has trashed your report as it involves a non-rulebreaking offense", GetRPName(playerid));
  49827. SendClientMessageEx(ReportInfo[reportid][rReporter], COLOR_LIGHTRED, "Please visit our rules page at os-rp.net for a full list of rulebreaking offenses.");
  49828. ReportInfo[reportid][rExists] = 0;
  49829. return 1;
  49830. }
  49831. CMD:nao(playerid, params[])
  49832. {
  49833. new reportid;
  49834. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  49835. {
  49836. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  49837. }
  49838. if(sscanf(params, "i", reportid))
  49839. {
  49840. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /nao [reportid]");
  49841. SendClientMessage(playerid, COLOR_SYNTAX, "This command will clear a report if there isn't a high enough administrator online.");
  49842. return 1;
  49843. }
  49844. if(!(0 <= reportid < MAX_REPORTS) || !ReportInfo[reportid][rExists])
  49845. {
  49846. return SendClientMessage(playerid, COLOR_GREY, "There's not a report that currently exists with this ID.");
  49847. }
  49848. if(ReportInfo[reportid][rAccepted])
  49849. {
  49850. return SendClientMessage(playerid, COLOR_GREY, "This report is already being handled by another administrator.");
  49851. }
  49852. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has trashed report %i from %s as there are no admins online to handle it.", GetRPName(playerid), reportid, GetRPName(ReportInfo[reportid][rReporter]));
  49853. SendClientMessageEx(ReportInfo[reportid][rReporter], COLOR_LIGHTRED, "%s has trashed your report as there no admins online with the authority to handle it.", GetRPName(playerid));
  49854. ReportInfo[reportid][rExists] = 0;
  49855. return 1;
  49856. }
  49857. CMD:ic(playerid, params[])
  49858. {
  49859. new reportid;
  49860. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  49861. {
  49862. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  49863. }
  49864. if(sscanf(params, "i", reportid))
  49865. {
  49866. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /ic [reportid]");
  49867. SendClientMessage(playerid, COLOR_SYNTAX, "This command will clear a report for being an IC issue");
  49868. return 1;
  49869. }
  49870. if(!(0 <= reportid < MAX_REPORTS) || !ReportInfo[reportid][rExists])
  49871. {
  49872. return SendClientMessage(playerid, COLOR_GREY, "There's not a report that currently exists with this ID.");
  49873. }
  49874. if(ReportInfo[reportid][rAccepted])
  49875. {
  49876. return SendClientMessage(playerid, COLOR_GREY, "This report is already being handled by another administrator.");
  49877. }
  49878. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has trashed report %i from %s as it is an in-character issue.", GetRPName(playerid), reportid, GetRPName(ReportInfo[reportid][rReporter]));
  49879. SendClientMessageEx(ReportInfo[reportid][rReporter], COLOR_LIGHTRED, "%s has trashed your report as it is an in-character issue.", GetRPName(playerid));
  49880. ReportInfo[reportid][rExists] = 0;
  49881. return 1;
  49882. }
  49883. CMD:nor(playerid, params[])
  49884. {
  49885. new reportid;
  49886. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  49887. {
  49888. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  49889. }
  49890. if(sscanf(params, "i", reportid))
  49891. {
  49892. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /nor [reportid]");
  49893. SendClientMessage(playerid, COLOR_SYNTAX, "This command will clear a report if the reporters revive request is invalid.");
  49894. return 1;
  49895. }
  49896. if(!(0 <= reportid < MAX_REPORTS) || !ReportInfo[reportid][rExists])
  49897. {
  49898. return SendClientMessage(playerid, COLOR_GREY, "There's not a report that currently exists with this ID.");
  49899. }
  49900. if(ReportInfo[reportid][rAccepted])
  49901. {
  49902. return SendClientMessage(playerid, COLOR_GREY, "This report is already being handled by another administrator.");
  49903. }
  49904. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has trashed report %i from %s as their request for a revive is invalid.", GetRPName(playerid), reportid, GetRPName(ReportInfo[reportid][rReporter]));
  49905. SendClientMessageEx(ReportInfo[reportid][rReporter], COLOR_LIGHTRED, "%s has trashed your report as your request for a revive is invalid. (/phone > call > 911)", GetRPName(playerid));
  49906. ReportInfo[reportid][rExists] = 0;
  49907. return 1;
  49908. }
  49909. CMD:post(playerid, params[])
  49910. {
  49911. new reportid;
  49912. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  49913. {
  49914. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  49915. }
  49916. if(sscanf(params, "i", reportid))
  49917. {
  49918. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /post [reportid]");
  49919. SendClientMessage(playerid, COLOR_SYNTAX, "This command will clear a report and notify the player to post an admin request.");
  49920. return 1;
  49921. }
  49922. if(!(0 <= reportid < MAX_REPORTS) || !ReportInfo[reportid][rExists])
  49923. {
  49924. return SendClientMessage(playerid, COLOR_GREY, "There's not a report that currently exists with this ID.");
  49925. }
  49926. if(ReportInfo[reportid][rAccepted])
  49927. {
  49928. return SendClientMessage(playerid, COLOR_GREY, "This report is already being handled by another administrator.");
  49929. }
  49930. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has trashed report %i from %s as it needs to be handled on the forums.", GetRPName(playerid), reportid, GetRPName(ReportInfo[reportid][rReporter]));
  49931. SendClientMessageEx(ReportInfo[reportid][rReporter], COLOR_LIGHTRED, "%s has trashed your report as your issue at hand must be handled on our forums.", GetRPName(playerid));
  49932. SendClientMessageEx(ReportInfo[reportid][rReporter], COLOR_LIGHTRED, "Please visit our website at os-rp.net in order to to resolve this issue.");
  49933. ReportInfo[reportid][rExists] = 0;
  49934. return 1;
  49935. }
  49936. CMD:norevive(playerid, params[])
  49937. {
  49938. return callcmd::nor(playerid, params);
  49939. }
  49940. CMD:er(playerid, params[])
  49941. {
  49942. return callcmd::cr(playerid, params);
  49943. }
  49944. CMD:bigears(playerid, params[])
  49945. {
  49946. return callcmd::listen(playerid, params);
  49947. }
  49948. CMD:rr(playerid, params[])
  49949. {
  49950. new reportid = PlayerData[playerid][pActiveReport];
  49951. if(reportid == -1)
  49952. {
  49953. return SendClientMessage(playerid, COLOR_GREY, "You have no active report to reply to.");
  49954. }
  49955. if(isnull(params))
  49956. {
  49957. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /rr [reply text]");
  49958. }
  49959. if(ReportInfo[reportid][rReporter] == playerid)
  49960. {
  49961. SendClientMessageEx(ReportInfo[reportid][rHandledBy], COLOR_YELLOW, "* Player %s (ID %i): %s *", GetRPName(playerid), playerid, params);
  49962. SendClientMessageEx(playerid, COLOR_YELLOW, "* Reply to %s (ID %i): %s *", GetRPName(ReportInfo[reportid][rHandledBy]), ReportInfo[reportid][rHandledBy], params);
  49963. }
  49964. else
  49965. {
  49966. SendClientMessageEx(ReportInfo[reportid][rReporter], COLOR_YELLOW, "* Admin %s (ID %i): %s *", GetRPName(playerid), playerid, params);
  49967. SendClientMessageEx(playerid, COLOR_YELLOW, "* Reply to %s (ID %i): %s *", GetRPName(ReportInfo[reportid][rReporter]), ReportInfo[reportid][rReporter], params);
  49968. }
  49969. return 1;
  49970. }
  49971. CMD:cr(playerid, params[])
  49972. {
  49973. new reportid = PlayerData[playerid][pActiveReport];
  49974. if(reportid == -1)
  49975. {
  49976. return SendClientMessage(playerid, COLOR_GREY, "You have no active report which you can close.");
  49977. }
  49978. if(ReportInfo[reportid][rReporter] == playerid)
  49979. {
  49980. SendClientMessageEx(ReportInfo[reportid][rHandledBy], COLOR_YELLOW, "* Player %s has closed the report. *", GetRPName(playerid));
  49981. SendClientMessageEx(playerid, COLOR_GREEN, "You have closed the report and ended your conversation with the admin.");
  49982. }
  49983. else
  49984. {
  49985. SendClientMessageEx(ReportInfo[reportid][rReporter], COLOR_YELLOW, "* Administrator %s has closed the report. *", GetRPName(playerid));
  49986. SendClientMessageEx(playerid, COLOR_GREEN, "You have closed the report and ended your conversation with the reporter.");
  49987. }
  49988. if(ReportInfo[reportid][rReporter] != INVALID_PLAYER_ID)
  49989. {
  49990. PlayerData[ReportInfo[reportid][rReporter]][pActiveReport] = -1;
  49991. }
  49992. if(ReportInfo[reportid][rHandledBy] != INVALID_PLAYER_ID)
  49993. {
  49994. PlayerData[ReportInfo[reportid][rHandledBy]][pActiveReport] = -1;
  49995. }
  49996. ReportInfo[reportid][rExists] = 0;
  49997. ReportInfo[reportid][rAccepted] = 0;
  49998. ReportInfo[reportid][rReporter] = INVALID_PLAYER_ID;
  49999. ReportInfo[reportid][rHandledBy] = INVALID_PLAYER_ID;
  50000. PlayerData[playerid][pActiveReport] = -1;
  50001. return 1;
  50002. }
  50003. CMD:skick(playerid, params[])
  50004. {
  50005. new targetid, reason[128];
  50006. if(PlayerData[playerid][pAdmin] < 1)
  50007. {
  50008. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  50009. }
  50010. if(sscanf(params, "us[128]", targetid, reason))
  50011. {
  50012. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /skick [playerid] [reason]");
  50013. }
  50014. if(!IsPlayerConnected(targetid))
  50015. {
  50016. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  50017. }
  50018. if(PlayerData[targetid][pAdmin] > PlayerData[playerid][pAdmin])
  50019. {
  50020. return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be kicked.");
  50021. }
  50022. Log_Write("log_punishments", "%s (uid: %i) silently kicked %s (uid: %i), reason: %s", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], reason);
  50023. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has silently kicked %s, reason: %s", GetRPName(playerid), GetRPName(targetid), reason);
  50024. KickPlayer(targetid);
  50025. return 1;
  50026. }
  50027. CMD:sban(playerid, params[])
  50028. {
  50029. new targetid, reason[128];
  50030. if(PlayerData[playerid][pAdmin] < 1)
  50031. {
  50032. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  50033. }
  50034. if(sscanf(params, "us[128]", targetid, reason))
  50035. {
  50036. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sban [playerid] [reason]");
  50037. }
  50038. if(!IsPlayerConnected(targetid))
  50039. {
  50040. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  50041. }
  50042. if(PlayerData[targetid][pAdmin] > PlayerData[playerid][pAdmin])
  50043. {
  50044. return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be banned.");
  50045. }
  50046. Log_Write("log_punishments", "%s (uid: %i) silently banned %s (uid: %i), reason: %s", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], reason);
  50047. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s was silently banned by %s, reason: %s", GetRPName(targetid), GetRPName(playerid), reason);
  50048. BanPlayer(targetid, GetPlayerNameEx(playerid), reason, false);
  50049. return 1;
  50050. }
  50051. CMD:sjail(playerid, params[])
  50052. {
  50053. new targetid, minutes, reason[128];
  50054. if(PlayerData[playerid][pAdmin] < 1)
  50055. {
  50056. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  50057. }
  50058. if(sscanf(params, "uis[128]", targetid, minutes, reason))
  50059. {
  50060. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sjail [playerid] [minutes] [reason]");
  50061. }
  50062. if(!IsPlayerConnected(targetid))
  50063. {
  50064. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  50065. }
  50066. if(PlayerData[targetid][pAdmin] > PlayerData[playerid][pAdmin])
  50067. {
  50068. return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be jailed.");
  50069. }
  50070. if(!PlayerData[targetid][pLogged])
  50071. {
  50072. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet.");
  50073. }
  50074. if(minutes < 0)
  50075. {
  50076. return SendClientMessage(playerid, COLOR_GREY, "The amount of minutes specified cannot be below zero.");
  50077. }
  50078. PlayerData[targetid][pJailType] = 1;
  50079. PlayerData[targetid][pJailTime] = minutes * 60;
  50080. ResetPlayerWeaponsEx(targetid);
  50081. ResetPlayer(targetid);
  50082. SetPlayerInJail(targetid);
  50083. Log_Write("log_punishments", "%s (uid: %i) silently jailed %s (uid: %i) for %i minutes, reason: %s", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], minutes, reason);
  50084. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was jailed for %i minutes by an Admin, reason: %s", GetRPName(targetid), minutes, reason);
  50085. SendClientMessageEx(targetid, COLOR_AQUA, "* You have been jailed for %i minutes by an admin.", minutes);
  50086. return 1;
  50087. }
  50088. CMD:pinfo(playerid, params[])
  50089. {
  50090. new targetid;
  50091. if(PlayerData[playerid][pAdmin] < 1)
  50092. {
  50093. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  50094. }
  50095. if(sscanf(params, "u", targetid))
  50096. {
  50097. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /pinfo [playerid]");
  50098. }
  50099. if(!IsPlayerConnected(targetid))
  50100. {
  50101. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  50102. }
  50103. SendClientMessageEx(playerid, COLOR_GREY1, "(ID: %i) - (Name: %s) - (Ping: %i) - (FPS: %i) - (Packet Loss: %.1f%c)", targetid, GetRPName(targetid), GetPlayerPing(targetid), PlayerData[targetid][pFPS], NetStats_PacketLossPercent(targetid), '%');
  50104. return 1;
  50105. }
  50106. CMD:admins(playerid, params[])
  50107. {
  50108. if(PlayerData[playerid][pAdmin] < 1 && !PlayerData[playerid][pDeveloper])
  50109. {
  50110. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  50111. }
  50112. SendClientMessage(playerid, COLOR_NAVYBLUE, "_________ Admins Online _________");
  50113. foreach(new i : Player)
  50114. {
  50115. if(PlayerData[i][pAdmin] > 0 && !PlayerData[i][pUndercover][0] || PlayerData[playerid][pAdmin] >= GENERAL_MANAGER && PlayerData[i][pUndercover][0])
  50116. {
  50117. new division[5];
  50118. strcpy(division, GetAdminDivision(i));
  50119. if(strlen(division) < 1) division = "None";
  50120. if(!strcmp(PlayerData[i][pAdminName], "None", true))
  50121. SendClientMessageEx(playerid, COLOR_GREY2, "(ID: %i) %s %s - Division: %s - Status: %s{C8C8C8} - Reports Handled: %i - Tabbed: %s", i, GetAdminRank(i), PlayerData[i][pUsername], division, (PlayerData[i][pAdminDuty]) ? ("{00AA00}On Duty") : ("Off Duty"), PlayerData[i][pReports], (PlayerData[i][pAFK]) ? ("Yes") : ("No"));
  50122. else
  50123. SendClientMessageEx(playerid, COLOR_GREY2, "(ID: %i) %s %s (%s) - Division: %s - Status: %s{C8C8C8} - Reports Handled: %i - Tabbed: %s", i, GetAdminRank(i), PlayerData[i][pUsername], PlayerData[i][pAdminName], division, (PlayerData[i][pAdminDuty]) ? ("{00AA00}On Duty") : ("Off Duty"), PlayerData[i][pReports], (PlayerData[i][pAFK]) ? ("Yes") : ("No"));
  50124. }
  50125. }
  50126. return 1;
  50127. }
  50128. CMD:checknewbies(playerid, params[])
  50129. {
  50130. new targetid;
  50131. if(!PlayerData[playerid][pAdmin] && PlayerData[playerid][pHelper] < 3)
  50132. {
  50133. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  50134. }
  50135. if(sscanf(params, "u", targetid))
  50136. {
  50137. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /checknewbies [playerid]");
  50138. }
  50139. SendClientMessageEx(playerid, COLOR_GREY, "Level %i Player %s has used newbie {00FF00}%s times.", PlayerData[targetid][pLevel], GetRPName(targetid), FormatNumber(PlayerData[targetid][pNewbies], 0));
  50140. return 1;
  50141. }
  50142. CMD:helpers(playerid, params[])
  50143. {
  50144. SendClientMessage(playerid, COLOR_NAVYBLUE, "_________ Helpers Online _________");
  50145. foreach(new i : Player)
  50146. {
  50147. if(PlayerData[i][pHelper] > 0 && !PlayerData[i][pPassport] && !PlayerData[i][pUndercover][0])
  50148. {
  50149. if(PlayerData[playerid][pAdmin] > 0 || PlayerData[playerid][pHelper] > 0)
  50150. SendClientMessageEx(playerid, COLOR_GREY2, "(ID: %i) %s %s - Help Requests: %s - Newbies: %s", i, GetHelperRank(i), GetRPName(i), FormatNumber(PlayerData[i][pHelpRequests], 0), FormatNumber(PlayerData[i][pNewbies], 0));
  50151. else
  50152. SendClientMessageEx(playerid, COLOR_GREY2, "(ID: %i) %s %s", i, GetHelperRank(i), GetRPName(i));
  50153. }
  50154. }
  50155. return 1;
  50156. }
  50157. CMD:flag(playerid, params[])
  50158. {
  50159. new targetid, desc[128];
  50160. if(PlayerData[playerid][pAdmin] < 1)
  50161. {
  50162. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  50163. }
  50164. if(sscanf(params, "us[128]", targetid, desc))
  50165. {
  50166. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /flag [playerid] [description]");
  50167. }
  50168. if(!IsPlayerConnected(targetid))
  50169. {
  50170. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  50171. }
  50172. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO flags VALUES(null, %i, '%s', NOW(), '%e')", PlayerData[targetid][pID], GetPlayerNameEx(playerid), desc);
  50173. mysql_tquery(connectionID, queryBuffer);
  50174. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s flagged %s's account for '%s'.", GetRPName(playerid), GetRPName(targetid), desc);
  50175. return 1;
  50176. }
  50177. CMD:oflag(playerid, params[])
  50178. {
  50179. new name[24], desc[128];
  50180. if(PlayerData[playerid][pAdmin] < 1)
  50181. {
  50182. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  50183. }
  50184. if(sscanf(params, "s[24]s[128]", name, desc))
  50185. {
  50186. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /oflag [username] [description]");
  50187. }
  50188. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid FROM "#TABLE_USERS" WHERE username = '%e'", name);
  50189. mysql_tquery(connectionID, queryBuffer, "OnAdminOfflineFlag", "iss", playerid, name, desc);
  50190. return 1;
  50191. }
  50192. CMD:listflagged(playerid, params[])
  50193. {
  50194. if(PlayerData[playerid][pAdmin] < 1)
  50195. {
  50196. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  50197. }
  50198. mysql_tquery(connectionID, "SELECT b.username FROM flags a, "#TABLE_USERS" b WHERE a.uid = b.uid ORDER BY b.username", "OnQueryFinished", "ii", THREAD_LIST_FLAGGED, playerid);
  50199. return 1;
  50200. }
  50201. CMD:ocheck(playerid, params[])
  50202. {
  50203. new name[24];
  50204. if(PlayerData[playerid][pAdmin] < 1 && !PlayerData[playerid][pHumanResources])
  50205. {
  50206. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  50207. }
  50208. if(sscanf(params, "s[24]", name))
  50209. {
  50210. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /ocheck [username]");
  50211. }
  50212. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM "#TABLE_USERS" WHERE username = '%e'", name);
  50213. mysql_tquery(connectionID, queryBuffer, "OnAdminOfflineCheck", "is", playerid, name);
  50214. return 1;
  50215. }
  50216. CMD:removeflag(playerid, params[])
  50217. {
  50218. new targetid;
  50219. if(PlayerData[playerid][pAdmin] < 1)
  50220. {
  50221. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  50222. }
  50223. if(sscanf(params, "u", targetid))
  50224. {
  50225. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /removeflag [playerid]");
  50226. }
  50227. if(!IsPlayerConnected(targetid))
  50228. {
  50229. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  50230. }
  50231. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM flags WHERE uid = %i", PlayerData[targetid][pID]);
  50232. mysql_tquery(connectionID, queryBuffer, "OnAdminListFlagsForRemoval", "ii", playerid, targetid);
  50233. return 1;
  50234. }
  50235. CMD:listflags(playerid, params[])
  50236. {
  50237. new targetid;
  50238. if(PlayerData[playerid][pAdmin] < 1)
  50239. {
  50240. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  50241. }
  50242. if(sscanf(params, "u", targetid))
  50243. {
  50244. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /listflags [playerid]");
  50245. }
  50246. if(!IsPlayerConnected(targetid))
  50247. {
  50248. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  50249. }
  50250. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM flags WHERE uid = %i ORDER BY date DESC", PlayerData[targetid][pID]);
  50251. mysql_tquery(connectionID, queryBuffer, "OnListPlayerFlags", "ii", playerid, targetid);
  50252. return 1;
  50253. }
  50254. CMD:hhcheck(playerid, params[])
  50255. {
  50256. new targetid;
  50257. if(PlayerData[playerid][pAdmin] < 1)
  50258. {
  50259. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  50260. }
  50261. if(sscanf(params, "u", targetid))
  50262. {
  50263. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /hhcheck [playerid]");
  50264. }
  50265. if(!IsPlayerConnected(targetid))
  50266. {
  50267. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  50268. }
  50269. if(PlayerData[targetid][pHHCheck])
  50270. {
  50271. return SendClientMessage(playerid, COLOR_GREY, "That player is already being checked for health hacks.");
  50272. }
  50273. if(gettime() - PlayerData[playerid][pLastUpdate] >= 3)
  50274. {
  50275. return SendClientMessage(playerid, COLOR_GREY, "You can't initiate this check on a tabbed player.");
  50276. }
  50277. GetPlayerHealth(targetid, PlayerData[targetid][pHealth]);
  50278. PlayerData[targetid][pHHCheck] = 1;
  50279. PlayerData[targetid][pHHTime] = 5;
  50280. PlayerData[targetid][pHHRounded] = GetPlayerHealthEx(targetid);
  50281. PlayerData[targetid][pHHCount] = 0;
  50282. SetPlayerHealth(targetid, random(100) + 1);
  50283. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has started the health hack check on %s.", GetRPName(playerid), GetRPName(targetid));
  50284. return 1;
  50285. }
  50286. CMD:spec(playerid, params[])
  50287. {
  50288. new targetid;
  50289. if(PlayerData[playerid][pAdmin] < 1)
  50290. {
  50291. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  50292. }
  50293. if(!strcmp(params, "off", true) && GetPlayerState(playerid) == PLAYER_STATE_SPECTATING)
  50294. {
  50295. SendClientMessageEx(playerid, COLOR_ORANGE, "You are no longer spectating %s (ID %i).", GetRPName(PlayerData[playerid][pSpectating]), PlayerData[playerid][pSpectating]);
  50296. PlayerData[playerid][pSpectating] = INVALID_PLAYER_ID;
  50297. SetPlayerToSpawn(playerid);
  50298. if(PlayerData[playerid][pAdmin] == 1)
  50299. {
  50300. PlayerData[playerid][pTogglePhone] = 0;
  50301. }
  50302. return 1;
  50303. }
  50304. if(sscanf(params, "u", targetid))
  50305. {
  50306. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /spec [playerid/off]");
  50307. }
  50308. if(!IsPlayerConnected(targetid))
  50309. {
  50310. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  50311. }
  50312. if(targetid == playerid)
  50313. {
  50314. return SendClientMessage(playerid, COLOR_GREY, "You can't spectate yourself.");
  50315. }
  50316. if(!IsPlayerSpawned(targetid))
  50317. {
  50318. return SendClientMessage(playerid, COLOR_GREY, "The player specified is either not spawned, or spectating.");
  50319. }
  50320. if(PlayerData[playerid][pAdmin] == 1)
  50321. {
  50322. PlayerData[playerid][pTogglePhone] = 1;
  50323. }
  50324. SavePlayerVariables(playerid);
  50325. TogglePlayerSpectating(playerid, 1);
  50326. SetPlayerInterior(playerid, GetPlayerInterior(targetid));
  50327. SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(targetid));
  50328. if(IsPlayerInAnyVehicle(targetid))
  50329. {
  50330. PlayerSpectateVehicle(playerid, GetPlayerVehicleID(targetid));
  50331. }
  50332. else
  50333. {
  50334. PlayerSpectatePlayer(playerid, targetid);
  50335. }
  50336. RefreshPlayerTextdraws(playerid);
  50337. PlayerData[playerid][pSpectating] = targetid;
  50338. SendClientMessageEx(playerid, COLOR_ORANGE, "You are now spectating %s (ID %i).", GetRPName(PlayerData[playerid][pSpectating]), PlayerData[playerid][pSpectating]);
  50339. return 1;
  50340. }
  50341. CMD:allhunt(playerid, params[])
  50342. {
  50343. new targetid, weaponid;
  50344. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  50345. {
  50346. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  50347. }
  50348. if(sscanf(params, "u", targetid, weaponid))
  50349. {
  50350. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /allhunt [targetid] [weapon (0 for wepset)]");
  50351. }
  50352. if(PlayerData[targetid][pHours] < 2 || PlayerData[targetid][pWeaponRestricted] > 0)
  50353. {
  50354. return SendClientMessage(playerid, COLOR_GREY, "That player is either weapon restricted or played less than two playing hours.");
  50355. }
  50356. if(weaponid == 38 && PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  50357. {
  50358. return SendClientMessage(playerid, COLOR_GREY, "The minigun was disabled due to abuse.");
  50359. }
  50360. SavePlayerVariables(targetid);
  50361. ResetPlayerWeapons(targetid);
  50362. if(weaponid != 0 && (1 <= weaponid <= 46))
  50363. {
  50364. GivePlayerWeaponEx(weaponid, weaponid, true);
  50365. }
  50366. else
  50367. {
  50368. GivePlayerWeaponEx(targetid, 24, true);
  50369. GivePlayerWeaponEx(targetid, 27, true);
  50370. GivePlayerWeaponEx(targetid, 29, true);
  50371. GivePlayerWeaponEx(targetid, 31, true);
  50372. GivePlayerWeaponEx(targetid, 34, true);
  50373. }
  50374. PlayerData[targetid][pJoinedEvent] = 1;
  50375. PlayerData[targetid][pHunted] = 1;
  50376. foreach(new i : Player)
  50377. {
  50378. if(PlayerData[i][pLogged] && GetPlayerInterior(i) == GetPlayerInterior(targetid))
  50379. {
  50380. SetPlayerMarkerForPlayer(i, targetid, COLOR_RETIRED);
  50381. }
  50382. }
  50383. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s has made %s a hunted. Kill them to win a prize!", GetRPName(playerid), GetRPName(targetid));
  50384. return 1;
  50385. }
  50386. CMD:quiz(playerid, params[])
  50387. {
  50388. new option[10], param[32];
  50389. if(sscanf(params, "s[10]S()[32]", option, param))
  50390. {
  50391. if(PlayerData[playerid][pAdmin] >= JUNIOR_ADMIN)
  50392. {
  50393. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /quiz [option]");
  50394. SendClientMessage(playerid, COLOR_SYNTAX, "List of Options: Create, End, Edit, Answer");
  50395. }
  50396. else
  50397. {
  50398. //SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /quiz answer [text]");
  50399. strcpy(option, "answer");
  50400. }
  50401. return 1;
  50402. }
  50403. if(!strcmp(option, "create", true))
  50404. {
  50405. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN) return 1;
  50406. if(isnull(quizQuestion))
  50407. {
  50408. if(CreateQuiz == -1)
  50409. {
  50410. ShowDialogToPlayer(playerid, DIALOG_CREATEQUIZ);
  50411. }
  50412. }
  50413. else
  50414. {
  50415. SendClientMessage(playerid, COLOR_GREY, "There is already an on-going quiz!");
  50416. }
  50417. return 1;
  50418. }
  50419. else if(!strcmp(option, "end", true))
  50420. {
  50421. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN) return 1;
  50422. if(!isnull(quizQuestion))
  50423. {
  50424. quizQuestion[0] = EOS;
  50425. SendClientMessageToAllEx(COLOR_RETIRED, "The quiz was ended by %s, answer: %s", GetRPName(playerid), quizAnswer);
  50426. quizAnswer[0] = EOS;
  50427. }
  50428. return 1;
  50429. }
  50430. else if(!strcmp(option, "edit", true))
  50431. {
  50432. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN) return 1;
  50433. if(strlen(param) > 0)
  50434. {
  50435. strcpy(quizAnswer, param);
  50436. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s changed the quiz answer to %s.", GetRPName(playerid), quizAnswer);
  50437. }
  50438. else
  50439. {
  50440. SendClientMessage(playerid, COLOR_GREY, "USAGE: /quiz edit [answer]");
  50441. }
  50442. }
  50443. else if(!strcmp(option, "answer", true))
  50444. {
  50445. if(isnull(quizAnswer))
  50446. {
  50447. return SendClientMessage(playerid, COLOR_GREY, "There is no active quiz!");
  50448. }
  50449. if(!isnull(param))
  50450. {
  50451. if(!strcmp(quizAnswer, param, true))
  50452. {
  50453. SendClientMessageToAllEx(COLOR_RETIRED, "%s has answered the quiz correctly. answer: %s", GetRPName(playerid), quizAnswer);
  50454. quizQuestion[0] = EOS;
  50455. quizAnswer[0] = EOS;
  50456. }
  50457. else
  50458. {
  50459. SendClientMessage(playerid, COLOR_GREY, "Sorry bud, that ain't the right answer.");
  50460. }
  50461. }
  50462. else
  50463. {
  50464. SendClientMessage(playerid, COLOR_GREY, "USAGE: /quiz answer [answer]");
  50465. }
  50466. }
  50467. return 1;
  50468. }
  50469. CMD:forcedeleteobject(playerid, params[])
  50470. {
  50471. if(PlayerData[playerid][pAdmin] >= GENERAL_MANAGER || PlayerData[playerid][pDeveloper])
  50472. {
  50473. new mode[32];
  50474. if(sscanf(params, "s[32]", mode))
  50475. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /forcedeleteobject [enable/disable]");
  50476. if(!strcmp(mode, "enable", true))
  50477. {
  50478. PlayerData[playerid][pDeleteMode] = 1;
  50479. }
  50480. else if(!strcmp(mode, "disable", true))
  50481. {
  50482. PlayerData[playerid][pDeleteMode] = 0;
  50483. }
  50484. else
  50485. {
  50486. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /forcedeleteobject [enable/disable]");
  50487. }
  50488. SendClientMessageEx(playerid, COLOR_GREY, "Object deletetion mode was %sd (%i)", mode, PlayerData[playerid][pDeleteMode]);
  50489. }
  50490. return 1;
  50491. }
  50492. CMD:godshand(playerid, params[])
  50493. {
  50494. if(PlayerData[playerid][pAdmin] >= MANAGEMENT)
  50495. {
  50496. new targetid;
  50497. if(sscanf(params, "u", targetid))
  50498. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /godshand [playerid]");
  50499. if(PlayerData[playerid][pGodshand] == 1)
  50500. {
  50501. SendClientMessage(playerid, COLOR_GREY, "Aww, that's sad as fuck.");
  50502. PlayerData[targetid][pGodshand] = 0;
  50503. }
  50504. else
  50505. {
  50506. SendClientMessage(playerid, COLOR_GREY, "Granted it is.");
  50507. PlayerData[targetid][pGodshand] = 1;
  50508. }
  50509. return 1;
  50510. }
  50511. return -1;
  50512. }
  50513. CMD:choke(playerid, params[])
  50514. {
  50515. if(PlayerData[playerid][pAdmin] >= JUNIOR_ADMIN)
  50516. {
  50517. new targetid;
  50518. if(sscanf(params, "u", targetid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /choke [playerid] ");
  50519. ApplyAnimation(targetid,"ped","gas_cwr",4.1,1,1,1,0,0,0);
  50520. if(PlayerData[playerid][pAdmin] <= PlayerData[targetid][pAdmin])
  50521. return SendClientMessageEx(playerid, COLOR_GREY, "You cannot choke higher level administrators.");
  50522. SendProximityMessage(targetid, 30.0, COLOR_PURPLE, "* %s bends over as he chokes by god's hand.", GetRPName(targetid));
  50523. }
  50524. else SendClientMessageEx(playerid, COLOR_GREY, "Your not authorized to use that command!");
  50525. return 1;
  50526. }
  50527. CMD:kick(playerid, params[])
  50528. {
  50529. new targetid, reason[128];
  50530. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  50531. {
  50532. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  50533. }
  50534. if(sscanf(params, "us[128]", targetid, reason))
  50535. {
  50536. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /kick [playerid] [reason]");
  50537. }
  50538. if(!IsPlayerConnected(targetid))
  50539. {
  50540. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  50541. }
  50542. if(PlayerData[targetid][pAdmin] > PlayerData[playerid][pAdmin])
  50543. {
  50544. return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be kicked.");
  50545. }
  50546. Log_Write("log_punishments", "%s (uid: %i) kicked %s (uid: %i), reason: %s", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], reason);
  50547. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was kicked by %s, reason: %s", GetRPName(targetid), GetRPName(playerid), reason);
  50548. KickPlayer(targetid);
  50549. return 1;
  50550. }
  50551. CMD:ban(playerid, params[])
  50552. {
  50553. new targetid, reason[128];
  50554. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  50555. {
  50556. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  50557. }
  50558. if(sscanf(params, "us[128]", targetid, reason))
  50559. {
  50560. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /ban [playerid] [reason]");
  50561. }
  50562. if(!IsPlayerConnected(targetid))
  50563. {
  50564. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  50565. }
  50566. if(PlayerData[targetid][pAdmin] > PlayerData[playerid][pAdmin])
  50567. {
  50568. return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be banned.");
  50569. }
  50570. Log_Write("log_punishments", "%s (uid: %i) banned %s (uid: %i), reason: %s", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], reason);
  50571. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was banned by %s, reason: %s", GetRPName(targetid), GetRPName(playerid), reason);
  50572. BanPlayer(targetid, GetPlayerNameEx(playerid), reason);
  50573. return 1;
  50574. }
  50575. CMD:warn(playerid, params[])
  50576. {
  50577. new targetid, reason[128];
  50578. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  50579. {
  50580. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  50581. }
  50582. if(sscanf(params, "us[128]", targetid, reason))
  50583. {
  50584. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /warn [playerid] [reason]");
  50585. }
  50586. if(!IsPlayerConnected(targetid))
  50587. {
  50588. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  50589. }
  50590. if(PlayerData[targetid][pAdmin] > PlayerData[playerid][pAdmin])
  50591. {
  50592. return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be warned.");
  50593. }
  50594. PlayerData[targetid][pWarnings]++;
  50595. Log_Write("log_punishments", "%s (uid: %i) warned %s (uid: %i), reason: %s (%i/3)", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], reason, PlayerData[targetid][pWarnings]);
  50596. if(PlayerData[targetid][pWarnings] < 3)
  50597. {
  50598. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s was warned by %s %s, reason: %s", GetRPName(targetid), GetAdmCmdRank(playerid), GetRPName(playerid), reason);
  50599. SendClientMessageEx(targetid, COLOR_LIGHTRED, "%s %s has warned you, reason: %s", GetAdmCmdRank(playerid), GetRPName(playerid), reason);
  50600. }
  50601. else
  50602. {
  50603. PlayerData[targetid][pWarnings] = 0;
  50604. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was banned by %s, reason: %s (3/3 warnings)", GetRPName(targetid), GetRPName(playerid), reason);
  50605. BanPlayer(targetid, GetPlayerNameEx(playerid), reason);
  50606. }
  50607. return 1;
  50608. }
  50609. CMD:check(playerid, params[])
  50610. {
  50611. new targetid;
  50612. if(PlayerData[playerid][pAdmin] < 1)
  50613. {
  50614. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  50615. }
  50616. if(sscanf(params, "u", targetid))
  50617. {
  50618. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /check [playerid]");
  50619. }
  50620. if(!IsPlayerConnected(targetid))
  50621. {
  50622. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  50623. }
  50624. if(!PlayerData[targetid][pLogged])
  50625. {
  50626. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet.");
  50627. }
  50628. DisplayStats(targetid, playerid);
  50629. return 1;
  50630. }
  50631. CMD:checkinv(playerid, params[])
  50632. {
  50633. new targetid;
  50634. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  50635. {
  50636. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  50637. }
  50638. if(sscanf(params, "u", targetid))
  50639. {
  50640. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /checkinv [playerid]");
  50641. }
  50642. if(!IsPlayerConnected(targetid))
  50643. {
  50644. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  50645. }
  50646. if(!PlayerData[targetid][pLogged])
  50647. {
  50648. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet.");
  50649. }
  50650. DisplayInventory(targetid, playerid);
  50651. return 1;
  50652. }
  50653. CMD:slap(playerid, params[])
  50654. {
  50655. new targetid, Float:height;
  50656. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  50657. {
  50658. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  50659. }
  50660. if(sscanf(params, "uF(5.0)", targetid, height))
  50661. {
  50662. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /slap [playerid] [height (optional)]");
  50663. }
  50664. if(!IsPlayerConnected(targetid))
  50665. {
  50666. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  50667. }
  50668. if(!IsPlayerSpawned(targetid))
  50669. {
  50670. return SendClientMessage(playerid, COLOR_GREY, "The player specified is not spawned and therefore cannot be slapped.");
  50671. }
  50672. if(PlayerData[targetid][pAdmin] > PlayerData[playerid][pAdmin])
  50673. {
  50674. return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be slapped.");
  50675. }
  50676. new
  50677. Float:x,
  50678. Float:y,
  50679. Float:z;
  50680. GetPlayerPos(targetid, x, y, z);
  50681. SetPlayerPos(targetid, x, y, z + height);
  50682. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s was slapped by %s %s.", GetRPName(targetid), GetAdmCmdRank(playerid), GetRPName(playerid));
  50683. PlayerPlaySound(targetid, 1130, 0.0, 0.0, 0.0);
  50684. return 1;
  50685. }
  50686. CMD:upgrade(playerid, params[])
  50687. {
  50688. ShowDialogToPlayer(playerid, DIALOG_NEWUPGRADE);
  50689. /* if(isnull(params))
  50690. {
  50691. SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /upgrade [option] (%i points available)", PlayerData[playerid][pUpgradePoints]);
  50692. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Inventory, Addict, Trader, Asset, Labor, SpawnHealth, SpawnArmor");
  50693. return 1;
  50694. }
  50695. else if(!strcmp(params, "asset", true))
  50696. {
  50697. if(PlayerData[playerid][pAssetUpgrade] >= 4)
  50698. {
  50699. return SendClientMessage(playerid, COLOR_GREY, "Your asset skill is already upgraded to its maximum level of 4.");
  50700. }
  50701. PlayerData[playerid][pAssetUpgrade]++;
  50702. PlayerData[playerid][pUpgradePoints]--;
  50703. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET assetupgrade = %i, upgradepoints = %i WHERE uid = %i", PlayerData[playerid][pAssetUpgrade], PlayerData[playerid][pUpgradePoints], PlayerData[playerid][pID]);
  50704. mysql_tquery(connectionID, queryBuffer);
  50705. SendClientMessageEx(playerid, COLOR_GREEN, "You upgraded your asset skill to level %i/4. You can now own %i/%i houses and garages and %i/%i businesses and vehicles.", PlayerData[playerid][pAssetUpgrade], GetPlayerAssetLimit(playerid, LIMIT_HOUSES), GetPlayerAssetLimit(playerid, LIMIT_GARAGES), GetPlayerAssetLimit(playerid, LIMIT_BUSINESSES), GetPlayerAssetLimit(playerid, LIMIT_VEHICLES));
  50706. }
  50707. else if(!strcmp(params, "labor", true))
  50708. {
  50709. if(PlayerData[playerid][pLaborUpgrade] >= 5)
  50710. {
  50711. return SendClientMessage(playerid, COLOR_GREY, "Your labor skill is already upgraded to its maximum level of 5.");
  50712. }
  50713. PlayerData[playerid][pLaborUpgrade]++;
  50714. PlayerData[playerid][pUpgradePoints]--;
  50715. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET laborupgrade = %i, upgradepoints = %i WHERE uid = %i", PlayerData[playerid][pLaborUpgrade], PlayerData[playerid][pUpgradePoints], PlayerData[playerid][pID]);
  50716. mysql_tquery(connectionID, queryBuffer);
  50717. SendClientMessageEx(playerid, COLOR_GREEN, "You upgraded your labor skill to level %i/5. You now earn %i percent more extra cash when you work.", PlayerData[playerid][pLaborUpgrade], PlayerData[playerid][pLaborUpgrade] * 2);
  50718. }
  50719. */
  50720. return 1;
  50721. }
  50722. CMD:charity(playerid, params[])
  50723. {
  50724. new option[10], param[64];
  50725. if(PlayerData[playerid][pLevel] < 5)
  50726. {
  50727. return SendClientMessage(playerid, COLOR_SYNTAX, "You cannot donate to charity if you're under level 5. /buylevel to level up.");
  50728. }
  50729. if(sscanf(params, "s[10]S()[64]", option, param))
  50730. {
  50731. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /charity [info | health | armor | song]");
  50732. }
  50733. if(!strcmp(option, "info", true))
  50734. {
  50735. SendClientMessage(playerid, COLOR_NAVYBLUE, "_______ Charity _______");
  50736. SendClientMessage(playerid, COLOR_GREY3, "If you have at least $1,000 on hand you can donate to charity.");
  50737. SendClientMessage(playerid, COLOR_GREY3, "You can donate to give health or armor for the entire server using '{FFD700}/charity health/armor{AAAAAA}'.");
  50738. SendClientMessage(playerid, COLOR_GREY3, "You can also donate to globally play a song of your choice using '{FFD700}/charity song{AAAAAA}'.");
  50739. SendClientMessage(playerid, COLOR_GREY3, "You can also donate your money the traditional way using '{FFD700}/charity [amount]{AAAAAA}'.");
  50740. SendClientMessage(playerid, COLOR_GREY3, "Once the charity bank hits a milestone, some of it will be given back to the community!");
  50741. SendClientMessageEx(playerid, COLOR_AQUA, "* %s has been donated to charity so far.", FormatNumber(gCharity));
  50742. return 1;
  50743. }
  50744. else if(!strcmp(option, "health", true))
  50745. {
  50746. if(PlayerData[playerid][pCash] < 150000)
  50747. {
  50748. return SendClientMessage(playerid, COLOR_GREY, "You need at least $150,000 on hand for this option.");
  50749. }
  50750. if(gCharityHealth)
  50751. {
  50752. return SendClientMessage(playerid, COLOR_GREY, "Players can only donate for this perk each hour. Try again after payday.");
  50753. }
  50754. foreach(new i : Player)
  50755. {
  50756. if(!PlayerData[i][pAdminDuty])
  50757. {
  50758. SetPlayerHealth(i, 150.0);
  50759. }
  50760. }
  50761. gCharity += 150000;
  50762. gCharityHealth = 1;
  50763. AddToTaxVault(150000);
  50764. SendClientMessageToAllEx(COLOR_OLDSCHOOL, "Charity: %s has generously donated $150,000 to heal everyone to 150 health!", GetRPName(playerid));
  50765. GivePlayerCash(playerid, -150000);
  50766. }
  50767. else if(!strcmp(option, "armor", true))
  50768. {
  50769. if(PlayerData[playerid][pCash] < 200000)
  50770. {
  50771. return SendClientMessage(playerid, COLOR_GREY, "You need at least $200,000 on hand for this option.");
  50772. }
  50773. if(gCharityArmor)
  50774. {
  50775. return SendClientMessage(playerid, COLOR_GREY, "Players can only donate for this perk each hour. Try again after payday.");
  50776. }
  50777. foreach(new i : Player)
  50778. {
  50779. if(!PlayerData[i][pAdminDuty])
  50780. {
  50781. SetScriptArmour(i, 100.0);
  50782. }
  50783. }
  50784. gCharity += 200000;
  50785. gCharityArmor = 1;
  50786. AddToTaxVault(200000);
  50787. SendClientMessageToAllEx(COLOR_OLDSCHOOL, "Charity: %s has generously donated $200,000 to give full armor to everyone!", GetRPName(playerid));
  50788. GivePlayerCash(playerid, -10000);
  50789. }
  50790. else if(!strcmp(option, "song", true))
  50791. {
  50792. if(isnull(param))
  50793. {
  50794. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /charity [song] [songfolder/name.mp3]");
  50795. }
  50796. if(PlayerData[playerid][pCash] < 25000)
  50797. {
  50798. return SendClientMessage(playerid, COLOR_GREY, "You need at least $25,000 on hand for this option.");
  50799. }
  50800. if(gettime() - gLastMusic < 300)
  50801. {
  50802. return SendClientMessage(playerid, COLOR_GREY, "Music can only be played globally every 5 minutes.");
  50803. }
  50804. new
  50805. url[144];
  50806. format(url, sizeof(url), "http://%s/%s", SERVER_MUSIC_URL, param);
  50807. foreach(new i : Player)
  50808. {
  50809. if(!PlayerData[i][pToggleMusic] && PlayerData[i][pStreamType] == MUSIC_NONE)
  50810. {
  50811. PlayAudioStreamForPlayer(i, url);
  50812. }
  50813. }
  50814. gLastMusic = gettime();
  50815. gCharity += 25000;
  50816. AddToTaxVault(25000);
  50817. SendClientMessageToAllEx(COLOR_OLDSCHOOL, "Charity: %s has generously donated $25,000 to play %s for the entire server!", GetRPName(playerid), param);
  50818. GivePlayerCash(playerid, -25000);
  50819. }
  50820. else if(IsNumeric(option))
  50821. {
  50822. new amount = strval(option);
  50823. if(amount < 1 || amount > PlayerData[playerid][pCash])
  50824. {
  50825. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  50826. }
  50827. gCharity += amount;
  50828. AddToTaxVault(amount);
  50829. GivePlayerCash(playerid, -amount);
  50830. if(amount > 100000)
  50831. {
  50832. SendClientMessageToAllEx(COLOR_OLDSCHOOL, "Charity: %s has generously donated %s to charity!", GetRPName(playerid), FormatNumber(amount));
  50833. }
  50834. }
  50835. return 1;
  50836. }
  50837. CMD:music(playerid, params[])
  50838. {
  50839. SendClientMessage(playerid, COLOR_NAVYBLUE, "_____________________ List of Music _____________________");
  50840. HTTP(playerid, HTTP_GET, SERVER_FETCH_URL, "", "HTTP_OnMusicFetchResponse");
  50841. return 1;
  50842. }
  50843. CMD:stopmusic(playerid, params[])
  50844. {
  50845. SendClientMessage(playerid, COLOR_YELLOW, "You have stopped all active audio streams playing for yourself.");
  50846. PlayerData[playerid][pStreamType] = MUSIC_NONE;
  50847. StopAudioStreamForPlayer(playerid);
  50848. return 1;
  50849. }
  50850. CMD:gplay(playerid, params[])
  50851. {
  50852. new url[144];
  50853. if(PlayerData[playerid][pAdmin] < SENIOR_ADMIN)
  50854. {
  50855. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  50856. }
  50857. if(isnull(params))
  50858. {
  50859. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /gplay [songfolder/name.mp3]");
  50860. }
  50861. format(url, sizeof(url), "http://%s/%s", SERVER_MUSIC_URL, params);
  50862. foreach(new i : Player)
  50863. {
  50864. if(!PlayerData[i][pToggleMusic] && PlayerData[i][pStreamType] == MUSIC_NONE)
  50865. {
  50866. PlayAudioStreamForPlayer(i, url);
  50867. SendClientMessageEx(i, COLOR_LIGHTRED, "AdmCmd: %s has started the global playback of %s.", GetRPName(playerid), params);
  50868. SendClientMessageEx(i, COLOR_YELLOW, "Use /stopmusic to stop playback and '/toggle streams' to disable global playback.");
  50869. }
  50870. }
  50871. return 1;
  50872. }
  50873. CMD:gplayurl(playerid, params[])
  50874. {
  50875. if(PlayerData[playerid][pAdmin] < SENIOR_ADMIN && !PlayerData[playerid][pDJ])
  50876. {
  50877. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  50878. }
  50879. if(isnull(params))
  50880. {
  50881. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /gplayurl [link]");
  50882. }
  50883. if(strfind(params, ".php", true) != -1)
  50884. {
  50885. return SendClientMessage(playerid, COLOR_SYNTAX, "No .php links allowed!");
  50886. }
  50887. foreach(new i : Player)
  50888. {
  50889. if(!PlayerData[i][pToggleMusic] && PlayerData[i][pStreamType] == MUSIC_NONE)
  50890. {
  50891. PlayAudioStreamForPlayer(i, params);
  50892. SendClientMessageEx(i, COLOR_LIGHTRED, "AdmCmd: %s has started the global playback of a custom URL.", GetRPName(playerid));
  50893. SendClientMessageEx(i, COLOR_YELLOW, "Use /stopmusic to stop playback and '/toggle streams' to disable global playback.");
  50894. }
  50895. }
  50896. return 1;
  50897. }
  50898. CMD:makedj(playerid, params[])
  50899. {
  50900. new targetid, rank;
  50901. if(PlayerData[playerid][pAdmin] < SENIOR_ADMIN && PlayerData[playerid][pDJ] != 2)
  50902. {
  50903. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command");
  50904. }
  50905. if(sscanf(params, "dd", targetid, rank))
  50906. {
  50907. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /makedj [playerid] [rank]");
  50908. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} 0 = None, 1 = DJ, 2 = Leader DJ");
  50909. }
  50910. if(!(0 <= rank <= 3))
  50911. {
  50912. return SendClientMessage(playerid, COLOR_GREY, "Invalid rank specified.");
  50913. }
  50914. if(PlayerData[targetid][pLogged])
  50915. {
  50916. if(rank == 0)
  50917. {
  50918. (playerid, COLOR_AQUA, "You've removed %s's DJ rank", GetRPName(targetid));
  50919. SendClientMessageEx(targetid, COLOR_AQUA, "Your DJ rank was removed by %s", GetRPName(playerid));
  50920. PlayerData[targetid][pDJ] = 0;
  50921. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET dj = %i WHERE uid = %i", PlayerData[targetid][pDJ], PlayerData[targetid][pID]);
  50922. mysql_tquery(connectionID, queryBuffer);
  50923. }
  50924. else
  50925. {
  50926. SendClientMessageEx(playerid, COLOR_AQUA, "You have made %s a rank %d DJ", GetRPName(targetid), rank);
  50927. SendClientMessageEx(targetid, COLOR_AQUA, "You have been made rank %d DJ by %s", rank, GetRPName(playerid));
  50928. PlayerData[targetid][pDJ] = rank;
  50929. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET dj = %i WHERE uid = %i", PlayerData[targetid][pDJ], PlayerData[targetid][pID]);
  50930. mysql_tquery(connectionID, queryBuffer);
  50931. }
  50932. }
  50933. return 1;
  50934. }
  50935. CMD:gstop(playerid, params[])
  50936. {
  50937. if(PlayerData[playerid][pAdmin] < SENIOR_ADMIN && !PlayerData[playerid][pDJ])
  50938. {
  50939. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  50940. }
  50941. foreach(new i: Player)
  50942. {
  50943. if(!PlayerData[i][pToggleMusic] && PlayerData[i][pStreamType] == MUSIC_NONE)
  50944. {
  50945. StopAudioStreamForPlayer(i);
  50946. SendClientMessageEx(i, COLOR_LIGHTRED, "AdmCmd: %s has stopped all active audio streams.", GetRPName(playerid));
  50947. }
  50948. }
  50949. return 1;
  50950. }
  50951. CMD:sdm(playerid, params[])
  50952. {
  50953. new targetid;
  50954. if(PlayerData[playerid][pAdmin] < 1)
  50955. {
  50956. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  50957. }
  50958. if(sscanf(params, "u", targetid))
  50959. {
  50960. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sdm [playerid]");
  50961. }
  50962. if(!IsPlayerConnected(targetid))
  50963. {
  50964. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  50965. }
  50966. if(PlayerData[targetid][pAdmin] > PlayerData[playerid][pAdmin])
  50967. {
  50968. return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be punished.");
  50969. }
  50970. if(!PlayerData[targetid][pLogged])
  50971. {
  50972. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet. You can wait until they login or use /oprison.");
  50973. }
  50974. PlayerData[targetid][pDMWarnings]++;
  50975. if(PlayerData[targetid][pDMWarnings] < 3)
  50976. {
  50977. new minutes = PlayerData[targetid][pDMWarnings] * 30;
  50978. PlayerData[targetid][pJailType] = 2;
  50979. PlayerData[targetid][pJailTime] = PlayerData[targetid][pDMWarnings] * 1800;
  50980. PlayerData[targetid][pWeaponRestricted] = PlayerData[targetid][pDMWarnings] * 4;
  50981. ResetPlayer(targetid);
  50982. ResetPlayerWeapons(targetid);
  50983. SetPlayerInJail(targetid);
  50984. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s was DM Warned & Prisoned for %i minutes by an Admin, reason: DM (%i/3)", GetRPName(targetid), minutes, PlayerData[targetid][pDMWarnings]);
  50985. GetPlayerName(playerid, PlayerData[targetid][pPrisonedBy], MAX_PLAYER_NAME);
  50986. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET prisonedby = '%e', prisonreason = 'DM' WHERE uid = %i", PlayerData[targetid][pPrisonedBy], PlayerData[targetid][pID]);
  50987. mysql_tquery(connectionID, queryBuffer);
  50988. strcpy(PlayerData[targetid][pPrisonReason], "DM", 128);
  50989. GameTextForPlayer(targetid, "~w~Welcome to~n~~r~admin jail", 5000, 3);
  50990. SendClientMessageEx(targetid, COLOR_WHITE, "You have been admin prisoned for %i minutes, reason: DM.", minutes);
  50991. SendClientMessageEx(targetid, COLOR_WHITE, "Your punishment is %i hours of weapon restriction and %i/5 DM warning.", PlayerData[targetid][pWeaponRestricted], PlayerData[targetid][pDMWarnings]);
  50992. Log_Write("log_punishments", "%s (uid: %i) silent prisoned %s (uid: %i) for %i minutes, reason: SDM [/sdm]", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], minutes);
  50993. }
  50994. else
  50995. {
  50996. Log_Write("log_punishments", "%s (uid: %i) banned %s (uid: %i), reason: Silent DM (3/3 warnings)", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  50997. PlayerData[targetid][pDMWarnings] = 0;
  50998. BanPlayer(targetid, GetPlayerNameEx(playerid), "DM (3/3 warnings)");
  50999. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was banned by an Admin, reason: DM (3/3 warnings)", GetRPName(targetid));
  51000. }
  51001. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET jailtype = %i, jailtime = %i, dmwarnings = %i, weaponrestricted = %i WHERE uid = %i", PlayerData[targetid][pJailType], PlayerData[targetid][pJailTime], PlayerData[targetid][pDMWarnings], PlayerData[targetid][pWeaponRestricted], PlayerData[targetid][pID]);
  51002. mysql_tquery(connectionID, queryBuffer);
  51003. return 1;
  51004. }
  51005. CMD:dm(playerid, params[])
  51006. {
  51007. new targetid;
  51008. if(PlayerData[playerid][pAdmin] < 1)
  51009. {
  51010. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  51011. }
  51012. if(sscanf(params, "u", targetid))
  51013. {
  51014. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /dm [playerid]");
  51015. }
  51016. if(!IsPlayerConnected(targetid))
  51017. {
  51018. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  51019. }
  51020. if(PlayerData[targetid][pAdmin] > PlayerData[playerid][pAdmin])
  51021. {
  51022. return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be punished.");
  51023. }
  51024. if(!PlayerData[targetid][pLogged])
  51025. {
  51026. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet. You can wait until they login or use /oprison.");
  51027. }
  51028. PlayerData[targetid][pDMWarnings]++;
  51029. if(PlayerData[targetid][pDMWarnings] < 3)
  51030. {
  51031. new minutes = PlayerData[targetid][pDMWarnings] * 30;
  51032. PlayerData[targetid][pJailType] = 2;
  51033. PlayerData[targetid][pJailTime] = PlayerData[targetid][pDMWarnings] * 1800;
  51034. PlayerData[targetid][pWeaponRestricted] = PlayerData[targetid][pDMWarnings] * 4;
  51035. ResetPlayer(targetid);
  51036. ResetPlayerWeapons(targetid);
  51037. SetPlayerInJail(targetid);
  51038. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s was DM Warned & Prisoned for %i minutes by %s, reason: DM (%i/3)", GetRPName(targetid), minutes, GetRPName(playerid), PlayerData[targetid][pDMWarnings]);
  51039. GetPlayerName(playerid, PlayerData[targetid][pPrisonedBy], MAX_PLAYER_NAME);
  51040. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET prisonedby = '%e', prisonreason = 'DM' WHERE uid = %i", PlayerData[targetid][pPrisonedBy], PlayerData[targetid][pID]);
  51041. mysql_tquery(connectionID, queryBuffer);
  51042. strcpy(PlayerData[targetid][pPrisonReason], "DM", 128);
  51043. GameTextForPlayer(targetid, "~w~Welcome to~n~~r~admin jail", 5000, 3);
  51044. SendClientMessageEx(targetid, COLOR_WHITE, "You have been admin prisoned for %i minutes, reason: DM.", minutes);
  51045. SendClientMessageEx(targetid, COLOR_WHITE, "Your punishment is %i hours of weapon restriction and %i/5 DM warning.", PlayerData[targetid][pWeaponRestricted], PlayerData[targetid][pDMWarnings]);
  51046. Log_Write("log_punishments", "%s (uid: %i) prisoned %s (uid: %i) for %i minutes, reason: DM [/dm]", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], minutes);
  51047. }
  51048. else
  51049. {
  51050. Log_Write("log_punishments", "%s (uid: %i) banned %s (uid: %i), reason: DM (3/3 warnings)", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  51051. PlayerData[targetid][pDMWarnings] = 0;
  51052. BanPlayer(targetid, GetPlayerNameEx(playerid), "DM (3/3 warnings)");
  51053. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was banned by %s, reason: DM (3/3 warnings)", GetRPName(targetid), GetRPName(playerid));
  51054. }
  51055. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET jailtype = %i, jailtime = %i, dmwarnings = %i, weaponrestricted = %i WHERE uid = %i", PlayerData[targetid][pJailType], PlayerData[targetid][pJailTime], PlayerData[targetid][pDMWarnings], PlayerData[targetid][pWeaponRestricted], PlayerData[targetid][pID]);
  51056. mysql_tquery(connectionID, queryBuffer);
  51057. return 1;
  51058. }
  51059. CMD:cleardm(playerid, params[])
  51060. {
  51061. if(PlayerData[playerid][pAdmin] >= GENERAL_MANAGER || PlayerData[playerid][pAdminDuty])
  51062. {
  51063. ClearDeathList(playerid);
  51064. SendClientMessage(playerid, COLOR_WHITE, "Death messages cleared.");
  51065. }
  51066. else
  51067. {
  51068. SendClientMessage(playerid, COLOR_GREY, "You are either not authorized to use this command or not on admin duty.");
  51069. }
  51070. return 1;
  51071. }
  51072. ClearDeathList(playerid)
  51073. {
  51074. for(new i = 0; i < 5; i ++)
  51075. {
  51076. SendDeathMessageToPlayer(playerid, 1001, 1001, 255);
  51077. }
  51078. return 1;
  51079. }
  51080. CMD:aduty(playerid, params[])
  51081. {
  51082. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  51083. {
  51084. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  51085. }
  51086. if(!PlayerData[playerid][pAdminDuty])
  51087. {
  51088. if(PlayerData[playerid][pUndercover][0])
  51089. {
  51090. OnUndercover(playerid, 0, "", 0, 0.0, 0.0);
  51091. }
  51092. SavePlayerVariables(playerid);
  51093. ResetPlayerWeapons(playerid);
  51094. SetPlayerHealth(playerid, 32767);
  51095. SetScriptArmour(playerid, 0.0);
  51096. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s is now on admin duty.", GetRPName(playerid));
  51097. SendClientMessage(playerid, COLOR_WHITE, "You are now on admin duty. Your stats will not be saved until you're off duty.");
  51098. PlayerData[playerid][pAdminDuty] = 1;
  51099. PlayerData[playerid][pTogglePhone] = 1;
  51100. if(strcmp(PlayerData[playerid][pAdminName], "None", true) != 0)
  51101. {
  51102. SetPlayerName(playerid, PlayerData[playerid][pAdminName]);
  51103. }
  51104. }
  51105. else
  51106. {
  51107. new savecheck = 0;
  51108. if(PlayerData[playerid][pPaycheck] > 1)
  51109. {
  51110. savecheck = PlayerData[playerid][pPaycheck];
  51111. }
  51112. if(PlayerData[playerid][pNoDamage])
  51113. {
  51114. PlayerData[playerid][pNoDamage] = 0;
  51115. SendClientMessage(playerid, COLOR_GREY, "Your god mode was turned off.");
  51116. }
  51117. ClearDeathList(playerid);
  51118. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM "#TABLE_USERS" WHERE uid = %i", PlayerData[playerid][pID]);
  51119. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_PROCESS_LOGIN, playerid);
  51120. PlayerData[playerid][pPaycheck] = savecheck;
  51121. }
  51122. return 1;
  51123. }
  51124. CMD:setadminname(playerid, params[])
  51125. {
  51126. new name[MAX_PLAYER_NAME], targetid;
  51127. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT)
  51128. {
  51129. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  51130. }
  51131. if(sscanf(params, "ds[24]", targetid, name))
  51132. {
  51133. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setadminname [targetid] [name]");
  51134. }
  51135. if(!IsValidName(name))
  51136. {
  51137. return SendClientMessage(playerid, COLOR_GREY, "The name specified is not supported by the SA-MP client.");
  51138. }
  51139. strcpy(PlayerData[targetid][pAdminName], name, MAX_PLAYER_NAME);
  51140. if(PlayerData[targetid][pAdminDuty])
  51141. {
  51142. SetPlayerName(targetid, name);
  51143. }
  51144. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET adminname = '%e' WHERE uid = %i", name, PlayerData[targetid][pID]);
  51145. mysql_tquery(connectionID, queryBuffer);
  51146. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s changed %s's administrator name to %s.", GetPlayerNameEx(playerid), GetPlayerNameEx(targetid), name);
  51147. return 1;
  51148. }
  51149. CMD:getip(playerid, params[])
  51150. {
  51151. new targetid;
  51152. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  51153. {
  51154. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  51155. }
  51156. if(sscanf(params, "u", targetid))
  51157. {
  51158. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /getip [playerid]");
  51159. }
  51160. if(PlayerData[playerid][pAdmin] < MANAGEMENT && PlayerData[targetid][pAdmin] > 1)
  51161. {
  51162. return SendClientMessage(playerid, COLOR_GREY, "You cannot use this command on another administrator");
  51163. }
  51164. if(!IsPlayerConnected(targetid))
  51165. {
  51166. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  51167. }
  51168. // SendClientMessageEx(playerid, COLOR_WHITE, "%s: {FF3300}%s {FFFFFF}| {1975FF}%s {33CC00}| %s", GetRPName(targetid), country, isp, city);
  51169. SendClientMessageEx(playerid, COLOR_WHITE, "* %s[%i]'s IP: %s *", GetRPName(targetid), targetid, GetPlayerIP(targetid));
  51170. return 1;
  51171. }
  51172. CMD:ogetip(playerid, params[])
  51173. {
  51174. new name[MAX_PLAYER_NAME];
  51175. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  51176. {
  51177. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  51178. }
  51179. if(sscanf(params, "s[24]", name))
  51180. {
  51181. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /ogetip [username]");
  51182. }
  51183. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT username, ip FROM "#TABLE_USERS" WHERE username = '%e'", name);
  51184. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_OFFLINE_IP, playerid);
  51185. return 1;
  51186. }
  51187. CMD:iplookup(playerid, params[])
  51188. {
  51189. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  51190. {
  51191. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  51192. }
  51193. if(!IsAnIP(params))
  51194. {
  51195. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /iplookup [ip address]");
  51196. }
  51197. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT username, lastlogin FROM "#TABLE_USERS" WHERE ip = '%s' ORDER BY lastlogin DESC", params);
  51198. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_TRACE_IP, playerid);
  51199. return 1;
  51200. }
  51201. CMD:lastactive(playerid, params[])
  51202. {
  51203. new username[24], specifiers[] = "%D of %M, %Y @ %k:%i";
  51204. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  51205. {
  51206. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  51207. }
  51208. if(sscanf(params, "s[24]", username))
  51209. {
  51210. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /lastactive [username]");
  51211. }
  51212. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT DATE_FORMAT(lastlogin, '%s') FROM "#TABLE_USERS" WHERE username = '%e'", specifiers, username);
  51213. mysql_tquery(connectionID, queryBuffer, "OnAdminCheckLastActive", "is", playerid, username);
  51214. return 1;
  51215. }
  51216. CMD:listjailed(playerid, params[])
  51217. {
  51218. new type[14];
  51219. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  51220. {
  51221. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  51222. }
  51223. SendClientMessage(playerid, COLOR_NAVYBLUE, "______ Jailed Players ______");
  51224. foreach(new i : Player)
  51225. {
  51226. if(PlayerData[i][pJailType] > 0)
  51227. {
  51228. switch(PlayerData[i][pJailType])
  51229. {
  51230. case 1: type = "OOC jailed";
  51231. case 2: type = "OOC prisoned";
  51232. case 3: type = "IC prisoned";
  51233. }
  51234. SendClientMessageEx(playerid, COLOR_GREY1, "(ID: %i) %s - Status: %s - Time: %i seconds", i, GetRPName(i), type, PlayerData[i][pJailTime]);
  51235. }
  51236. }
  51237. return 1;
  51238. }
  51239. CMD:prisoninfo(playerid, params[])
  51240. {
  51241. new targetid;
  51242. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  51243. {
  51244. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  51245. }
  51246. if(sscanf(params, "u", targetid))
  51247. {
  51248. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /prisoninfo [playerid]");
  51249. }
  51250. if(!IsPlayerConnected(targetid))
  51251. {
  51252. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  51253. }
  51254. if(PlayerData[targetid][pJailType] != 2)
  51255. {
  51256. return SendClientMessage(playerid, COLOR_GREY, "That player is not in OOC prison.");
  51257. }
  51258. SendClientMessageEx(playerid, COLOR_WHITE, "* %s was prisoned by %s, reason: %s (%i seconds left.) *", GetRPName(targetid), PlayerData[targetid][pPrisonedBy], PlayerData[targetid][pPrisonReason], PlayerData[targetid][pJailTime]);
  51259. return 1;
  51260. }
  51261. CMD:relog(playerid, params[])
  51262. {
  51263. new targetid;
  51264. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  51265. {
  51266. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  51267. }
  51268. if(sscanf(params, "u", targetid))
  51269. {
  51270. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /relog [playerid]");
  51271. }
  51272. if(!IsPlayerConnected(targetid))
  51273. {
  51274. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  51275. }
  51276. if(!PlayerData[targetid][pLogged])
  51277. {
  51278. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet.");
  51279. }
  51280. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has forced %s to relog.", GetRPName(playerid), GetRPName(targetid));
  51281. SavePlayerVariables(targetid);
  51282. ResetPlayer(targetid);
  51283. PlayerData[targetid][pLogged] = 0;
  51284. CallLocalFunction("OnPlayerRequestClass", "ii", targetid, 0);
  51285. return 1;
  51286. }
  51287. CMD:setint(playerid, params[])
  51288. {
  51289. new targetid, interiorid;
  51290. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  51291. {
  51292. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  51293. }
  51294. if(sscanf(params, "ui", targetid, interiorid))
  51295. {
  51296. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setint [playerid] [int]");
  51297. }
  51298. if(!IsPlayerConnected(targetid))
  51299. {
  51300. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  51301. }
  51302. if(!(0 <= interiorid <= 19))
  51303. {
  51304. return SendClientMessage(playerid, COLOR_GREY, "Invalid interior. Valid interiors range from 0 to 19.");
  51305. }
  51306. SetPlayerInterior(targetid, interiorid);
  51307. SendClientMessageEx(playerid, COLOR_GREY2, "%s's interior set to ID %i.", GetRPName(targetid), interiorid);
  51308. return 1;
  51309. }
  51310. CMD:setvw(playerid, params[])
  51311. {
  51312. new targetid, worldid;
  51313. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  51314. {
  51315. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  51316. }
  51317. if(sscanf(params, "ui", targetid, worldid))
  51318. {
  51319. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setvw [playerid] [vw]");
  51320. }
  51321. if(!IsPlayerConnected(targetid))
  51322. {
  51323. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  51324. }
  51325. SetPlayerVirtualWorld(targetid, worldid);
  51326. SendClientMessageEx(playerid, COLOR_GREY2, "%s's virtual world set to ID %i.", GetRPName(targetid), worldid);
  51327. return 1;
  51328. }
  51329. CMD:setskin(playerid, params[])
  51330. {
  51331. new targetid, skinid;
  51332. if(PlayerData[playerid][pAdmin] < 2)
  51333. {
  51334. return SendClientMessage(playerid, COLOR_GREY, "Ti nuk je i autorizuar p?r t? p?rdorur k?t? komand?.");
  51335. }
  51336. if(sscanf(params, "ui", targetid, skinid))
  51337. {
  51338. return SendSyntaxMessage(playerid, " /setskin [playerid] [skinid]");
  51339. }
  51340. if(!IsPlayerConnected(targetid))
  51341. {
  51342. return SendClientMessage(playerid, COLOR_GREY, "Ai lojtar nuk ?sht? n? server.");
  51343. }
  51344. if(!(0 <= skinid <= 311) && !(25000 <= skinid <= 25165))
  51345. {
  51346. return SendClientMessage(playerid, COLOR_GREY, "Invalid skin specified.");
  51347. }
  51348. if(!IsPlayerSpawned(targetid))
  51349. {
  51350. return SendClientMessage(playerid, COLOR_GREY, "The player specified is either not spawned, or spectating.");
  51351. }
  51352. if(PlayerData[targetid][pAdmin] > PlayerData[playerid][pAdmin])
  51353. {
  51354. return SendClientMessage(playerid, COLOR_GREY, "That player has a higher admin level than you. You can't change their skin.");
  51355. }
  51356. SetScriptSkin(targetid, skinid);
  51357. SendClientMessageEx(playerid, COLOR_GREY2, "%s's skin set to ID %i.", GetPlayerNameEx(targetid), skinid);
  51358. return 1;
  51359. }
  51360. CMD:revive(playerid, params[])
  51361. {
  51362. new targetid;
  51363. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  51364. {
  51365. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  51366. }
  51367. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  51368. {
  51369. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  51370. }
  51371. if(sscanf(params, "u", targetid))
  51372. {
  51373. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /revive [playerid]");
  51374. }
  51375. if(!IsPlayerConnected(targetid))
  51376. {
  51377. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  51378. }
  51379. if(!PlayerData[targetid][pInjured])
  51380. {
  51381. return SendClientMessage(playerid, COLOR_GREY, "The player specified is not injured.");
  51382. }
  51383. PlayerData[targetid][pInjured] = 0;
  51384. SetPlayerHealth(targetid, 100.0);
  51385. ClearAnimations(targetid, 1);
  51386. SendClientMessage(targetid, COLOR_YELLOW, "You have been revived by an admin!");
  51387. if(PlayerData[targetid][pAcceptedEMS] != INVALID_PLAYER_ID)
  51388. {
  51389. SendClientMessageEx(PlayerData[targetid][pAcceptedEMS], COLOR_YELLOW, "Your patient %s has somehow found the strength to get up.", GetRPName(targetid));
  51390. PlayerData[targetid][pAcceptedEMS] = INVALID_PLAYER_ID;
  51391. }
  51392. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has revived %s.", GetRPName(playerid), GetRPName(targetid));
  51393. return 1;
  51394. }
  51395. CMD:heject(playerid, params[])
  51396. {
  51397. new targetid;
  51398. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  51399. {
  51400. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  51401. }
  51402. if(sscanf(params, "u", targetid))
  51403. {
  51404. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /heject [playerid]");
  51405. }
  51406. if(!IsPlayerConnected(targetid))
  51407. {
  51408. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  51409. }
  51410. if(!PlayerData[targetid][pHospital])
  51411. {
  51412. return SendClientMessage(playerid, COLOR_GREY, "The player specified is not in hospital.");
  51413. }
  51414. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s ejected %s from the hospital.", GetRPName(playerid), GetRPName(targetid));
  51415. PlayerData[targetid][pHospitalTime] = 1;
  51416. SendClientMessage(targetid, COLOR_YELLOW, "You have been ejected from hospital by an admin!");
  51417. return 1;
  51418. }
  51419. CMD:goto(playerid, params[])
  51420. {
  51421. new targetid;
  51422. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  51423. {
  51424. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  51425. }
  51426. if(PlayerData[targetid][pToggleTP] == 1)
  51427. {
  51428. return SendClientMessage(playerid, COLOR_GREY, "Target id has togged teleports");
  51429. }
  51430. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  51431. {
  51432. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  51433. }
  51434. if(sscanf(params, "u", targetid))
  51435. {
  51436. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /goto [playerid/location]");
  51437. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: LS, SF, LV, Grove, Idlewood, Unity, Jefferson, Market, Airport, Bank");
  51438. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Dealership, VIP, Paintball, DMV, Casino, Spawn, Allsaints, Casino");
  51439. return 1;
  51440. }
  51441. if(!strcmp(params, "ls", true))
  51442. {
  51443. TeleportToCoords(playerid, 1544.4407, -1675.5522, 13.5584, 90.0000, 0, 0);
  51444. SendClientMessage(playerid, COLOR_GREY2, "Teleported to Los Santos.");
  51445. }
  51446. else if(!strcmp(params, "sf", true))
  51447. {
  51448. TeleportToCoords(playerid, -1421.5629, -288.9972, 14.1484, 135.0000, 0, 0);
  51449. SendClientMessage(playerid, COLOR_GREY2, "Teleported to San Fierro.");
  51450. }
  51451. else if(!strcmp(params, "lv", true))
  51452. {
  51453. TeleportToCoords(playerid, 1670.6908, 1423.5240, 10.7811, 270.0000, 0, 0);
  51454. SendClientMessage(playerid, COLOR_GREY2, "Teleported to Las Venturas.");
  51455. }
  51456. else if(!strcmp(params, "grove", true))
  51457. {
  51458. TeleportToCoords(playerid, 2497.8274, -1668.9033, 13.3438, 90.0000, 0, 0);
  51459. SendClientMessage(playerid, COLOR_GREY2, "Teleported to Grove Street.");
  51460. }
  51461. else if(!strcmp(params, "idlewood", true))
  51462. {
  51463. TeleportToCoords(playerid, 2090.0664, -1816.9071, 13.3904, 90.0000, 0, 0);
  51464. SendClientMessage(playerid, COLOR_GREY2, "Teleported to Idlewood.");
  51465. }
  51466. else if(!strcmp(params, "unity", true))
  51467. {
  51468. TeleportToCoords(playerid, 1782.2683, -1865.5726, 13.5725, 0.0000, 0, 0);
  51469. SendClientMessage(playerid, COLOR_GREY2, "Teleported to Unity Station.");
  51470. }
  51471. else if(!strcmp(params, "jefferson", true))
  51472. {
  51473. TeleportToCoords(playerid, 2222.3438, -1164.5013, 25.7331, 0.0000, 0, 0);
  51474. SendClientMessage(playerid, COLOR_GREY2, "Teleported to Jefferson Motel.");
  51475. }
  51476. else if(!strcmp(params, "market", true))
  51477. {
  51478. TeleportToCoords(playerid, 818.1782, -1349.2217, 13.5260, 0.0000, 0, 0);
  51479. SendClientMessage(playerid, COLOR_GREY2, "Teleported to Market.");
  51480. }
  51481. else if(!strcmp(params, "airport", true))
  51482. {
  51483. TeleportToCoords(playerid, 1938.7185, -2370.6375, 13.5469, 0.0000, 0, 0);
  51484. SendClientMessage(playerid, COLOR_GREY2, "Teleported to LS airport.");
  51485. }
  51486. else if(!strcmp(params, "bank", true))
  51487. {
  51488. TeleportToCoords(playerid, 1463.8929, -1026.6189, 23.8281, 180.0000, 0, 0);
  51489. SendClientMessage(playerid, COLOR_GREY2, "Teleported to Mulholland bank.");
  51490. }
  51491. else if(!strcmp(params, "dealership", true))
  51492. {
  51493. TeleportToCoords(playerid, 546.7000, -1281.5160, 17.2482, 180.0000, 0, 0);
  51494. SendClientMessage(playerid, COLOR_GREY2, "Teleported to Grotti dealership.");
  51495. }
  51496. else if(!strcmp(params, "vip", true))
  51497. {
  51498. TeleportToCoords(playerid, 1310.2343,-1395.1676,13.2596, 90.0000, 0, 0);
  51499. SendClientMessage(playerid, COLOR_GREY2, "Teleported to VIP lounge.");
  51500. }
  51501. else if(!strcmp(params, "paintball", true))
  51502. {
  51503. TeleportToCoords(playerid, 1286.2870,-1349.8572,13.5689, 315.0000, 0, 0);
  51504. SendClientMessage(playerid, COLOR_GREY2, "Teleported to Paintball.");
  51505. }
  51506. else if(!strcmp(params, "dmv", true))
  51507. {
  51508. TeleportToCoords(playerid, 1224.1537, -1824.5253, 13.5900, 180.0000, 0, 0);
  51509. SendClientMessage(playerid, COLOR_GREY2, "Teleported to DMV.");
  51510. }
  51511. else if(!strcmp(params, "casino", true))
  51512. {
  51513. TeleportToCoords(playerid, 1603.5885,-1170.0281,24.0781, 180.0000, 0, 0);
  51514. SendClientMessage(playerid, COLOR_GREY2, "Teleported to Casino.");
  51515. }
  51516. else if(!strcmp(params, "spawn", true))
  51517. {
  51518. TeleportToCoords(playerid, 1723.4384, -1380.0234, 13.5469, 270.0000, 0, 0);
  51519. SendClientMessage(playerid, COLOR_GREY2, "Teleported to Spawn.");
  51520. }
  51521. else if(!strcmp(params, "allsaints", true))
  51522. {
  51523. TeleportToCoords(playerid, 1189.5807, -1301.7474, 13.5584, 180.0000, 0, 0);
  51524. SendClientMessage(playerid, COLOR_GREY2, "Teleported to Allsaints.");
  51525. }
  51526. else if(!strcmp(params, "county", true))
  51527. {
  51528. TeleportToCoords(playerid, 1999.4670, -1448.2010, 13.5601, 315.0000, 0, 0);
  51529. SendClientMessage(playerid, COLOR_GREY2, "Teleported to County.");
  51530. }
  51531. else
  51532. {
  51533. if(!IsPlayerConnected(targetid))
  51534. {
  51535. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  51536. }
  51537. if(!IsPlayerSpawned(targetid))
  51538. {
  51539. return SendClientMessage(playerid, COLOR_GREY, "The player specified is either not spawned, or spectating.");
  51540. }
  51541. TeleportToPlayer(playerid, targetid);
  51542. SendClientMessageEx(targetid, COLOR_LIGHTRED, "%s %s has teleported to your position.", GetAdmCmdRank(playerid), GetRPName(playerid));
  51543. SendClientMessageEx(playerid, COLOR_GREY2, "Teleported to %s's position.", GetRPName(targetid));
  51544. }
  51545. return 1;
  51546. }
  51547. CMD:gethere(playerid, params[])
  51548. {
  51549. new targetid;
  51550. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  51551. {
  51552. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  51553. }
  51554. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  51555. {
  51556. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  51557. }
  51558. if(sscanf(params, "u", targetid))
  51559. {
  51560. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /gethere [playerid]");
  51561. }
  51562. if(!IsPlayerConnected(targetid))
  51563. {
  51564. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  51565. }
  51566. if(!IsPlayerSpawned(targetid))
  51567. {
  51568. return SendClientMessage(playerid, COLOR_GREY, "The player specified is either not spawned, or spectating.");
  51569. }
  51570. if(PlayerData[targetid][pPaintball] > 0 && PlayerData[playerid][pPaintball] == 0)
  51571. {
  51572. return SendClientMessage(playerid, COLOR_GREY, "That player is currently in the paintball arena.");
  51573. }
  51574. if(PlayerData[targetid][pAdmin] > PlayerData[playerid][pAdmin])
  51575. {
  51576. return SendClientMessage(playerid, COLOR_GREY, "You can't teleport an admin who has a higher admin level than you.");
  51577. }
  51578. /*if(PlayerData[targetid][pJoinedEvent])
  51579. {
  51580. return SendClientMessage(playerid, COLOR_GREY, "That player is currently in the event.");
  51581. }*/
  51582. TeleportToPlayer(targetid, playerid);
  51583. SendClientMessageEx(playerid, COLOR_GREY2, "Teleported %s to your position.", GetRPName(targetid));
  51584. return 1;
  51585. }
  51586. CMD:gotocar(playerid, params[])
  51587. {
  51588. new vehicleid;
  51589. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  51590. {
  51591. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  51592. }
  51593. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  51594. {
  51595. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  51596. }
  51597. if(sscanf(params, "i", vehicleid))
  51598. {
  51599. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /gotocar [vehicleid]");
  51600. }
  51601. if(!IsValidVehicle(vehicleid))
  51602. {
  51603. return SendClientMessage(playerid, COLOR_GREY, "Invalid vehicle specified.");
  51604. }
  51605. TeleportToVehicle(playerid, vehicleid);
  51606. SendClientMessageEx(playerid, COLOR_GREY2, "Teleported to vehicle ID %i.", vehicleid);
  51607. return 1;
  51608. }
  51609. CMD:getcar(playerid, params[])
  51610. {
  51611. new vehicleid, driverid;
  51612. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  51613. {
  51614. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  51615. }
  51616. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  51617. {
  51618. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  51619. }
  51620. if(sscanf(params, "i", vehicleid))
  51621. {
  51622. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /getcar [vehicleid]");
  51623. }
  51624. if(!IsValidVehicle(vehicleid))
  51625. {
  51626. return SendClientMessage(playerid, COLOR_GREY, "Invalid vehicle specified.");
  51627. }
  51628. if((driverid = GetVehicleDriver(vehicleid)) != INVALID_PLAYER_ID && PlayerData[driverid][pAdmin] > PlayerData[playerid][pAdmin])
  51629. {
  51630. return SendClientMessage(playerid, COLOR_GREY, "You can't teleport the vehicle of an admin who has a higher admin level than you.");
  51631. }
  51632. new
  51633. Float:x,
  51634. Float:y,
  51635. Float:z;
  51636. GetPlayerPos(playerid, x, y, z);
  51637. SetVehiclePos(vehicleid, x + 1, y + 1, z + 2.0);
  51638. SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid));
  51639. LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid));
  51640. SendClientMessageEx(playerid, COLOR_GREY2, "Teleported vehicle ID %i to your position.", vehicleid);
  51641. return 1;
  51642. }
  51643. CMD:gotocoords(playerid, params[])
  51644. {
  51645. new Float:x, Float:y, Float:z, interiorid;
  51646. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  51647. {
  51648. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  51649. }
  51650. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  51651. {
  51652. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  51653. }
  51654. if(sscanf(params, "fffI(0)", x, y, z, interiorid))
  51655. {
  51656. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /gotocoords [x] [y] [z] [int (optional)]");
  51657. }
  51658. SetPlayerPos(playerid, x, y, z);
  51659. SetPlayerInterior(playerid, interiorid);
  51660. return 1;
  51661. }
  51662. CMD:gotoint(playerid, params[])
  51663. {
  51664. static list[4096];
  51665. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  51666. {
  51667. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  51668. }
  51669. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  51670. {
  51671. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  51672. }
  51673. if(isnull(list))
  51674. {
  51675. for(new i = 0; i < sizeof(interiorArray); i ++)
  51676. {
  51677. format(list, sizeof(list), "%s\n%s", list, interiorArray[i][intName]);
  51678. }
  51679. }
  51680. Dialog_Show(playerid, DIALOG_INTERIORS, DIALOG_STYLE_LIST, "Choose an interior to teleport to.", list, "Select", "Cancel");
  51681. return 1;
  51682. }
  51683. CMD:jetpack(playerid, params[])
  51684. {
  51685. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  51686. {
  51687. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  51688. }
  51689. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  51690. {
  51691. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  51692. }
  51693. PlayerData[playerid][pJetpack] = 1;
  51694. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
  51695. GameTextForPlayer(playerid, "~g~Jetpack", 3000, 3);
  51696. switch(random(4))
  51697. {
  51698. case 0: SendClientMessage(playerid, COLOR_WHITE, "* Random Fact: The jetpack is part of an experiment conducted at the Area 69 facility.");
  51699. case 1: SendClientMessage(playerid, COLOR_WHITE, "* Random Fact: You stole this from Area 69 in that one single player mission. Remember?");
  51700. case 2: SendClientMessage(playerid, COLOR_WHITE, "* Random Fact: You probably don't need this anyway. All you admins seem to do is airbreak around the map.");
  51701. case 3: SendClientMessage(playerid, COLOR_WHITE, "* Random Fact: You probably aren't reading this anyway. Fuck you.");
  51702. }
  51703. return 1;
  51704. }
  51705. CMD:sendto(playerid, params[])
  51706. {
  51707. new targetid, option[12], param[32];
  51708. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN && PlayerData[playerid][pHelper] < 3)
  51709. {
  51710. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  51711. }
  51712. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  51713. {
  51714. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  51715. }
  51716. if(sscanf(params, "us[12]S()[32]", targetid, option, param))
  51717. {
  51718. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sendto [playerid] [location]");
  51719. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Player, Vehicle, LS, SF, LV, Grove, Idlewood, Unity, Jefferson, Market, Bank");
  51720. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Dealership, VIP, Paintball, DMV, Casino");
  51721. return 1;
  51722. }
  51723. if(!IsPlayerConnected(targetid))
  51724. {
  51725. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  51726. }
  51727. if(!IsPlayerSpawned(targetid))
  51728. {
  51729. return SendClientMessage(playerid, COLOR_GREY, "The player specified is either not spawned, or spectating.");
  51730. }
  51731. if(PlayerData[targetid][pJailType])
  51732. {
  51733. return SendClientMessage(playerid, COLOR_GREY, "This player is in jail so you can't teleport them.");
  51734. }
  51735. if(PlayerData[targetid][pPaintball] > 0 && PlayerData[playerid][pPaintball] == 0)
  51736. {
  51737. return SendClientMessage(playerid, COLOR_GREY, "That player is currently in the paintball arena.");
  51738. }
  51739. if(PlayerData[targetid][pJoinedEvent])
  51740. {
  51741. return SendClientMessage(playerid, COLOR_GREY, "That player is currently in the event.");
  51742. }
  51743. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN && isnull(PlayerData[targetid][pHelpRequest]) && PlayerData[playerid][pAcceptedHelp] == 0)
  51744. {
  51745. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't submitted a help request. Therefore you can't teleport them.");
  51746. }
  51747. if(PlayerData[targetid][pAdmin] > PlayerData[playerid][pAdmin])
  51748. {
  51749. return SendClientMessage(playerid, COLOR_GREY, "You can't teleport an admin who has a higher admin level than you.");
  51750. }
  51751. if(!strcmp(option, "ls", true))
  51752. {
  51753. TeleportToCoords(targetid, 1544.4407, -1675.5522, 13.5584, 90.0000, 0, 0);
  51754. SendClientMessageEx(playerid, COLOR_GREY2, "You have sent %s to Los Santos.", GetRPName(targetid));
  51755. SendClientMessageEx(targetid, COLOR_GREY2, "%s has sent you to Los Santos.", GetRPName(playerid));
  51756. }
  51757. else if(!strcmp(option, "sf", true))
  51758. {
  51759. TeleportToCoords(targetid, -1421.5629, -288.9972, 14.1484, 135.0000, 0, 0);
  51760. SendClientMessageEx(playerid, COLOR_GREY2, "You have sent %s to San Fierro.", GetRPName(targetid));
  51761. SendClientMessageEx(targetid, COLOR_GREY2, "%s has sent you to San Fierro.", GetRPName(playerid));
  51762. }
  51763. else if(!strcmp(option, "lv", true))
  51764. {
  51765. TeleportToCoords(targetid, 1670.6908, 1423.5240, 10.7811, 270.0000, 0, 0);
  51766. SendClientMessageEx(playerid, COLOR_GREY2, "You have sent %s to Las Venturas.", GetRPName(targetid));
  51767. SendClientMessageEx(targetid, COLOR_GREY2, "%s has sent you to Las Venturas.", GetRPName(playerid));
  51768. }
  51769. else if(!strcmp(option, "grove", true))
  51770. {
  51771. TeleportToCoords(targetid, 2497.8274, -1668.9033, 13.3438, 90.0000, 0, 0);
  51772. SendClientMessageEx(playerid, COLOR_GREY2, "You have sent %s to Grove Street.", GetRPName(targetid));
  51773. SendClientMessageEx(targetid, COLOR_GREY2, "%s has sent you to Grove Street.", GetRPName(playerid));
  51774. }
  51775. else if(!strcmp(option, "idlewood", true))
  51776. {
  51777. TeleportToCoords(targetid, 2090.0664, -1816.9071, 13.3904, 90.0000, 0, 0);
  51778. SendClientMessageEx(playerid, COLOR_GREY2, "You have sent %s to Idlewood.", GetRPName(targetid));
  51779. SendClientMessageEx(targetid, COLOR_GREY2, "%s has sent you to Idlewood.", GetRPName(playerid));
  51780. }
  51781. else if(!strcmp(option, "unity", true))
  51782. {
  51783. TeleportToCoords(targetid, 1782.2683, -1865.5726, 13.5725, 0.0000, 0, 0);
  51784. SendClientMessageEx(playerid, COLOR_GREY2, "You have sent %s to Unity Station.", GetRPName(targetid));
  51785. SendClientMessageEx(targetid, COLOR_GREY2, "%s has sent you to Unity Station.", GetRPName(playerid));
  51786. }
  51787. else if(!strcmp(option, "jefferson", true))
  51788. {
  51789. TeleportToCoords(targetid, 2222.3438, -1164.5013, 25.7331, 0.0000, 0, 0);
  51790. SendClientMessageEx(playerid, COLOR_GREY2, "You have sent %s to Jefferson Motel.", GetRPName(targetid));
  51791. SendClientMessageEx(targetid, COLOR_GREY2, "%s has sent you to Jefferson Motel.", GetRPName(playerid));
  51792. }
  51793. else if(!strcmp(option, "market", true))
  51794. {
  51795. TeleportToCoords(targetid, 818.1782, -1349.2217, 13.5260, 0.0000, 0, 0);
  51796. SendClientMessageEx(playerid, COLOR_GREY2, "You have sent %s to Market.", GetRPName(targetid));
  51797. SendClientMessageEx(targetid, COLOR_GREY2, "%s has sent you to Market.", GetRPName(playerid));
  51798. }
  51799. else if(!strcmp(option, "bank", true))
  51800. {
  51801. TeleportToCoords(targetid, 1463.8929, -1026.6189, 23.8281, 180.0000, 0, 0);
  51802. SendClientMessageEx(playerid, COLOR_GREY2, "You have sent %s to the Bank.", GetRPName(targetid));
  51803. SendClientMessageEx(targetid, COLOR_GREY2, "%s has sent you to the Bank.", GetRPName(playerid));
  51804. }
  51805. else if(!strcmp(option, "dealership", true))
  51806. {
  51807. TeleportToCoords(targetid, 546.7000, -1281.5160, 17.2482, 180.0000, 0, 0);
  51808. SendClientMessageEx(playerid, COLOR_GREY2, "You have sent %s to Grotti car dealership.", GetRPName(targetid));
  51809. SendClientMessageEx(targetid, COLOR_GREY2, "%s has sent you to Grotti car dealership.", GetRPName(playerid));
  51810. }
  51811. else if(!strcmp(option, "vip", true))
  51812. {
  51813. TeleportToCoords(targetid, 1024.2438, -1553.4551, 13.5691, 90.0000, 0, 0);
  51814. SendClientMessageEx(playerid, COLOR_GREY2, "You have sent %s to the VIP lounge.", GetRPName(targetid));
  51815. SendClientMessageEx(targetid, COLOR_GREY2, "%s has sent you to the VIP lounge.", GetRPName(playerid));
  51816. }
  51817. else if(!strcmp(option, "paintball", true))
  51818. {
  51819. TeleportToCoords(targetid, 1286.2870,-1349.8572,13.5689, 315.0000, 0, 0);
  51820. SendClientMessageEx(playerid, COLOR_GREY2, "You have sent %s to Paintball.", GetRPName(targetid));
  51821. SendClientMessageEx(targetid, COLOR_GREY2, "%s has sent you to Paintball.", GetRPName(playerid));
  51822. }
  51823. else if(!strcmp(option, "dmv", true))
  51824. {
  51825. TeleportToCoords(targetid, 1224.1537, -1824.5253, 13.5900, 180.0000, 0, 0);
  51826. SendClientMessageEx(playerid, COLOR_GREY2, "You have sent %s to the DMV.", GetRPName(targetid));
  51827. SendClientMessageEx(targetid, COLOR_GREY2, "%s has sent you to the DMV.", GetRPName(playerid));
  51828. }
  51829. else if(!strcmp(option, "casino", true))
  51830. {
  51831. TeleportToCoords(targetid, 1022.5992, -1122.8069, 23.8710, 180.0000, 0, 0);
  51832. SendClientMessageEx(playerid, COLOR_GREY2, "You have sent %s to Casino.", GetRPName(targetid));
  51833. SendClientMessageEx(targetid, COLOR_GREY2, "%s has sent you to Casino.", GetRPName(playerid));
  51834. }
  51835. else if(!strcmp(option, "player", true))
  51836. {
  51837. new sendtargetid;
  51838. if(PlayerData[playerid][pAdmin] < 1)
  51839. {
  51840. return SendClientMessage(playerid, COLOR_GREY, "Only level 2+ admins can do this.");
  51841. }
  51842. if(sscanf(param, "u", sendtargetid))
  51843. {
  51844. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sendto [playerid] [player] [targetid]");
  51845. }
  51846. if(!IsPlayerConnected(sendtargetid))
  51847. {
  51848. return SendClientMessage(playerid, COLOR_GREY, "The target specified is disconnected.");
  51849. }
  51850. if(!IsPlayerSpawned(sendtargetid))
  51851. {
  51852. return SendClientMessage(playerid, COLOR_GREY, "The target specified is either not spawned, or spectating.");
  51853. }
  51854. TeleportToPlayer(targetid, sendtargetid);
  51855. SendClientMessageEx(playerid, COLOR_GREY2, "You have sent %s to %s's location.", GetRPName(targetid), GetRPName(sendtargetid));
  51856. SendClientMessageEx(targetid, COLOR_GREY2, "%s has sent you to %s's location.", GetRPName(playerid), GetRPName(sendtargetid));
  51857. }
  51858. else if(!strcmp(option, "vehicle", true))
  51859. {
  51860. new vehicleid;
  51861. if(PlayerData[playerid][pAdmin] < 1)
  51862. {
  51863. return SendClientMessage(playerid, COLOR_GREY, "Only level 2+ admins can do this.");
  51864. }
  51865. if(sscanf(param, "i", vehicleid))
  51866. {
  51867. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sendto [playerid] [vehicle] [vehicleid]");
  51868. }
  51869. if(!IsValidVehicle(vehicleid))
  51870. {
  51871. return SendClientMessage(playerid, COLOR_GREY, "Invalid vehicle specified.");
  51872. }
  51873. TeleportToVehicle(targetid, vehicleid);
  51874. SendClientMessageEx(playerid, COLOR_GREY2, "You have sent %s to vehicle ID %i.", GetRPName(targetid), vehicleid);
  51875. SendClientMessageEx(targetid, COLOR_GREY2, "%s has sent you to vehicle ID %i.", GetRPName(playerid), vehicleid);
  51876. }
  51877. return 1;
  51878. }
  51879. CMD:listen(playerid, params[])
  51880. {
  51881. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  51882. {
  51883. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  51884. }
  51885. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  51886. {
  51887. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  51888. }
  51889. if(!PlayerData[playerid][pListen])
  51890. {
  51891. PlayerData[playerid][pListen] = 1;
  51892. SendClientMessage(playerid, COLOR_AQUA, "You are now listening to all IC & local OOC chats.");
  51893. }
  51894. else
  51895. {
  51896. PlayerData[playerid][pListen] = 0;
  51897. SendClientMessage(playerid, COLOR_AQUA, "You are no longer listening to IC & local OOC chats.");
  51898. }
  51899. return 1;
  51900. }
  51901. CMD:jail(playerid, params[])
  51902. {
  51903. new targetid, minutes, reason[128];
  51904. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  51905. {
  51906. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  51907. }
  51908. if(sscanf(params, "uis[128]", targetid, minutes, reason))
  51909. {
  51910. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /jail [playerid] [minutes] [reason]");
  51911. }
  51912. if(!IsPlayerConnected(targetid))
  51913. {
  51914. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  51915. }
  51916. if(PlayerData[targetid][pAdmin] > PlayerData[playerid][pAdmin])
  51917. {
  51918. return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be jailed.");
  51919. }
  51920. if(!PlayerData[targetid][pLogged])
  51921. {
  51922. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet. You can wait until they login or use /ojail.");
  51923. }
  51924. if(minutes < 1)
  51925. {
  51926. return SendClientMessage(playerid, COLOR_GREY, "The amount of minutes cannot be below one. /unjail to release a player.");
  51927. }
  51928. PlayerData[targetid][pJailType] = 1;
  51929. PlayerData[targetid][pJailTime] = minutes * 60;
  51930. ResetPlayerWeaponsEx(targetid);
  51931. ResetPlayer(targetid);
  51932. SetPlayerInJail(targetid);
  51933. Log_Write("log_punishments", "%s (uid: %i) jailed %s (uid: %i) for %i minutes, reason: %s", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], minutes, reason);
  51934. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was jailed for %i minutes by %s, reason: %s", GetRPName(targetid), minutes, GetRPName(playerid), reason);
  51935. SendClientMessageEx(targetid, COLOR_AQUA, "* You have been admin jailed for %i minutes by %s.", minutes, GetRPName(playerid));
  51936. return 1;
  51937. }
  51938. CMD:rwarn(playerid, params[])
  51939. {
  51940. new targetid, reason[128];
  51941. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  51942. {
  51943. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  51944. }
  51945. if(sscanf(params, "us[128]", targetid, reason))
  51946. {
  51947. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /rwarn [playerid] [reason]");
  51948. }
  51949. if(!IsPlayerConnected(targetid))
  51950. {
  51951. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  51952. }
  51953. if(PlayerData[targetid][pReportMuted])
  51954. {
  51955. return SendClientMessage(playerid, COLOR_GREY, "The player specified is muted from reports.");
  51956. }
  51957. PlayerData[targetid][pReportWarns]++;
  51958. SendClientMessageEx(targetid, COLOR_LIGHTRED, "* %s issued you a report warning, reason: %s (%i/3)", GetRPName(playerid), reason, PlayerData[targetid][pReportWarns]);
  51959. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s was given a report warning by %s, reason: %s", GetRPName(targetid), GetRPName(playerid), reason);
  51960. if(PlayerData[targetid][pReportWarns] >= 3)
  51961. {
  51962. PlayerData[targetid][pReportMuted] = 12;
  51963. SendClientMessage(targetid, COLOR_LIGHTRED, "* You have been muted from reports for 12 playing hours.");
  51964. }
  51965. return 1;
  51966. }
  51967. CMD:runmute(playerid, params[])
  51968. {
  51969. new targetid;
  51970. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  51971. {
  51972. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  51973. }
  51974. if(sscanf(params, "u", targetid))
  51975. {
  51976. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /runmute [playerid]");
  51977. }
  51978. if(!IsPlayerConnected(targetid))
  51979. {
  51980. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  51981. }
  51982. if(!PlayerData[targetid][pReportMuted])
  51983. {
  51984. return SendClientMessage(playerid, COLOR_GREY, "The player specified is not muted from reports.");
  51985. }
  51986. PlayerData[targetid][pReportWarns] = 0;
  51987. PlayerData[targetid][pReportMuted] = 0;
  51988. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s was unmuted from reports by %s.", GetRPName(targetid), GetRPName(playerid));
  51989. SendClientMessageEx(targetid, COLOR_YELLOW, "Your report mute has been lifted by %s. Your report warnings were reset.", GetRPName(playerid));
  51990. return 1;
  51991. }
  51992. CMD:nmute(playerid, params[])
  51993. {
  51994. new targetid;
  51995. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN && PlayerData[playerid][pHelper] < 2)
  51996. {
  51997. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  51998. }
  51999. if(sscanf(params, "u", targetid))
  52000. {
  52001. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /nmute [playerid]");
  52002. }
  52003. if(!IsPlayerConnected(targetid))
  52004. {
  52005. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  52006. }
  52007. if(!PlayerData[targetid][pNewbieMuted])
  52008. {
  52009. PlayerData[targetid][pNewbieMuted] = 1;
  52010. PlayerData[targetid][pNewbieMuteTime] = gettime() + 14400;
  52011. SendStaffMessage(COLOR_LIGHTRED, "AdmCmd: %s was muted from newbie chat by %s.", GetRPName(targetid), GetRPName(playerid));
  52012. SendClientMessageEx(targetid, COLOR_LIGHTRED, "You have been muted from newbie chat by %s.", GetRPName(playerid));
  52013. }
  52014. else
  52015. {
  52016. PlayerData[targetid][pNewbieMuted] = 0;
  52017. PlayerData[targetid][pNewbieMuteTime] = 0;
  52018. SendStaffMessage(COLOR_LIGHTRED, "AdmCmd: %s was unmuted from newbie chat by %s.", GetRPName(targetid), GetRPName(playerid));
  52019. SendClientMessageEx(targetid, COLOR_WHITE, "You have been unmuted from newbie chat by %s.", GetRPName(playerid));
  52020. }
  52021. return 1;
  52022. }
  52023. CMD:hmute(playerid, params[])
  52024. {
  52025. new targetid;
  52026. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN && PlayerData[playerid][pHelper] < 2)
  52027. {
  52028. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  52029. }
  52030. if(sscanf(params, "u", targetid))
  52031. {
  52032. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /hmute [playerid]");
  52033. }
  52034. if(!IsPlayerConnected(targetid))
  52035. {
  52036. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  52037. }
  52038. if(!PlayerData[targetid][pHelpMuted])
  52039. {
  52040. PlayerData[targetid][pHelpMuted] = 1;
  52041. SendStaffMessage(COLOR_LIGHTRED, "AdmCmd: %s was muted from help requests by %s.", GetRPName(targetid), GetRPName(playerid));
  52042. SendClientMessageEx(targetid, COLOR_LIGHTRED, "You have been muted from help requests by %s.", GetRPName(playerid));
  52043. }
  52044. else
  52045. {
  52046. PlayerData[targetid][pHelpMuted] = 0;
  52047. SendStaffMessage(COLOR_LIGHTRED, "AdmCmd: %s was unmuted from help requests by %s.", GetRPName(targetid), GetRPName(playerid));
  52048. SendClientMessageEx(targetid, COLOR_WHITE, "You have been unmuted from help requests by %s.", GetRPName(playerid));
  52049. }
  52050. return 1;
  52051. }
  52052. CMD:admute(playerid, params[])
  52053. {
  52054. new targetid;
  52055. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  52056. {
  52057. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  52058. }
  52059. if(sscanf(params, "u", targetid))
  52060. {
  52061. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /admute [playerid]");
  52062. }
  52063. if(!IsPlayerConnected(targetid))
  52064. {
  52065. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  52066. }
  52067. if(!PlayerData[targetid][pAdMuted])
  52068. {
  52069. PlayerData[targetid][pAdMuted] = 1;
  52070. SendStaffMessage(COLOR_LIGHTRED, "AdmCmd: %s was muted from advertisements by %s.", GetRPName(targetid), GetRPName(playerid));
  52071. SendClientMessageEx(targetid, COLOR_LIGHTRED, "You have been muted from advertisements by %s.", GetRPName(playerid));
  52072. }
  52073. else
  52074. {
  52075. PlayerData[targetid][pAdMuted] = 0;
  52076. SendStaffMessage(COLOR_LIGHTRED, "AdmCmd: %s was unmuted from advertisements by %s.", GetRPName(targetid), GetRPName(playerid));
  52077. SendClientMessageEx(targetid, COLOR_WHITE, "You have been unmuted from advertisements by %s.", GetRPName(playerid));
  52078. }
  52079. return 1;
  52080. }
  52081. CMD:gmute(playerid, params[])
  52082. {
  52083. new targetid;
  52084. if(PlayerData[playerid][pAdmin] < 1 && PlayerData[playerid][pHelper] < 2)
  52085. {
  52086. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  52087. }
  52088. if(sscanf(params, "u", targetid))
  52089. {
  52090. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /gmute [playerid]");
  52091. }
  52092. if(!IsPlayerConnected(targetid))
  52093. {
  52094. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  52095. }
  52096. if(!PlayerData[targetid][pGlobalMuted])
  52097. {
  52098. PlayerData[targetid][pGlobalMuted] = 1;
  52099. PlayerData[targetid][pGlobalMuteTime] = gettime() + 14400;
  52100. SendStaffMessage(COLOR_LIGHTRED, "AdmCmd: %s was muted from global chat by %s.", GetRPName(targetid), GetRPName(playerid));
  52101. SendClientMessageEx(targetid, COLOR_LIGHTRED, "You have been muted from global chat by %s.", GetRPName(playerid));
  52102. }
  52103. else
  52104. {
  52105. PlayerData[targetid][pGlobalMuted] = 0;
  52106. PlayerData[targetid][pGlobalMuteTime] = 0;
  52107. SendStaffMessage(COLOR_LIGHTRED, "AdmCmd: %s was unmuted from global chat by %s.", GetRPName(targetid), GetRPName(playerid));
  52108. SendClientMessageEx(targetid, COLOR_WHITE, "You have been unmuted from global chat by %s.", GetRPName(playerid));
  52109. }
  52110. return 1;
  52111. }
  52112. CMD:rmute(playerid, params[])
  52113. {
  52114. new targetid;
  52115. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  52116. {
  52117. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  52118. }
  52119. if(sscanf(params, "u", targetid))
  52120. {
  52121. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /rmute [playerid]");
  52122. }
  52123. if(!IsPlayerConnected(targetid))
  52124. {
  52125. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  52126. }
  52127. if(!PlayerData[targetid][pReportMuted])
  52128. {
  52129. PlayerData[targetid][pReportMuted] = 99999;
  52130. PlayerData[targetid][pReportMuteTime] = gettime() + 14400;
  52131. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s was muted from submitting reports by %s.", GetRPName(targetid), GetRPName(playerid));
  52132. SendClientMessageEx(targetid, COLOR_LIGHTRED, "You have been muted from submitting reports by %s.", GetRPName(playerid));
  52133. }
  52134. else
  52135. {
  52136. PlayerData[targetid][pReportMuted] = 0;
  52137. PlayerData[targetid][pReportMuteTime] = 0;
  52138. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s was unmuted from submitting reports by %s.", GetRPName(targetid), GetRPName(playerid));
  52139. SendClientMessageEx(targetid, COLOR_WHITE, "You have been unmuted from submitting reports by %s.", GetRPName(playerid));
  52140. }
  52141. return 1;
  52142. }
  52143. CMD:nextweather(playerid, params[])
  52144. {
  52145. if(GetFactionType(playerid) != FACTION_NEWS)
  52146. {
  52147. return SendClientMessage(playerid, COLOR_GREY, "You are not a news reporter.");
  52148. }
  52149. if(nextWeather == 0)
  52150. {
  52151. SendClientMessage(playerid, COLOR_GREY, "Weather Forecast for the next hour, {FFFFFF}Sunny Skies");
  52152. }
  52153. if(nextWeather == 1)
  52154. {
  52155. SendClientMessage(playerid, COLOR_GREY, "Weather Forecast for the next hour, {FFFFFF}Moderate Sunny");
  52156. }
  52157. if(nextWeather == 2)
  52158. {
  52159. SendClientMessage(playerid, COLOR_GREY, "Weather Forecast for the next hour, {FFFFFF}Extra Sunny");
  52160. }
  52161. if(nextWeather == 3)
  52162. {
  52163. SendClientMessage(playerid, COLOR_GREY, "Weather Forecast for the next hour, {FFFFFF}Sunny");
  52164. }
  52165. if(nextWeather == 4)
  52166. {
  52167. SendClientMessage(playerid, COLOR_GREY, "Weather Forecast for the next hour, {FFFFFF}Cloudy");
  52168. }
  52169. if(nextWeather == 5)
  52170. {
  52171. SendClientMessage(playerid, COLOR_GREY, "Weather Forecast for the next hour, {FFFFFF}Sunny Skies");
  52172. }
  52173. if(nextWeather == 6)
  52174. {
  52175. SendClientMessage(playerid, COLOR_GREY, "Weather Forecast for the next hour, {FFFFFF}Extra Sunny");
  52176. }
  52177. if(nextWeather == 7)
  52178. {
  52179. SendClientMessage(playerid, COLOR_GREY, "Weather Forecast for the next hour, {FFFFFF}Cloudy");
  52180. }
  52181. if(nextWeather == 8)
  52182. {
  52183. SendClientMessage(playerid, COLOR_GREY, "Weather Forecast for the next hour, {FFFFFF}Rainy");
  52184. }
  52185. if(nextWeather == 9)
  52186. {
  52187. SendClientMessage(playerid, COLOR_GREY, "Weather Forecast for the next hour, {FFFFFF}Foggy");
  52188. }
  52189. if(nextWeather == 10)
  52190. {
  52191. SendClientMessage(playerid, COLOR_GREY, "Weather Forecast for the next hour, {FFFFFF}Sunny Skies");
  52192. }
  52193. if(nextWeather == 11)
  52194. {
  52195. SendClientMessage(playerid, COLOR_GREY, "Weather Forecast for the next hour, {FFFFFF}Extra Sunny");
  52196. }
  52197. if(nextWeather == 12)
  52198. {
  52199. SendClientMessage(playerid, COLOR_GREY, "Weather Forecast for the next hour, {FFFFFF}Cloudy");
  52200. }
  52201. if(nextWeather == 13)
  52202. {
  52203. SendClientMessage(playerid, COLOR_GREY, "Weather Forecast for the next hour, {FFFFFF}Extra Sunny");
  52204. }
  52205. if(nextWeather == 14)
  52206. {
  52207. SendClientMessage(playerid, COLOR_GREY, "Weather Forecast for the next hour, {FFFFFF}Sunny Skies");
  52208. }
  52209. if(nextWeather == 15)
  52210. {
  52211. SendClientMessage(playerid, COLOR_GREY, "Weather Forecast for the next hour, {FFFFFF}Cloudy");
  52212. }
  52213. if(nextWeather == 16)
  52214. {
  52215. SendClientMessage(playerid, COLOR_GREY, "Weather Forecast for the next hour, {FFFFFF}Rainy");
  52216. }
  52217. if(nextWeather == 17)
  52218. {
  52219. SendClientMessage(playerid, COLOR_GREY, "Weather Forecast for the next hour, {FFFFFF}Extra Sunny");
  52220. }
  52221. if(nextWeather == 18)
  52222. {
  52223. SendClientMessage(playerid, COLOR_GREY, "Weather Forecast for the next hour, {FFFFFF}Extra Sunny");
  52224. }
  52225. if(nextWeather == 19)
  52226. {
  52227. SendClientMessage(playerid, COLOR_GREY, "Weather Forecast for the next hour, {FFFFFF}Sandstorm");
  52228. }
  52229. if(nextWeather == 20)
  52230. {
  52231. SendClientMessage(playerid, COLOR_GREY, "Weather Forecast for the next hour, {FFFFFF}Foggy(greenish)");
  52232. }
  52233. return 1;
  52234. }
  52235. CMD:freeze(playerid, params[])
  52236. {
  52237. new targetid;
  52238. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  52239. {
  52240. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  52241. }
  52242. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  52243. {
  52244. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  52245. }
  52246. if(sscanf(params, "u", targetid))
  52247. {
  52248. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /freeze [playerid]");
  52249. }
  52250. if(!IsPlayerConnected(targetid))
  52251. {
  52252. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  52253. }
  52254. TogglePlayerControllable(targetid, 0);
  52255. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s was frozen by %s.", GetRPName(targetid), GetRPName(playerid));
  52256. return 1;
  52257. }
  52258. CMD:unfreeze(playerid, params[])
  52259. {
  52260. new targetid;
  52261. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  52262. {
  52263. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  52264. }
  52265. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  52266. {
  52267. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  52268. }
  52269. if(sscanf(params, "u", targetid))
  52270. {
  52271. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /unfreeze [playerid]");
  52272. }
  52273. if(!IsPlayerConnected(targetid))
  52274. {
  52275. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  52276. }
  52277. if(PlayerData[targetid][pTazedTime])
  52278. {
  52279. ClearAnimations(targetid, 1);
  52280. PlayerData[targetid][pTazedTime] = 0;
  52281. }
  52282. PlayerData[targetid][pTied] = 0;
  52283. TogglePlayerControllable(targetid, 1);
  52284. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s was unfrozen by %s.", GetRPName(targetid), GetRPName(playerid));
  52285. return 1;
  52286. }
  52287. CMD:skiptut(playerid, params[])
  52288. {
  52289. new targetid;
  52290. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  52291. {
  52292. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  52293. }
  52294. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  52295. {
  52296. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  52297. }
  52298. if(sscanf(params, "u", targetid))
  52299. {
  52300. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /skiptut [playerid]");
  52301. }
  52302. if(!IsPlayerConnected(targetid))
  52303. {
  52304. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  52305. }
  52306. if(!PlayerData[targetid][pTutorial])
  52307. {
  52308. return SendClientMessage(playerid, COLOR_GREY, "That player isn't currently watching the tutorial.");
  52309. }
  52310. SendClientMessageEx(targetid, COLOR_WHITE, "%s has forced you out of the tutorial.", GetRPName(playerid));
  52311. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s forced %s out of the tutorial.", GetRPName(playerid), GetRPName(targetid));
  52312. KillTimer(PlayerData[targetid][pTutorialTimer]);
  52313. TutorialTimer(targetid, 11);
  52314. return 1;
  52315. }
  52316. CMD:listguns(playerid, params[])
  52317. {
  52318. new targetid;
  52319. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  52320. {
  52321. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  52322. }
  52323. if(sscanf(params, "u", targetid))
  52324. {
  52325. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /listguns [playerid]");
  52326. }
  52327. if(!IsPlayerConnected(targetid))
  52328. {
  52329. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  52330. }
  52331. SendClientMessageEx(playerid, COLOR_NAVYBLUE, "_______ %s's Weapons _______", GetRPName(targetid));
  52332. for(new i = 0; i < 13; i ++)
  52333. {
  52334. new
  52335. weapon,
  52336. ammo;
  52337. GetPlayerWeaponData(targetid, i, weapon, ammo);
  52338. if(weapon)
  52339. {
  52340. if(!PlayerHasWeapon(targetid, weapon, true)) {
  52341. SendClientMessageEx(playerid, COLOR_GREY2, "-> %s {FFD700}(Desynced){C8C8C8}", GetWeaponNameEx(weapon));
  52342. } else {
  52343. SendClientMessageEx(playerid, COLOR_GREY2, "-> %s", GetWeaponNameEx(weapon));
  52344. }
  52345. }
  52346. }
  52347. return 1;
  52348. }
  52349. CMD:disarm(playerid, params[])
  52350. {
  52351. new targetid;
  52352. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  52353. {
  52354. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  52355. }
  52356. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  52357. {
  52358. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  52359. }
  52360. if(sscanf(params, "u", targetid))
  52361. {
  52362. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /disarm [playerid]");
  52363. }
  52364. if(!IsPlayerConnected(targetid))
  52365. {
  52366. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  52367. }
  52368. ResetPlayerWeaponsEx(targetid);
  52369. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has disarmed %s.", GetRPName(playerid), GetRPName(targetid));
  52370. return 1;
  52371. }
  52372. CMD:nrn(playerid, params[])
  52373. {
  52374. new targetid;
  52375. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  52376. {
  52377. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  52378. }
  52379. if(sscanf(params, "u", targetid))
  52380. {
  52381. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /nrn [playerid]");
  52382. }
  52383. if(!IsPlayerConnected(targetid))
  52384. {
  52385. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  52386. }
  52387. /* if(PlayerData[targetid][pLevel] > 3)
  52388. {
  52389. return SendClientMessage(playerid, COLOR_GREY, "That player is level 3 or above and doesn't need a free namechange.");
  52390. } */
  52391. if(!PlayerData[targetid][pLogged])
  52392. {
  52393. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet.");
  52394. }
  52395. Dialog_Show(targetid, DIALOG_FREENAMECHANGE, DIALOG_STYLE_INPUT, "Non-RP Name", "An administrator has came to the conclusion that your name is non-RP.\nTherefore you have been given this free namechange in order to correct it.\n\nEnter a name in the Firstname_Lastname format in the box below:", "Submit", "");
  52396. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has forced %s to change their name for being Non-RP.", GetRPName(playerid), GetRPName(targetid));
  52397. return 1;
  52398. }
  52399. CMD:odm(playerid, params[])
  52400. {
  52401. new name[MAX_PLAYER_NAME];
  52402. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  52403. {
  52404. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  52405. }
  52406. if(sscanf(params, "s[24]", name))
  52407. {
  52408. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /odm [username]");
  52409. }
  52410. if(IsPlayerOnline(name))
  52411. {
  52412. return SendClientMessage(playerid, COLOR_GREY, "That player is already online and logged in. Use /dm instead.");
  52413. }
  52414. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid, ip, adminlevel, dmwarnings FROM "#TABLE_USERS" WHERE username = '%e'", name);
  52415. mysql_tquery(connectionID, queryBuffer, "OnAdminOfflineDM", "is", playerid, name);
  52416. return 1;
  52417. }
  52418. CMD:prison(playerid, params[])
  52419. {
  52420. new targetid, minutes, reason[128];
  52421. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  52422. {
  52423. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  52424. }
  52425. if(sscanf(params, "uis[128]", targetid, minutes, reason))
  52426. {
  52427. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /prison [playerid] [minutes] [reason]");
  52428. }
  52429. if(!IsPlayerConnected(targetid))
  52430. {
  52431. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  52432. }
  52433. if(PlayerData[targetid][pAdmin] > PlayerData[playerid][pAdmin])
  52434. {
  52435. return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be prisoned.");
  52436. }
  52437. if(!PlayerData[targetid][pLogged])
  52438. {
  52439. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet. You can wait until they login or use /oprison.");
  52440. }
  52441. if(minutes < 1)
  52442. {
  52443. return SendClientMessage(playerid, COLOR_GREY, "The amount of minutes cannot be below one. /unjail to release a player.");
  52444. }
  52445. PlayerData[targetid][pJailType] = 2;
  52446. PlayerData[targetid][pJailTime] = minutes * 60;
  52447. ResetPlayerWeaponsEx(targetid);
  52448. ResetPlayer(targetid);
  52449. SetPlayerInJail(targetid);
  52450. GameTextForPlayer(targetid, "~w~Welcome to~n~~r~admin jail", 5000, 3);
  52451. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET prisonedby = '%e', prisonreason = '%e' WHERE uid = %i", GetPlayerNameEx(playerid), reason, PlayerData[targetid][pID]);
  52452. mysql_tquery(connectionID, queryBuffer);
  52453. GetPlayerName(playerid, PlayerData[targetid][pPrisonedBy], MAX_PLAYER_NAME);
  52454. strcpy(PlayerData[targetid][pPrisonReason], reason, 128);
  52455. Log_Write("log_punishments", "%s (uid: %i) prisoned %s (uid: %i) for %i minutes, reason: %s", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], minutes, reason);
  52456. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was prisoned for %i minutes by %s, reason: %s", GetRPName(targetid), minutes, GetRPName(playerid), reason);
  52457. SendClientMessageEx(targetid, COLOR_AQUA, "* You have been admin prisoned for %i minutes by %s.", minutes, GetRPName(playerid));
  52458. return 1;
  52459. }
  52460. CMD:oprison(playerid, params[])
  52461. {
  52462. new username[MAX_PLAYERS], minutes, reason[128];
  52463. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  52464. {
  52465. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  52466. }
  52467. if(sscanf(params, "s[24]is[128]", username, minutes, reason))
  52468. {
  52469. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /oprison [username] [minutes] [reason]");
  52470. }
  52471. if(minutes < 1)
  52472. {
  52473. return SendClientMessage(playerid, COLOR_GREY, "The amount of minutes cannot be below one. /unjail to release a player.");
  52474. }
  52475. if(IsPlayerOnline(username))
  52476. {
  52477. return SendClientMessage(playerid, COLOR_GREY, "That player is already online and logged in. Use /prison instead.");
  52478. }
  52479. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT adminlevel, uid FROM "#TABLE_USERS" WHERE username = '%e'", username);
  52480. mysql_tquery(connectionID, queryBuffer, "OnAdminOfflinePrison", "isis", playerid, username, minutes, reason);
  52481. return 1;
  52482. }
  52483. CMD:release(playerid, params[])
  52484. {
  52485. new targetid, reason[128];
  52486. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  52487. {
  52488. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  52489. }
  52490. if(sscanf(params, "us[128]", targetid, reason))
  52491. {
  52492. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /release [playerid] [reason]");
  52493. }
  52494. if(!IsPlayerConnected(targetid))
  52495. {
  52496. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  52497. }
  52498. if(!PlayerData[targetid][pJailType])
  52499. {
  52500. return SendClientMessage(playerid, COLOR_GREY, "That player is not jailed.");
  52501. }
  52502. PlayerData[targetid][pJailTime] = 1;
  52503. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was released from jail/prison by %s, reason: %s", GetRPName(targetid), GetRPName(playerid), reason);
  52504. return 1;
  52505. }
  52506. CMD:fine(playerid, params[])
  52507. {
  52508. new targetid, amount, reason[128];
  52509. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  52510. {
  52511. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  52512. }
  52513. if(sscanf(params, "uis[128]", targetid, amount, reason))
  52514. {
  52515. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /fine [playerid] [amount] [reason]");
  52516. }
  52517. if(!IsPlayerConnected(targetid))
  52518. {
  52519. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  52520. }
  52521. if(PlayerData[targetid][pAdmin] > PlayerData[playerid][pAdmin])
  52522. {
  52523. return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be fined.");
  52524. }
  52525. if(!PlayerData[targetid][pLogged])
  52526. {
  52527. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet.");
  52528. }
  52529. if(amount < 1)
  52530. {
  52531. return SendClientMessage(playerid, COLOR_GREY, "Invalid amount.");
  52532. }
  52533. GivePlayerCash(targetid, -amount);
  52534. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was fined %s by %s, reason: %s", GetRPName(targetid), FormatNumber(amount), GetRPName(playerid), reason);
  52535. Log_Write("log_admin", "%s (uid: %i) fined %s (uid: %i) for $%i, reason: %s", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], amount, reason);
  52536. return 1;
  52537. }
  52538. CMD:pfine(playerid, params[])
  52539. {
  52540. new targetid, percent, reason[128];
  52541. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  52542. {
  52543. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  52544. }
  52545. if(sscanf(params, "uis[128]", targetid, percent, reason))
  52546. {
  52547. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /pfine [playerid] [percent] [reason]");
  52548. }
  52549. if(!IsPlayerConnected(targetid))
  52550. {
  52551. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  52552. }
  52553. if(!PlayerData[targetid][pLogged])
  52554. {
  52555. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet.");
  52556. }
  52557. if(!(1 <= percent <= 100))
  52558. {
  52559. return SendClientMessage(playerid, COLOR_GREY, "The percentage value must be between 1 and 100.");
  52560. }
  52561. new amount = ((PlayerData[targetid][pCash] + PlayerData[targetid][pBank]) / 100) * percent;
  52562. GivePlayerCash(targetid, -amount);
  52563. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was fined %s by %s, reason: %s", GetRPName(targetid), FormatNumber(amount), GetRPName(playerid), reason);
  52564. Log_Write("log_admin", "%s (uid: %i) fined %s (uid: %i) for $%i (%i percent), reason: %s", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], amount, percent, reason);
  52565. return 1;
  52566. }
  52567. CMD:ofine(playerid, params[])
  52568. {
  52569. new username[MAX_PLAYERS], amount, reason[128];
  52570. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  52571. {
  52572. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  52573. }
  52574. if(sscanf(params, "s[24]is[128]", username, amount, reason))
  52575. {
  52576. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /ofine [username] [amount] [reason]");
  52577. }
  52578. if(amount < 1)
  52579. {
  52580. return SendClientMessage(playerid, COLOR_GREY, "Invalid amount.");
  52581. }
  52582. if(IsPlayerOnline(username))
  52583. {
  52584. return SendClientMessage(playerid, COLOR_GREY, "That player is already online and logged in. Use /fine instead.");
  52585. }
  52586. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT adminlevel FROM "#TABLE_USERS" WHERE username = '%e'", username);
  52587. mysql_tquery(connectionID, queryBuffer, "OnAdminOfflineFine", "isis", playerid, username, amount, reason);
  52588. return 1;
  52589. }
  52590. CMD:sethp(playerid, params[])
  52591. {
  52592. new targetid, Float:amount;
  52593. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  52594. {
  52595. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  52596. }
  52597. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  52598. {
  52599. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  52600. }
  52601. if(sscanf(params, "uf", targetid, amount))
  52602. {
  52603. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sethp [playerid] [amount]");
  52604. SendClientMessage(playerid, COLOR_SYNTAX, "Warning: Values above 255.0 may not work properly with the server-sided damage system.");
  52605. return 1;
  52606. }
  52607. if(!IsPlayerConnected(targetid))
  52608. {
  52609. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  52610. }
  52611. if(amount < 1.0 && PlayerData[targetid][pAdmin] > PlayerData[playerid][pAdmin])
  52612. {
  52613. return SendClientMessage(playerid, COLOR_GREY, "You can't do this to an admin with a higher level than you.");
  52614. }
  52615. SetPlayerHealth(targetid, amount);
  52616. SendClientMessageEx(playerid, COLOR_GREY2, "%s's health set to %.1f.", GetRPName(targetid), amount);
  52617. return 1;
  52618. }
  52619. CMD:setarmor(playerid, params[])
  52620. {
  52621. new targetid, Float:amount;
  52622. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  52623. {
  52624. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  52625. }
  52626. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  52627. {
  52628. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  52629. }
  52630. if(sscanf(params, "uf", targetid, amount))
  52631. {
  52632. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setarmor [playerid] [amount]");
  52633. }
  52634. if(!IsPlayerConnected(targetid))
  52635. {
  52636. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  52637. }
  52638. SetScriptArmour(targetid, amount);
  52639. SendClientMessageEx(playerid, COLOR_GREY2, "%s's armor set to %.1f.", GetRPName(targetid), amount);
  52640. return 1;
  52641. }
  52642. CMD:refillcars(playerid, params[])
  52643. {
  52644. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  52645. {
  52646. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  52647. }
  52648. foreach(new i: Vehicle)
  52649. {
  52650. vehicleFuel[i] = 100;
  52651. }
  52652. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s refilled all vehicles to maximum fuel.", GetRPName(playerid));
  52653. return 1;
  52654. }
  52655. CMD:refilldrug(playerid, params[])
  52656. {
  52657. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  52658. {
  52659. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  52660. }
  52661. if(isnull(params))
  52662. {
  52663. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /refilldrug [seeds | cocaine | ephedrine]");
  52664. SendClientMessage(playerid, COLOR_SYNTAX, "This command refills the specified drug stock to maximum value.");
  52665. return 1;
  52666. }
  52667. if(!strcmp(params, "seeds", true))
  52668. {
  52669. gSeedsStock = 1000;
  52670. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has refilled the seeds in the drug den.", GetRPName(playerid));
  52671. }
  52672. else if(!strcmp(params, "cocaine", true))
  52673. {
  52674. gCocaineStock = 500;
  52675. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has refilled the cocaine in the crack house.", GetRPName(playerid));
  52676. }
  52677. else if(!strcmp(params, "ephedrine", true))
  52678. {
  52679. gEphedrineStock = 250;
  52680. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has refilled the ephedrine in the drug den.", GetRPName(playerid));
  52681. }
  52682. return 1;
  52683. }
  52684. CMD:togooc(playerid, params[])
  52685. {
  52686. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  52687. {
  52688. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  52689. }
  52690. if(!enabledOOC)
  52691. {
  52692. enabledOOC = 1;
  52693. SendClientMessageToAllEx(COLOR_WHITE, "(( Administrator %s enabled the OOC channel. ))", GetRPName(playerid));
  52694. }
  52695. else
  52696. {
  52697. enabledOOC = 0;
  52698. SendClientMessageToAllEx(COLOR_WHITE, "(( Administrator %s disabled the OOC channel. ))", GetRPName(playerid));
  52699. }
  52700. return 1;
  52701. }
  52702. CMD:tognewbie(playerid, params[])
  52703. {
  52704. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  52705. {
  52706. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  52707. }
  52708. if(!enabledNewbie)
  52709. {
  52710. enabledNewbie = 1;
  52711. SendClientMessageToAllEx(COLOR_NEWBIE, "* Administrator %s enabled the newbie channel.", GetRPName(playerid));
  52712. }
  52713. else
  52714. {
  52715. enabledNewbie = 0;
  52716. SendClientMessageToAllEx(COLOR_NEWBIE, "* Administrator %s disabled the newbie channel.", GetRPName(playerid));
  52717. }
  52718. return 1;
  52719. }
  52720. CMD:god(playerid, params[])
  52721. {
  52722. if(PlayerData[playerid][pAdmin] >= GENERAL_MANAGER || PlayerData[playerid][pAdminDuty])
  52723. {
  52724. if(!PlayerData[playerid][pNoDamage])
  52725. {
  52726. PlayerData[playerid][pNoDamage] = 1;
  52727. SendClientMessage(playerid, COLOR_GREY, "You are now in GODMODE, you will no longer take damage from ANYTHING.");
  52728. }
  52729. else
  52730. {
  52731. PlayerData[playerid][pNoDamage] = 0;
  52732. SendClientMessage(playerid, COLOR_GREY, "You've turned off GODMODE, you will now take damage normally.");
  52733. }
  52734. return 1;
  52735. }
  52736. return 0;
  52737. }
  52738. CMD:togglobal(playerid, params[])
  52739. {
  52740. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  52741. {
  52742. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  52743. }
  52744. if(!enabledGlobal)
  52745. {
  52746. enabledGlobal = 1;
  52747. SendClientMessageToAllEx(COLOR_GLOBAL, "(( Administrator %s enabled the global channel. ))", GetRPName(playerid));
  52748. }
  52749. else
  52750. {
  52751. enabledGlobal = 0;
  52752. SendClientMessageToAllEx(COLOR_GLOBAL, "(( Administrator %s disabled the global channel. ))", GetRPName(playerid));
  52753. }
  52754. return 1;
  52755. }
  52756. CMD:togreports(playerid, params[])
  52757. {
  52758. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  52759. {
  52760. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  52761. }
  52762. if(!enabledReports)
  52763. {
  52764. enabledReports = 1;
  52765. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has enabled the report channel.", GetRPName(playerid));
  52766. }
  52767. else
  52768. {
  52769. enabledReports = 0;
  52770. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has disabled the report channel.", GetRPName(playerid));
  52771. }
  52772. return 1;
  52773. }
  52774. CMD:listpvehs(playerid, params[])
  52775. {
  52776. new targetid;
  52777. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  52778. {
  52779. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  52780. }
  52781. if(sscanf(params, "u", targetid))
  52782. {
  52783. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /listpvehs [playerid]");
  52784. }
  52785. if(!IsPlayerConnected(targetid))
  52786. {
  52787. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  52788. }
  52789. if(!PlayerData[targetid][pLogged])
  52790. {
  52791. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet.");
  52792. }
  52793. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT id, modelid, pos_x, pos_y, pos_z, interior FROM vehicles WHERE ownerid = %i", PlayerData[targetid][pID]);
  52794. mysql_tquery(connectionID, queryBuffer, "OnAdminListVehicles", "ii", playerid, targetid);
  52795. return 1;
  52796. }
  52797. CMD:removepveh(playerid, params[])
  52798. {
  52799. new targetid;
  52800. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  52801. {
  52802. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  52803. }
  52804. if(sscanf(params, "u", targetid))
  52805. {
  52806. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /removepveh [playerid]");
  52807. }
  52808. if(!IsPlayerConnected(targetid))
  52809. {
  52810. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  52811. }
  52812. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT id, modelid, pos_x, pos_y, pos_z, interior FROM vehicles WHERE ownerid = %i", PlayerData[targetid][pID]);
  52813. mysql_tquery(connectionID, queryBuffer, "OnAdminListVehiclesForRemoval", "ii", playerid, targetid);
  52814. return 1;
  52815. }
  52816. CMD:despawnpveh(playerid, params[])
  52817. {
  52818. new vehicleid;
  52819. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  52820. {
  52821. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  52822. }
  52823. if(sscanf(params, "i", vehicleid))
  52824. {
  52825. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /despawnpveh [vehicleid]");
  52826. }
  52827. if(!IsValidVehicle(vehicleid) || !VehicleInfo[vehicleid][vOwnerID])
  52828. {
  52829. return SendClientMessage(playerid, COLOR_GREY, "The vehicle specified is invalid or not owned by any player.");
  52830. }
  52831. SendClientMessageEx(playerid, COLOR_WHITE, "You have despawned %s's %s.", VehicleInfo[vehicleid][vOwner], GetVehicleName(vehicleid));
  52832. DespawnVehicle(vehicleid);
  52833. return 1;
  52834. }
  52835. CMD:veh(playerid, params[])
  52836. {
  52837. new model[20], modelid, color1, color2, Float:x, Float:y, Float:z, Float:a, vehicleid;
  52838. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  52839. {
  52840. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  52841. }
  52842. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  52843. {
  52844. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  52845. }
  52846. if(sscanf(params, "s[20]I(-1)I(-1)", model, color1, color2))
  52847. {
  52848. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /veh [modelid/name] [color1 (optional)] [color2 (optional)]");
  52849. }
  52850. if((modelid = GetVehicleModelByName(model)) == 0)
  52851. {
  52852. return SendClientMessage(playerid, COLOR_GREY, "Invalid vehicle model.");
  52853. }
  52854. if(!(-1 <= color1 <= 255) || !(-1 <= color2 <= 255))
  52855. {
  52856. return SendClientMessage(playerid, COLOR_GREY, "Invalid color. Valid colors range from -1 to 255.");
  52857. }
  52858. GetPlayerPos(playerid, x, y, z);
  52859. GetPlayerFacingAngle(playerid, a);
  52860. vehicleid = AddStaticVehicleEx(modelid, x, y, z, a, color1, color2, -1);
  52861. if(vehicleid == INVALID_PLAYER_ID)
  52862. {
  52863. return SendClientMessage(playerid, COLOR_GREY, "Cannot spawn vehicle. The vehicle pool is currently full.");
  52864. }
  52865. ResetVehicleObjects(vehicleid);
  52866. adminVehicle{vehicleid} = true;
  52867. vehicleFuel[vehicleid] = 100;
  52868. vehicleColors[vehicleid][0] = color1;
  52869. vehicleColors[vehicleid][1] = color2;
  52870. SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid));
  52871. LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid));
  52872. PutPlayerInVehicle(playerid, vehicleid, 0);
  52873. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s spawned a %s.", GetRPName(playerid), GetVehicleName(vehicleid));
  52874. SendClientMessageEx(playerid, COLOR_WHITE, "%s (ID %i) spawned. Use '/savevehicle %i' to save this vehicle to the database.", GetVehicleName(vehicleid), vehicleid, vehicleid);
  52875. return 1;
  52876. }
  52877. CMD:savevehicle(playerid, params[])
  52878. {
  52879. new vehicleid, gangid, type, delay, vip, Float:x, Float:y, Float:z, Float:a, plate[32];
  52880. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  52881. {
  52882. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  52883. }
  52884. if(sscanf(params, "iiiiI(0)", vehicleid, gangid, type, delay, vip))
  52885. {
  52886. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /savevehicle [vehicleid] [gangid (-1 = none)] [faction type] [respawn delay (seconds)] [vip level (optional)]");
  52887. SendClientMessage(playerid, COLOR_SYNTAX, "List of types: (0) None (1) Police (2) Medic (3) News (4) Government (5) Hitman (6) Federal (7) Army");
  52888. return 1;
  52889. }
  52890. if(!IsValidVehicle(vehicleid) || !adminVehicle{vehicleid})
  52891. {
  52892. return SendClientMessage(playerid, COLOR_GREY, "The vehicle specified is either invalid or not an admin spawned vehicle.");
  52893. }
  52894. if(!(-1 <= gangid < MAX_GANGS) || (gangid >= 0 && !GangInfo[gangid][gSetup]))
  52895. {
  52896. return SendClientMessage(playerid, COLOR_GREY, "Invalid gang.");
  52897. }
  52898. if(!(0 <= type <= 7))
  52899. {
  52900. return SendClientMessage(playerid, COLOR_GREY, "Invalid type.");
  52901. }
  52902. if(!(0 <= vip <= 3))
  52903. {
  52904. return SendClientMessage(playerid, COLOR_GREY, "Invalid type.");
  52905. }
  52906. SendClientMessageEx(playerid, COLOR_WHITE, "%s saved. This vehicle will now spawn here from now on.", GetVehicleName(vehicleid));
  52907. GetVehiclePos(vehicleid, x, y, z);
  52908. GetVehicleZAngle(vehicleid, a);
  52909. format(plate, 32, "%c%c%c %i", Random('A', 'Z'), Random('A', 'Z'), Random('A', 'Z'), Random(100, 999));
  52910. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO vehicles (modelid, pos_x, pos_y, pos_z, pos_a, plate, color1, color2, gangid, factiontype, vippackage, respawndelay, interior, world) VALUES(%i, '%f', '%f', '%f', '%f', '%s', %i, %i, %i, %i, %i, %i, %i, %i)",
  52911. GetVehicleModel(vehicleid), x, y, z, a, plate, vehicleColors[vehicleid][0], vehicleColors[vehicleid][1], gangid, type, vip, delay, GetPlayerInterior(playerid), GetPlayerVirtualWorld(playerid));
  52912. mysql_tquery(connectionID, queryBuffer);
  52913. mysql_tquery(connectionID, "SELECT * FROM vehicles WHERE id = LAST_INSERT_ID()", "OnQueryFinished", "ii", THREAD_LOAD_VEHICLES, 0);
  52914. adminVehicle{vehicleid} = false;
  52915. DestroyVehicleEx(vehicleid);
  52916. return 1;
  52917. }
  52918. CMD:editvehicle(playerid, params[])
  52919. {
  52920. new vehicleid, option[14], param[32], value, Float:value2;
  52921. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  52922. {
  52923. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  52924. }
  52925. if(sscanf(params, "is[14]S()[32]", vehicleid, option, param))
  52926. {
  52927. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editvehicle [vehicleid] [option]");
  52928. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Spawn, Price, Tickets, Locked, Plate, Color, Paintjob, Neon, Trunk, Health");
  52929. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Gang, Faction, Job, VIP, Respawndelay, Siren, Rank, Type");
  52930. return 1;
  52931. }
  52932. if(!IsValidVehicle(vehicleid) || !VehicleInfo[vehicleid][vID])
  52933. {
  52934. return SendClientMessage(playerid, COLOR_GREY, "The vehicle specified is invalid or a static vehicle.");
  52935. }
  52936. if(!strcmp(option, "spawn", true))
  52937. {
  52938. new id = VehicleInfo[vehicleid][vID];
  52939. /*if(VehicleInfo[vehicleid][vFactionType] > 0)
  52940. {
  52941. return SendClientMessage(playerid, COLOR_GREY, "You can't set the spawn of a faction vehicle indoors.");
  52942. }*/
  52943. if(IsPlayerInAnyVehicle(playerid))
  52944. {
  52945. GetVehiclePos(vehicleid, VehicleInfo[vehicleid][vPosX], VehicleInfo[vehicleid][vPosY], VehicleInfo[vehicleid][vPosZ]);
  52946. GetVehicleZAngle(vehicleid, VehicleInfo[vehicleid][vPosA]);
  52947. }
  52948. else
  52949. {
  52950. GetPlayerPos(playerid, VehicleInfo[vehicleid][vPosX], VehicleInfo[vehicleid][vPosY], VehicleInfo[vehicleid][vPosZ]);
  52951. GetPlayerFacingAngle(playerid, VehicleInfo[vehicleid][vPosA]);
  52952. }
  52953. if(VehicleInfo[vehicleid][vGang] >= 0 || VehicleInfo[vehicleid][vOwnerID] > 0)
  52954. {
  52955. VehicleInfo[vehicleid][vInterior] = GetPlayerInterior(playerid);
  52956. VehicleInfo[vehicleid][vWorld] = GetPlayerVirtualWorld(playerid);
  52957. SaveVehicleModifications(vehicleid);
  52958. }
  52959. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET pos_x = '%f', pos_y = '%f', pos_z = '%f', pos_a = '%f', interior = %i, world = %i WHERE id = %i", VehicleInfo[vehicleid][vPosX], VehicleInfo[vehicleid][vPosY], VehicleInfo[vehicleid][vPosZ], VehicleInfo[vehicleid][vPosA], VehicleInfo[vehicleid][vInterior], VehicleInfo[vehicleid][vWorld], id);
  52960. mysql_tquery(connectionID, queryBuffer);
  52961. SendClientMessageEx(playerid, COLOR_AQUA, "* You have moved the spawn point for %s (ID %i).", GetVehicleName(vehicleid), vehicleid);
  52962. SendClientMessage(playerid, COLOR_WHITE, "Note: The vehicle's ID may have changed in the mean time.");
  52963. DespawnVehicle(vehicleid, false);
  52964. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM vehicles WHERE id = %i", id);
  52965. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LOAD_VEHICLES, -1);
  52966. }
  52967. else if(!strcmp(option, "price", true))
  52968. {
  52969. if(!VehicleInfo[vehicleid][vOwnerID])
  52970. {
  52971. return SendClientMessage(playerid, COLOR_GREY, "This option can only be adjusted on player owned vehicles.");
  52972. }
  52973. if(sscanf(param, "i", value))
  52974. {
  52975. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editvehicle [vehicleid] [price] [value]");
  52976. }
  52977. VehicleInfo[vehicleid][vPrice] = value;
  52978. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET price = %i WHERE id = %i", VehicleInfo[vehicleid][vPrice], VehicleInfo[vehicleid][vID]);
  52979. mysql_tquery(connectionID, queryBuffer);
  52980. SendClientMessageEx(playerid, COLOR_AQUA, "* You have set the price of %s's %s (ID %i) to $%i.", VehicleInfo[vehicleid][vOwner], GetVehicleName(vehicleid), vehicleid, value);
  52981. Log_Write("log_admin", "%s (uid: %i) has edited vehicle id %d price to $%d", GetPlayerNameEx(playerid), vehicleid, value);
  52982. }
  52983. else if(!strcmp(option, "mileage", true))
  52984. {
  52985. if(sscanf(param, "i", value2))
  52986. {
  52987. return SendSyntaxMessage(playerid, " /editvehicle [vehicleid] [mileage] [value]");
  52988. }
  52989. VehicleInfo[vehicleid][vMileage] = value2;
  52990. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET mileage = %.2f WHERE id = %i", VehicleInfo[vehicleid][vMileage], VehicleInfo[vehicleid][vID]);
  52991. mysql_tquery(connectionID, queryBuffer);
  52992. if(value2 == 0)
  52993. SendClientMessageEx(playerid, COLOR_AQUA, "** Ju keni ristartuar kilometrazhin e vetures %s (ID %i).", GetVehicleName(vehicleid), vehicleid);
  52994. else
  52995. SendClientMessageEx(playerid, COLOR_AQUA, "** Ju keni edituar kilometrazhin e vetures %s (ID %i) n? (%i) KM.", GetVehicleName(vehicleid), vehicleid, value);
  52996. }
  52997. else if(!strcmp(option, "type", true))
  52998. {
  52999. if(VehicleInfo[vehicleid][vOwnerID])
  53000. {
  53001. return SendClientMessage(playerid, COLOR_GREY, "This option can only be adjusted on a not player owned vehicles.");
  53002. }
  53003. if(sscanf(param, "i", value))
  53004. {
  53005. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editvehicle [vehicleid] [type] [0/1]");
  53006. }
  53007. VehicleInfo[vehicleid][vType] = value;
  53008. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET type = %i WHERE id = %i", VehicleInfo[vehicleid][vType], VehicleInfo[vehicleid][vID]);
  53009. mysql_tquery(connectionID, queryBuffer);
  53010. SendClientMessageEx(playerid, COLOR_AQUA, "* You have set the type of %s (ID %i) to %i.", GetVehicleName(vehicleid), vehicleid, value);
  53011. }
  53012. else if(!strcmp(option, "tickets", true))
  53013. {
  53014. if(!VehicleInfo[vehicleid][vOwnerID])
  53015. {
  53016. return SendClientMessage(playerid, COLOR_GREY, "This option can only be adjusted on player owned vehicles.");
  53017. }
  53018. if(sscanf(param, "i", value))
  53019. {
  53020. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editvehicle [vehicleid] [tickets] [value]");
  53021. }
  53022. VehicleInfo[vehicleid][vTickets] = value;
  53023. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET tickets = %i WHERE id = %i", VehicleInfo[vehicleid][vTickets], VehicleInfo[vehicleid][vID]);
  53024. mysql_tquery(connectionID, queryBuffer);
  53025. SendClientMessageEx(playerid, COLOR_AQUA, "* You have set the tickets of %s's %s (ID %i) to $%i.", VehicleInfo[vehicleid][vOwner], GetVehicleName(vehicleid), vehicleid, value);
  53026. }
  53027. else if(!strcmp(option, "locked", true))
  53028. {
  53029. if(sscanf(param, "i", value) || !(0 <= value <= 1))
  53030. {
  53031. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editvehicle [vehicleid] [locked] [0/1]");
  53032. }
  53033. if(VehicleInfo[vehicleid][vFactionType] > 0)
  53034. {
  53035. return SendClientMessage(playerid, COLOR_GREY, "Faction vehicles can't be locked.");
  53036. }
  53037. VehicleInfo[vehicleid][vLocked] = value;
  53038. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET locked = %i WHERE id = %i", VehicleInfo[vehicleid][vLocked], VehicleInfo[vehicleid][vID]);
  53039. mysql_tquery(connectionID, queryBuffer);
  53040. SetVehicleParams(vehicleid, VEHICLE_DOORS, value);
  53041. SendClientMessageEx(playerid, COLOR_AQUA, "* You have set the locked state of %s (ID %i) to %i.", GetVehicleName(vehicleid), vehicleid, value);
  53042. }
  53043. else if(!strcmp(option, "color", true))
  53044. {
  53045. new color1, color2;
  53046. if(sscanf(param, "ii", color1, color2))
  53047. {
  53048. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editvehicle [vehicleid] [color] [color 1] [color 2]");
  53049. }
  53050. if(!(0 <= color1 <= 255) || !(0 <= color2 <= 255))
  53051. {
  53052. return SendClientMessage(playerid, COLOR_GREY, "The colors must range from 0 to 255.");
  53053. }
  53054. VehicleInfo[vehicleid][vColor1] = color1;
  53055. VehicleInfo[vehicleid][vColor2] = color2;
  53056. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET color1 = %i, color2 = %i WHERE id = %i", VehicleInfo[vehicleid][vColor1], VehicleInfo[vehicleid][vColor2], VehicleInfo[vehicleid][vID]);
  53057. mysql_tquery(connectionID, queryBuffer);
  53058. ChangeVehicleColor(vehicleid, color1, color2);
  53059. SendClientMessageEx(playerid, COLOR_AQUA, "* You have set the colors of %s (ID %i) to %i, %i.", GetVehicleName(vehicleid), vehicleid, color1, color2);
  53060. }
  53061. else if(!strcmp(option, "paintjob", true))
  53062. {
  53063. new paintjobid;
  53064. if(sscanf(param, "i", paintjobid))
  53065. {
  53066. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editvehicle [vehicleid] [paintjobid] [value (-1 = none)]");
  53067. }
  53068. if(!(-1 <= paintjobid <= 5))
  53069. {
  53070. return SendClientMessage(playerid, COLOR_GREY, "The paintjob must range from -1 to 5.");
  53071. }
  53072. if(VehicleInfo[vehicleid][vFactionType] > 0)
  53073. {
  53074. return SendClientMessage(playerid, COLOR_GREY, "You can't change the paintjob on a faction vehicle.");
  53075. }
  53076. VehicleInfo[vehicleid][vPaintjob] = paintjobid;
  53077. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET paintjob = %i WHERE id = %i", VehicleInfo[vehicleid][vPaintjob], VehicleInfo[vehicleid][vID]);
  53078. mysql_tquery(connectionID, queryBuffer);
  53079. ChangeVehiclePaintjob(vehicleid, paintjobid);
  53080. SendClientMessageEx(playerid, COLOR_AQUA, "* You have set the paintjob of %s (ID %i) to %i.", GetVehicleName(vehicleid), vehicleid, paintjobid);
  53081. }
  53082. else if(!strcmp(option, "impound", true))
  53083. {
  53084. if(!VehicleInfo[vehicleid][vOwnerID])
  53085. {
  53086. return SendClientMessage(playerid, COLOR_GREY, "This option can only be adjusted on player owned vehicles.");
  53087. }
  53088. new paintjobid;
  53089. if(sscanf(param, "i", paintjobid))
  53090. {
  53091. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editvehicle [impound] [-1 to reset]");
  53092. return 1;
  53093. }
  53094. VehicleInfo[vehicleid][carImpounded] = paintjobid;
  53095. VehicleInfo[vehicleid][carImpoundPrice] = -1;
  53096. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE `vehicles` SET `carImpounded` = '%i', `carImpoundPrice` = '100' WHERE `id` = '%i'", paintjobid, VehicleInfo[vehicleid][vID]);
  53097. mysql_tquery(connectionID, queryBuffer);
  53098. SendClientMessageEx(playerid, COLOR_AQUA, "* You have set the neon type of %s's %s (ID %i) to %s.", VehicleInfo[vehicleid][vOwner], GetVehicleName(vehicleid), vehicleid, param);
  53099. }
  53100. else if(!strcmp(option, "neon", true))
  53101. {
  53102. if(!VehicleInfo[vehicleid][vOwnerID])
  53103. {
  53104. return SendClientMessage(playerid, COLOR_GREY, "This option can only be adjusted on player owned vehicles.");
  53105. }
  53106. if(isnull(param))
  53107. {
  53108. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editvehicle [vehicleid] [neon] [color]");
  53109. SendClientMessage(playerid, COLOR_SYNTAX, "List of colors: None, Red, Blue, Green, Yellow, Pink, White");
  53110. return 1;
  53111. }
  53112. if(!strcmp(param, "neon", true)) {
  53113. SetVehicleNeon(vehicleid, 0);
  53114. } else if(!strcmp(param, "red", true)) {
  53115. SetVehicleNeon(vehicleid, 18647);
  53116. } else if(!strcmp(param, "blue", true)) {
  53117. SetVehicleNeon(vehicleid, 18648);
  53118. } else if(!strcmp(param, "green", true)) {
  53119. SetVehicleNeon(vehicleid, 18649);
  53120. } else if(!strcmp(param, "yellow", true)) {
  53121. SetVehicleNeon(vehicleid, 18650);
  53122. } else if(!strcmp(param, "pink", true)) {
  53123. SetVehicleNeon(vehicleid, 18651);
  53124. } else if(!strcmp(param, "white", true)) {
  53125. SetVehicleNeon(vehicleid, 18652);
  53126. } else {
  53127. return SendClientMessage(playerid, COLOR_GREY, "Invalid color.");
  53128. }
  53129. SendClientMessageEx(playerid, COLOR_AQUA, "* You have set the neon type of %s's %s (ID %i) to %s.", VehicleInfo[vehicleid][vOwner], GetVehicleName(vehicleid), vehicleid, param);
  53130. }
  53131. else if(!strcmp(option, "trunk", true))
  53132. {
  53133. if(!VehicleInfo[vehicleid][vOwnerID])
  53134. {
  53135. return SendClientMessage(playerid, COLOR_GREY, "This option can only be adjusted on player owned vehicles.");
  53136. }
  53137. if(sscanf(param, "i", value) || !(0 <= value <= 3))
  53138. {
  53139. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editvehicle [vehicleid] [trunk] [level (0-3)]");
  53140. }
  53141. VehicleInfo[vehicleid][vTrunk] = value;
  53142. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET trunk = %i WHERE id = %i", VehicleInfo[vehicleid][vTrunk], VehicleInfo[vehicleid][vID]);
  53143. mysql_tquery(connectionID, queryBuffer);
  53144. SendClientMessageEx(playerid, COLOR_AQUA, "* You have set the trunk of %s's %s (ID %i) to level %i/3.", VehicleInfo[vehicleid][vOwner], GetVehicleName(vehicleid), vehicleid, value);
  53145. }
  53146. else if(!strcmp(option, "health", true))
  53147. {
  53148. new Float:amount;
  53149. if(sscanf(param, "f", amount))
  53150. {
  53151. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editvehicle [vehicleid] [health] [amount]");
  53152. }
  53153. if(!(300.0 <= amount <= 10000.0))
  53154. {
  53155. return SendClientMessage(playerid, COLOR_GREY, "The health value must range from 300.0 to 10000.0.");
  53156. }
  53157. VehicleInfo[vehicleid][vHealth] = amount;
  53158. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET health = '%f' WHERE id = %i", VehicleInfo[vehicleid][vHealth], VehicleInfo[vehicleid][vID]);
  53159. mysql_tquery(connectionID, queryBuffer);
  53160. SetVehicleHealth(vehicleid, amount);
  53161. SendClientMessageEx(playerid, COLOR_AQUA, "* You have set the health of %s (ID %i) to %.2f.", GetVehicleName(vehicleid), vehicleid, amount);
  53162. }
  53163. else if(!strcmp(option, "gang", true))
  53164. {
  53165. new gangid;
  53166. if(VehicleInfo[vehicleid][vOwnerID] > 0)
  53167. {
  53168. return SendClientMessage(playerid, COLOR_GREY, "This option cannot be adjusted on player owned vehicles.");
  53169. }
  53170. if(sscanf(param, "i", gangid))
  53171. {
  53172. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editvehicle [vehicleid] [gang] [gangid (-1 = none)]");
  53173. }
  53174. if(!(-1 <= gangid < MAX_GANGS) || (gangid >= 0 && !GangInfo[gangid][gSetup]))
  53175. {
  53176. return SendClientMessage(playerid, COLOR_GREY, "Invalid gang.");
  53177. }
  53178. VehicleInfo[vehicleid][vGang] = gangid;
  53179. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET gangid = %i WHERE id = %i", VehicleInfo[vehicleid][vGang], VehicleInfo[vehicleid][vID]);
  53180. mysql_tquery(connectionID, queryBuffer);
  53181. if(gangid == -1)
  53182. SendClientMessageEx(playerid, COLOR_AQUA, "* You have reset the gang for %s (ID %i).", GetVehicleName(vehicleid), vehicleid);
  53183. else
  53184. SendClientMessageEx(playerid, COLOR_AQUA, "* You have set the gang of %s (ID %i) to %s (%i).", GetVehicleName(vehicleid), vehicleid, GangInfo[gangid][gName], gangid);
  53185. }
  53186. else if(!strcmp(option, "faction", true))
  53187. {
  53188. new type;
  53189. if(VehicleInfo[vehicleid][vOwnerID] > 0)
  53190. {
  53191. return SendClientMessage(playerid, COLOR_GREY, "This option cannot be adjusted on player owned vehicles.");
  53192. }
  53193. if(sscanf(param, "i", type))
  53194. {
  53195. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editvehicle [vehicleid] [faction] [type]");
  53196. SendClientMessage(playerid, COLOR_SYNTAX, "List of types: (0) None (1) Police (2) Medic (3) News (4) Government (5) Hitman (6) Federal");
  53197. return 1;
  53198. }
  53199. if(!(0 <= type <= 6))
  53200. {
  53201. return SendClientMessage(playerid, COLOR_GREY, "Invalid type.");
  53202. }
  53203. VehicleInfo[vehicleid][vFactionType] = type;
  53204. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET factiontype = %i WHERE id = %i", VehicleInfo[vehicleid][vFactionType], VehicleInfo[vehicleid][vID]);
  53205. mysql_tquery(connectionID, queryBuffer);
  53206. if(type == FACTION_NONE)
  53207. SendClientMessageEx(playerid, COLOR_AQUA, "* You've reset the faction type for %s (ID %i).", GetVehicleName(vehicleid), vehicleid);
  53208. else
  53209. SendClientMessageEx(playerid, COLOR_AQUA, "* You've set the faction type of %s (ID %i) to %s (%i).", GetVehicleName(vehicleid), vehicleid, factionTypes[type], type);
  53210. }
  53211. else if(!strcmp(option, "job", true))
  53212. {
  53213. if(VehicleInfo[vehicleid][vOwnerID] > 0)
  53214. {
  53215. return SendClientMessage(playerid, COLOR_GREY, "This option cannot be adjusted on player owned vehicles.");
  53216. }
  53217. if(sscanf(param, "i", value))
  53218. {
  53219. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editvehicle [vehicleid] [job] [type]");
  53220. SendClientMessage(playerid, COLOR_SYNTAX, "List of jobs: (-1) None (0) Pizzaman (1) Courier (2) Fisherman (3) Bodyguard (4) Weapon Dealer (5) Mechanic");
  53221. SendClientMessage(playerid, COLOR_SYNTAX, "List of jobs: (6) Miner (7) Sweeper (8) Taxi Driver (9) Drug Dealer (10) Lawyer (11) Detective (12) Thief");
  53222. return 1;
  53223. }
  53224. if(!(-1 <= value <= 12))
  53225. {
  53226. return SendClientMessage(playerid, COLOR_GREY, "Invalid job.");
  53227. }
  53228. VehicleInfo[vehicleid][vJob] = value;
  53229. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET job = %i WHERE id = %i", VehicleInfo[vehicleid][vJob], VehicleInfo[vehicleid][vID]);
  53230. mysql_tquery(connectionID, queryBuffer);
  53231. if(value == JOB_NONE)
  53232. SendClientMessageEx(playerid, COLOR_AQUA, "* You've reset the job type for %s (ID %i).", GetVehicleName(vehicleid), vehicleid);
  53233. else
  53234. SendClientMessageEx(playerid, COLOR_AQUA, "* You've set the job type of %s (ID %i) to %s (%i).", GetVehicleName(vehicleid), vehicleid, GetJobName(value), value);
  53235. }
  53236. else if(!strcmp(option, "vip", true))
  53237. {
  53238. if(VehicleInfo[vehicleid][vOwnerID] > 0)
  53239. {
  53240. return SendClientMessage(playerid, COLOR_GREY, "This option cannot be adjusted on player owned vehicles.");
  53241. }
  53242. if(sscanf(param, "i", value))
  53243. {
  53244. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editvehicle [vehicleid] [vip] [level (0-3)]");
  53245. }
  53246. if(!(0 <= value <= 3))
  53247. {
  53248. return SendClientMessage(playerid, COLOR_GREY, "Invalid level.");
  53249. }
  53250. VehicleInfo[vehicleid][vVIP] = value;
  53251. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET vippackage = %i WHERE id = %i", VehicleInfo[vehicleid][vVIP], VehicleInfo[vehicleid][vID]);
  53252. mysql_tquery(connectionID, queryBuffer);
  53253. if(value == 0)
  53254. SendClientMessageEx(playerid, COLOR_AQUA, "* You've reset the VIP restriction for %s (ID %i).", GetVehicleName(vehicleid), vehicleid);
  53255. else
  53256. SendClientMessageEx(playerid, COLOR_AQUA, "* You've set the VIP restriction of %s (ID %i) to %s (%i).", GetVehicleName(vehicleid), vehicleid, GetVIPRank(value), value);
  53257. }
  53258. else if(!strcmp(option, "respawndelay", true))
  53259. {
  53260. new id = VehicleInfo[vehicleid][vID];
  53261. if(VehicleInfo[vehicleid][vOwnerID] > 0)
  53262. {
  53263. return SendClientMessage(playerid, COLOR_GREY, "This option cannot be adjusted on player owned vehicles.");
  53264. }
  53265. if(sscanf(param, "i", value))
  53266. {
  53267. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editvehicle [vehicleid] [respawndelay] [seconds (-1 = none)]");
  53268. }
  53269. VehicleInfo[vehicleid][vRespawnDelay] = value;
  53270. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET respawndelay = %i WHERE id = %i", VehicleInfo[vehicleid][vRespawnDelay], id);
  53271. mysql_tquery(connectionID, queryBuffer);
  53272. SendClientMessageEx(playerid, COLOR_AQUA, "* You have set the respawn delay of %s (ID %i) to %i seconds.", GetVehicleName(vehicleid), vehicleid, value);
  53273. SendClientMessage(playerid, COLOR_WHITE, "Note: The vehicle's ID may have changed in the mean time.");
  53274. DespawnVehicle(vehicleid, false);
  53275. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM vehicles WHERE id = %i", id);
  53276. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LOAD_VEHICLES, -1);
  53277. }
  53278. else if(!strcmp(option, "siren", true))
  53279. {
  53280. new id = VehicleInfo[vehicleid][vID];
  53281. if(VehicleInfo[vehicleid][vFactionType] == FACTION_NONE)
  53282. {
  53283. return SendClientMessage(playerid, COLOR_GREY, "This option can only be adjusted on faction vehicles.");
  53284. }
  53285. if(sscanf(param, "i", value))
  53286. {
  53287. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editvehicle [vehicleid] [siren] [1/0]");
  53288. }
  53289. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET siren = %i WHERE id = %i", value, id);
  53290. mysql_tquery(connectionID, queryBuffer);
  53291. SendClientMessageEx(playerid, COLOR_AQUA, "* You have set the siren of %s (ID %i) to %i.", GetVehicleName(vehicleid), vehicleid, value);
  53292. SendClientMessage(playerid, COLOR_WHITE, "Note: The vehicle's ID may have changed in the mean time.");
  53293. DespawnVehicle(vehicleid, false);
  53294. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM vehicles WHERE id = %i", id);
  53295. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LOAD_VEHICLES, -1);
  53296. }
  53297. else if(!strcmp(option, "rank", true))
  53298. {
  53299. if(VehicleInfo[vehicleid][vOwnerID] > 0)
  53300. {
  53301. return SendClientMessage(playerid, COLOR_GREY, "This option cannot be adjusted on player owned vehicles.");
  53302. }
  53303. if(sscanf(param, "i", value))
  53304. {
  53305. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editvehicle [vehicleid] [rank] [rank(0-12)]");
  53306. }
  53307. if(!(0 <= value <= 12))
  53308. {
  53309. return SendClientMessage(playerid, COLOR_GREY, "Invalid rank.");
  53310. }
  53311. VehicleInfo[vehicleid][vRank] = value;
  53312. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET rank = %i WHERE id = %i", VehicleInfo[vehicleid][vRank], VehicleInfo[vehicleid][vID]);
  53313. mysql_tquery(connectionID, queryBuffer);
  53314. if(value == 0)
  53315. SendClientMessageEx(playerid, COLOR_AQUA, "* You've reset the rank restriction for %s (ID %i).", GetVehicleName(vehicleid), vehicleid);
  53316. else
  53317. SendClientMessageEx(playerid, COLOR_AQUA, "* You've set the rank restriction of %s (ID %i) to %i (%i).", GetVehicleName(vehicleid), vehicleid, VehicleInfo[vehicleid][vRank], value);
  53318. }
  53319. return 1;
  53320. }
  53321. CMD:removevehicle(playerid, params[])
  53322. {
  53323. new vehicleid;
  53324. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  53325. {
  53326. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  53327. }
  53328. if(sscanf(params, "i", vehicleid))
  53329. {
  53330. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /removevehicle [vehicleid]");
  53331. }
  53332. if(!IsValidVehicle(vehicleid) || !VehicleInfo[vehicleid][vID])
  53333. {
  53334. return SendClientMessage(playerid, COLOR_GREY, "The vehicle specified is invalid or a static vehicle.");
  53335. }
  53336. if(VehicleInfo[vehicleid][vOwnerID]) {
  53337. SendClientMessageEx(playerid, COLOR_WHITE, "You have deleted %s's %s.", VehicleInfo[vehicleid][vOwner], GetVehicleName(vehicleid));
  53338. } else {
  53339. SendClientMessageEx(playerid, COLOR_WHITE, "You have deleted %s (ID %i).", GetVehicleName(vehicleid), vehicleid);
  53340. }
  53341. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM vehicles WHERE id = %i", VehicleInfo[vehicleid][vID]);
  53342. mysql_tquery(connectionID, queryBuffer);
  53343. DespawnVehicle(vehicleid, false);
  53344. return 1;
  53345. }
  53346. CMD:vehicleinfo(playerid, params[])
  53347. {
  53348. new vehicleid, neon[12], gang[32], Float:health;
  53349. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  53350. {
  53351. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  53352. }
  53353. if(sscanf(params, "i", vehicleid))
  53354. {
  53355. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /vehicleinfo [vehicleid]");
  53356. }
  53357. if(!IsValidVehicle(vehicleid) || !VehicleInfo[vehicleid][vID])
  53358. {
  53359. return SendClientMessage(playerid, COLOR_GREY, "The vehicle specified is invalid or a static vehicle.");
  53360. }
  53361. GetVehicleHealth(vehicleid, health);
  53362. switch(VehicleInfo[vehicleid][vNeon])
  53363. {
  53364. case 18647: neon = "Red";
  53365. case 18648: neon = "Blue";
  53366. case 18649: neon = "Green";
  53367. case 18650: neon = "Yellow";
  53368. case 18651: neon = "Pink";
  53369. case 18652: neon = "White";
  53370. default: neon = "None";
  53371. }
  53372. if(VehicleInfo[vehicleid][vGang] >= 0)
  53373. {
  53374. strcat(gang, GangInfo[VehicleInfo[vehicleid][vGang]][gName]);
  53375. }
  53376. else
  53377. {
  53378. gang = "None";
  53379. }
  53380. SendClientMessageEx(playerid, COLOR_NAVYBLUE, "_______ %s Stats _______", GetVehicleName(vehicleid));
  53381. SendClientMessageEx(playerid, COLOR_GREY2, "Owner: %s - Value: %s - Tickets: %s - License Plate: %s", VehicleInfo[vehicleid][vOwner], FormatNumber(VehicleInfo[vehicleid][vPrice]), FormatNumber(VehicleInfo[vehicleid][vTickets]), VehicleInfo[vehicleid][vPlate]);
  53382. SendClientMessageEx(playerid, COLOR_GREY2, "Neon: %s - Trunk Level: %i/3 - Alarm Level: %i/3 - Health: %.1f - Fuel: %i/100", neon, VehicleInfo[vehicleid][vTrunk], VehicleInfo[vehicleid][vAlarm], health, vehicleFuel[vehicleid]);
  53383. SendClientMessageEx(playerid, COLOR_GREY2, "Gang: %s - Faction: %s - Rank: %i - Job Type: %s - Respawn Delay: %i seconds", gang, factionTypes[VehicleInfo[vehicleid][vFactionType]], VehicleInfo[vehicleid][vRank], GetJobName(VehicleInfo[vehicleid][vJob]), VehicleInfo[vehicleid][vRespawnDelay]);
  53384. return 1;
  53385. }
  53386. CMD:aclearwanted(playerid, params[])
  53387. {
  53388. new targetid;
  53389. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  53390. {
  53391. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  53392. }
  53393. if(sscanf(params, "u", targetid))
  53394. {
  53395. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /aclearwanted [playerid]");
  53396. }
  53397. if(!IsPlayerConnected(targetid))
  53398. {
  53399. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  53400. }
  53401. if(!PlayerData[targetid][pWantedLevel])
  53402. {
  53403. return SendClientMessage(playerid, COLOR_GREY, "That player has no active charges to clear.");
  53404. }
  53405. PlayerData[targetid][pWantedLevel] = 0;
  53406. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM charges WHERE uid = %i", PlayerData[targetid][pID]);
  53407. mysql_tquery(connectionID, queryBuffer);
  53408. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET wantedlevel = 0 WHERE uid = %i", PlayerData[targetid][pID]);
  53409. mysql_tquery(connectionID, queryBuffer);
  53410. SendClientMessageEx(targetid, COLOR_WHITE, "Your crimes were cleared by %s.", GetRPName(playerid));
  53411. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has cleared %s's crimes and wanted level.", GetRPName(playerid), GetRPName(targetid));
  53412. return 1;
  53413. }
  53414. CMD:removedm(playerid, params[])
  53415. {
  53416. new targetid;
  53417. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  53418. {
  53419. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  53420. }
  53421. if(sscanf(params, "u", targetid))
  53422. {
  53423. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /removedm [playerid]");
  53424. }
  53425. if(!IsPlayerConnected(targetid))
  53426. {
  53427. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  53428. }
  53429. if(!PlayerData[targetid][pDMWarnings] && !PlayerData[targetid][pWeaponRestricted])
  53430. {
  53431. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't been punished for DM recently.");
  53432. }
  53433. PlayerData[targetid][pDMWarnings]--;
  53434. PlayerData[targetid][pWeaponRestricted] = 0;
  53435. if(PlayerData[targetid][pJailType] == 2)
  53436. {
  53437. PlayerData[targetid][pJailType] = 0;
  53438. PlayerData[targetid][pJailTime] = 0;
  53439. SetPlayerPos(targetid, 1544.4407, -1675.5522, 13.5584);
  53440. SetPlayerFacingAngle(targetid, 90.0000);
  53441. SetPlayerInterior(targetid, 0);
  53442. SetPlayerVirtualWorld(targetid, 0);
  53443. SetCameraBehindPlayer(targetid);
  53444. SetPlayerWeapons(targetid);
  53445. }
  53446. SendClientMessageEx(targetid, COLOR_AQUA, "* Your DM punishment has been reversed by %s.", GetRPName(playerid));
  53447. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has reversed %s's DM punishment.", GetRPName(playerid), GetRPName(targetid));
  53448. Log_Write("log_admin", "%s (uid: %i) reversed %s's (uid: %i) DM punishment.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  53449. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET jailtype = 0, jailtime = 0, dmwarnings = %i, weaponrestricted = 0 WHERE uid = %i", PlayerData[targetid][pDMWarnings], PlayerData[targetid][pID]);
  53450. mysql_tquery(connectionID, queryBuffer);
  53451. return 1;
  53452. }
  53453. CMD:destroyveh(playerid, params[])
  53454. {
  53455. new vehicleid = GetPlayerVehicleID(playerid);
  53456. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  53457. {
  53458. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  53459. }
  53460. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  53461. {
  53462. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  53463. }
  53464. if(adminVehicle{vehicleid})
  53465. {
  53466. DestroyVehicleEx(vehicleid);
  53467. adminVehicle{vehicleid} = false;
  53468. return SendClientMessage(playerid, COLOR_GREY, "Admin vehicle destroyed.");
  53469. }
  53470. for(new i = 0; i < MAX_VEHICLES; i++)
  53471. {
  53472. if(adminVehicle{i})
  53473. {
  53474. if(IsValidDynamicObject(vehicleSiren[i]))
  53475. {
  53476. DestroyDynamicObject(vehicleSiren[i]);
  53477. vehicleSiren[i] = INVALID_OBJECT_ID;
  53478. }
  53479. DestroyVehicleEx(i);
  53480. adminVehicle{i} = false;
  53481. }
  53482. }
  53483. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s destroyed all admin spawned vehicles.", GetRPName(playerid));
  53484. return 1;
  53485. }
  53486. CMD:respawncars(playerid, params[])
  53487. {
  53488. new option[10], param[12];
  53489. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  53490. {
  53491. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  53492. }
  53493. if(sscanf(params, "s[10]S()[12]", option, param))
  53494. {
  53495. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /respawncars [job | faction | nearby | all]");
  53496. }
  53497. if(!strcmp(option, "job", true))
  53498. {
  53499. foreach(new i: Vehicle)
  53500. {
  53501. if(!IsVehicleOccupied(i) && !adminVehicle{i})
  53502. {
  53503. if((pizzaVehicles[0] <= i <= pizzaVehicles[5]) || (courierVehicles[0] <= i <= courierVehicles[6]) || (sweeperVehicles[0] <= i <= sweeperVehicles[3]) || (taxiVehicles[0] <= i <= taxiVehicles[3]) || (garbageVehicles[0] <= i <= garbageVehicles[5]) || (VehicleInfo[i][vJob] != JOB_NONE))
  53504. {
  53505. SetVehicleToRespawn(i);
  53506. }
  53507. }
  53508. }
  53509. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s respawned all unoccupied job vehicles.", GetRPName(playerid));
  53510. }
  53511. else if(!strcmp(option, "faction", true))
  53512. {
  53513. new type;
  53514. if(sscanf(param, "i", type))
  53515. {
  53516. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /respawncars [faction] [type]");
  53517. SendClientMessage(playerid, COLOR_SYNTAX, "List of types: (1) Police (2) Medic (3) News (4) Government (5) Hitman (6) Federal");
  53518. return 1;
  53519. }
  53520. if(!(1 <= type <= 5))
  53521. {
  53522. return SendClientMessage(playerid, COLOR_GREY, "Invalid faction type.");
  53523. }
  53524. foreach(new i: Vehicle)
  53525. {
  53526. if(!IsVehicleOccupied(i) && !adminVehicle{i} && VehicleInfo[i][vFactionType] == type)
  53527. {
  53528. SetVehicleToRespawn(i);
  53529. }
  53530. }
  53531. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s respawned all unoccupied {F7A763}%s{FF6347} vehicles.", GetRPName(playerid), factionTypes[type]);
  53532. }
  53533. else if(!strcmp(option, "nearby", true))
  53534. {
  53535. foreach(new i: Vehicle)
  53536. {
  53537. if(!IsVehicleOccupied(i) && !adminVehicle{i} && IsVehicleStreamedIn(i, playerid))
  53538. {
  53539. SetVehicleToRespawn(i);
  53540. }
  53541. }
  53542. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s respawned all unoccupied vehicles in %s.", GetRPName(playerid), GetPlayerZoneName(playerid));
  53543. }
  53544. else if(!strcmp(option, "all", true))
  53545. {
  53546. foreach(new i: Vehicle)
  53547. {
  53548. if(!IsVehicleOccupied(i) && !adminVehicle{i})
  53549. {
  53550. SetVehicleToRespawn(i);
  53551. }
  53552. }
  53553. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s respawned all unoccupied vehicles.", GetRPName(playerid));
  53554. }
  53555. return 1;
  53556. }
  53557. CMD:broadcast(playerid, params[])
  53558. {
  53559. new style, text[128];
  53560. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  53561. {
  53562. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  53563. }
  53564. if(sscanf(params, "is[128]", style, text))
  53565. {
  53566. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /broadcast [style (0-6)] [text]");
  53567. }
  53568. if(!(0 <= style <= 6))
  53569. {
  53570. return SendClientMessage(playerid, COLOR_GREY, "Invalid style.");
  53571. }
  53572. if(style == 2)
  53573. {
  53574. return SendClientMessage(playerid, COLOR_GREY, "Style 2 only disappears after death and is therefore disabled.");
  53575. }
  53576. GameTextForAll(text, 6000, style);
  53577. return 1;
  53578. }
  53579. CMD:fixveh(playerid, params[])
  53580. {
  53581. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  53582. {
  53583. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  53584. }
  53585. if(!IsPlayerInAnyVehicle(playerid))
  53586. {
  53587. return SendClientMessage(playerid, COLOR_GREY, "You can't fix a vehicle if you're not sitting in one.");
  53588. }
  53589. RepairVehicle(GetPlayerVehicleID(playerid));
  53590. SendClientMessage(playerid, COLOR_GREY, "Vehicle fixed.");
  53591. return 1;
  53592. }
  53593. CMD:cc( playerid, params[], help) {
  53594. if( PlayerData[ playerid ][ pAdmin ] >= 1)
  53595. {
  53596. for( new j; j < 96; j++ ) {
  53597. SendClientMessageToAllEx( -1, " " );
  53598. }
  53599. SendClientMessageToAllEx( 0x1692B8FF, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" );
  53600. SendAdminMessage( 0x1692B8FF, "Chat was cleared by admin %s", GetPlayerNameEx(playerid));
  53601. SendClientMessageToAllEx( 0x1692B8FF, " {d909d9}>>> {FFFFFF}www.os-rp.net{d909d9} <<<" );
  53602. SendClientMessageToAllEx( 0x1692B8FF, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" );
  53603. }
  53604. return 1;
  53605. }
  53606. CMD:healrange(playerid, params[])
  53607. {
  53608. new Float:radius;
  53609. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  53610. {
  53611. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  53612. }
  53613. if(sscanf(params, "f", radius))
  53614. {
  53615. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /healrange [radius]");
  53616. }
  53617. if(!(1.0 <= radius <= 50.0))
  53618. {
  53619. return SendClientMessage(playerid, COLOR_GREY, "The radius can't be below 1.0 or above 50.0.");
  53620. }
  53621. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  53622. {
  53623. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  53624. }
  53625. foreach(new i : Player)
  53626. {
  53627. if(IsPlayerInRangeOfPlayer(i, playerid, radius))
  53628. {
  53629. if(!PlayerData[i][pAdminDuty])
  53630. {
  53631. SetPlayerHealth(i, 100.0);
  53632. if(GetPlayerArmourEx(i) < 25.0)
  53633. {
  53634. SetScriptArmour(i, 25.0);
  53635. }
  53636. }
  53637. SendClientMessage(i, COLOR_WHITE, "An admin has healed everyone nearby.");
  53638. }
  53639. }
  53640. return 1;
  53641. }
  53642. CMD:freezerange(playerid, params[])
  53643. {
  53644. new Float:radius;
  53645. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  53646. {
  53647. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  53648. }
  53649. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  53650. {
  53651. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  53652. }
  53653. if(sscanf(params, "f", radius))
  53654. {
  53655. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /freezerange [radius]");
  53656. }
  53657. if(!(1.0 <= radius <= 50.0))
  53658. {
  53659. return SendClientMessage(playerid, COLOR_GREY, "The radius can't be below 1.0 or above 50.0.");
  53660. }
  53661. foreach(new i : Player)
  53662. {
  53663. if(IsPlayerInRangeOfPlayer(i, playerid, radius))
  53664. {
  53665. if(!PlayerData[i][pAdminDuty])
  53666. {
  53667. TogglePlayerControllable(i, false);
  53668. }
  53669. SendClientMessage(i, COLOR_WHITE, "An admin has frozen everyone nearby.");
  53670. }
  53671. }
  53672. return 1;
  53673. }
  53674. CMD:unfreezerange(playerid, params[])
  53675. {
  53676. new Float:radius;
  53677. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  53678. {
  53679. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  53680. }
  53681. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  53682. {
  53683. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  53684. }
  53685. if(sscanf(params, "f", radius))
  53686. {
  53687. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /unfreezerange [radius]");
  53688. }
  53689. if(!(1.0 <= radius <= 50.0))
  53690. {
  53691. return SendClientMessage(playerid, COLOR_GREY, "The radius can't be below 1.0 or above 50.0.");
  53692. }
  53693. foreach(new i : Player)
  53694. {
  53695. if(IsPlayerInRangeOfPlayer(i, playerid, radius))
  53696. {
  53697. if(!PlayerData[i][pAdminDuty])
  53698. {
  53699. TogglePlayerControllable(i, true);
  53700. }
  53701. SendClientMessage(i, COLOR_WHITE, "An admin has unfrozen everyone nearby.");
  53702. }
  53703. }
  53704. return 1;
  53705. }
  53706. CMD:reviverange(playerid, params[])
  53707. {
  53708. new Float:radius;
  53709. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  53710. {
  53711. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  53712. }
  53713. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  53714. {
  53715. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  53716. }
  53717. if(sscanf(params, "f", radius))
  53718. {
  53719. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /reviverange [radius]");
  53720. }
  53721. if(!(1.0 <= radius <= 50.0))
  53722. {
  53723. return SendClientMessage(playerid, COLOR_GREY, "The radius can't be below 1.0 or above 50.0.");
  53724. }
  53725. foreach(new i : Player)
  53726. {
  53727. if(IsPlayerInRangeOfPlayer(i, playerid, radius) && PlayerData[i][pInjured])
  53728. {
  53729. PlayerData[i][pInjured] = 0;
  53730. if(PlayerData[i][pAcceptedEMS] != INVALID_PLAYER_ID)
  53731. {
  53732. SendClientMessageEx(PlayerData[i][pAcceptedEMS], COLOR_YELLOW, "Your patient %s has somehow found the strength to get up.", GetRPName(i));
  53733. PlayerData[i][pAcceptedEMS] = INVALID_PLAYER_ID;
  53734. }
  53735. SetPlayerHealth(i, 100.0);
  53736. ClearAnimations(i, 1);
  53737. SendClientMessage(i, COLOR_WHITE, "An admin has revived everyone nearby.");
  53738. }
  53739. }
  53740. return 1;
  53741. }
  53742. CMD:shots(playerid, params[])
  53743. {
  53744. new targetid;
  53745. if(PlayerData[playerid][pAdmin] < 1)
  53746. {
  53747. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  53748. }
  53749. if(sscanf(params, "u", targetid))
  53750. {
  53751. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /shots [playerid]");
  53752. }
  53753. if(!IsPlayerConnected(targetid))
  53754. {
  53755. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  53756. }
  53757. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM shots WHERE playerid = %i ORDER BY id DESC LIMIT 20", targetid);
  53758. mysql_tquery(connectionID, queryBuffer, "OnAdminListShots", "ii", playerid, targetid);
  53759. return 1;
  53760. }
  53761. CMD:damages(playerid, params[])
  53762. {
  53763. new playerb;
  53764. if(sscanf(params, "u", playerb))return SendClientMessage(playerid, COLOR_ADM, "USAGE:{FFFFFF} /damages [playerid/PartofName]");
  53765. if(!IsPlayerConnected(playerb))return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You have specified an invalid player.");
  53766. if(PlayerData[playerid][pAdminDuty])
  53767. {
  53768. ReturnDamagesAdmin(playerb, playerid);
  53769. }
  53770. else{
  53771. if(!IsPlayerInRangeOfPlayer(playerid, playerb, 5.0)) return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You must be closer to that player.");
  53772. ReturnDamages(playerb, playerid);
  53773. }
  53774. return true;
  53775. }
  53776. CMD:adamages(playerid, params[])
  53777. {
  53778. new targetid;
  53779. if(PlayerData[playerid][pAdmin] < 1)
  53780. {
  53781. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  53782. }
  53783. if(sscanf(params, "u", targetid))
  53784. {
  53785. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /damages [playerid]");
  53786. }
  53787. if(!IsPlayerConnected(targetid))
  53788. {
  53789. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  53790. }
  53791. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT weaponid, playerid, timestamp FROM shots WHERE hitid = %i AND hittype = 1 ORDER BY id DESC LIMIT 20", targetid);
  53792. mysql_tquery(connectionID, queryBuffer, "OnAdminListDamages", "ii", playerid, targetid);
  53793. return 1;
  53794. }
  53795. CMD:kills(playerid, params[])
  53796. {
  53797. new targetid;
  53798. if(PlayerData[playerid][pAdmin] < 1)
  53799. {
  53800. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  53801. }
  53802. if(sscanf(params, "u", targetid))
  53803. {
  53804. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /kills [playerid]");
  53805. }
  53806. if(!IsPlayerConnected(targetid))
  53807. {
  53808. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  53809. }
  53810. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM kills WHERE killer_uid = %i OR target_uid = %i ORDER BY date DESC LIMIT 20", PlayerData[targetid][pID], PlayerData[targetid][pID]);
  53811. mysql_tquery(connectionID, queryBuffer, "OnAdminListKills", "ii", playerid, targetid);
  53812. return 1;
  53813. }
  53814. CMD:resetadtimer(playerid, params[])
  53815. {
  53816. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  53817. {
  53818. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  53819. }
  53820. gLastAd = 0;
  53821. SendClientMessage(playerid, COLOR_GREY, "Advertisement timer reset.");
  53822. return 1;
  53823. }
  53824. CMD:setname(playerid, params[])
  53825. {
  53826. new targetid, name[24];
  53827. if(PlayerData[playerid][pAdmin] < SENIOR_ADMIN)
  53828. {
  53829. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  53830. }
  53831. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  53832. {
  53833. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  53834. }
  53835. if(sscanf(params, "us[24]", targetid, name))
  53836. {
  53837. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setname [playerid] [name]");
  53838. }
  53839. if(!IsPlayerConnected(targetid))
  53840. {
  53841. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  53842. }
  53843. if(!PlayerData[targetid][pLogged])
  53844. {
  53845. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet.");
  53846. }
  53847. if(PlayerData[targetid][pAdminDuty] && strcmp(PlayerData[targetid][pAdminName], "None", true) != 0)
  53848. {
  53849. return SendClientMessage(playerid, COLOR_GREY, "You can't change the name of a player on admin duty. They're using their admin name.");
  53850. }
  53851. if(!IsValidName(name))
  53852. {
  53853. return SendClientMessage(playerid, COLOR_GREY, "The name specified is not supported by the SA-MP client.");
  53854. }
  53855. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid FROM "#TABLE_USERS" WHERE username = '%e'", name);
  53856. mysql_tquery(connectionID, queryBuffer, "OnAdminChangeName", "iis", playerid, targetid, name);
  53857. return 1;
  53858. }
  53859. CMD:explode(playerid, params[])
  53860. {
  53861. new targetid, damage;
  53862. if(PlayerData[playerid][pAdmin] < SENIOR_ADMIN)
  53863. {
  53864. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  53865. }
  53866. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  53867. {
  53868. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  53869. }
  53870. if(sscanf(params, "ui", targetid, damage))
  53871. {
  53872. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /explode [playerid] [damage(amount)]");
  53873. }
  53874. if(!IsPlayerConnected(targetid))
  53875. {
  53876. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  53877. }
  53878. new
  53879. Float:x,
  53880. Float:y,
  53881. Float:z;
  53882. GetPlayerPos(targetid, x, y, z);
  53883. CreateExplosionForPlayer(targetid, x, y, z, 6, 20.0);
  53884. SendClientMessageEx(playerid, COLOR_WHITE, "You exploded %s for their client only.", GetRPName(targetid));
  53885. return 1;
  53886. }
  53887. CMD:oban(playerid, params[])
  53888. {
  53889. new username[MAX_PLAYERS], reason[128], targetid;
  53890. if(PlayerData[playerid][pAdmin] < SENIOR_ADMIN)
  53891. {
  53892. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  53893. }
  53894. if(sscanf(params, "s[24]s[128]", username, reason))
  53895. {
  53896. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /oban [username] [reason]");
  53897. }
  53898. if(PlayerData[targetid][pAdmin] > PlayerData[playerid][pAdmin])
  53899. {
  53900. return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be kicked.");
  53901. }
  53902. if(IsPlayerOnline(username))
  53903. {
  53904. return SendClientMessage(playerid, COLOR_GREY, "That player is already online and logged in. Use /ban instead.");
  53905. }
  53906. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT adminlevel, ip, uid FROM "#TABLE_USERS" WHERE username = '%e'", username);
  53907. mysql_tquery(connectionID, queryBuffer, "OnAdminOfflineBan", "iss", playerid, username, reason);
  53908. return 1;
  53909. }
  53910. CMD:permaban(playerid, params[])
  53911. {
  53912. new targetid, reason[128];
  53913. if(PlayerData[playerid][pAdmin] < SENIOR_ADMIN)
  53914. {
  53915. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  53916. }
  53917. if(sscanf(params, "us[128]", targetid, reason))
  53918. {
  53919. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /permaban [playerid] [reason]");
  53920. }
  53921. if(!IsPlayerConnected(targetid))
  53922. {
  53923. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  53924. }
  53925. if(PlayerData[targetid][pAdmin] > PlayerData[playerid][pAdmin])
  53926. {
  53927. return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be banned.");
  53928. }
  53929. Log_Write("log_punishments", "%s (uid: %i) permabanned %s (uid: %i), reason: %s", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], reason);
  53930. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was permanently banned by %s, reason: %s", GetRPName(targetid), GetRPName(playerid), reason);
  53931. BanPlayer(targetid, GetPlayerNameEx(playerid), reason, true);
  53932. return 1;
  53933. }
  53934. CMD:baninfo(playerid, params[])
  53935. {
  53936. new string[MAX_PLAYER_NAME];
  53937. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN && !PlayerData[playerid][pBanAppealer])
  53938. {
  53939. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  53940. }
  53941. if(sscanf(params, "s[24]", string))
  53942. {
  53943. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /baninfo [username/ip]");
  53944. }
  53945. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM bans WHERE username = '%e' OR ip = '%e'", string, string);
  53946. mysql_tquery(connectionID, queryBuffer, "OnAdminCheckBan", "is", playerid, string);
  53947. return 1;
  53948. }
  53949. CMD:banhistory(playerid, params[])
  53950. {
  53951. new name[MAX_PLAYER_NAME];
  53952. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN && !PlayerData[playerid][pBanAppealer] && !PlayerData[playerid][pHumanResources])
  53953. {
  53954. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  53955. }
  53956. if(sscanf(params, "s[24]", name))
  53957. {
  53958. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /banhistory [username]");
  53959. }
  53960. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT a.date, a.description FROM log_bans a, "#TABLE_USERS" b WHERE a.uid = b.uid AND b.username = '%e' ORDER BY a.date DESC", name);
  53961. mysql_tquery(connectionID, queryBuffer, "OnAdminCheckBanHistory", "is", playerid, name);
  53962. return 1;
  53963. }
  53964. CMD:unban(playerid, params[])
  53965. {
  53966. new username[MAX_PLAYER_NAME];
  53967. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pBanAppealer])
  53968. {
  53969. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  53970. }
  53971. if(sscanf(params, "s[24]", username))
  53972. {
  53973. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /unban [username]");
  53974. }
  53975. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT id, permanent FROM bans WHERE username = '%e'", username);
  53976. mysql_tquery(connectionID, queryBuffer, "OnAdminUnbanUser", "is", playerid, username);
  53977. return 1;
  53978. }
  53979. CMD:unbanip(playerid, params[])
  53980. {
  53981. new string[25];
  53982. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pBanAppealer])
  53983. {
  53984. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  53985. }
  53986. if(!IsAnIP(params))
  53987. {
  53988. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /unbanip [ip address]");
  53989. }
  53990. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM bans WHERE ip = '%s'", params);
  53991. mysql_tquery(connectionID, queryBuffer);
  53992. format(string, sizeof(string), "unbanip %s", params);
  53993. SendRconCommand(string);
  53994. SendRconCommand("reloadbans");
  53995. UnBlockIpAddress(params);
  53996. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has unbanned IP '%s'.", GetRPName(playerid), params);
  53997. return 1;
  53998. }
  53999. CMD:banip(playerid, params[])
  54000. {
  54001. new ip[16], reason[128], targetid;
  54002. if(PlayerData[playerid][pAdmin] < SENIOR_ADMIN && !PlayerData[playerid][pBanAppealer])
  54003. {
  54004. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  54005. }
  54006. if(sscanf(params, "s[16]S(N/A)[128]", ip, reason))
  54007. {
  54008. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /banip [ip address] [reason (optional)]");
  54009. }
  54010. if(PlayerData[targetid][pAdmin] > PlayerData[playerid][pAdmin])
  54011. {
  54012. return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be banned.");
  54013. }
  54014. if(!IsAnIP(ip))
  54015. {
  54016. return SendClientMessage(playerid, COLOR_GREY, "Invalid IP address.");
  54017. }
  54018. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT id FROM bans WHERE ip = '%s'", ip);
  54019. mysql_tquery(connectionID, queryBuffer, "OnAdminBanIP", "iss", playerid, ip, reason);
  54020. return 1;
  54021. }
  54022. CMD:lockaccount(playerid, params[])
  54023. {
  54024. new username[MAX_PLAYER_NAME];
  54025. if(PlayerData[playerid][pAdmin] < SENIOR_ADMIN)
  54026. {
  54027. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  54028. }
  54029. if(sscanf(params, "s[24]", username))
  54030. {
  54031. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /lockaccount [username]");
  54032. }
  54033. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT locked, adminlevel FROM "#TABLE_USERS" WHERE username = '%e'", username);
  54034. mysql_tquery(connectionID, queryBuffer, "OnAdminLockAccount", "is", playerid, username);
  54035. return 1;
  54036. }
  54037. CMD:unlockaccount(playerid, params[])
  54038. {
  54039. new username[MAX_PLAYER_NAME];
  54040. if(PlayerData[playerid][pAdmin] < SENIOR_ADMIN)
  54041. {
  54042. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  54043. }
  54044. if(sscanf(params, "s[24]", username))
  54045. {
  54046. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /unlockaccount [username]");
  54047. }
  54048. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid FROM "#TABLE_USERS" WHERE username = '%e' AND locked = 1", username);
  54049. mysql_tquery(connectionID, queryBuffer, "OnAdminUnlockAccount", "is", playerid, username);
  54050. return 1;
  54051. }
  54052. CMD:sprison(playerid, params[])
  54053. {
  54054. new targetid, minutes, reason[128];
  54055. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  54056. {
  54057. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  54058. }
  54059. if(sscanf(params, "uis[128]", targetid, minutes, reason))
  54060. {
  54061. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sprison [playerid] [minutes] [reason]");
  54062. }
  54063. if(!IsPlayerConnected(targetid))
  54064. {
  54065. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  54066. }
  54067. if(PlayerData[targetid][pAdmin] > PlayerData[playerid][pAdmin])
  54068. {
  54069. return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be prisoned.");
  54070. }
  54071. if(!PlayerData[targetid][pLogged])
  54072. {
  54073. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet. You can wait until they login or use /oprison.");
  54074. }
  54075. if(minutes < 1)
  54076. {
  54077. return SendClientMessage(playerid, COLOR_GREY, "The amount of minutes cannot be below one. /unjail to release a player.");
  54078. }
  54079. PlayerData[targetid][pJailType] = 2;
  54080. PlayerData[targetid][pJailTime] = minutes * 60;
  54081. ResetPlayerWeaponsEx(targetid);
  54082. ResetPlayer(targetid);
  54083. SetPlayerInJail(targetid);
  54084. Log_Write("log_punishments", "%s (uid: %i) silently prisoned %s (uid: %i) for %i minutes, reason: %s", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], minutes, reason);
  54085. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was prisoned for %i minutes by an Admin, reason: %s", GetRPName(targetid), minutes, reason);
  54086. SendClientMessageEx(targetid, COLOR_AQUA, "* You have been admin prisoned for %i minutes by an admin.", minutes);
  54087. return 1;
  54088. }
  54089. CMD:sethpall(playerid, params[])
  54090. {
  54091. new Float:amount;
  54092. if(PlayerData[playerid][pAdmin] < SENIOR_ADMIN)
  54093. {
  54094. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  54095. }
  54096. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  54097. {
  54098. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  54099. }
  54100. if(sscanf(params, "f", amount))
  54101. {
  54102. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sethpall [amount]");
  54103. }
  54104. if(amount < 1.0)
  54105. {
  54106. return SendClientMessage(playerid, COLOR_GREY, "Health can't be under 1.0.");
  54107. }
  54108. foreach(new i : Player)
  54109. {
  54110. if(!PlayerData[i][pAdminDuty] && !PlayerData[i][pJoinedEvent] && !PlayerData[i][pPaintball] && PlayerData[i][pDueling] == INVALID_PLAYER_ID)
  54111. {
  54112. SetPlayerHealth(i, amount);
  54113. }
  54114. }
  54115. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s set everyone's health to %.1f.", GetRPName(playerid), amount);
  54116. return 1;
  54117. }
  54118. CMD:setarmorall(playerid, params[])
  54119. {
  54120. new Float:amount;
  54121. if(PlayerData[playerid][pAdmin] < SENIOR_ADMIN)
  54122. {
  54123. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  54124. }
  54125. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  54126. {
  54127. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  54128. }
  54129. if(sscanf(params, "f", amount))
  54130. {
  54131. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setarmorall [amount]");
  54132. }
  54133. if(amount < 0.0 || amount > 150.0)
  54134. {
  54135. return SendClientMessage(playerid, COLOR_GREY, "Armor can't be under 0.0 or above 150.0.");
  54136. }
  54137. foreach(new i : Player)
  54138. {
  54139. if(!PlayerData[i][pAdminDuty] && !PlayerData[i][pJoinedEvent] && !PlayerData[i][pPaintball] && PlayerData[i][pDueling] == INVALID_PLAYER_ID)
  54140. {
  54141. SetScriptArmour(i, amount);
  54142. }
  54143. }
  54144. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s set everyone's armor to %.1f.", GetRPName(playerid), amount);
  54145. return 1;
  54146. }
  54147. CMD:fws(playerid, params[])
  54148. {
  54149. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < ASST_MANAGEMENT)
  54150. {
  54151. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  54152. }
  54153. if(PlayerData[playerid][pAdmin] >= SENIOR_ADMIN)
  54154. {
  54155. new targetid, reason[64];
  54156. if(sscanf(params, "uds[64]", targetid, reason))
  54157. {
  54158. SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /fws [playerid] [reason]");
  54159. return 1;
  54160. }
  54161. GivePlayerWeaponEx(targetid, 24);
  54162. GivePlayerWeaponEx(targetid, 25);
  54163. GivePlayerWeaponEx(targetid, 24);
  54164. GivePlayerWeaponEx(targetid, 30);
  54165. GivePlayerWeaponEx(targetid, 34);
  54166. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s gave a full weapon set to %s, reaason %s.", GetRPName(playerid), GetRPName(targetid), reason);
  54167. SendClientMessageEx(targetid, COLOR_AQUA, "You have received a {00AA00}full weapon set{33CCFF} from %s.", GetRPName(playerid));
  54168. }
  54169. else
  54170. {
  54171. SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  54172. }
  54173. return 1;
  54174. }
  54175. CMD:healup(playerid, params[])
  54176. {
  54177. if(PlayerData[playerid][pDonator] < 1)
  54178. {
  54179. return SendClientMessage(playerid, COLOR_GREY, "You are not {D909D9}Legendary VIP.");
  54180. }
  54181. if(!IsPlayerInRangeOfPoint(playerid, 3.0, 3090.76, 221.60, 1053.48))
  54182. {
  54183. return SendClientMessage(playerid, COLOR_GREY, "You are not in the {D909D9}Legendary VIP{afafaf} Lounge");
  54184. }
  54185. SetScriptArmour(playerid, 100);
  54186. SetPlayerHealth(playerid, 100);
  54187. return 1;
  54188. }
  54189. CMD:getboombox(playerid, params[])
  54190. {
  54191. if(PlayerData[playerid][pDonator] < 3)
  54192. {
  54193. return SendClientMessage(playerid, COLOR_GREY, "You are not {D909D9}Legendary VIP.");
  54194. }
  54195. if(!IsPlayerInRangeOfPoint(playerid, 3.0, 3088.6802,221.4168,1053.4829))
  54196. {
  54197. return SendClientMessage(playerid, 0xAFAFAFAA, "You are not in the {D909D9}Legendary VIP{Afafaf} Lounge.");
  54198. }
  54199. if(!strcmp(params, "confirm", true))
  54200. {
  54201. PlayerData[playerid][pBoombox] = 1;
  54202. SendClientMessageEx(playerid, COLOR_WHITE, "You have earned a free {D909D9}Legendary VIP{FFFFFF} boombox.");
  54203. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET boombox = 1 WHERE uid = %i", PlayerData[playerid][pID]);
  54204. mysql_tquery(connectionID, queryBuffer);
  54205. }
  54206. return 1;
  54207. }
  54208. CMD:vweapons(playerid, params[])
  54209. {
  54210. if(PlayerData[playerid][pDonator] < 3)
  54211. {
  54212. return SendClientMessage(playerid, COLOR_GREY, "You are not {D909D9}Legendary VIP.");
  54213. }
  54214. if(!IsPlayerInRangeOfPoint(playerid, 3.0, 3093.50, 221.60, 1053.48))
  54215. {
  54216. return SendClientMessage(playerid, 0xAFAFAFAA, "You are not in the {D909D9}Legendary VIP{Afafaf} Lounge.");
  54217. }
  54218. GivePlayerWeaponEx(playerid, 12);
  54219. GivePlayerWeaponEx(playerid, 24);
  54220. GivePlayerWeaponEx(playerid, 25);
  54221. GivePlayerWeaponEx(playerid, 27);
  54222. GivePlayerWeaponEx(playerid, 31);
  54223. GivePlayerWeaponEx(playerid, 34);
  54224. SendClientMessageEx(playerid, COLOR_AQUA, "You have received a {00AA00}full weapon set{33CCFF} from your vip weapons.");
  54225. return 1;
  54226. }
  54227. CMD:givegun(playerid, params[])
  54228. {
  54229. new targetid, weaponid;
  54230. if(PlayerData[playerid][pAdmin] < SENIOR_ADMIN)
  54231. {
  54232. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  54233. }
  54234. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  54235. {
  54236. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  54237. }
  54238. if(sscanf(params, "ui", targetid, weaponid))
  54239. {
  54240. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /givegun [playerid] [weaponid]");
  54241. SendClientMessage(playerid, COLOR_GREEN, "_______________________________________");
  54242. SendClientMessage(playerid, COLOR_SYNTAX, "1: Brass Knuckles 2: Golf Club 3: Nite Stick 4: Knife 5: Baseball Bat 6: Shovel 7: Pool Cue 8: Katana 9: Chainsaw");
  54243. SendClientMessage(playerid, COLOR_SYNTAX, "10: Purple Dildo 11: Small White Vibrator 12: Large White Vibrator 13: Silver Vibrator 14: Flowers 15: Cane 16: Frag Grenade");
  54244. SendClientMessage(playerid, COLOR_SYNTAX, "17: Tear Gas 18: Molotov Cocktail 19: Vehicle Missile 20: Hydra Flare 21: Jetpack 22: 9mm 23: Silenced 9mm 24: Desert Eagle");
  54245. SendClientMessage(playerid, COLOR_SYNTAX, "26: Sawnoff Shotgun 27: Combat Shotgun 28: Micro SMG (Mac 10) 29: SMG (MP5) 30: AK-47 31: M4 32: Tec9 33: Rifle");
  54246. SendClientMessage(playerid, COLOR_SYNTAX, "25: Shotgun 34: Sniper Rifle 35: Rocket Launcher 36: HS Rocket Launcher 37: Flamethrower 38: Minigun 39: Satchel Charge");
  54247. SendClientMessage(playerid, COLOR_SYNTAX, "40: Detonator 41: Spraycan 42: Fire Extinguisher 43: Camera 44: Nightvision Goggles 45: Infared Goggles 46: Parachute");
  54248. SendClientMessage(playerid, COLOR_SYNTAX, "_______________________________________");
  54249. return 1;
  54250. }
  54251. if(!IsPlayerConnected(targetid))
  54252. {
  54253. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  54254. }
  54255. if(PlayerData[targetid][pHours] < 2 || PlayerData[targetid][pWeaponRestricted] > 0)
  54256. {
  54257. return SendClientMessage(playerid, COLOR_GREY, "That player is either weapon restricted or played less than two playing hours.");
  54258. }
  54259. if(!(1 <= weaponid <= 46))
  54260. {
  54261. return SendClientMessage(playerid, COLOR_GREY, "Invalid weapon.");
  54262. }
  54263. if(weaponid == 38 && PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  54264. {
  54265. return SendClientMessage(playerid, COLOR_GREY, "The minigun was disabled due to abuse.");
  54266. }
  54267. //ammo
  54268. GivePlayerWeaponEx(targetid, weaponid); // true = pgunsammo
  54269. SendClientMessageEx(targetid, COLOR_AQUA, "You have received a {00AA00}%s{33CCFF} from %s.", GetWeaponNameEx(weaponid), GetRPName(playerid));
  54270. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has given a %s to %s.", GetRPName(playerid), GetWeaponNameEx(weaponid), GetRPName(targetid));
  54271. Log_Write("log_givegun", "%s (uid: %i) gives a %s to %s (uid: %i)", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetWeaponNameEx(weaponid), GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  54272. return 1;
  54273. }
  54274. CMD:setweather(playerid, params[])
  54275. {
  54276. new weatherid;
  54277. if(PlayerData[playerid][pAdmin] < SENIOR_ADMIN)
  54278. {
  54279. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  54280. }
  54281. if(sscanf(params, "i", weatherid))
  54282. {
  54283. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setweather [weatherid]");
  54284. }
  54285. gWeather = weatherid;
  54286. SetWeather(weatherid);
  54287. SendClientMessageEx(playerid, COLOR_GREY2, "Weather changed to %i.", weatherid);
  54288. return 1;
  54289. }
  54290. CMD:settime(playerid, params[])
  54291. {
  54292. new hour;
  54293. if(PlayerData[playerid][pAdmin] < SENIOR_ADMIN)
  54294. {
  54295. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  54296. }
  54297. if(sscanf(params, "i", hour))
  54298. {
  54299. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /settime [hour]");
  54300. }
  54301. if(!(0 <= hour <= 23))
  54302. {
  54303. return SendClientMessage(playerid, COLOR_GREY, "The hour must range from 0 to 23.");
  54304. }
  54305. gWorldTime = hour;
  54306. SetWorldTime(hour);
  54307. SendClientMessageToAllEx(COLOR_GREY2, "Time of day changed to %i hours.", hour);
  54308. return 1;
  54309. }
  54310. CMD:setstat(playerid, params[])
  54311. {
  54312. new targetid, option[24], param[32], value;
  54313. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pDynamicAdmin])
  54314. {
  54315. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  54316. }
  54317. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  54318. {
  54319. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  54320. }
  54321. if(sscanf(params, "us[24]S()[32]", targetid, option, param))
  54322. {
  54323. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [option]");
  54324. SendClientMessageEx(playerid, COLOR_SYNTAX, "List of options: Gender, Age, Cash, Bank, Level, Respect, UpgradePoints, Hours, Warnings");
  54325. SendClientMessageEx(playerid, COLOR_SYNTAX, "List of options: SpawnHealth, SpawnArmor, FightStyle, Accent, Cookies, Phone, Crimes, Arrested");
  54326. SendClientMessageEx(playerid, COLOR_SYNTAX, "List of options: WantedLevel, Materials, Weed, Cocaine, Meth, Painkillers, Cigars, WalkieTalkie");
  54327. SendClientMessageEx(playerid, COLOR_SYNTAX, "List of options: Channel, Spraycans, Boombox, Phonebook, Paycheck, CarLicense, Seeds, Ephedrine");
  54328. SendClientMessageEx(playerid, COLOR_SYNTAX, "List of options: InventoryUpgrade, AddictUpgrade, TraderUpgrade, AssetUpgrade, LaborUpgrade");
  54329. SendClientMessageEx(playerid, COLOR_SYNTAX, "List of options: MP3Player, Job, MuriaticAcid, BakingSoda, Components, Watch, GPS, GasCan");
  54330. SendClientMessageEx(playerid, COLOR_SYNTAX, "List of options: DMWarnings, WeaponRestricted, CourierSkill, FishingSkill, GuardSkill, WeaponSkill");
  54331. SendClientMessageEx(playerid, COLOR_SYNTAX, "List of options: MechanicSkill, LawyerSkill, SmugglerSkill, DetectiveSkill, ThiefSkill");
  54332. SendClientMessageEx(playerid, COLOR_SYNTAX, "List of options: Bombs, FirstAid, PoliceScanner, Bodykits, Rimkits, Diamonds, Marriage, Skates");
  54333. return 1;
  54334. }
  54335. if(!strcmp(option, "gender", true))
  54336. {
  54337. if(isnull(param))
  54338. {
  54339. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [gender] [male | female | shemale]");
  54340. }
  54341. if(!strcmp(param, "male", true))
  54342. {
  54343. PlayerData[targetid][pGender] = 1;
  54344. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's gender to Male.", GetRPName(targetid));
  54345. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET gender = 1 WHERE uid = %i", PlayerData[targetid][pID]);
  54346. mysql_tquery(connectionID, queryBuffer);
  54347. }
  54348. else if(!strcmp(param, "female", true))
  54349. {
  54350. PlayerData[targetid][pGender] = 2;
  54351. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's gender to Female.", GetRPName(targetid));
  54352. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET gender = 2 WHERE uid = %i", PlayerData[targetid][pID]);
  54353. mysql_tquery(connectionID, queryBuffer);
  54354. }
  54355. else if(!strcmp(param, "shemale", true))
  54356. {
  54357. PlayerData[targetid][pGender] = 3;
  54358. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's gender to Shemale.", GetRPName(targetid));
  54359. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET gender = 3 WHERE uid = %i", PlayerData[targetid][pID]);
  54360. mysql_tquery(connectionID, queryBuffer);
  54361. }
  54362. }
  54363. else if(!strcmp(option, "age", true))
  54364. {
  54365. if(sscanf(param, "i", value))
  54366. {
  54367. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [age] [value]");
  54368. }
  54369. if(!(0 <= value <= 128))
  54370. {
  54371. return SendClientMessage(playerid, COLOR_GREY3, "The value specified can't be under 0 or above 128.");
  54372. }
  54373. PlayerData[targetid][pAge] = value;
  54374. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's age to %i.", GetRPName(targetid), value);
  54375. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET age = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54376. mysql_tquery(connectionID, queryBuffer);
  54377. }
  54378. else if(!strcmp(option, "cash", true))
  54379. {
  54380. if(sscanf(param, "i", value))
  54381. {
  54382. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [cash] [value]");
  54383. }
  54384. PlayerData[targetid][pCash] = value;
  54385. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's cash to $%i.", GetRPName(targetid), value);
  54386. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET cash = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54387. mysql_tquery(connectionID, queryBuffer);
  54388. }
  54389. else if(!strcmp(option, "bank", true))
  54390. {
  54391. if(sscanf(param, "i", value))
  54392. {
  54393. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [bank] [value]");
  54394. }
  54395. PlayerData[targetid][pBank] = value;
  54396. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's bank money to $%i.", GetRPName(targetid), value);
  54397. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET bank = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54398. mysql_tquery(connectionID, queryBuffer);
  54399. }
  54400. else if(!strcmp(option, "level", true))
  54401. {
  54402. if(sscanf(param, "i", value))
  54403. {
  54404. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [level] [value]");
  54405. }
  54406. PlayerData[targetid][pLevel] = value;
  54407. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's level to %i.", GetRPName(targetid), value);
  54408. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET level = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54409. mysql_tquery(connectionID, queryBuffer);
  54410. }
  54411. else if(!strcmp(option, "respect", true))
  54412. {
  54413. if(sscanf(param, "i", value))
  54414. {
  54415. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [respect] [value]");
  54416. }
  54417. PlayerData[targetid][pEXP] = value;
  54418. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's respect points to %i.", GetRPName(targetid), value);
  54419. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET exp = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54420. mysql_tquery(connectionID, queryBuffer);
  54421. }
  54422. else if(!strcmp(option, "upgradepoints", true))
  54423. {
  54424. if(sscanf(param, "i", value))
  54425. {
  54426. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [upgradepoints] [value]");
  54427. }
  54428. PlayerData[targetid][pUpgradePoints] = value;
  54429. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's upgrade points to %i.", GetRPName(targetid), value);
  54430. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET upgradepoints = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54431. mysql_tquery(connectionID, queryBuffer);
  54432. }
  54433. else if(!strcmp(option, "hours", true))
  54434. {
  54435. if(sscanf(param, "i", value))
  54436. {
  54437. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [hours] [value]");
  54438. }
  54439. PlayerData[targetid][pHours] = value;
  54440. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's playing hours to %i.", GetRPName(targetid), value);
  54441. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET hours = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54442. mysql_tquery(connectionID, queryBuffer);
  54443. }
  54444. else if(!strcmp(option, "warnings", true))
  54445. {
  54446. if(sscanf(param, "i", value))
  54447. {
  54448. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [warnings] [value]");
  54449. }
  54450. if(!(0 <= value <= 3))
  54451. {
  54452. return SendClientMessage(playerid, COLOR_GREY3, "The value specified can't be under 0 or above 3.");
  54453. }
  54454. PlayerData[targetid][pWarnings] = value;
  54455. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's warnings to %i.", GetRPName(targetid), value);
  54456. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET warnings = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54457. mysql_tquery(connectionID, queryBuffer);
  54458. }
  54459. else if(!strcmp(option, "spawnhealth", true))
  54460. {
  54461. new Float:amount;
  54462. if(sscanf(param, "f", amount))
  54463. {
  54464. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [spawnhealth] [value]");
  54465. }
  54466. PlayerData[targetid][pSpawnHealth] = amount;
  54467. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's spawn health to %.1f.", GetRPName(targetid), amount);
  54468. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET spawnhealth = '%f' WHERE uid = %i", amount, PlayerData[targetid][pID]);
  54469. mysql_tquery(connectionID, queryBuffer);
  54470. }
  54471. else if(!strcmp(option, "spawnarmor", true))
  54472. {
  54473. new Float:amount;
  54474. if(sscanf(param, "f", amount))
  54475. {
  54476. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [spawnarmor] [value]");
  54477. }
  54478. PlayerData[targetid][pSpawnArmor] = amount;
  54479. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's spawn armor to %.1f.", GetRPName(targetid), amount);
  54480. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET spawnarmor = '%f' WHERE uid = %i", amount, PlayerData[targetid][pID]);
  54481. mysql_tquery(connectionID, queryBuffer);
  54482. }
  54483. else if(!strcmp(option, "fightstyle", true))
  54484. {
  54485. if(isnull(param))
  54486. {
  54487. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [fightstyle] [option]");
  54488. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Normal, Boxing, Kungfu, Kneehead, Grabkick, Elbow");
  54489. return 1;
  54490. }
  54491. if(!strcmp(param, "normal", true))
  54492. {
  54493. PlayerData[targetid][pFightStyle] = FIGHT_STYLE_NORMAL;
  54494. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's fight style to Normal.", GetRPName(targetid));
  54495. SetPlayerFightingStyle(targetid, PlayerData[targetid][pFightStyle]);
  54496. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET fightstyle = %i WHERE uid = %i", PlayerData[targetid][pFightStyle], PlayerData[targetid][pID]);
  54497. mysql_tquery(connectionID, queryBuffer);
  54498. }
  54499. else if(!strcmp(param, "boxing", true))
  54500. {
  54501. PlayerData[targetid][pFightStyle] = FIGHT_STYLE_BOXING;
  54502. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's fight style to Boxing.", GetRPName(targetid));
  54503. SetPlayerFightingStyle(targetid, PlayerData[targetid][pFightStyle]);
  54504. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET fightstyle = %i WHERE uid = %i", PlayerData[targetid][pFightStyle], PlayerData[targetid][pID]);
  54505. mysql_tquery(connectionID, queryBuffer);
  54506. }
  54507. else if(!strcmp(param, "kungfu", true))
  54508. {
  54509. PlayerData[targetid][pFightStyle] = FIGHT_STYLE_KUNGFU;
  54510. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's fight style to Kung Fu.", GetRPName(targetid));
  54511. SetPlayerFightingStyle(targetid, PlayerData[targetid][pFightStyle]);
  54512. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET fightstyle = %i WHERE uid = %i", PlayerData[targetid][pFightStyle], PlayerData[targetid][pID]);
  54513. mysql_tquery(connectionID, queryBuffer);
  54514. }
  54515. else if(!strcmp(param, "kneehead", true))
  54516. {
  54517. PlayerData[targetid][pFightStyle] = FIGHT_STYLE_KNEEHEAD;
  54518. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's fight style to Kneehead.", GetRPName(targetid));
  54519. SetPlayerFightingStyle(targetid, PlayerData[targetid][pFightStyle]);
  54520. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET fightstyle = %i WHERE uid = %i", PlayerData[targetid][pFightStyle], PlayerData[targetid][pID]);
  54521. mysql_tquery(connectionID, queryBuffer);
  54522. }
  54523. else if(!strcmp(param, "grabkick", true))
  54524. {
  54525. PlayerData[targetid][pFightStyle] = FIGHT_STYLE_GRABKICK;
  54526. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's fight style to Grabkick.", GetRPName(targetid));
  54527. SetPlayerFightingStyle(targetid, PlayerData[targetid][pFightStyle]);
  54528. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET fightstyle = %i WHERE uid = %i", PlayerData[targetid][pFightStyle], PlayerData[targetid][pID]);
  54529. mysql_tquery(connectionID, queryBuffer);
  54530. }
  54531. else if(!strcmp(param, "elbow", true))
  54532. {
  54533. PlayerData[targetid][pFightStyle] = FIGHT_STYLE_ELBOW;
  54534. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's fight style to Elbow.", GetRPName(targetid));
  54535. SetPlayerFightingStyle(targetid, PlayerData[targetid][pFightStyle]);
  54536. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET fightstyle = %i WHERE uid = %i", PlayerData[targetid][pFightStyle], PlayerData[targetid][pID]);
  54537. mysql_tquery(connectionID, queryBuffer);
  54538. }
  54539. }
  54540. else if(!strcmp(option, "accent", true))
  54541. {
  54542. new accent[16];
  54543. if(sscanf(param, "s[16]", accent))
  54544. {
  54545. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [accent] [text]");
  54546. }
  54547. strcpy(PlayerData[targetid][pAccent], accent, 16);
  54548. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's accent to '%s'.", GetRPName(targetid), accent);
  54549. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET accent = '%e' WHERE uid = %i", accent, PlayerData[targetid][pID]);
  54550. mysql_tquery(connectionID, queryBuffer);
  54551. }
  54552. else if(!strcmp(option, "cookies", true))
  54553. {
  54554. if(sscanf(param, "i", value))
  54555. {
  54556. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [cookies] [value]");
  54557. }
  54558. PlayerData[targetid][pCookies] = value;
  54559. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's cookies to %i.", GetRPName(targetid), value);
  54560. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET cookies = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54561. mysql_tquery(connectionID, queryBuffer);
  54562. }
  54563. else if(!strcmp(option, "phone", true))
  54564. {
  54565. if(sscanf(param, "i", value))
  54566. {
  54567. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [phone] [number]");
  54568. }
  54569. if(value == 911)
  54570. {
  54571. return SendClientMessage(playerid, COLOR_GREY, "Invalid number.");
  54572. }
  54573. if(value == 0)
  54574. {
  54575. PlayerData[targetid][pPhone] = 0;
  54576. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's phone number to 0.", GetRPName(targetid));
  54577. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET phone = 0 WHERE uid = %i", PlayerData[targetid][pID]);
  54578. mysql_tquery(connectionID, queryBuffer);
  54579. }
  54580. else
  54581. {
  54582. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid FROM "#TABLE_USERS" WHERE phone = %i", value);
  54583. mysql_tquery(connectionID, queryBuffer, "OnAdminSetPhoneNumber", "iii", playerid, targetid, value);
  54584. return 1;
  54585. }
  54586. }
  54587. else if(!strcmp(option, "crimes", true))
  54588. {
  54589. if(sscanf(param, "i", value))
  54590. {
  54591. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [crimes] [value]");
  54592. }
  54593. PlayerData[targetid][pCrimes] = value;
  54594. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's commited crimes to %i.", GetRPName(targetid), value);
  54595. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET crimes = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54596. mysql_tquery(connectionID, queryBuffer);
  54597. }
  54598. else if(!strcmp(option, "arrested", true))
  54599. {
  54600. if(sscanf(param, "i", value))
  54601. {
  54602. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [arrested] [value]");
  54603. }
  54604. PlayerData[targetid][pArrested] = value;
  54605. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's arrested count to %i.", GetRPName(targetid), value);
  54606. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET arrested = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54607. mysql_tquery(connectionID, queryBuffer);
  54608. }
  54609. else if(!strcmp(option, "wantedlevel", true))
  54610. {
  54611. if(sscanf(param, "i", value))
  54612. {
  54613. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [wantedlevel] [value]");
  54614. }
  54615. if(!(0 <= value <= 6))
  54616. {
  54617. return SendClientMessage(playerid, COLOR_GREY3, "The value specified can't be under 0 or above 6.");
  54618. }
  54619. PlayerData[targetid][pWantedLevel] = value;
  54620. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's wanted level to %i.", GetRPName(targetid), value);
  54621. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET wantedlevel = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54622. mysql_tquery(connectionID, queryBuffer);
  54623. }
  54624. else if(!strcmp(option, "materials", true))
  54625. {
  54626. if(sscanf(param, "i", value))
  54627. {
  54628. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [materials] [value]");
  54629. }
  54630. PlayerData[targetid][pMaterials] = value;
  54631. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's materials to %i.", GetRPName(targetid), value);
  54632. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET materials = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54633. mysql_tquery(connectionID, queryBuffer);
  54634. }
  54635. else if(!strcmp(option, "weed", true))
  54636. {
  54637. if(sscanf(param, "i", value))
  54638. {
  54639. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [weed] [value]");
  54640. }
  54641. PlayerData[targetid][pWeed] = value;
  54642. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's weed to %i.", GetRPName(targetid), value);
  54643. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET weed = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54644. mysql_tquery(connectionID, queryBuffer);
  54645. }
  54646. else if(!strcmp(option, "cocaine", true))
  54647. {
  54648. if(sscanf(param, "i", value))
  54649. {
  54650. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [cocaine] [value]");
  54651. }
  54652. PlayerData[targetid][pCocaine] = value;
  54653. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's cocaine to %i.", GetRPName(targetid), value);
  54654. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET cocaine = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54655. mysql_tquery(connectionID, queryBuffer);
  54656. }
  54657. else if(!strcmp(option, "meth", true))
  54658. {
  54659. if(sscanf(param, "i", value))
  54660. {
  54661. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [meth] [value]");
  54662. }
  54663. PlayerData[targetid][pMeth] = value;
  54664. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's meth to %i.", GetRPName(targetid), value);
  54665. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET meth = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54666. mysql_tquery(connectionID, queryBuffer);
  54667. }
  54668. else if(!strcmp(option, "painkillers", true))
  54669. {
  54670. if(sscanf(param, "i", value))
  54671. {
  54672. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [painkillers] [value]");
  54673. }
  54674. PlayerData[targetid][pPainkillers] = value;
  54675. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's painkillers to %i.", GetRPName(targetid), value);
  54676. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET painkillers = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54677. mysql_tquery(connectionID, queryBuffer);
  54678. }
  54679. else if(!strcmp(option, "cigars", true))
  54680. {
  54681. if(sscanf(param, "i", value))
  54682. {
  54683. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [cigars] [value]");
  54684. }
  54685. PlayerData[targetid][pCigars] = value;
  54686. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's cigars to %i.", GetRPName(targetid), value);
  54687. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET cigars = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54688. mysql_tquery(connectionID, queryBuffer);
  54689. }
  54690. else if(!strcmp(option, "walkietalkie", true))
  54691. {
  54692. if(sscanf(param, "i", value) || !(0 <= value <= 1))
  54693. {
  54694. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [walkietalkie] [0/1]");
  54695. }
  54696. PlayerData[targetid][pWalkieTalkie] = value;
  54697. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's walkie talkie to %i.", GetRPName(targetid), value);
  54698. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET walkietalkie = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54699. mysql_tquery(connectionID, queryBuffer);
  54700. }
  54701. else if(!strcmp(option, "channel", true))
  54702. {
  54703. if(sscanf(param, "i", value))
  54704. {
  54705. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [channel] [value]");
  54706. }
  54707. PlayerData[targetid][pChannel] = value;
  54708. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's radio channel to %i.", GetRPName(targetid), value);
  54709. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET channel = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54710. mysql_tquery(connectionID, queryBuffer);
  54711. }
  54712. else if(!strcmp(option, "spraycans", true))
  54713. {
  54714. if(sscanf(param, "i", value))
  54715. {
  54716. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [spraycans] [value]");
  54717. }
  54718. PlayerData[targetid][pSpraycans] = value;
  54719. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's spraycans to %i.", GetRPName(targetid), value);
  54720. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET spraycans = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54721. mysql_tquery(connectionID, queryBuffer);
  54722. }
  54723. else if(!strcmp(option, "boombox", true))
  54724. {
  54725. if(sscanf(param, "i", value) || !(0 <= value <= 1))
  54726. {
  54727. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [boombox] [0/1]");
  54728. }
  54729. if((value == 0) && PlayerData[targetid][pBoomboxPlaced])
  54730. {
  54731. DestroyBoombox(targetid);
  54732. }
  54733. PlayerData[targetid][pBoombox] = value;
  54734. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's boombox to %i.", GetRPName(targetid), value);
  54735. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET boombox = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54736. mysql_tquery(connectionID, queryBuffer);
  54737. }
  54738. else if(!strcmp(option, "phonebook", true))
  54739. {
  54740. if(sscanf(param, "i", value) || !(0 <= value <= 1))
  54741. {
  54742. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [phonebook] [0/1]");
  54743. }
  54744. PlayerData[targetid][pPhonebook] = value;
  54745. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's phonebook to %i.", GetRPName(targetid), value);
  54746. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET phonebook = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54747. mysql_tquery(connectionID, queryBuffer);
  54748. }
  54749. else if(!strcmp(option, "paycheck", true))
  54750. {
  54751. if(sscanf(param, "i", value))
  54752. {
  54753. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [paycheck] [value]");
  54754. }
  54755. PlayerData[targetid][pPaycheck] = value;
  54756. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's paycheck to $%i.", GetRPName(targetid), value);
  54757. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET paycheck = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54758. mysql_tquery(connectionID, queryBuffer);
  54759. }
  54760. else if(!strcmp(option, "carlicense", true))
  54761. {
  54762. if(sscanf(param, "i", value) || !(0 <= value <= 1))
  54763. {
  54764. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [carlicense] [0/1]");
  54765. }
  54766. PlayerData[targetid][pCarLicense] = value;
  54767. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's car license to %i.", GetRPName(targetid), value);
  54768. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET carlicense = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54769. mysql_tquery(connectionID, queryBuffer);
  54770. }
  54771. else if(!strcmp(option, "seeds", true))
  54772. {
  54773. if(sscanf(param, "i", value))
  54774. {
  54775. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [seeds] [value]");
  54776. }
  54777. PlayerData[targetid][pSeeds] = value;
  54778. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's seeds to %i.", GetRPName(targetid), value);
  54779. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET seeds = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54780. mysql_tquery(connectionID, queryBuffer);
  54781. }
  54782. else if(!strcmp(option, "ephedrine", true))
  54783. {
  54784. if(sscanf(param, "i", value))
  54785. {
  54786. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [ephedrine] [value]");
  54787. }
  54788. PlayerData[targetid][pEphedrine] = value;
  54789. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's ephedrine to %i.", GetRPName(targetid), value);
  54790. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET ephedrine = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54791. mysql_tquery(connectionID, queryBuffer);
  54792. }
  54793. else if(!strcmp(option, "job", true))
  54794. {
  54795. if(sscanf(param, "i", value))
  54796. {
  54797. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [job] [value (-1 = none)]");
  54798. SendClientMessage(playerid, COLOR_SYNTAX, "List of jobs: (0) Pizzaman (1) Courier (2) Fisherman (3) Bodyguard (4) Weapon Dealer (5) Mechanic (6) Miner");
  54799. SendClientMessage(playerid, COLOR_SYNTAX, "List of jobs: (7) Sweeper (8) Taxi Driver (9) Drug Dealer (10) Lawyer (11) Detective (12) Thief (13) Garbage Man (14) Farmer");
  54800. return 1;
  54801. }
  54802. if(!(-1 <= value <= 14))
  54803. {
  54804. return SendClientMessage(playerid, COLOR_GREY, "Invalid job.");
  54805. }
  54806. PlayerData[targetid][pJob] = value;
  54807. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's job to %s.", GetRPName(targetid), GetJobName(value));
  54808. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET job = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54809. mysql_tquery(connectionID, queryBuffer);
  54810. }
  54811. else if(!strcmp(option, "inventoryupgrade", true))
  54812. {
  54813. if(sscanf(param, "i", value))
  54814. {
  54815. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [inventoryupgrade] [value]");
  54816. }
  54817. if(!(0 <= value <= 5))
  54818. {
  54819. return SendClientMessage(playerid, COLOR_GREY, "The value must range from 0 to 5.");
  54820. }
  54821. PlayerData[targetid][pInventoryUpgrade] = value;
  54822. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's inventory upgrade to %i.", GetRPName(targetid), value);
  54823. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET inventoryupgrade = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54824. mysql_tquery(connectionID, queryBuffer);
  54825. }
  54826. else if(!strcmp(option, "addictupgrade", true))
  54827. {
  54828. if(sscanf(param, "i", value))
  54829. {
  54830. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [addictupgrade] [value]");
  54831. }
  54832. if(!(0 <= value <= 3))
  54833. {
  54834. return SendClientMessage(playerid, COLOR_GREY, "The value must range from 0 to 3.");
  54835. }
  54836. PlayerData[targetid][pAddictUpgrade] = value;
  54837. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's addict upgrade to %i.", GetRPName(targetid), value);
  54838. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET addictupgrade = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54839. mysql_tquery(connectionID, queryBuffer);
  54840. }
  54841. else if(!strcmp(option, "traderupgrade", true))
  54842. {
  54843. if(sscanf(param, "i", value))
  54844. {
  54845. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [traderupgrade] [value]");
  54846. }
  54847. if(!(0 <= value <= 3))
  54848. {
  54849. return SendClientMessage(playerid, COLOR_GREY, "The value must range from 0 to 3.");
  54850. }
  54851. PlayerData[targetid][pTraderUpgrade] = value;
  54852. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's trader upgrade to %i.", GetRPName(targetid), value);
  54853. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET traderupgrade = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54854. mysql_tquery(connectionID, queryBuffer);
  54855. }
  54856. else if(!strcmp(option, "assetupgrade", true))
  54857. {
  54858. if(sscanf(param, "i", value))
  54859. {
  54860. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [assetupgrade] [value]");
  54861. }
  54862. if(!(0 <= value <= 4))
  54863. {
  54864. return SendClientMessage(playerid, COLOR_GREY, "The value must range from 0 to 4.");
  54865. }
  54866. PlayerData[targetid][pAssetUpgrade] = value;
  54867. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's asset upgrade to %i.", GetRPName(targetid), value);
  54868. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET assetupgrade = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54869. mysql_tquery(connectionID, queryBuffer);
  54870. }
  54871. else if(!strcmp(option, "laborupgrade", true))
  54872. {
  54873. if(sscanf(param, "i", value))
  54874. {
  54875. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [laborupgrade] [value]");
  54876. }
  54877. if(!(0 <= value <= 5))
  54878. {
  54879. return SendClientMessage(playerid, COLOR_GREY, "The value must range from 0 to 5.");
  54880. }
  54881. PlayerData[targetid][pLaborUpgrade] = value;
  54882. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's labor upgrade to %i.", GetRPName(targetid), value);
  54883. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET laborupgrade = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54884. mysql_tquery(connectionID, queryBuffer);
  54885. }
  54886. else if(!strcmp(option, "mp3player", true))
  54887. {
  54888. if(sscanf(param, "i", value) || !(0 <= value <= 1))
  54889. {
  54890. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [mp3player] [0/1]");
  54891. }
  54892. PlayerData[targetid][pMP3Player] = value;
  54893. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's MP3 player to %i.", GetRPName(targetid), value);
  54894. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET mp3player = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54895. mysql_tquery(connectionID, queryBuffer);
  54896. }
  54897. else if(!strcmp(option, "muriaticacid", true))
  54898. {
  54899. if(sscanf(param, "i", value))
  54900. {
  54901. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [muriaticacid] [value]");
  54902. }
  54903. PlayerData[targetid][pMuriaticAcid] = value;
  54904. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's muriatic acid to %i.", GetRPName(targetid), value);
  54905. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET muriaticacid = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54906. mysql_tquery(connectionID, queryBuffer);
  54907. }
  54908. else if(!strcmp(option, "bakingsoda", true))
  54909. {
  54910. if(sscanf(param, "i", value))
  54911. {
  54912. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [bakingsoda] [value]");
  54913. }
  54914. PlayerData[targetid][pBakingSoda] = value;
  54915. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's baking soda to %i.", GetRPName(targetid), value);
  54916. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET bakingsoda = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54917. mysql_tquery(connectionID, queryBuffer);
  54918. }
  54919. else if(!strcmp(option, "dmwarnings", true))
  54920. {
  54921. if(sscanf(param, "i", value))
  54922. {
  54923. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [dmwarnings] [value]");
  54924. }
  54925. if(!(0 <= value <= 4))
  54926. {
  54927. return SendClientMessage(playerid, COLOR_GREY, "The value must range from 0 to 4.");
  54928. }
  54929. PlayerData[targetid][pDMWarnings] = value;
  54930. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's DM warnings to %i.", GetRPName(targetid), value);
  54931. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET dmwarnings = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54932. mysql_tquery(connectionID, queryBuffer);
  54933. }
  54934. else if(!strcmp(option, "weaponrestricted", true))
  54935. {
  54936. if(sscanf(param, "i", value))
  54937. {
  54938. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [weaponrestricted] [hours]");
  54939. }
  54940. PlayerData[targetid][pWeaponRestricted] = value;
  54941. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's weapon restriction to %i hours.", GetRPName(targetid), value);
  54942. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET weaponrestricted = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54943. mysql_tquery(connectionID, queryBuffer);
  54944. }
  54945. else if(!strcmp(option, "components", true))
  54946. {
  54947. if(sscanf(param, "i", value))
  54948. {
  54949. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [components] [value]");
  54950. }
  54951. PlayerData[targetid][pComponents] = value;
  54952. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's components to %i.", GetRPName(targetid), value);
  54953. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET components = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54954. mysql_tquery(connectionID, queryBuffer);
  54955. }
  54956. else if(!strcmp(option, "watch", true))
  54957. {
  54958. if(sscanf(param, "i", value) || !(0 <= value <= 1))
  54959. {
  54960. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [watch] [0/1]");
  54961. }
  54962. PlayerData[targetid][pWatch] = value;
  54963. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's watch to %i.", GetRPName(targetid), value);
  54964. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET watch = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54965. mysql_tquery(connectionID, queryBuffer);
  54966. }
  54967. else if(!strcmp(option, "gps", true))
  54968. {
  54969. if(sscanf(param, "i", value) || !(0 <= value <= 1))
  54970. {
  54971. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [gps] [0/1]");
  54972. }
  54973. PlayerData[targetid][pGPS] = value;
  54974. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's GPS to %i.", GetRPName(targetid), value);
  54975. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET gps = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54976. mysql_tquery(connectionID, queryBuffer);
  54977. }
  54978. else if(!strcmp(option, "gascan", true))
  54979. {
  54980. if(sscanf(param, "i", value))
  54981. {
  54982. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [gascan] [value]");
  54983. }
  54984. PlayerData[targetid][pGasCan] = value;
  54985. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's gas can to %i.", GetRPName(targetid), value);
  54986. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET gascan = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54987. mysql_tquery(connectionID, queryBuffer);
  54988. }
  54989. else if(!strcmp(option, "smugglerskill", true))
  54990. {
  54991. if(sscanf(param, "i", value))
  54992. {
  54993. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [smugglerskill] [value]");
  54994. }
  54995. PlayerData[targetid][pSmugglerSkill] = value;
  54996. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's courier skill to %i.", GetRPName(targetid), value);
  54997. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET smugglerskill = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  54998. mysql_tquery(connectionID, queryBuffer);
  54999. }
  55000. else if(!strcmp(option, "courierskill", true))
  55001. {
  55002. if(sscanf(param, "i", value))
  55003. {
  55004. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [courierskill] [value]");
  55005. }
  55006. PlayerData[targetid][pCourierSkill] = value;
  55007. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's courier skill to %i.", GetRPName(targetid), value);
  55008. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET courierskill = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  55009. mysql_tquery(connectionID, queryBuffer);
  55010. }
  55011. else if(!strcmp(option, "fishingskill", true))
  55012. {
  55013. if(sscanf(param, "i", value))
  55014. {
  55015. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [fishingskill] [value]");
  55016. }
  55017. PlayerData[targetid][pFishingSkill] = value;
  55018. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's fishing skill to %i.", GetRPName(targetid), value);
  55019. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET fishingskill = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  55020. mysql_tquery(connectionID, queryBuffer);
  55021. }
  55022. else if(!strcmp(option, "guardskill", true))
  55023. {
  55024. if(sscanf(param, "i", value))
  55025. {
  55026. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [guardskill] [value]");
  55027. }
  55028. PlayerData[targetid][pGuardSkill] = value;
  55029. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's bodyguard skill to %i.", GetRPName(targetid), value);
  55030. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET guardskill = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  55031. mysql_tquery(connectionID, queryBuffer);
  55032. }
  55033. else if(!strcmp(option, "weaponskill", true))
  55034. {
  55035. if(sscanf(param, "i", value))
  55036. {
  55037. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [weaponskill] [value]");
  55038. }
  55039. PlayerData[targetid][pWeaponSkill] = value;
  55040. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's weapon skill to %i.", GetRPName(targetid), value);
  55041. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET weaponskill = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  55042. mysql_tquery(connectionID, queryBuffer);
  55043. }
  55044. else if(!strcmp(option, "mechanicskill", true))
  55045. {
  55046. if(sscanf(param, "i", value))
  55047. {
  55048. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [mechanicskill] [value]");
  55049. }
  55050. PlayerData[targetid][pMechanicSkill] = value;
  55051. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's mechanic skill to %i.", GetRPName(targetid), value);
  55052. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET mechanicskill = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  55053. mysql_tquery(connectionID, queryBuffer);
  55054. }
  55055. else if(!strcmp(option, "lawyerskill", true))
  55056. {
  55057. if(sscanf(param, "i", value))
  55058. {
  55059. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [lawyerskill] [value]");
  55060. }
  55061. PlayerData[targetid][pLawyerSkill] = value;
  55062. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's lawyer skill to %i.", GetRPName(targetid), value);
  55063. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET lawyerskill = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  55064. mysql_tquery(connectionID, queryBuffer);
  55065. }
  55066. else if(!strcmp(option, "detectiveskill", true))
  55067. {
  55068. if(sscanf(param, "i", value))
  55069. {
  55070. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [detectiveskill] [value]");
  55071. }
  55072. PlayerData[targetid][pDetectiveSkill] = value;
  55073. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's detective skill to %i.", GetRPName(targetid), value);
  55074. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET detectiveskill = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  55075. mysql_tquery(connectionID, queryBuffer);
  55076. }
  55077. else if(!strcmp(option, "thiefskill", true))
  55078. {
  55079. if(sscanf(param, "i", value))
  55080. {
  55081. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [thiefskill] [value]");
  55082. }
  55083. PlayerData[targetid][pThiefSkill] = value;
  55084. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's thief skill to %i.", GetRPName(targetid), value);
  55085. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET thiefskill = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  55086. mysql_tquery(connectionID, queryBuffer);
  55087. }
  55088. else if(!strcmp(option, "bombs", true))
  55089. {
  55090. if(sscanf(param, "i", value))
  55091. {
  55092. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [bombs] [value]");
  55093. }
  55094. PlayerData[targetid][pBombs] = value;
  55095. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's bombs to %i.", GetRPName(targetid), value);
  55096. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET bombs = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  55097. mysql_tquery(connectionID, queryBuffer);
  55098. }
  55099. else if(!strcmp(option, "firstaid", true))
  55100. {
  55101. if(sscanf(param, "i", value))
  55102. {
  55103. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [firstaid] [value]");
  55104. }
  55105. PlayerData[targetid][pFirstAid] = value;
  55106. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's first aid kits to %i.", GetRPName(targetid), value);
  55107. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET firstaid = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  55108. mysql_tquery(connectionID, queryBuffer);
  55109. }
  55110. else if(!strcmp(option, "policescanner", true))
  55111. {
  55112. if(sscanf(param, "i", value) || !(0 <= value <= 1))
  55113. {
  55114. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [policescanner] [0/1]");
  55115. }
  55116. PlayerData[targetid][pPoliceScanner] = value;
  55117. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's police scanner to %i.", GetRPName(targetid), value);
  55118. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET policescanner = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  55119. mysql_tquery(connectionID, queryBuffer);
  55120. }
  55121. else if(!strcmp(option, "bodykits", true))
  55122. {
  55123. if(sscanf(param, "i", value))
  55124. {
  55125. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [bodykits] [value]");
  55126. }
  55127. PlayerData[targetid][pBodykits] = value;
  55128. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's bodykits to %i.", GetRPName(targetid), value);
  55129. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET bodykits = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  55130. mysql_tquery(connectionID, queryBuffer);
  55131. }
  55132. else if(!strcmp(option, "rimkits", true))
  55133. {
  55134. if(sscanf(param, "i", value))
  55135. {
  55136. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [rimkits] [value]");
  55137. }
  55138. PlayerData[targetid][pRimkits] = value;
  55139. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's rimkits to %i.", GetRPName(targetid), value);
  55140. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET rimkits = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  55141. mysql_tquery(connectionID, queryBuffer);
  55142. }
  55143. else if(!strcmp(option, "diamonds", true))
  55144. {
  55145. if(sscanf(param, "i", value))
  55146. {
  55147. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [diamonds] [value]");
  55148. }
  55149. PlayerData[targetid][pDiamonds] = value;
  55150. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's diamonds to %i.", GetRPName(targetid), value);
  55151. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET diamonds = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  55152. mysql_tquery(connectionID, queryBuffer);
  55153. }
  55154. else if(!strcmp(option, "marriage", true))
  55155. {
  55156. if(sscanf(param, "i", value))
  55157. {
  55158. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [marriedto] [playerid(-1 to reset)]");
  55159. }
  55160. if(IsPlayerConnected(value))
  55161. {
  55162. PlayerData[targetid][pMarriedTo] = PlayerData[value][pID];
  55163. strcpy(PlayerData[targetid][pMarriedName], GetPlayerNameEx(value), MAX_PLAYER_NAME);
  55164. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's marriage to %s.", GetRPName(targetid), GetRPName(value));
  55165. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET marriedto = %i WHERE uid = %i", PlayerData[value][pID], PlayerData[targetid][pID]);
  55166. mysql_tquery(connectionID, queryBuffer);
  55167. }
  55168. else if(value == -1)
  55169. {
  55170. PlayerData[targetid][pMarriedTo] = -1;
  55171. strcpy(PlayerData[targetid][pMarriedName], "Nobody", MAX_PLAYER_NAME);
  55172. SendClientMessageEx(playerid, COLOR_WHITE, "You have reset %s's marriage.", GetRPName(targetid));
  55173. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET marriedto = -1 WHERE uid = %i", PlayerData[targetid][pID]);
  55174. mysql_tquery(connectionID, queryBuffer);
  55175. }
  55176. }
  55177. else if(!strcmp(option, "skates", true))
  55178. {
  55179. if(sscanf(param, "i", value) || !(0<=value<=1))
  55180. {
  55181. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstat [playerid] [skates] [1/0]");
  55182. }
  55183. else
  55184. {
  55185. PlayerData[targetid][pSkates] = value;
  55186. SendClientMessageEx(playerid, COLOR_WHITE, "You have set %s's skates to %i.", GetRPName(targetid), value);
  55187. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET rollerskates = %i WHERE uid = %i", value, PlayerData[targetid][pID]);
  55188. mysql_tquery(connectionID, queryBuffer);
  55189. }
  55190. }
  55191. else
  55192. {
  55193. return 1;
  55194. }
  55195. Log_Write("log_setstat", "%s (uid: %i) set %s's (uid: %i) %s to %s", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], option, param);
  55196. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s set %s's %s to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(targetid), option, param);
  55197. return 1;
  55198. }
  55199. CMD:givemoney(playerid, params[])
  55200. {
  55201. new targetid, amount;
  55202. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  55203. {
  55204. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  55205. }
  55206. if(sscanf(params, "ui", targetid, amount))
  55207. {
  55208. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /givemoney [playerid] [amount]");
  55209. }
  55210. if(!IsPlayerConnected(targetid))
  55211. {
  55212. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  55213. }
  55214. if(!PlayerData[targetid][pLogged])
  55215. {
  55216. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet.");
  55217. }
  55218. GivePlayerCash(targetid, amount);
  55219. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has given %s to %s.", GetRPName(playerid), FormatNumber(amount), GetRPName(targetid));
  55220. Log_Write("log_givemoney", "%s (uid: %i) has used /givemoney to give $%i to %s (uid: %i).", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount, GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  55221. return 1;
  55222. }
  55223. CMD:givecookie(playerid, params[])
  55224. {
  55225. new targetid, reason[128];
  55226. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  55227. {
  55228. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  55229. }
  55230. if(sscanf(params, "us", targetid, reason))
  55231. {
  55232. return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /givecookie [playerid] [reason]");
  55233. }
  55234. if(!IsPlayerConnected(targetid))
  55235. {
  55236. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  55237. }
  55238. if(!PlayerData[targetid][pLogged])
  55239. {
  55240. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet.");
  55241. }
  55242. /*if(PlayerData[targetid][pCookies] > 500)
  55243. {
  55244. return SendClientMessage(playerid, COLOR_GREY, "That player already has 400 cookies!");
  55245. }*/
  55246. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has given a {089DCE}cookie{FF6347} to %s, reason: %s", GetRPName(playerid), GetRPName(targetid), reason);
  55247. SendClientMessageEx(targetid, COLOR_LIGHTRED, "You have been awarded a {089DCE}cookie{FF6347} by %s for %s", GetRPName(playerid), reason);
  55248. PlayerData[targetid][pCookies]++;
  55249. if(PlayerData[targetid][pCookies] >= 5)
  55250. {
  55251. AwardAchievement(targetid, "Cookie jar");
  55252. }
  55253. Log_Write("log_givecookie", "%s (uid: %i) has given a cookie to %s (uid: %i) for reason %s", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], reason);
  55254. return 1;
  55255. }
  55256. CMD:givecookieall(playerid, params[])
  55257. {
  55258. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  55259. {
  55260. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  55261. }
  55262. foreach(new i : Player)
  55263. {
  55264. if(PlayerData[i][pLogged])
  55265. {
  55266. if(PlayerData[i][pCookies] > 500)
  55267. {
  55268. continue;
  55269. }
  55270. PlayerData[i][pCookies]++;
  55271. if(PlayerData[i][pCookies] >= 5)
  55272. {
  55273. AwardAchievement(i, "Cookie jar");
  55274. }
  55275. }
  55276. }
  55277. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s has given a {089DCE}cookie{FF6347} to every player online.", GetRPName(playerid));
  55278. Log_Write("log_givecookie", "%s (uid: %i) has given a cookie to every player online", GetPlayerNameEx(playerid), PlayerData[playerid][pID]);
  55279. return 1;
  55280. }
  55281. CMD:osetvip(playerid, params[])
  55282. {
  55283. new username[MAX_PLAYER_NAME], level, time;
  55284. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN) // HEAD ADMIN+ ONLY
  55285. {
  55286. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  55287. }
  55288. if(sscanf(params, "s[24]iI(0)", username, level, time))
  55289. {
  55290. SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /osetvip [username] [level(0-3)] [days]");
  55291. SendClientMessage(playerid, COLOR_GREY3, "List of ranks: (0) None (1) Silver (2) Gold (3) Legendary");
  55292. return 1;
  55293. }
  55294. if(!(0 <= level <= 3))
  55295. {
  55296. return SendClientMessage(playerid, COLOR_GREY, "Invalid level. Valid levels range from 0 to 3.");
  55297. }
  55298. if(!(1 <= time <= 365))
  55299. {
  55300. return SendClientMessage(playerid, COLOR_GREY, "The amount of days must range from 1 to 365.");
  55301. }
  55302. if(IsPlayerOnline(username))
  55303. {
  55304. return SendClientMessage(playerid, COLOR_GREY, "That player is already online and logged in. Use /setvip instead.");
  55305. }
  55306. if(level == 0)
  55307. {
  55308. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has removed %s's VIP package.", GetRPName(playerid), username);
  55309. time = 0;
  55310. }
  55311. else if(time >= 30)
  55312. {
  55313. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has given a {A028AD}%s{FF6347} VIP package to %s for %i months.", GetRPName(playerid), GetVIPRank(level), username, time / 30);
  55314. time = gettime() + (time * 86400);
  55315. }
  55316. else
  55317. {
  55318. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has given a {A028AD}%s{FF6347} VIP package to %s for %i days.", GetRPName(playerid), GetVIPRank(level), username, time);
  55319. time = gettime() + (time * 86400);
  55320. }
  55321. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET vippackage = %i, viptime = %i, vipcooldown = 0 WHERE username = '%e'", level, time, username);
  55322. mysql_tquery(connectionID, queryBuffer);
  55323. return 1;
  55324. }
  55325. CMD:setvip(playerid, params[])
  55326. {
  55327. new targetid, rank, days, drugs, weed, cocaine, meth, painkillers, seeds;
  55328. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pDynamicAdmin])
  55329. {
  55330. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  55331. }
  55332. if(sscanf(params, "uiii", targetid, rank, days))
  55333. {
  55334. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setvip [playerid] [rank] [days]");
  55335. SendClientMessage(playerid, COLOR_SYNTAX, "List of ranks: (1) Silver (2) Gold (3) Legendary");
  55336. return 1;
  55337. }
  55338. if(!IsPlayerConnected(targetid))
  55339. {
  55340. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  55341. }
  55342. if(!PlayerData[targetid][pLogged])
  55343. {
  55344. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet.");
  55345. }
  55346. if(!(1 <= rank <= 3))
  55347. {
  55348. return SendClientMessage(playerid, COLOR_GREY, "Invalid rank.");
  55349. }
  55350. if(!(1 <= days <= 365))
  55351. {
  55352. return SendClientMessage(playerid, COLOR_GREY, "The amount of days must range from 1 to 365.");
  55353. }
  55354. weed = GetPlayerCapacity(playerid, CAPACITY_WEED);
  55355. cocaine = GetPlayerCapacity(playerid, CAPACITY_COCAINE);
  55356. meth = GetPlayerCapacity(playerid, CAPACITY_METH);
  55357. painkillers = GetPlayerCapacity(playerid, CAPACITY_PAINKILLERS);
  55358. seeds = GetPlayerCapacity(playerid, CAPACITY_SEEDS);
  55359. if(drugs)
  55360. {
  55361. PlayerData[targetid][pWeed] = weed;
  55362. PlayerData[targetid][pCocaine] = cocaine;
  55363. PlayerData[targetid][pMeth] = meth;
  55364. PlayerData[targetid][pPainkillers] = painkillers;
  55365. PlayerData[targetid][pSeeds] = seeds;
  55366. PlayerData[targetid][pBoombox] = 1;
  55367. PlayerData[targetid][pMP3Player] = 1;
  55368. SendClientMessageEx(targetid, COLOR_VIP, "%s %s has given you a full load of drugs with your %s VIP Package", GetAdminRank(playerid), GetRPName(playerid), GetVIPRank(rank));
  55369. }
  55370. PlayerData[targetid][pDonator] = rank;
  55371. PlayerData[targetid][pVIPTime] = gettime() + (days * 86400);
  55372. PlayerData[targetid][pVIPCooldown] = 0;
  55373. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET vippackage = %i, viptime = %i, vipcooldown = 0, weed = %i, cocaine = %i, meth = %i, painkillers = %i, seeds = %i WHERE uid = %i", PlayerData[targetid][pDonator], PlayerData[targetid][pVIPTime], PlayerData[targetid][pWeed], PlayerData[targetid][pCocaine], PlayerData[targetid][pMeth], PlayerData[targetid][pPainkillers], PlayerData[targetid][pSeeds], PlayerData[targetid][pID]);
  55374. mysql_tquery(connectionID, queryBuffer);
  55375. if(days >= 30)
  55376. {
  55377. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has given a {D909D9}%s{FF6347} VIP package to %s for %i months.", GetRPName(playerid), GetVIPRank(rank), GetRPName(targetid), days / 30);
  55378. SendClientMessageEx(playerid, COLOR_AQUA, "* You have given %s a {D909D9}%s{33CCFF} VIP package for %i months.", GetRPName(targetid), GetVIPRank(rank), days / 30);
  55379. SendClientMessageEx(targetid, COLOR_AQUA, "* %s has given you a {D909D9}%s{33CCFF} VIP package for %i months.", GetRPName(playerid), GetVIPRank(rank), days / 30);
  55380. }
  55381. else
  55382. {
  55383. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has given a {D909D9}%s{FF6347} VIP package to %s for %i days.", GetRPName(playerid), GetVIPRank(rank), GetRPName(targetid), days);
  55384. SendClientMessageEx(playerid, COLOR_AQUA, "* You have given %s a {D909D9}%s{33CCFF} VIP package for %i days.", GetRPName(targetid), GetVIPRank(rank), days);
  55385. SendClientMessageEx(targetid, COLOR_AQUA, "* %s has given you a {D909D9}%s{33CCFF} VIP package for %i days.", GetRPName(playerid), GetVIPRank(rank), days);
  55386. }
  55387. Log_Write("log_vip", "%s (uid: %i) has given %s (uid: %i) a %s VIP package for %i days.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], GetVIPRank(rank), days);
  55388. return 1;
  55389. }
  55390. CMD:removevip(playerid, params[])
  55391. {
  55392. new targetid;
  55393. if(PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  55394. {
  55395. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  55396. }
  55397. if(sscanf(params, "u", targetid))
  55398. {
  55399. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /removevip [playerid]");
  55400. }
  55401. if(!IsPlayerConnected(targetid))
  55402. {
  55403. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  55404. }
  55405. if(!PlayerData[targetid][pLogged])
  55406. {
  55407. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet.");
  55408. }
  55409. if(!PlayerData[targetid][pDonator])
  55410. {
  55411. return SendClientMessage(playerid, COLOR_GREY, "That player doesn't have a VIP subscription which you can remove.");
  55412. }
  55413. Log_Write("log_vip", "%s (uid: %i) has removed %s's (uid: %i) %s VIP package.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], GetVIPRank(PlayerData[targetid][pDonator]));
  55414. PlayerData[targetid][pDonator] = 0;
  55415. PlayerData[targetid][pVIPTime] = 0;
  55416. PlayerData[targetid][pVIPColor] = 0;
  55417. PlayerData[targetid][pSecondJob] = JOB_NONE;
  55418. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET vippackage = 0, viptime = 0 WHERE uid = %i", PlayerData[targetid][pID]);
  55419. mysql_tquery(connectionID, queryBuffer);
  55420. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has revoked %s's VIP subscription.", GetRPName(playerid), GetRPName(targetid));
  55421. SendClientMessageEx(targetid, COLOR_AQUA, "* %s has revoked your VIP subscription.", GetRPName(playerid));
  55422. return 1;
  55423. }
  55424. CMD:rangeban(playerid, params[])
  55425. {
  55426. new targetid, reason[128];
  55427. if(PlayerData[playerid][pAdmin] < SENIOR_ADMIN)
  55428. {
  55429. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  55430. }
  55431. if(sscanf(params, "us[128]", targetid, reason))
  55432. {
  55433. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /rangeban [playerid] [reason]");
  55434. }
  55435. if(!IsPlayerConnected(targetid))
  55436. {
  55437. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  55438. }
  55439. if(PlayerData[targetid][pAdmin] > PlayerData[playerid][pAdmin])
  55440. {
  55441. return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be banned.");
  55442. }
  55443. Log_Write("log_punishments", "%s (uid: %i) rangebanned %s (uid: %i), reason: %s", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], reason);
  55444. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was rangebanned by %s, reason: %s", GetRPName(targetid), GetRPName(playerid), reason);
  55445. Rangeban(targetid, GetPlayerNameEx(playerid), reason);
  55446. return 1;
  55447. }
  55448. CMD:forcepayday(playerid, params[])
  55449. {
  55450. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pDynamicAdmin])
  55451. {
  55452. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  55453. }
  55454. if(sscanf(params, "s", "confirm"))
  55455. {
  55456. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /forcepayday [confirm] (gives everyone a paycheck)");
  55457. }
  55458. foreach(new i : Player)
  55459. {
  55460. SendPaycheck(i);
  55461. }
  55462. return 1;
  55463. }
  55464. CMD:setpassword(playerid, params[])
  55465. {
  55466. new username[MAX_PLAYER_NAME], password[128];
  55467. if(PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  55468. {
  55469. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  55470. }
  55471. if(sscanf(params, "s[24]s[128]", username, password))
  55472. {
  55473. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setpassword [username] [new password]");
  55474. }
  55475. if(IsPlayerOnline(username))
  55476. {
  55477. return SendClientMessage(playerid, COLOR_GREY, "That player is already online and logged in. You can't change their password.");
  55478. }
  55479. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid FROM "#TABLE_USERS" WHERE username = '%e'", username);
  55480. mysql_tquery(connectionID, queryBuffer, "OnAdminChangePassword", "iss", playerid, username, password);
  55481. return 1;
  55482. }
  55483. CMD:deleteaccount(playerid, params[])
  55484. {
  55485. new username[MAX_PLAYER_NAME];
  55486. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  55487. {
  55488. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  55489. }
  55490. if(sscanf(params, "s[24]", username))
  55491. {
  55492. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /deleteaccount [username]");
  55493. }
  55494. if(IsPlayerOnline(username))
  55495. {
  55496. return SendClientMessage(playerid, COLOR_GREY, "That player is already online and logged in. You can't delete their account.");
  55497. }
  55498. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT adminlevel FROM "#TABLE_USERS" WHERE username = '%e'", username);
  55499. mysql_tquery(connectionID, queryBuffer, "OnAdminDeleteAccount", "is", playerid, username);
  55500. return 1;
  55501. }
  55502. CMD:createhouse(playerid, params[])
  55503. {
  55504. new type, Float:x, Float:y, Float:z, Float:a;
  55505. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pDynamicAdmin])
  55506. {
  55507. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  55508. }
  55509. if(sscanf(params, "i", type))
  55510. {
  55511. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /createhouse [type (1-%i)]", sizeof(houseInteriors));
  55512. }
  55513. if(!(1 <= type <= sizeof(houseInteriors)))
  55514. {
  55515. return SendClientMessage(playerid, COLOR_GREY, "Invalid type.");
  55516. }
  55517. if(GetNearbyHouse(playerid) >= 0)
  55518. {
  55519. return SendClientMessage(playerid, COLOR_GREY, "There is a house in range. Find somewhere else to create this one.");
  55520. }
  55521. GetPlayerPos(playerid, x, y, z);
  55522. GetPlayerFacingAngle(playerid, a);
  55523. type--;
  55524. for(new i = 0; i < MAX_HOUSES; i++)
  55525. {
  55526. if(!HouseInfo[i][hExists])
  55527. {
  55528. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO houses (type, price, pos_x, pos_y, pos_z, pos_a, int_x, int_y, int_z, int_a, interior, outsideint, outsidevw) VALUES(%i, %i, '%f', '%f', '%f', '%f', '%f', '%f', '%f', '%f', %i, %i, %i)", type, houseInteriors[type][intPrice], x, y, z, a - 180.0,
  55529. houseInteriors[type][intX], houseInteriors[type][intY], houseInteriors[type][intZ], houseInteriors[type][intA], houseInteriors[type][intID], GetPlayerInterior(playerid), GetPlayerVirtualWorld(playerid));
  55530. mysql_tquery(connectionID, queryBuffer, "OnAdminCreateHouse", "iiiffff", playerid, i, type, x, y, z, a);
  55531. return 1;
  55532. }
  55533. }
  55534. SendClientMessage(playerid, COLOR_GREY, "House slots are currently full. Ask developers to increase the internal limit.");
  55535. return 1;
  55536. }
  55537. CMD:edithouse(playerid, params[])
  55538. {
  55539. new houseid, option[10], param[32];
  55540. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pDynamicAdmin])
  55541. {
  55542. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  55543. }
  55544. if(sscanf(params, "is[10]S()[32]", houseid, option, param))
  55545. {
  55546. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /edithouse [houseid] [option]");
  55547. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Entrance, Exit, World, Type, Owner, Price, RentPrice, Level, Locked, Delivery");
  55548. return 1;
  55549. }
  55550. if(!(0 <= houseid < MAX_HOUSES) || !HouseInfo[houseid][hExists])
  55551. {
  55552. return SendClientMessage(playerid, COLOR_GREY, "Invalid house.");
  55553. }
  55554. if(!strcmp(option, "entrance", true))
  55555. {
  55556. GetPlayerPos(playerid, HouseInfo[houseid][hPosX], HouseInfo[houseid][hPosY], HouseInfo[houseid][hPosZ]);
  55557. GetPlayerFacingAngle(playerid, HouseInfo[houseid][hPosA]);
  55558. HouseInfo[houseid][hOutsideInt] = GetPlayerInterior(playerid);
  55559. HouseInfo[houseid][hOutsideVW] = GetPlayerVirtualWorld(playerid);
  55560. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET pos_x = '%f', pos_y = '%f', pos_z = '%f', pos_a = '%f', outsideint = %i, outsidevw = %i WHERE id = %i", HouseInfo[houseid][hPosX], HouseInfo[houseid][hPosY], HouseInfo[houseid][hPosZ], HouseInfo[houseid][hPosA], HouseInfo[houseid][hOutsideInt], HouseInfo[houseid][hOutsideVW], HouseInfo[houseid][hID]);
  55561. mysql_tquery(connectionID, queryBuffer);
  55562. ReloadHouse(houseid);
  55563. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the entrance of house %i.", houseid);
  55564. }
  55565. else if(!strcmp(option, "exit", true))
  55566. {
  55567. new type = -1;
  55568. for(new i = 0; i < sizeof(houseInteriors); i ++)
  55569. {
  55570. if(IsPlayerInRangeOfPoint(playerid, 100.0, houseInteriors[i][intX], houseInteriors[i][intY], houseInteriors[i][intZ]))
  55571. {
  55572. type = i;
  55573. }
  55574. }
  55575. GetPlayerPos(playerid, HouseInfo[houseid][hIntX], HouseInfo[houseid][hIntY], HouseInfo[houseid][hIntZ]);
  55576. GetPlayerFacingAngle(playerid, HouseInfo[houseid][hIntA]);
  55577. HouseInfo[houseid][hInterior] = GetPlayerInterior(playerid);
  55578. HouseInfo[houseid][hType] = type;
  55579. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET type = %i, int_x = '%f', int_y = '%f', int_z = '%f', int_a = '%f', interior = %i WHERE id = %i", type, HouseInfo[houseid][hIntX], HouseInfo[houseid][hIntY], HouseInfo[houseid][hIntZ], HouseInfo[houseid][hIntA], HouseInfo[houseid][hInterior], HouseInfo[houseid][hID]);
  55580. mysql_tquery(connectionID, queryBuffer);
  55581. ReloadHouse(houseid);
  55582. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the exit of house %i.", houseid);
  55583. }
  55584. else if(!strcmp(option, "world", true))
  55585. {
  55586. new worldid;
  55587. if(sscanf(param, "i", worldid))
  55588. {
  55589. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /edithouse [houseid] [world] [vw]");
  55590. }
  55591. HouseInfo[houseid][hWorld] = worldid;
  55592. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET world = %i WHERE id = %i", HouseInfo[houseid][hWorld], HouseInfo[houseid][hID]);
  55593. mysql_tquery(connectionID, queryBuffer);
  55594. ReloadHouse(houseid);
  55595. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the virtual world of house %i to %i.", houseid, worldid);
  55596. }
  55597. else if(!strcmp(option, "type", true))
  55598. {
  55599. new type;
  55600. if(sscanf(param, "i", type))
  55601. {
  55602. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /edithouse [houseid] [type] [value (1-%i)]", sizeof(houseInteriors));
  55603. }
  55604. if(!(1 <= type <= sizeof(houseInteriors)))
  55605. {
  55606. return SendClientMessage(playerid, COLOR_GREY, "Invalid type.");
  55607. }
  55608. type--;
  55609. HouseInfo[houseid][hType] = type;
  55610. HouseInfo[houseid][hInterior] = houseInteriors[type][intID];
  55611. HouseInfo[houseid][hIntX] = houseInteriors[type][intX];
  55612. HouseInfo[houseid][hIntY] = houseInteriors[type][intY];
  55613. HouseInfo[houseid][hIntZ] = houseInteriors[type][intZ];
  55614. HouseInfo[houseid][hIntA] = houseInteriors[type][intA];
  55615. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET type = %i, int_x = '%f', int_y = '%f', int_z = '%f', int_a = '%f', interior = %i, world = %i WHERE id = %i", type, HouseInfo[houseid][hIntX], HouseInfo[houseid][hIntY], HouseInfo[houseid][hIntZ], HouseInfo[houseid][hIntA], HouseInfo[houseid][hInterior], HouseInfo[houseid][hWorld], HouseInfo[houseid][hID]);
  55616. mysql_tquery(connectionID, queryBuffer);
  55617. ReloadHouse(houseid);
  55618. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the type of house %i to %i.", houseid, type + 1);
  55619. }
  55620. else if(!strcmp(option, "owner", true))
  55621. {
  55622. new targetid;
  55623. if(sscanf(param, "u", targetid))
  55624. {
  55625. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /edithouse [houseid] [owner] [playerid]");
  55626. }
  55627. if(!IsPlayerConnected(targetid))
  55628. {
  55629. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  55630. }
  55631. if(!PlayerData[targetid][pLogged])
  55632. {
  55633. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet.");
  55634. }
  55635. SetHouseOwner(houseid, targetid);
  55636. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the owner of house %i to %s.", houseid, GetRPName(targetid));
  55637. }
  55638. else if(!strcmp(option, "price", true))
  55639. {
  55640. new price;
  55641. if(sscanf(param, "i", price))
  55642. {
  55643. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /edithouse [houseid] [price] [value]");
  55644. }
  55645. if(price < 0)
  55646. {
  55647. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $0.");
  55648. }
  55649. HouseInfo[houseid][hPrice] = price;
  55650. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET price = %i WHERE id = %i", HouseInfo[houseid][hPrice], HouseInfo[houseid][hID]);
  55651. mysql_tquery(connectionID, queryBuffer);
  55652. ReloadHouse(houseid);
  55653. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the price of house %i to $%i.", houseid, price);
  55654. }
  55655. else if(!strcmp(option, "rentprice", true))
  55656. {
  55657. new price;
  55658. if(sscanf(param, "i", price))
  55659. {
  55660. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /edithouse [houseid] [rentprice] [value]");
  55661. }
  55662. if(price < 0)
  55663. {
  55664. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $0.");
  55665. }
  55666. HouseInfo[houseid][hRentPrice] = price;
  55667. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET rentprice = %i WHERE id = %i", HouseInfo[houseid][hRentPrice], HouseInfo[houseid][hID]);
  55668. mysql_tquery(connectionID, queryBuffer);
  55669. ReloadHouse(houseid);
  55670. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the rent price of house %i to $%i.", houseid, price);
  55671. }
  55672. else if(!strcmp(option, "level", true))
  55673. {
  55674. new level;
  55675. if(sscanf(param, "i", level))
  55676. {
  55677. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /edithouse [houseid] [level] [value (0-5)]");
  55678. }
  55679. if(!(0 <= level <= 6))
  55680. {
  55681. return SendClientMessage(playerid, COLOR_GREY, "Invalid level. Valid levels range from 0 to 5.");
  55682. }
  55683. HouseInfo[houseid][hLevel] = level;
  55684. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET level = %i WHERE id = %i", HouseInfo[houseid][hLevel], HouseInfo[houseid][hID]);
  55685. mysql_tquery(connectionID, queryBuffer);
  55686. ReloadHouse(houseid);
  55687. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the level of house %i to %i.", houseid, level);
  55688. }
  55689. else if(!strcmp(option, "locked", true))
  55690. {
  55691. new locked;
  55692. if(sscanf(param, "i", locked) || !(0 <= locked <= 1))
  55693. {
  55694. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /edithouse [houseid] [locked] [0/1]");
  55695. }
  55696. HouseInfo[houseid][hLocked] = locked;
  55697. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET locked = %i WHERE id = %i", HouseInfo[houseid][hLocked], HouseInfo[houseid][hID]);
  55698. mysql_tquery(connectionID, queryBuffer);
  55699. ReloadHouse(houseid);
  55700. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the lock state of house %i to %i.", houseid, locked);
  55701. }
  55702. else if(!strcmp(option, "delivery", true))
  55703. {
  55704. new delivery;
  55705. if(sscanf(param, "i", delivery) || !(0 <= delivery <= 1))
  55706. {
  55707. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /edithouse [houseid] [locked] [0/1]");
  55708. }
  55709. HouseInfo[houseid][hDelivery] = delivery;
  55710. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET delivery = %i WHERE id = %i", HouseInfo[houseid][hDelivery], HouseInfo[houseid][hID]);
  55711. mysql_tquery(connectionID, queryBuffer);
  55712. ReloadHouse(houseid);
  55713. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the ability to be to delivered of house %i to %i.", houseid, delivery);
  55714. }
  55715. return 1;
  55716. }
  55717. CMD:removehouse(playerid, params[])
  55718. {
  55719. new houseid;
  55720. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pDynamicAdmin])
  55721. {
  55722. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  55723. }
  55724. if(sscanf(params, "i", houseid))
  55725. {
  55726. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /removehouse [houseid]");
  55727. }
  55728. if(!(0 <= houseid < MAX_HOUSES) || !HouseInfo[houseid][hExists])
  55729. {
  55730. return SendClientMessage(playerid, COLOR_GREY, "Invalid house.");
  55731. }
  55732. DestroyDynamic3DTextLabel(HouseInfo[houseid][hText]);
  55733. DestroyDynamicPickup(HouseInfo[houseid][hPickup]);
  55734. // DestroyDynamicMapIcon(HouseInfo[houseid][hMapIcon]);
  55735. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM houses WHERE id = %i", HouseInfo[houseid][hID]);
  55736. mysql_tquery(connectionID, queryBuffer);
  55737. HouseInfo[houseid][hExists] = 0;
  55738. HouseInfo[houseid][hID] = 0;
  55739. HouseInfo[houseid][hOwnerID] = 0;
  55740. Iter_Remove(House, houseid);
  55741. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has removed house id %i", GetPlayerNameEx(playerid), houseid);
  55742. SendClientMessageEx(playerid, COLOR_AQUA, "* You have removed house %i.", houseid);
  55743. return 1;
  55744. }
  55745. CMD:gotohouse(playerid, params[])
  55746. {
  55747. new houseid;
  55748. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  55749. {
  55750. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  55751. }
  55752. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  55753. {
  55754. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  55755. }
  55756. if(sscanf(params, "i", houseid))
  55757. {
  55758. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /gotohouse [houseid]");
  55759. }
  55760. if(!(0 <= houseid < MAX_HOUSES) || !HouseInfo[houseid][hExists])
  55761. {
  55762. return SendClientMessage(playerid, COLOR_GREY, "Invalid house.");
  55763. }
  55764. GameTextForPlayer(playerid, "~w~Teleported", 5000, 1);
  55765. SetPlayerPos(playerid, HouseInfo[houseid][hPosX], HouseInfo[houseid][hPosY], HouseInfo[houseid][hPosZ]);
  55766. SetPlayerFacingAngle(playerid, HouseInfo[houseid][hPosA]);
  55767. SetPlayerInterior(playerid, HouseInfo[houseid][hOutsideInt]);
  55768. SetPlayerVirtualWorld(playerid, HouseInfo[houseid][hOutsideVW]);
  55769. SetCameraBehindPlayer(playerid);
  55770. return 1;
  55771. }
  55772. CMD:previewint(playerid, params[])
  55773. {
  55774. new type, string[32];
  55775. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  55776. {
  55777. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  55778. }
  55779. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  55780. {
  55781. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  55782. }
  55783. if(sscanf(params, "i", type))
  55784. {
  55785. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /previewint [1-%i]", sizeof(houseInteriors));
  55786. }
  55787. if(!(1 <= type <= sizeof(houseInteriors)))
  55788. {
  55789. return SendClientMessage(playerid, COLOR_GREY, "Invalid type.");
  55790. }
  55791. type--;
  55792. format(string, sizeof(string), "~w~%s", houseInteriors[type][intClass]);
  55793. GameTextForPlayer(playerid, string, 5000, 1);
  55794. SetPlayerPos(playerid, houseInteriors[type][intX], houseInteriors[type][intY], houseInteriors[type][intZ]);
  55795. SetPlayerFacingAngle(playerid, houseInteriors[type][intA]);
  55796. SetPlayerInterior(playerid, houseInteriors[type][intID]);
  55797. SetCameraBehindPlayer(playerid);
  55798. return 1;
  55799. }
  55800. CMD:nearest(playerid, params[])
  55801. {
  55802. new id;
  55803. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN && !PlayerData[playerid][pGangMod])
  55804. {
  55805. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  55806. }
  55807. SendClientMessage(playerid, COLOR_NAVYBLUE, "_______ Nearest Items _______");
  55808. if((id = GetNearbyHouse(playerid)) >= 0)
  55809. {
  55810. SendClientMessageEx(playerid, COLOR_GREY2, "You are in range of house ID %i.", id);
  55811. }
  55812. if((id = GetNearbyGarage(playerid)) >= 0)
  55813. {
  55814. SendClientMessageEx(playerid, COLOR_GREY2, "You are in range of garage ID %i.", id);
  55815. }
  55816. if((id = GetNearbyBusiness(playerid)) >= 0)
  55817. {
  55818. SendClientMessageEx(playerid, COLOR_GREY2, "You are in range of business ID %i.", id);
  55819. }
  55820. if((id = GetNearbyEntrance(playerid)) >= 0)
  55821. {
  55822. SendClientMessageEx(playerid, COLOR_GREY2, "You are in range of entrance ID %i.", id);
  55823. }
  55824. if((id = GetNearbyLand(playerid)) >= 0)
  55825. {
  55826. SendClientMessageEx(playerid, COLOR_GREY2, "You are in range of land ID %i.", id);
  55827. }
  55828. if((id = GetNearbyPoint(playerid)) >= 0)
  55829. {
  55830. SendClientMessageEx(playerid, COLOR_GREY2, "You are in range of point ID %i.", id);
  55831. }
  55832. if((id = GetNearbyTurf(playerid)) >= 0)
  55833. {
  55834. SendClientMessageEx(playerid, COLOR_GREY2, "You are in range of turf ID %i.", id);
  55835. }
  55836. if((id = Graffiti_Nearest(playerid)) >= 0)
  55837. {
  55838. SendClientMessageEx(playerid, COLOR_GREY2, "You are in range of graffiti ID %i.", id);
  55839. }
  55840. if((id = GetNearbyLocker(playerid)) >= 0)
  55841. {
  55842. SendClientMessageEx(playerid, COLOR_GREY2, "You are in range of locker ID %i.", id);
  55843. }
  55844. if((id = GetNearbyLocation(playerid, 20.0)) >= 0)
  55845. {
  55846. SendClientMessageEx(playerid, COLOR_GREY2, "You are in range of (location) %s [%i].", LocationInfo[id][locName], id);
  55847. }
  55848. if((id = GetNearbyAtm(playerid)) >= 0)
  55849. {
  55850. SendClientMessageEx(playerid, COLOR_GREY2, "You are in range of atm ID %i", id);
  55851. }
  55852. return 1;
  55853. }
  55854. CMD:dynamichelp(playerid, params[])
  55855. {
  55856. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  55857. {
  55858. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  55859. }
  55860. else if (isnull(params))
  55861. {
  55862. SendSyntaxMessage(playerid, "/dynamichelp (type)");
  55863. SendClientMessage(playerid, COLOR_GREY, "Types: house, businesses, entrances, atms, lands, factions, gangs");
  55864. SendClientMessage(playerid, COLOR_GREY, "Types: locations, points, turfs, fires, lockers, payphones, gangtags");
  55865. return 1;
  55866. }
  55867. else if (!strcmp(params, "house", true))
  55868. {
  55869. SendClientMessage(playerid, COLOR_GREEN, "HOUSES:{DDDDDD} /createhouse, /edithouse, /removehouse, /gotohouse, /asellhouse, /removefurniture.");
  55870. }
  55871. else if (!strcmp(params, "garages", true))
  55872. {
  55873. SendClientMessage(playerid, COLOR_GREEN, "GARAGES:{DDDDDD} /creategarage, /editgarage, /removegarage, /gotogarage, /asellgarage.");
  55874. }
  55875. else if (!strcmp(params, "businesses", true))
  55876. {
  55877. SendClientMessage(playerid, COLOR_GREEN, "BUSINESSES:{DDDDDD} /createbiz, /editbiz, /removebiz, /gotobiz, /asellbiz.");
  55878. }
  55879. else if (!strcmp(params, "entrances", true))
  55880. {
  55881. SendClientMessage(playerid, COLOR_GREEN, "ENTRANCES:{DDDDDD} /createentrance, /editentrance, /removeentrance, /gotoentrance.");
  55882. }
  55883. else if (!strcmp(params, "lands", true))
  55884. {
  55885. SendClientMessage(playerid, COLOR_GREEN, "LANDS:{DDDDDD} /createland, /landcancel, /removeland, /gotoland, /asellland, /removelandobjects.");
  55886. }
  55887. else if (!strcmp(params, "factions", true))
  55888. {
  55889. SendClientMessage(playerid, COLOR_GREEN, "FACTIONS:{DDDDDD} /createfaction, /editfaction, /removefaction, /switchfaction, /purgefaction.");
  55890. }
  55891. else if (!strcmp(params, "gangs", true))
  55892. {
  55893. SendClientMessage(playerid, COLOR_GREEN, "GANGS:{DDDDDD} /creategang, /editgang, /removegang, /gangstrike, /switchgang, /caplimit, /setcooldown.");
  55894. }
  55895. else if (!strcmp(params, "points", true))
  55896. {
  55897. SendClientMessage(playerid, COLOR_GREEN, "POINTS:{DDDDDD} /createpoint, /editpoint, /removepoint, /gotopoint.");
  55898. }
  55899. else if (!strcmp(params, "turfs", true))
  55900. {
  55901. SendClientMessage(playerid, COLOR_GREEN, "TURFS:{DDDDDD} /createturf, /turfcancel, /editturf, /removeturf, /gototurf.");
  55902. }
  55903. else if (!strcmp(params, "fires", true))
  55904. {
  55905. SendClientMessage(playerid, COLOR_GREEN, "FIRES:{DDDDDD} /randomfire, /killfire, /spawnfire.");
  55906. }
  55907. else if (!strcmp(params, "lockers", true))
  55908. {
  55909. SendClientMessage(playerid, COLOR_GREEN, "LOCKERS:{DDDDDD} /createlocker, /editlocker, /removelocker.");
  55910. }
  55911. else if (!strcmp(params, "locations", true))
  55912. {
  55913. SendClientMessage(playerid, COLOR_GREEN, "LOCATIONS:{DDDDDD} /createlocation, /editlocation, /removelocation.");
  55914. }
  55915. else if (!strcmp(params, "atms", true))
  55916. {
  55917. SendClientMessage(playerid, COLOR_GREEN, "ATMS:{DDDDDD} /createatm, /gotoatm, /editatm, /deleteatm.");
  55918. }
  55919. else if (!strcmp(params, "gangtags", true))
  55920. {
  55921. SendClientMessage(playerid, COLOR_GREEN, "Gang Tags:{DDDDDD} /creategangtag, /destroygangtag");
  55922. }
  55923. else if (!strcmp(params, "payphones", true))
  55924. {
  55925. SendClientMessage(playerid, COLOR_GREEN, "Payphones:{FFFFFF} /addpayphone, /gotopayphone, /editpayphone, /deletepayphone.");
  55926. }
  55927. return 1;
  55928. }
  55929. CMD:myassets(playerid, params[])
  55930. {
  55931. if(!PlayerData[playerid][pLogged])
  55932. {
  55933. return SendClientMessage(playerid, COLOR_GREY, "You are not logged in yet.");
  55934. }
  55935. SendClientMessageEx(playerid, COLOR_NAVYBLUE, "_____ %s's Assets _____", GetRPName(playerid));
  55936. foreach(new i : House)
  55937. {
  55938. if(HouseInfo[i][hExists] && IsHouseOwner(playerid, i))
  55939. {
  55940. SendClientMessageEx(playerid, COLOR_GREY2, "* {33CC33}House{C8C8C8} | ID: %i | Location: %s | Status: %s", i, GetZoneName(HouseInfo[i][hPosX], HouseInfo[i][hPosY], HouseInfo[i][hPosZ]), (gettime() - HouseInfo[i][hTimestamp]) > 2592000 ? ("{FF6347}Inactive") : ("{00AA00}Active"));
  55941. }
  55942. }
  55943. foreach(new i : Business)
  55944. {
  55945. if(BusinessInfo[i][bExists] && IsBusinessOwner(playerid, i))
  55946. {
  55947. SendClientMessageEx(playerid, COLOR_GREY2, "* {FFD700}Business{C8C8C8} | ID: %i | Location: %s | Status: %s", i, GetZoneName(BusinessInfo[i][bPosX], BusinessInfo[i][bPosY], BusinessInfo[i][bPosZ]), (gettime() - BusinessInfo[i][bTimestamp]) > 2592000 ? ("{FF6347}Inactive") : ("{00AA00}Active"));
  55948. }
  55949. }
  55950. foreach(new i : Garage)
  55951. {
  55952. if(GarageInfo[i][gExists] && IsGarageOwner(playerid, i))
  55953. {
  55954. SendClientMessageEx(playerid, COLOR_GREY2, "* {004CFF}Garage{C8C8C8} | ID: %i | Location: %s | Status: %s", i, GetZoneName(GarageInfo[i][gPosX], GarageInfo[i][gPosY], GarageInfo[i][gPosZ]), (gettime() - GarageInfo[i][gTimestamp]) > 2592000 ? ("{FF6347}Inactive") : ("{00AA00}Active"));
  55955. }
  55956. }
  55957. foreach(new i : Land)
  55958. {
  55959. if(LandInfo[i][lExists] && IsLandOwner(playerid, i))
  55960. {
  55961. SendClientMessageEx(playerid, COLOR_GREY2, "* {33CCFF}Land{C8C8C8} | ID: %i | Location: %s", i, GetZoneName(LandInfo[i][lHeightX], LandInfo[i][lHeightY], LandInfo[i][lHeightZ]));
  55962. }
  55963. }
  55964. return 1;
  55965. }
  55966. CMD:listassets(playerid, params[])
  55967. {
  55968. new targetid;
  55969. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  55970. {
  55971. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  55972. }
  55973. if(sscanf(params, "u", targetid))
  55974. {
  55975. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /listassets [playerid]");
  55976. }
  55977. if(!IsPlayerConnected(targetid))
  55978. {
  55979. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  55980. }
  55981. if(!PlayerData[targetid][pLogged])
  55982. {
  55983. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet.");
  55984. }
  55985. SendClientMessageEx(playerid, COLOR_NAVYBLUE, "_____ %s's Assets _____", GetRPName(targetid));
  55986. foreach(new i : House)
  55987. {
  55988. if(HouseInfo[i][hExists] && IsHouseOwner(targetid, i))
  55989. {
  55990. SendClientMessageEx(playerid, COLOR_GREY2, "* {33CC33}House{C8C8C8} | ID: %i | Location: %s | Status: %s", i, GetZoneName(HouseInfo[i][hPosX], HouseInfo[i][hPosY], HouseInfo[i][hPosZ]), (gettime() - HouseInfo[i][hTimestamp]) > 2592000 ? ("{FF6347}Inactive") : ("{00AA00}Active"));
  55991. }
  55992. }
  55993. foreach(new i : Business)
  55994. {
  55995. if(BusinessInfo[i][bExists] && IsBusinessOwner(targetid, i))
  55996. {
  55997. SendClientMessageEx(playerid, COLOR_GREY2, "* {FFD700}Business{C8C8C8} | ID: %i | Location: %s | Status: %s", i, GetZoneName(BusinessInfo[i][bPosX], BusinessInfo[i][bPosY], BusinessInfo[i][bPosZ]), (gettime() - BusinessInfo[i][bTimestamp]) > 2592000 ? ("{FF6347}Inactive") : ("{00AA00}Active"));
  55998. }
  55999. }
  56000. foreach(new i : Garage)
  56001. {
  56002. if(GarageInfo[i][gExists] && IsGarageOwner(targetid, i))
  56003. {
  56004. SendClientMessageEx(playerid, COLOR_GREY2, "* {004CFF}Garage{C8C8C8} | ID: %i | Location: %s | Status: %s", i, GetZoneName(GarageInfo[i][gPosX], GarageInfo[i][gPosY], GarageInfo[i][gPosZ]), (gettime() - GarageInfo[i][gTimestamp]) > 2592000 ? ("{FF6347}Inactive") : ("{00AA00}Active"));
  56005. }
  56006. }
  56007. foreach(new i : Land)
  56008. {
  56009. if(LandInfo[i][lExists] && IsLandOwner(targetid, i))
  56010. {
  56011. SendClientMessageEx(playerid, COLOR_GREY2, "* {33CCFF}Land{C8C8C8} | ID: %i | Location: %s", i, GetZoneName(LandInfo[i][lHeightX], LandInfo[i][lHeightY], LandInfo[i][lHeightZ]));
  56012. }
  56013. }
  56014. return 1;
  56015. }
  56016. CMD:buyhousealarm(playerid, params[])
  56017. {
  56018. foreach(new i : House)
  56019. {
  56020. if(HouseInfo[i][hExists] && IsHouseOwner(playerid, i))
  56021. {
  56022. if(HouseInfo[i][hAlarm] != 1 && PlayerData[playerid][pCash] > 100000)
  56023. {
  56024. SendClientMessageEx(playerid, COLOR_GREY, "You have bought an house alarm for $25,000");
  56025. GivePlayerCash(playerid, -25000);
  56026. HouseInfo[i][hAlarm] = 1;
  56027. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET alarm = %i, where id = %i", HouseInfo[i][hAlarm], HouseInfo[i][hID]);
  56028. mysql_tquery(connectionID, queryBuffer);
  56029. return 1;
  56030. }
  56031. else
  56032. {
  56033. SendClientMessageEx(playerid, COLOR_GREY, "You already own a house alarm or don't have enough cash on-hand to cover the cost.");
  56034. }
  56035. }
  56036. else return SendClientMessageEx(playerid, COLOR_GREY, "You don't own a house.");
  56037. }
  56038. return 1;
  56039. }
  56040. CMD:asellhouse(playerid, params[])
  56041. {
  56042. new houseid;
  56043. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  56044. {
  56045. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  56046. }
  56047. if(sscanf(params, "i", houseid))
  56048. {
  56049. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /asellhouse [houseid]");
  56050. }
  56051. if(!(0 <= houseid < MAX_HOUSES) || !HouseInfo[houseid][hExists])
  56052. {
  56053. return SendClientMessage(playerid, COLOR_GREY, "Invalid house.");
  56054. }
  56055. SetHouseOwner(houseid, INVALID_PLAYER_ID);
  56056. SendClientMessageEx(playerid, COLOR_AQUA, "* You have admin sold house %i.", houseid);
  56057. return 1;
  56058. }
  56059. CMD:asellgarage(playerid, params[])
  56060. {
  56061. new garageid;
  56062. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  56063. {
  56064. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  56065. }
  56066. if(sscanf(params, "i", garageid))
  56067. {
  56068. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /asellgarage [garageid]");
  56069. }
  56070. if(!(0 <= garageid < MAX_GARAGES) || !GarageInfo[garageid][gExists])
  56071. {
  56072. return SendClientMessage(playerid, COLOR_GREY, "Invalid garage.");
  56073. }
  56074. SetGarageOwner(garageid, INVALID_PLAYER_ID);
  56075. SendClientMessageEx(playerid, COLOR_AQUA, "* You have admin sold garage %i.", garageid);
  56076. return 1;
  56077. }
  56078. CMD:asellbiz(playerid, params[])
  56079. {
  56080. new businessid;
  56081. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  56082. {
  56083. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  56084. }
  56085. if(sscanf(params, "i", businessid))
  56086. {
  56087. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /asellbiz [businessid]");
  56088. }
  56089. if(!(0 <= businessid < MAX_BUSINESSES) || !BusinessInfo[businessid][bExists])
  56090. {
  56091. return SendClientMessage(playerid, COLOR_GREY, "Invalid business.");
  56092. }
  56093. SetBusinessOwner(businessid, INVALID_PLAYER_ID);
  56094. SendClientMessageEx(playerid, COLOR_AQUA, "* You have admin sold business %i.", businessid);
  56095. return 1;
  56096. }
  56097. CMD:asellland(playerid, params[])
  56098. {
  56099. new landid;
  56100. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  56101. {
  56102. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  56103. }
  56104. if(sscanf(params, "i", landid))
  56105. {
  56106. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /asellland [landid]");
  56107. }
  56108. if(!(0 <= landid < MAX_LANDS) || !LandInfo[landid][lExists])
  56109. {
  56110. return SendClientMessage(playerid, COLOR_GREY, "Invalid land.");
  56111. }
  56112. SetLandOwner(landid, INVALID_PLAYER_ID);
  56113. SendClientMessageEx(playerid, COLOR_AQUA, "* You have admin sold land %i.", landid);
  56114. return 1;
  56115. }
  56116. CMD:enter(playerid, params[])
  56117. {
  56118. if(PlayerData[playerid][pInjured] > 0 || PlayerData[playerid][pTazedTime] > 0 || PlayerData[playerid][pCuffed] > 0 || PlayerData[playerid][pDueling] != INVALID_PLAYER_ID)
  56119. {
  56120. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment.");
  56121. }
  56122. if(IsPlayerInRangeOfPoint(playerid, 3.0, 1286.2870,-1349.8572,13.5689))
  56123. {
  56124. if(PlayerData[playerid][pAcceptedHelp])
  56125. {
  56126. return SendClientMessage(playerid, COLOR_GREY, "You can not enter the paintball arena while on helper duty!");
  56127. }
  56128. if(PlayerData[playerid][pWeaponRestricted] > 0)
  56129. {
  56130. return SendClientMessage(playerid, COLOR_GREY, "You are restricted from weapons and therefore can't join paintball.");
  56131. }
  56132. ShowDialogToPlayer(playerid, DIALOG_PAINTBALL);
  56133. }
  56134. else
  56135. {
  56136. EnterCheck(playerid);
  56137. }
  56138. return 1;
  56139. }
  56140. CMD:exit(playerid, params[])
  56141. {
  56142. if(PlayerData[playerid][pInjured] > 0 || PlayerData[playerid][pTazedTime] > 0 || PlayerData[playerid][pCuffed] > 0 || PlayerData[playerid][pDueling] != INVALID_PLAYER_ID)
  56143. {
  56144. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment.");
  56145. }
  56146. if(PlayerData[playerid][pPaintball] > 0)
  56147. {
  56148. foreach(new i : Player)
  56149. {
  56150. if(PlayerData[playerid][pPaintball] == PlayerData[i][pPaintball])
  56151. {
  56152. SendClientMessageEx(i, COLOR_LIGHTORANGE, "(( %s has left the paintball arena. ))", GetRPName(playerid));
  56153. }
  56154. }
  56155. ResetPlayerWeapons(playerid);
  56156. SetPlayerArmedWeapon(playerid, 0);
  56157. PlayerData[playerid][pPaintball] = 0;
  56158. PlayerData[playerid][pPaintballTeam] = -1;
  56159. GangZoneHideForPlayer(playerid, zone_paintball[0]);
  56160. GangZoneHideForPlayer(playerid, zone_paintball[1]);
  56161. SetPlayerPos(playerid, PlayerData[playerid][pPosX], PlayerData[playerid][pPosY], PlayerData[playerid][pPosZ]);
  56162. SetPlayerFacingAngle(playerid, PlayerData[playerid][pPosA]);
  56163. SetPlayerInterior(playerid, PlayerData[playerid][pInterior]);
  56164. SetPlayerVirtualWorld(playerid, PlayerData[playerid][pWorld]);
  56165. SetPlayerWeapons(playerid);
  56166. }
  56167. else
  56168. {
  56169. ExitCheck(playerid);
  56170. }
  56171. return 1;
  56172. }
  56173. CMD:buyhouse(playerid, params[])
  56174. {
  56175. new houseid, type[16];
  56176. if((houseid = GetNearbyHouse(playerid)) == -1)
  56177. {
  56178. return SendClientMessage(playerid, COLOR_GREY, "There is no house in range. You must be near a house.");
  56179. }
  56180. if(strcmp(params, "confirm", true) != 0)
  56181. {
  56182. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /buyhouse [confirm]");
  56183. }
  56184. if(HouseInfo[houseid][hOwnerID])
  56185. {
  56186. return SendClientMessage(playerid, COLOR_GREY, "This house already has an owner.");
  56187. }
  56188. if(PlayerData[playerid][pCash] < HouseInfo[houseid][hPrice])
  56189. {
  56190. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this house.");
  56191. }
  56192. if(GetPlayerAssetCount(playerid, LIMIT_HOUSES) >= GetPlayerAssetLimit(playerid, LIMIT_HOUSES))
  56193. {
  56194. return SendClientMessageEx(playerid, COLOR_GREY, "You currently own %i/%i houses. You can't own anymore unless you upgrade your asset perk.", GetPlayerAssetCount(playerid, LIMIT_HOUSES), GetPlayerAssetLimit(playerid, LIMIT_HOUSES));
  56195. }
  56196. if(HouseInfo[houseid][hType]) {
  56197. type = "House";
  56198. } else {
  56199. strcpy(type, houseInteriors[HouseInfo[houseid][hType]][intClass]);
  56200. }
  56201. SetHouseOwner(houseid, playerid);
  56202. GivePlayerCash(playerid, -HouseInfo[houseid][hPrice]);
  56203. SendClientMessageEx(playerid, COLOR_GREEN, "You paid %s to make this house yours! /househelp for a list of commands.", FormatNumber(HouseInfo[houseid][hPrice]));
  56204. Log_Write("log_property", "%s (uid: %i) purchased %s (id: %i) for $%i.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], type, HouseInfo[houseid][hID], HouseInfo[houseid][hPrice]);
  56205. return 1;
  56206. }
  56207. CMD:lock(playerid, params[])
  56208. {
  56209. new id, houseid = GetInsideHouse(playerid), landid = GetNearbyLand(playerid);
  56210. for(new i = 0, j = Streamer_GetUpperBound(STREAMER_TYPE_OBJECT); i <= j; i ++)
  56211. {
  56212. if(IsValidDynamicObject(i) && IsPlayerInRangeOfDynamicObject(playerid, i, 2.5) && IsDoorObject(i))
  56213. {
  56214. if(houseid >= 0 && Streamer_GetExtraInt(i, E_OBJECT_TYPE) == E_OBJECT_FURNITURE && Streamer_GetExtraInt(i, E_OBJECT_EXTRA_ID) == HouseInfo[houseid][hID])
  56215. {
  56216. if(!(IsHouseOwner(playerid, houseid) || PlayerData[playerid][pRentingHouse] == HouseInfo[houseid][hID] || PlayerData[playerid][pFurniturePerms] == houseid))
  56217. {
  56218. return SendClientMessage(playerid, COLOR_GREY, "You don't have permission from the house owner to lock this door.");
  56219. }
  56220. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT door_locked FROM furniture WHERE id = %i", Streamer_GetExtraInt(i, E_OBJECT_INDEX_ID));
  56221. mysql_tquery(connectionID, queryBuffer, "OnPlayerLockFurnitureDoor", "ii", playerid, Streamer_GetExtraInt(i, E_OBJECT_INDEX_ID));
  56222. return 1;
  56223. }
  56224. else if(landid >= 0 && Streamer_GetExtraInt(i, E_OBJECT_TYPE) == E_OBJECT_LAND && Streamer_GetExtraInt(i, E_OBJECT_EXTRA_ID) == LandInfo[landid][lID])
  56225. {
  56226. if(!(IsLandOwner(playerid, landid) || PlayerData[playerid][pLandPerms] == landid))
  56227. {
  56228. return SendClientMessage(playerid, COLOR_GREY, "You don't have permission from the land owner to lock this door.");
  56229. }
  56230. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT door_locked FROM landobjects WHERE id = %i", Streamer_GetExtraInt(i, E_OBJECT_INDEX_ID));
  56231. mysql_tquery(connectionID, queryBuffer, "OnPlayerLockLandDoor", "ii", playerid, Streamer_GetExtraInt(i, E_OBJECT_INDEX_ID));
  56232. return 1;
  56233. }
  56234. }
  56235. }
  56236. if((id = GetNearbyVehicle(playerid)) != INVALID_VEHICLE_ID && (IsVehicleOwner(playerid, id) || PlayerData[playerid][pVehicleKeys] == id || (VehicleInfo[id][vGang] >= 0 && VehicleInfo[id][vGang] == PlayerData[playerid][pGang])))
  56237. {
  56238. if(!VehicleInfo[id][vLocked])
  56239. {
  56240. new string[24];
  56241. VehicleInfo[id][vLocked] = 1;
  56242. format(string, sizeof(string), "~r~%s locked", GetVehicleName(id));
  56243. GameTextForPlayer(playerid, string, 3000, 3);
  56244. ShowActionBubble(playerid, "* %s locks their %s.", GetRPName(playerid), GetVehicleName(id));
  56245. }
  56246. else
  56247. {
  56248. VehicleInfo[id][vLocked] = 0;
  56249. new string[24];
  56250. format(string, sizeof(string), "~b~%s unlocked", GetVehicleName(id));
  56251. GameTextForPlayer(playerid, string, 3000, 3);
  56252. ShowActionBubble(playerid, "* %s unlocks their %s.", GetRPName(playerid), GetVehicleName(id));
  56253. }
  56254. SetVehicleParams(id, VEHICLE_DOORS, VehicleInfo[id][vLocked]);
  56255. PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  56256. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET locked = %i WHERE id = %i", VehicleInfo[id][vLocked], VehicleInfo[id][vID]);
  56257. mysql_tquery(connectionID, queryBuffer);
  56258. return 1;
  56259. }
  56260. else if((id = GetNearbyHouseEx(playerid)) >= 0 && (IsHouseOwner(playerid, id) || PlayerData[playerid][pRentingHouse] == HouseInfo[id][hID] || PlayerData[playerid][pHouseKeys] == id))
  56261. {
  56262. if(!HouseInfo[id][hLocked])
  56263. {
  56264. HouseInfo[id][hLocked] = 1;
  56265. GameTextForPlayer(playerid, "~r~House locked", 3000, 6);
  56266. ShowActionBubble(playerid, "* %s locks their house door.", GetRPName(playerid));
  56267. }
  56268. else
  56269. {
  56270. HouseInfo[id][hLocked] = 0;
  56271. GameTextForPlayer(playerid, "~g~House unlocked", 3000, 6);
  56272. ShowActionBubble(playerid, "* %s unlocks their house door.", GetRPName(playerid));
  56273. }
  56274. PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  56275. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET locked = %i WHERE id = %i", HouseInfo[id][hLocked], HouseInfo[id][hID]);
  56276. mysql_tquery(connectionID, queryBuffer);
  56277. return 1;
  56278. }
  56279. else if((id = GetNearbyGarageEx(playerid)) >= 0 && IsGarageOwner(playerid, id))
  56280. {
  56281. if(!GarageInfo[id][gLocked])
  56282. {
  56283. GarageInfo[id][gLocked] = 1;
  56284. GameTextForPlayer(playerid, "~r~Garage locked", 3000, 6);
  56285. ShowActionBubble(playerid, "* %s locks their garage door.", GetRPName(playerid));
  56286. }
  56287. else
  56288. {
  56289. GarageInfo[id][gLocked] = 0;
  56290. GameTextForPlayer(playerid, "~g~Garage unlocked", 3000, 6);
  56291. ShowActionBubble(playerid, "* %s unlocks their garage door.", GetRPName(playerid));
  56292. }
  56293. PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  56294. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE garages SET locked = %i WHERE id = %i", GarageInfo[id][gLocked], GarageInfo[id][gID]);
  56295. mysql_tquery(connectionID, queryBuffer);
  56296. return 1;
  56297. }
  56298. else if((id = GetNearbyBusinessEx(playerid)) >= 0 && IsBusinessOwner(playerid, id))
  56299. {
  56300. if(!BusinessInfo[id][bLocked])
  56301. {
  56302. BusinessInfo[id][bLocked] = 1;
  56303. GameTextForPlayer(playerid, "~r~Business locked", 3000, 6);
  56304. ShowActionBubble(playerid, "* %s locks their business door.", GetRPName(playerid));
  56305. }
  56306. else
  56307. {
  56308. BusinessInfo[id][bLocked] = 0;
  56309. GameTextForPlayer(playerid, "~g~Business unlocked", 3000, 6);
  56310. ShowActionBubble(playerid, "* %s unlocks their business door.", GetRPName(playerid));
  56311. }
  56312. PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  56313. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET locked = %i WHERE id = %i", BusinessInfo[id][bLocked], BusinessInfo[id][bID]);
  56314. mysql_tquery(connectionID, queryBuffer);
  56315. return 1;
  56316. }
  56317. else if((id = GetNearbyEntranceEx(playerid)) >= 0)
  56318. {
  56319. new correct_pass;
  56320. if(!IsEntranceOwner(playerid, id) && strcmp(EntranceInfo[id][ePassword], "None", true) != 0)
  56321. {
  56322. if(isnull(params)) {
  56323. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /lock [password]");
  56324. } else if(strcmp(params, EntranceInfo[id][ePassword]) != 0) {
  56325. return SendClientMessage(playerid, COLOR_GREY, "Incorrect password.");
  56326. } else {
  56327. correct_pass = true;
  56328. }
  56329. }
  56330. if((correct_pass) || IsEntranceOwner(playerid, id))
  56331. {
  56332. if(!EntranceInfo[id][eLocked])
  56333. {
  56334. EntranceInfo[id][eLocked] = 1;
  56335. GameTextForPlayer(playerid, "~r~Entrance locked", 3000, 6);
  56336. ShowActionBubble(playerid, "* %s locks their entrance door.", GetRPName(playerid));
  56337. }
  56338. else
  56339. {
  56340. EntranceInfo[id][eLocked] = 0;
  56341. GameTextForPlayer(playerid, "~g~Entrance unlocked", 3000, 6);
  56342. ShowActionBubble(playerid, "* %s unlocks their entrance door.", GetRPName(playerid));
  56343. }
  56344. PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  56345. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET locked = %i WHERE id = %i", EntranceInfo[id][eLocked], EntranceInfo[id][eID]);
  56346. mysql_tquery(connectionID, queryBuffer);
  56347. }
  56348. return 1;
  56349. }
  56350. SendClientMessage(playerid, COLOR_GREY, "You are not close to anything which you can lock.");
  56351. return 1;
  56352. }
  56353. CMD:alock(playerid, params[])
  56354. {
  56355. new id;
  56356. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  56357. {
  56358. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  56359. }
  56360. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  56361. {
  56362. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  56363. }
  56364. for(new i = 0, j = Streamer_GetUpperBound(STREAMER_TYPE_OBJECT); i <= j; i ++)
  56365. {
  56366. if(IsValidDynamicObject(i) && IsPlayerInRangeOfDynamicObject(playerid, i, 2.5) && IsDoorObject(i))
  56367. {
  56368. if((id = GetInsideHouse(playerid)) >= 0 && Streamer_GetExtraInt(i, E_OBJECT_TYPE) == E_OBJECT_FURNITURE && Streamer_GetExtraInt(i, E_OBJECT_EXTRA_ID) == HouseInfo[id][hID])
  56369. {
  56370. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT door_locked FROM furniture WHERE id = %i", Streamer_GetExtraInt(i, E_OBJECT_INDEX_ID));
  56371. mysql_tquery(connectionID, queryBuffer, "OnPlayerLockFurnitureDoor", "ii", playerid, Streamer_GetExtraInt(i, E_OBJECT_INDEX_ID));
  56372. return 1;
  56373. }
  56374. else if((id = GetNearbyLand(playerid)) >= 0 && Streamer_GetExtraInt(i, E_OBJECT_TYPE) == E_OBJECT_LAND && Streamer_GetExtraInt(i, E_OBJECT_EXTRA_ID) == LandInfo[id][lID])
  56375. {
  56376. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT door_locked FROM landobjects WHERE id = %i", Streamer_GetExtraInt(i, E_OBJECT_INDEX_ID));
  56377. mysql_tquery(connectionID, queryBuffer, "OnPlayerLockLandDoor", "ii", playerid, Streamer_GetExtraInt(i, E_OBJECT_INDEX_ID));
  56378. return 1;
  56379. }
  56380. }
  56381. }
  56382. if((id = GetNearbyVehicle(playerid)) != INVALID_VEHICLE_ID)
  56383. {
  56384. if(!VehicleInfo[id][vLocked])
  56385. {
  56386. VehicleInfo[id][vLocked] = 1;
  56387. GameTextForPlayer(playerid, "~r~Vehicle locked", 3000, 6);
  56388. }
  56389. else
  56390. {
  56391. VehicleInfo[id][vLocked] = 0;
  56392. GameTextForPlayer(playerid, "~g~Vehicle unlocked", 3000, 6);
  56393. }
  56394. SetVehicleParams(id, VEHICLE_DOORS, VehicleInfo[id][vLocked]);
  56395. PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  56396. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET locked = %i WHERE id = %i", VehicleInfo[id][vLocked], VehicleInfo[id][vID]);
  56397. mysql_tquery(connectionID, queryBuffer);
  56398. return 1;
  56399. }
  56400. else if((id = GetNearbyHouseEx(playerid)) >= 0)
  56401. {
  56402. if(!HouseInfo[id][hLocked])
  56403. {
  56404. HouseInfo[id][hLocked] = 1;
  56405. GameTextForPlayer(playerid, "~r~House locked", 3000, 6);
  56406. }
  56407. else
  56408. {
  56409. HouseInfo[id][hLocked] = 0;
  56410. GameTextForPlayer(playerid, "~g~House unlocked", 3000, 6);
  56411. }
  56412. PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  56413. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET locked = %i WHERE id = %i", HouseInfo[id][hLocked], HouseInfo[id][hID]);
  56414. mysql_tquery(connectionID, queryBuffer);
  56415. return 1;
  56416. }
  56417. else if((id = GetNearbyGarageEx(playerid)) >= 0)
  56418. {
  56419. if(!GarageInfo[id][gLocked])
  56420. {
  56421. GarageInfo[id][gLocked] = 1;
  56422. GameTextForPlayer(playerid, "~r~Garage locked", 3000, 6);
  56423. }
  56424. else
  56425. {
  56426. GarageInfo[id][gLocked] = 0;
  56427. GameTextForPlayer(playerid, "~g~Garage unlocked", 3000, 6);
  56428. }
  56429. PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  56430. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE garages SET locked = %i WHERE id = %i", GarageInfo[id][gLocked], GarageInfo[id][gID]);
  56431. mysql_tquery(connectionID, queryBuffer);
  56432. return 1;
  56433. }
  56434. else if((id = GetNearbyBusinessEx(playerid)) >= 0)
  56435. {
  56436. if(!BusinessInfo[id][bLocked])
  56437. {
  56438. BusinessInfo[id][bLocked] = 1;
  56439. GameTextForPlayer(playerid, "~r~Business locked", 3000, 6);
  56440. }
  56441. else
  56442. {
  56443. BusinessInfo[id][bLocked] = 0;
  56444. GameTextForPlayer(playerid, "~g~Business unlocked", 3000, 6);
  56445. }
  56446. PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  56447. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET locked = %i WHERE id = %i", BusinessInfo[id][bLocked], BusinessInfo[id][bID]);
  56448. mysql_tquery(connectionID, queryBuffer);
  56449. return 1;
  56450. }
  56451. else if((id = GetNearbyEntranceEx(playerid)) >= 0)
  56452. {
  56453. if(!EntranceInfo[id][eLocked])
  56454. {
  56455. EntranceInfo[id][eLocked] = 1;
  56456. GameTextForPlayer(playerid, "~r~Entrance locked", 3000, 6);
  56457. }
  56458. else
  56459. {
  56460. EntranceInfo[id][eLocked] = 0;
  56461. GameTextForPlayer(playerid, "~g~Entrance unlocked", 3000, 6);
  56462. }
  56463. PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  56464. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET locked = %i WHERE id = %i", EntranceInfo[id][eLocked], EntranceInfo[id][eID]);
  56465. mysql_tquery(connectionID, queryBuffer);
  56466. return 1;
  56467. }
  56468. SendClientMessage(playerid, COLOR_GREY, "You are not close to anything which you can lock.");
  56469. return 1;
  56470. }
  56471. CMD:househelp(playerid, params[])
  56472. {
  56473. SendClientMessage(playerid, COLOR_GREEN, "_______________________________________");
  56474. SendClientMessage(playerid, COLOR_WHITE, "** HOUSE HELP ** type a command for more information.");
  56475. SendClientMessage(playerid, COLOR_GREY, "** HOUSE ** /buyhouse /lock /stash /furniture /upgradehouse /sellhouse /sellmyhouse");
  56476. SendClientMessage(playerid, COLOR_GREY, "** HOUSE ** /door /renthouse /unrent /setrent /tenants /evict /evictall /houseinfo");
  56477. SendClientMessage(playerid, COLOR_GREY, "** HOUSE ** /houseinvite /hlights /installhousealarm (/iha), /uninstallhousealarm (/uha)");
  56478. return 1;
  56479. }
  56480. CMD:stash(playerid, params[])
  56481. {
  56482. new houseid;
  56483. if((houseid = GetInsideHouse(playerid)) >= 0 && IsHouseOwner(playerid, houseid))
  56484. {
  56485. new option[14], param[32];
  56486. if(!HouseInfo[houseid][hLevel])
  56487. {
  56488. return SendClientMessage(playerid, COLOR_GREY, "This house has no stash upgrade. '/upgradehouse level' to purchase one.");
  56489. }
  56490. if(sscanf(params, "s[14]S()[32]", option, param))
  56491. {
  56492. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /stash [balance | deposit | withdraw]");
  56493. }
  56494. if(PlayerData[playerid][pAdminDuty])
  56495. {
  56496. return SendClientMessage(playerid, COLOR_GREY, "You cannot use this command while on admin duty");
  56497. }
  56498. if(!strcmp(option, "balance", true))
  56499. {
  56500. new count;
  56501. for(new i = 0; i < 10; i ++)
  56502. {
  56503. if(HouseInfo[houseid][hWeapons][i])
  56504. {
  56505. count++;
  56506. }
  56507. }
  56508. SendClientMessage(playerid, COLOR_NAVYBLUE, "______ Stash Balance ______");
  56509. SendClientMessageEx(playerid, COLOR_GREY2, "Cash: $%i/$%i", HouseInfo[houseid][hCash], GetHouseStashCapacity(houseid, STASH_CAPACITY_CASH));
  56510. SendClientMessageEx(playerid, COLOR_GREY2, "Materials: %i/%i | Weapons: %i/%i", HouseInfo[houseid][hMaterials], GetHouseStashCapacity(houseid, STASH_CAPACITY_MATERIALS), count, GetHouseStashCapacity(houseid, STASH_CAPACITY_WEAPONS));
  56511. SendClientMessageEx(playerid, COLOR_GREY2, "Weed: %i/%i grams | Cocaine: %i/%i grams", HouseInfo[houseid][hWeed], GetHouseStashCapacity(houseid, STASH_CAPACITY_WEED), HouseInfo[houseid][hCocaine], GetHouseStashCapacity(houseid, STASH_CAPACITY_COCAINE));
  56512. SendClientMessageEx(playerid, COLOR_GREY2, "Meth: %i/%i grams | Painkillers: %i/%i pills", HouseInfo[houseid][hMeth], GetHouseStashCapacity(houseid, STASH_CAPACITY_METH), HouseInfo[houseid][hPainkillers], GetHouseStashCapacity(houseid, STASH_CAPACITY_PAINKILLERS));
  56513. if(count > 0)
  56514. {
  56515. SendClientMessage(playerid, COLOR_NAVYBLUE, "______ Stash Weapons ______");
  56516. for(new i = 0; i < 10; i ++)
  56517. {
  56518. if(HouseInfo[houseid][hWeapons][i])
  56519. {
  56520. SendClientMessageEx(playerid, COLOR_GREY2, "[%i] Weapon: %s", i + 1, GetWeaponNameEx(HouseInfo[houseid][hWeapons][i]));
  56521. }
  56522. }
  56523. }
  56524. }
  56525. else if(!strcmp(option, "deposit", true))
  56526. {
  56527. new value;
  56528. if(sscanf(param, "s[14]S()[32]", option, param))
  56529. {
  56530. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /stash [deposit] [option]");
  56531. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Cash, Materials, Weed, Cocaine, Meth, Painkillers, Weapon");
  56532. return 1;
  56533. }
  56534. if(!strcmp(option, "cash", true))
  56535. {
  56536. if(sscanf(param, "i", value))
  56537. {
  56538. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /stash [deposit] [cash] [amount]");
  56539. }
  56540. if(value < 1 || value > PlayerData[playerid][pCash])
  56541. {
  56542. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  56543. }
  56544. if(GetHouseStashCapacity(houseid, STASH_CAPACITY_CASH) < HouseInfo[houseid][hCash] + value)
  56545. {
  56546. return SendClientMessageEx(playerid, COLOR_GREY, "Your stash can only hold up to %s at your house's level.", FormatNumber(GetHouseStashCapacity(houseid, STASH_CAPACITY_CASH)));
  56547. }
  56548. GivePlayerCash(playerid, -value);
  56549. HouseInfo[houseid][hCash] += value;
  56550. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET cash = %i WHERE id = %i", HouseInfo[houseid][hCash], HouseInfo[houseid][hID]);
  56551. mysql_tquery(connectionID, queryBuffer);
  56552. SendClientMessageEx(playerid, COLOR_AQUA, "* You have stored %s in your house stash.", FormatNumber(value));
  56553. }
  56554. else if(!strcmp(option, "materials", true))
  56555. {
  56556. if(sscanf(param, "i", value))
  56557. {
  56558. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /stash [deposit] [materials] [amount]");
  56559. }
  56560. if(value < 1 || value > PlayerData[playerid][pMaterials])
  56561. {
  56562. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  56563. }
  56564. if(GetHouseStashCapacity(houseid, STASH_CAPACITY_MATERIALS) < HouseInfo[houseid][hMaterials] + value)
  56565. {
  56566. return SendClientMessageEx(playerid, COLOR_GREY, "Your stash can only hold up to %i materials at your house's level.", GetHouseStashCapacity(houseid, STASH_CAPACITY_MATERIALS));
  56567. }
  56568. PlayerData[playerid][pMaterials] -= value;
  56569. HouseInfo[houseid][hMaterials] += value;
  56570. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET materials = %i WHERE id = %i", HouseInfo[houseid][hMaterials], HouseInfo[houseid][hID]);
  56571. mysql_tquery(connectionID, queryBuffer);
  56572. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET materials = %i WHERE uid = %i", PlayerData[playerid][pMaterials], PlayerData[playerid][pID]);
  56573. mysql_tquery(connectionID, queryBuffer);
  56574. SendClientMessageEx(playerid, COLOR_AQUA, "* You have stored %i materials in your house stash.", value);
  56575. }
  56576. else if(!strcmp(option, "weed", true))
  56577. {
  56578. if(sscanf(param, "i", value))
  56579. {
  56580. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /stash [deposit] [weed] [amount]");
  56581. }
  56582. if(value < 1 || value > PlayerData[playerid][pWeed])
  56583. {
  56584. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  56585. }
  56586. if(GetHouseStashCapacity(houseid, STASH_CAPACITY_WEED) < HouseInfo[houseid][hWeed] + value)
  56587. {
  56588. return SendClientMessageEx(playerid, COLOR_GREY, "Your stash can only hold up to %i grams of weed at your house's level.", GetHouseStashCapacity(houseid, STASH_CAPACITY_WEED));
  56589. }
  56590. PlayerData[playerid][pWeed] -= value;
  56591. HouseInfo[houseid][hWeed] += value;
  56592. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET weed = %i WHERE id = %i", HouseInfo[houseid][hWeed], HouseInfo[houseid][hID]);
  56593. mysql_tquery(connectionID, queryBuffer);
  56594. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET weed = %i WHERE uid = %i", PlayerData[playerid][pWeed], PlayerData[playerid][pID]);
  56595. mysql_tquery(connectionID, queryBuffer);
  56596. SendClientMessageEx(playerid, COLOR_AQUA, "* You have stored %ig of weed in your house stash.", value);
  56597. }
  56598. else if(!strcmp(option, "cocaine", true))
  56599. {
  56600. if(sscanf(param, "i", value))
  56601. {
  56602. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /stash [deposit] [cocaine] [amount]");
  56603. }
  56604. if(value < 1 || value > PlayerData[playerid][pCocaine])
  56605. {
  56606. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  56607. }
  56608. if(GetHouseStashCapacity(houseid, STASH_CAPACITY_COCAINE) < HouseInfo[houseid][hCocaine] + value)
  56609. {
  56610. return SendClientMessageEx(playerid, COLOR_GREY, "Your stash can only hold up to %i grams of cocaine at your house's level.", GetHouseStashCapacity(houseid, STASH_CAPACITY_COCAINE));
  56611. }
  56612. PlayerData[playerid][pCocaine] -= value;
  56613. HouseInfo[houseid][hCocaine] += value;
  56614. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET cocaine = %i WHERE id = %i", HouseInfo[houseid][hCocaine], HouseInfo[houseid][hID]);
  56615. mysql_tquery(connectionID, queryBuffer);
  56616. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET cocaine = %i WHERE uid = %i", PlayerData[playerid][pCocaine], PlayerData[playerid][pID]);
  56617. mysql_tquery(connectionID, queryBuffer);
  56618. SendClientMessageEx(playerid, COLOR_AQUA, "* You have stored %ig of cocaine in your house stash.", value);
  56619. }
  56620. else if(!strcmp(option, "meth", true))
  56621. {
  56622. if(sscanf(param, "i", value))
  56623. {
  56624. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /stash [deposit] [meth] [amount]");
  56625. }
  56626. if(value < 1 || value > PlayerData[playerid][pMeth])
  56627. {
  56628. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  56629. }
  56630. if(GetHouseStashCapacity(houseid, STASH_CAPACITY_METH) < HouseInfo[houseid][hMeth] + value)
  56631. {
  56632. return SendClientMessageEx(playerid, COLOR_GREY, "Your stash can only hold up to %i grams of meth at your house's level.", GetHouseStashCapacity(houseid, STASH_CAPACITY_METH));
  56633. }
  56634. PlayerData[playerid][pMeth] -= value;
  56635. HouseInfo[houseid][hMeth] += value;
  56636. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET meth = %i WHERE id = %i", HouseInfo[houseid][hMeth], HouseInfo[houseid][hID]);
  56637. mysql_tquery(connectionID, queryBuffer);
  56638. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET meth = %i WHERE uid = %i", PlayerData[playerid][pMeth], PlayerData[playerid][pID]);
  56639. mysql_tquery(connectionID, queryBuffer);
  56640. SendClientMessageEx(playerid, COLOR_AQUA, "* You have stored %ig of meth in your house stash.", value);
  56641. }
  56642. else if(!strcmp(option, "painkillers", true))
  56643. {
  56644. if(sscanf(param, "i", value))
  56645. {
  56646. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /stash [deposit] [painkillers] [amount]");
  56647. }
  56648. if(value < 1 || value > PlayerData[playerid][pPainkillers])
  56649. {
  56650. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  56651. }
  56652. if(GetHouseStashCapacity(houseid, STASH_CAPACITY_PAINKILLERS) < HouseInfo[houseid][hPainkillers] + value)
  56653. {
  56654. return SendClientMessageEx(playerid, COLOR_GREY, "Your stash can only hold up to %i painkillers at your house's level.", GetHouseStashCapacity(houseid, STASH_CAPACITY_PAINKILLERS));
  56655. }
  56656. PlayerData[playerid][pPainkillers] -= value;
  56657. HouseInfo[houseid][hPainkillers] += value;
  56658. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET painkillers = %i WHERE id = %i", HouseInfo[houseid][hPainkillers], HouseInfo[houseid][hID]);
  56659. mysql_tquery(connectionID, queryBuffer);
  56660. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET painkillers = %i WHERE uid = %i", PlayerData[playerid][pPainkillers], PlayerData[playerid][pID]);
  56661. mysql_tquery(connectionID, queryBuffer);
  56662. SendClientMessageEx(playerid, COLOR_AQUA, "* You have stored %i painkillers in your house stash.", value);
  56663. }
  56664. else if(!strcmp(option, "weapon", true))
  56665. {
  56666. new weaponid;
  56667. if(sscanf(param, "i", weaponid))
  56668. {
  56669. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /stash [deposit] [weapon] [weaponid] (/guninv for weapon IDs)");
  56670. }
  56671. if(!(1 <= weaponid <= 46) || PlayerData[playerid][pWeapons][weaponSlotIDs[weaponid]] != weaponid)
  56672. {
  56673. return SendClientMessage(playerid, COLOR_GREY, "You don't have that weapon. /guninv for a list of your weapons.");
  56674. }
  56675. if(IsLawEnforcement(playerid))
  56676. {
  56677. return SendClientMessage(playerid, COLOR_GREY, "Law enforcement is prohibited from storing weapons.");
  56678. }
  56679. if(GetPlayerHealthEx(playerid) < 60)
  56680. {
  56681. return SendClientMessage(playerid, COLOR_GREY, "You can't store weapons as your health is below 60.");
  56682. }
  56683. for(new i = 0; i < GetHouseStashCapacity(houseid, STASH_CAPACITY_WEAPONS); i ++)
  56684. {
  56685. if(!HouseInfo[houseid][hWeapons][i])
  56686. {
  56687. HouseInfo[houseid][hWeapons][i] = weaponid;
  56688. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET weapon_%i = %i WHERE id = %i", i + 1, HouseInfo[houseid][hWeapons][i], HouseInfo[houseid][hID]);
  56689. mysql_tquery(connectionID, queryBuffer);
  56690. RemovePlayerWeapon(playerid, weaponid);
  56691. SendClientMessageEx(playerid, COLOR_AQUA, "* You have stored a %s in slot %i of your house stash.", GetWeaponNameEx(HouseInfo[houseid][hWeapons][i]), i + 1);
  56692. return 1;
  56693. }
  56694. }
  56695. SendClientMessage(playerid, COLOR_GREY, "Your house stash has no more slots available for weapons.");
  56696. }
  56697. }
  56698. else if(!strcmp(option, "withdraw", true))
  56699. {
  56700. new value;
  56701. if(sscanf(param, "s[14]S()[32]", option, param))
  56702. {
  56703. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /stash [withdraw] [option]");
  56704. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Cash, Weed, Cocaine, Meth, Painkillers, Weapon");
  56705. return 1;
  56706. }
  56707. if(!strcmp(option, "cash", true))
  56708. {
  56709. if(sscanf(param, "i", value))
  56710. {
  56711. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /stash [withdraw] [cash] [amount]");
  56712. }
  56713. if(value < 1 || value > HouseInfo[houseid][hCash])
  56714. {
  56715. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  56716. }
  56717. GivePlayerCash(playerid, value);
  56718. HouseInfo[houseid][hCash] -= value;
  56719. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET cash = %i WHERE id = %i", HouseInfo[houseid][hCash], HouseInfo[houseid][hID]);
  56720. mysql_tquery(connectionID, queryBuffer);
  56721. SendClientMessageEx(playerid, COLOR_AQUA, "* You have taken %s from your house stash.", FormatNumber(value));
  56722. }
  56723. else if(!strcmp(option, "materials", true))
  56724. {
  56725. if(sscanf(param, "i", value))
  56726. {
  56727. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /stash [withdraw] [materials] [amount]");
  56728. }
  56729. if(value < 1 || value > HouseInfo[houseid][hMaterials])
  56730. {
  56731. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  56732. }
  56733. if(PlayerData[playerid][pMaterials] + value > GetPlayerCapacity(playerid, CAPACITY_MATERIALS))
  56734. {
  56735. return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i materials. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pMaterials], GetPlayerCapacity(playerid, CAPACITY_MATERIALS));
  56736. }
  56737. PlayerData[playerid][pMaterials] += value;
  56738. HouseInfo[houseid][hMaterials] -= value;
  56739. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET materials = %i WHERE id = %i", HouseInfo[houseid][hMaterials], HouseInfo[houseid][hID]);
  56740. mysql_tquery(connectionID, queryBuffer);
  56741. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET materials = %i WHERE uid = %i", PlayerData[playerid][pMaterials], PlayerData[playerid][pID]);
  56742. mysql_tquery(connectionID, queryBuffer);
  56743. SendClientMessageEx(playerid, COLOR_AQUA, "* You have taken %i materials from your house stash.", value);
  56744. }
  56745. else if(!strcmp(option, "weed", true))
  56746. {
  56747. if(sscanf(param, "i", value))
  56748. {
  56749. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /stash [withdraw] [weed] [amount]");
  56750. }
  56751. if(value < 1 || value > HouseInfo[houseid][hWeed])
  56752. {
  56753. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  56754. }
  56755. if(PlayerData[playerid][pWeed] + value > GetPlayerCapacity(playerid, CAPACITY_WEED))
  56756. {
  56757. return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i weed. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pWeed], GetPlayerCapacity(playerid, CAPACITY_WEED));
  56758. }
  56759. PlayerData[playerid][pWeed] += value;
  56760. HouseInfo[houseid][hWeed] -= value;
  56761. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET weed = %i WHERE id = %i", HouseInfo[houseid][hWeed], HouseInfo[houseid][hID]);
  56762. mysql_tquery(connectionID, queryBuffer);
  56763. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET weed = %i WHERE uid = %i", PlayerData[playerid][pWeed], PlayerData[playerid][pID]);
  56764. mysql_tquery(connectionID, queryBuffer);
  56765. SendClientMessageEx(playerid, COLOR_AQUA, "* You have taken %ig of weed from your house stash.", value);
  56766. }
  56767. else if(!strcmp(option, "cocaine", true))
  56768. {
  56769. if(sscanf(param, "i", value))
  56770. {
  56771. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /stash [withdraw] [cocaine] [amount]");
  56772. }
  56773. if(value < 1 || value > HouseInfo[houseid][hCocaine])
  56774. {
  56775. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  56776. }
  56777. if(PlayerData[playerid][pCocaine] + value > GetPlayerCapacity(playerid, CAPACITY_COCAINE))
  56778. {
  56779. return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i cocaine. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pCocaine], GetPlayerCapacity(playerid, CAPACITY_COCAINE));
  56780. }
  56781. PlayerData[playerid][pCocaine] += value;
  56782. HouseInfo[houseid][hCocaine] -= value;
  56783. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET cocaine = %i WHERE id = %i", HouseInfo[houseid][hCocaine], HouseInfo[houseid][hID]);
  56784. mysql_tquery(connectionID, queryBuffer);
  56785. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET cocaine = %i WHERE uid = %i", PlayerData[playerid][pCocaine], PlayerData[playerid][pID]);
  56786. mysql_tquery(connectionID, queryBuffer);
  56787. SendClientMessageEx(playerid, COLOR_AQUA, "* You have taken %ig of cocaine from your house stash.", value);
  56788. }
  56789. else if(!strcmp(option, "meth", true))
  56790. {
  56791. if(sscanf(param, "i", value))
  56792. {
  56793. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /stash [withdraw] [meth] [amount]");
  56794. }
  56795. if(value < 1 || value > HouseInfo[houseid][hMeth])
  56796. {
  56797. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  56798. }
  56799. if(PlayerData[playerid][pMeth] + value > GetPlayerCapacity(playerid, CAPACITY_METH))
  56800. {
  56801. return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i meth. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pMeth], GetPlayerCapacity(playerid, CAPACITY_METH));
  56802. }
  56803. PlayerData[playerid][pMeth] += value;
  56804. HouseInfo[houseid][hMeth] -= value;
  56805. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET meth = %i WHERE id = %i", HouseInfo[houseid][hMeth], HouseInfo[houseid][hID]);
  56806. mysql_tquery(connectionID, queryBuffer);
  56807. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET meth = %i WHERE uid = %i", PlayerData[playerid][pMeth], PlayerData[playerid][pID]);
  56808. mysql_tquery(connectionID, queryBuffer);
  56809. SendClientMessageEx(playerid, COLOR_AQUA, "* You have taken %ig of meth from your house stash.", value);
  56810. }
  56811. else if(!strcmp(option, "painkillers", true))
  56812. {
  56813. if(sscanf(param, "i", value))
  56814. {
  56815. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /stash [withdraw] [painkillers] [amount]");
  56816. }
  56817. if(value < 1 || value > HouseInfo[houseid][hPainkillers])
  56818. {
  56819. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  56820. }
  56821. if(PlayerData[playerid][pPainkillers] + value > GetPlayerCapacity(playerid, CAPACITY_PAINKILLERS))
  56822. {
  56823. return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i painkillers. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pPainkillers], GetPlayerCapacity(playerid, CAPACITY_PAINKILLERS));
  56824. }
  56825. PlayerData[playerid][pPainkillers] += value;
  56826. HouseInfo[houseid][hPainkillers] -= value;
  56827. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET painkillers = %i WHERE id = %i", HouseInfo[houseid][hPainkillers], HouseInfo[houseid][hID]);
  56828. mysql_tquery(connectionID, queryBuffer);
  56829. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET painkillers = %i WHERE uid = %i", PlayerData[playerid][pPainkillers], PlayerData[playerid][pID]);
  56830. mysql_tquery(connectionID, queryBuffer);
  56831. SendClientMessageEx(playerid, COLOR_AQUA, "* You have taken %i painkillers from your house stash.", value);
  56832. }
  56833. else if(!strcmp(option, "weapon", true))
  56834. {
  56835. new slots = GetHouseStashCapacity(houseid, STASH_CAPACITY_WEAPONS);
  56836. if(sscanf(param, "i", value))
  56837. {
  56838. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /stash [withdraw] [weapon] [slot (1-%i)]", slots);
  56839. }
  56840. if(value < 1 || value > slots)
  56841. {
  56842. return SendClientMessage(playerid, COLOR_GREY, "Invalid slot, or the slot specified is locked.");
  56843. }
  56844. if(!HouseInfo[houseid][hWeapons][value-1])
  56845. {
  56846. return SendClientMessage(playerid, COLOR_GREY, "The slot specified contains no weapon which you can take.");
  56847. }
  56848. if(PlayerData[playerid][pHours] < 2 || PlayerData[playerid][pWeaponRestricted] > 0)
  56849. {
  56850. return SendClientMessage(playerid, COLOR_GREY, "You are either weapon restricted or you played less than two playing hours.");
  56851. }
  56852. GivePlayerWeaponEx(playerid, HouseInfo[houseid][hWeapons][value-1]);
  56853. SendClientMessageEx(playerid, COLOR_AQUA, "* You have taken a %s from slot %i of your house stash.", GetWeaponNameEx(HouseInfo[houseid][hWeapons][value-1]), value);
  56854. HouseInfo[houseid][hWeapons][value-1] = 0;
  56855. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET weapon_%i = 0 WHERE id = %i", value, HouseInfo[houseid][hID]);
  56856. mysql_tquery(connectionID, queryBuffer);
  56857. }
  56858. }
  56859. }
  56860. else
  56861. {
  56862. SendClientMessage(playerid, COLOR_GREY, "You are not in range of any stash which you can use.");
  56863. }
  56864. return 1;
  56865. }
  56866. CMD:upgradehouse(playerid, params[])
  56867. {
  56868. new
  56869. houseid = GetNearbyHouseEx(playerid),
  56870. option[10],
  56871. param[12],
  56872. string[20];
  56873. if(houseid == -1 || !IsHouseOwner(playerid, houseid))
  56874. {
  56875. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any house of yours.");
  56876. }
  56877. if(sscanf(params, "s[10]S()[12]", option, param))
  56878. {
  56879. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /upgradehouse [level/interior]");
  56880. }
  56881. if(!strcmp(option, "level", true))
  56882. {
  56883. new cost = (HouseInfo[houseid][hLevel] * 25000) + 25000;
  56884. if(HouseInfo[houseid][hLevel] >= 5)
  56885. {
  56886. return SendClientMessage(playerid, COLOR_GREY, "Your house is already at the maximum level possible.");
  56887. }
  56888. if(isnull(param) || strcmp(param, "confirm", true) != 0)
  56889. {
  56890. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /upgradehouse [level] [confirm]");
  56891. SendClientMessageEx(playerid, COLOR_SYNTAX, "You are about to upgrade to level %i/5 which will cost you $%i.", HouseInfo[houseid][hLevel] + 1, cost);
  56892. return 1;
  56893. }
  56894. if(PlayerData[playerid][pCash] < cost)
  56895. {
  56896. return SendClientMessage(playerid, COLOR_GREY, "You don't have that much cash.");
  56897. }
  56898. HouseInfo[houseid][hLevel]++;
  56899. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET level = level + 1 WHERE id = %i", HouseInfo[houseid][hID]);
  56900. mysql_tquery(connectionID, queryBuffer);
  56901. format(string, sizeof(string), "~r~-$%i", cost);
  56902. GameTextForPlayer(playerid, string, 5000, 1);
  56903. GivePlayerCash(playerid, -cost);
  56904. ReloadHouse(houseid);
  56905. if(HouseInfo[houseid][hLevel] == 1)
  56906. {
  56907. SendClientMessageEx(playerid, COLOR_GREEN, "You have upgraded your house to level %i/5. You unlocked a stash for your house! (/stash)", HouseInfo[houseid][hLevel]);
  56908. }
  56909. else
  56910. {
  56911. SendClientMessageEx(playerid, COLOR_GREEN, "You have upgraded your house to level %i/5. Your stash capacity was increased.", HouseInfo[houseid][hLevel]);
  56912. }
  56913. SendClientMessageEx(playerid, COLOR_GREEN, "Your tenant and furniture capacity were also both increased to %i/%i.", GetHouseTenantCapacity(houseid), GetHouseFurnitureCapacity(houseid));
  56914. Log_Write("log_property", "%s (uid: %i) upgraded their house (id: %i) to level %i for $%i.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], HouseInfo[houseid][hID], HouseInfo[houseid][hLevel], cost);
  56915. }
  56916. else if(!strcmp(option, "interior", true))
  56917. {
  56918. static interiors[sizeof(houseInteriors) * 64];
  56919. if(isnull(interiors))
  56920. {
  56921. interiors = "#\tClass\tPrice";
  56922. for(new i = 0; i < sizeof(houseInteriors); i ++)
  56923. {
  56924. format(interiors, sizeof(interiors), "%s\n%i\t%s\t{00AA00}$%i{FFFFFF}", interiors, i + 1, houseInteriors[i][intClass], houseInteriors[i][intPrice]);
  56925. }
  56926. }
  56927. Dialog_Show(playerid, DIALOG_HOUSEINTERIORS, DIALOG_STYLE_TABLIST_HEADERS, "Choose an interior to preview.", interiors, "Preview", "Cancel");
  56928. }
  56929. return 1;
  56930. }
  56931. CMD:sellhouse(playerid, params[])
  56932. {
  56933. new houseid = GetNearbyHouseEx(playerid), targetid, amount;
  56934. if(houseid == -1 || !IsHouseOwner(playerid, houseid))
  56935. {
  56936. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any house of yours.");
  56937. }
  56938. if(sscanf(params, "ui", targetid, amount))
  56939. {
  56940. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sellhouse [playerid] [amount]");
  56941. }
  56942. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  56943. {
  56944. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  56945. }
  56946. if(targetid == playerid)
  56947. {
  56948. return SendClientMessage(playerid, COLOR_GREY, "You can't sell to yourself.");
  56949. }
  56950. if(amount < 1)
  56951. {
  56952. return SendClientMessage(playerid, COLOR_GREY, "You must specify an amount above zero.");
  56953. }
  56954. PlayerData[targetid][pHouseOffer] = playerid;
  56955. PlayerData[targetid][pHouseOffered] = houseid;
  56956. PlayerData[targetid][pHousePrice] = amount;
  56957. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered you their house for %s (/accept house).", GetRPName(playerid), FormatNumber(amount));
  56958. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered %s to buy your house for %s.", GetRPName(targetid), FormatNumber(amount));
  56959. return 1;
  56960. }
  56961. CMD:sellmyhouse(playerid, params[])
  56962. {
  56963. new houseid = GetNearbyHouseEx(playerid);
  56964. if(houseid == -1 || !IsHouseOwner(playerid, houseid))
  56965. {
  56966. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any house of yours.");
  56967. }
  56968. if(strcmp(params, "confirm", true) != 0)
  56969. {
  56970. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sellmyhouse [confirm]");
  56971. SendClientMessageEx(playerid, COLOR_SYNTAX, "This command sells your house back to the state. You will receive %s back.", FormatNumber(percent(HouseInfo[houseid][hPrice], 75)));
  56972. return 1;
  56973. }
  56974. SetHouseOwner(houseid, INVALID_PLAYER_ID);
  56975. GivePlayerCash(playerid, percent(HouseInfo[houseid][hPrice], 75));
  56976. SendClientMessageEx(playerid, COLOR_GREEN, "You have sold your house to the state and received %s back.", FormatNumber(percent(HouseInfo[houseid][hPrice], 75)));
  56977. Log_Write("log_property", "%s (uid: %i) sold their house (id: %i) to the state for $%i", GetPlayerNameEx(playerid), PlayerData[playerid][pID], HouseInfo[houseid][hID], percent(HouseInfo[houseid][hPrice], 75));
  56978. return 1;
  56979. }
  56980. CMD:houseinfo(playerid, params[])
  56981. {
  56982. new houseid = GetNearbyHouseEx(playerid);
  56983. if(houseid == -1 || !IsHouseOwner(playerid, houseid))
  56984. {
  56985. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any house of yours.");
  56986. }
  56987. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT (SELECT COUNT(*) FROM furniture WHERE houseid = %i) AS furnitureCount, (SELECT COUNT(*) FROM "#TABLE_USERS" WHERE rentinghouse = %i) AS tenantCount", HouseInfo[houseid][hID], HouseInfo[houseid][hID]);
  56988. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_HOUSE_INFORMATION, playerid);
  56989. return 1;
  56990. }
  56991. CMD:makeadmin(playerid, params[])
  56992. {
  56993. new targetid, level;
  56994. if(PlayerData[playerid][pAdmin] < MANAGEMENT && !PlayerData[playerid][pAdminPersonnel])
  56995. {
  56996. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  56997. }
  56998. if(sscanf(params, "ui", targetid, level))
  56999. {
  57000. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /makeadmin [playerid] [level]");
  57001. }
  57002. if(!IsPlayerConnected(targetid))
  57003. {
  57004. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  57005. }
  57006. if(!PlayerData[targetid][pLogged])
  57007. {
  57008. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet.");
  57009. }
  57010. if(!(0 <= level <= 10))
  57011. {
  57012. return SendClientMessage(playerid, COLOR_GREY, "Invalid level. Valid levels range from 0 to 10.");
  57013. }
  57014. if(PlayerData[playerid][pAdminPersonnel] && level > PlayerData[playerid][pAdmin])
  57015. {
  57016. return SendClientMessage(playerid, COLOR_GREY, "Level cannot be higher than your admin level.");
  57017. }
  57018. if(PlayerData[targetid][pAdmin] > PlayerData[playerid][pAdmin] && level < PlayerData[targetid][pAdmin])
  57019. {
  57020. return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be demoted.");
  57021. }
  57022. if(level <= 1 && PlayerData[targetid][pAdminDuty])
  57023. {
  57024. SetPlayerName(targetid, PlayerData[targetid][pUsername]);
  57025. PlayerData[targetid][pAdminDuty] = 0;
  57026. }
  57027. PlayerData[targetid][pAdmin] = level;
  57028. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has made %s a %s (%i).", GetRPName(playerid), GetRPName(targetid), GetAdminRank(targetid), level);
  57029. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET adminlevel = %i WHERE uid = %i", level, PlayerData[targetid][pID]);
  57030. mysql_tquery(connectionID, queryBuffer);
  57031. if(level == 0)
  57032. {
  57033. SendClientMessageEx(playerid, COLOR_AQUA, "You have removed %s's administrator powers.", GetRPName(targetid));
  57034. SendClientMessageEx(targetid, COLOR_AQUA, "%s has removed your administrator powers.", GetRPName(playerid));
  57035. PlayerData[playerid][pDeveloper] = 0;
  57036. PlayerData[playerid][pFactionMod] = 0;
  57037. PlayerData[playerid][pWebDev] = 0;
  57038. PlayerData[playerid][pBanAppealer] = 0;
  57039. PlayerData[playerid][pGangMod] = 0;
  57040. PlayerData[playerid][pHelperManager] = 0;
  57041. PlayerData[playerid][pDynamicAdmin] = 0;
  57042. PlayerData[playerid][pAdminPersonnel] = 0;
  57043. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET removeddate = '%s' scripter = 0, gangmod = 0, banappealer = 0, factionmod = 0, webdev = 0, helpermanager = 0, dynamicadmin = 0, adminpersonnel = 0 WHERE uid = %i", GetDate(), PlayerData[targetid][pID]);
  57044. mysql_tquery(connectionID, queryBuffer);
  57045. }
  57046. else
  57047. {
  57048. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET addeddate = '%s' WHERE uid = %i", GetDate(), PlayerData[playerid][pID]);
  57049. mysql_tquery(connectionID, queryBuffer);
  57050. SendClientMessageEx(playerid, COLOR_AQUA, "You have set %s's admin level to {FF6347}%s{33CCFF} (%i).", GetRPName(targetid), GetAdminRank(targetid), level);
  57051. SendClientMessageEx(targetid, COLOR_AQUA, "%s has set your admin level to {FF6347}%s{33CCFF} (%i).", GetRPName(playerid), GetAdminRank(targetid), level);
  57052. }
  57053. Log_Write("log_makeadmin", "%s (uid: %i) set %s's (uid: %i) admin level to %i", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], level);
  57054. return 1;
  57055. }
  57056. CMD:makehelper(playerid, params[])
  57057. {
  57058. new targetid, level;
  57059. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && PlayerData[playerid][pHelper] < 7 && !PlayerData[playerid][pHelperManager])
  57060. {
  57061. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  57062. }
  57063. if(sscanf(params, "ui", targetid, level))
  57064. {
  57065. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /makehelper [playerid] [level]");
  57066. }
  57067. if(!IsPlayerConnected(targetid))
  57068. {
  57069. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  57070. }
  57071. if(!PlayerData[targetid][pLogged])
  57072. {
  57073. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet.");
  57074. }
  57075. if(!(0 <= level <= 7))
  57076. {
  57077. return SendClientMessage(playerid, COLOR_GREY, "Invalid level. Valid levels range from 0 to 7.");
  57078. }
  57079. if((PlayerData[playerid][pAdmin] < GENERAL_MANAGER) && PlayerData[targetid][pHelper] > PlayerData[playerid][pHelper] && level < PlayerData[targetid][pHelper])
  57080. {
  57081. return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher helper level than you. They cannot be demoted.");
  57082. }
  57083. if(level == 0)
  57084. {
  57085. if(PlayerData[targetid][pAcceptedHelp])
  57086. {
  57087. callcmd::return(targetid, "\1");
  57088. }
  57089. }
  57090. SendStaffMessage(COLOR_LIGHTRED, "AdmCmd: %s has made %s a level %i helper.", GetRPName(playerid), GetRPName(targetid), level);
  57091. PlayerData[targetid][pHelper] = level;
  57092. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET helperlevel = %i WHERE uid = %i", level, PlayerData[targetid][pID]);
  57093. mysql_tquery(connectionID, queryBuffer);
  57094. SendClientMessageEx(playerid, COLOR_AQUA, "You have made %s a {00AA00}%s{33CCFF} (%i).", GetRPName(targetid), GetHelperRank(targetid), level);
  57095. SendClientMessageEx(targetid, COLOR_AQUA, "%s has made you a {00AA00}%s{33CCFF} (%i).", GetRPName(playerid), GetHelperRank(targetid), level);
  57096. Log_Write("log_makehelper", "%s (uid: %i) set %s's (uid: %i) helper level to %i", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], level);
  57097. return 1;
  57098. }
  57099. CMD:omakeadmin(playerid, params[])
  57100. {
  57101. new username[MAX_PLAYER_NAME], level;
  57102. if(PlayerData[playerid][pAdmin] < MANAGEMENT)
  57103. {
  57104. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  57105. }
  57106. if(sscanf(params, "s[24]i", username, level))
  57107. {
  57108. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /omakeadmin [username] [level]");
  57109. }
  57110. if(!(0 <= level <= 6))
  57111. {
  57112. return SendClientMessage(playerid, COLOR_GREY, "Invalid level. Valid levels range from 0 to 6.");
  57113. }
  57114. if(IsPlayerOnline(username))
  57115. {
  57116. return SendClientMessage(playerid, COLOR_GREY, "That player is already online and logged in. Use /makeadmin instead.");
  57117. }
  57118. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT adminlevel FROM "#TABLE_USERS" WHERE username = '%e'", username);
  57119. mysql_tquery(connectionID, queryBuffer, "OnAdminSetAdminLevel", "isi", playerid, username, level);
  57120. return 1;
  57121. }
  57122. CMD:omakehelper(playerid, params[])
  57123. {
  57124. new username[MAX_PLAYER_NAME], level;
  57125. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && PlayerData[playerid][pHelper] < 4 && !PlayerData[playerid][pHelperManager])
  57126. {
  57127. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  57128. }
  57129. if(sscanf(params, "s[24]i", username, level))
  57130. {
  57131. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /omakehelper [username] [level]");
  57132. }
  57133. if(!(0 <= level <= 4))
  57134. {
  57135. return SendClientMessage(playerid, COLOR_GREY, "Invalid level. Valid levels range from 0 to 4.");
  57136. }
  57137. if(IsPlayerOnline(username))
  57138. {
  57139. return SendClientMessage(playerid, COLOR_GREY, "That player is already online and logged in. Use /makehelper instead.");
  57140. }
  57141. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT helperlevel FROM "#TABLE_USERS" WHERE username = '%e'", username);
  57142. mysql_tquery(connectionID, queryBuffer, "OnAdminSetHelperLevel", "isi", playerid, username, level);
  57143. return 1;
  57144. }
  57145. CMD:olisthelpers(playerid, params[])
  57146. {
  57147. if(PlayerData[playerid][pAdmin] < GENERAL_MANAGER && PlayerData[playerid][pHelper] < 3 && !PlayerData[playerid][pHelperManager])
  57148. {
  57149. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  57150. }
  57151. mysql_tquery(connectionID, "SELECT username, lastlogin, helperlevel FROM "#TABLE_USERS" WHERE helperlevel > 0 ORDER BY lastlogin DESC", "OnQueryFinished", "ii", THREAD_LIST_HELPERS, playerid);
  57152. return 1;
  57153. }
  57154. CMD:ganglogs(playerid, params[])
  57155. {
  57156. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT id, date, description FROM `log_gang` WHERE id = %d LIMIT 15", PlayerData[playerid][pGang]);
  57157. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_GANGLOGS, playerid);
  57158. return 1;
  57159. }
  57160. CMD:oadmins(playerid, params[])
  57161. {
  57162. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pAdminPersonnel] && !PlayerData[playerid][pHumanResources])
  57163. {
  57164. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  57165. }
  57166. mysql_tquery(connectionID, "SELECT username, lastlogin, adminlevel FROM "#TABLE_USERS" WHERE adminlevel > 0 ORDER BY adminlevel DESC", "OnQueryFinished", "ii", THREAD_LIST_ADMINS, playerid);
  57167. return 1;
  57168. }
  57169. CMD:ovips(playerid, params[])
  57170. {
  57171. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pDynamicAdmin])
  57172. {
  57173. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  57174. }
  57175. mysql_tquery(connectionID, "SELECT username, lastlogin, vippackage, viptime FROM "#TABLE_USERS" WHERE vippackage > 0 ORDER BY vippackage DESC", "OnQueryFinished", "ii", THREAD_LIST_VIPS, playerid);
  57176. return 1;
  57177. }
  57178. CMD:sellinactive(playerid, params[])
  57179. {
  57180. new houses, garages, businesses;
  57181. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pDynamicAdmin])
  57182. {
  57183. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  57184. }
  57185. foreach(new i : House)
  57186. {
  57187. if(HouseInfo[i][hExists] && HouseInfo[i][hOwnerID] > 0 && (gettime() - HouseInfo[i][hTimestamp]) > 2592000)
  57188. {
  57189. SetHouseOwner(i, INVALID_PLAYER_ID);
  57190. houses++;
  57191. }
  57192. }
  57193. foreach(new i : Garage)
  57194. {
  57195. if(GarageInfo[i][gExists] && GarageInfo[i][gOwnerID] > 0 && (gettime() - GarageInfo[i][gTimestamp]) > 2592000)
  57196. {
  57197. SetGarageOwner(i, INVALID_PLAYER_ID);
  57198. garages++;
  57199. }
  57200. }
  57201. foreach(new i : Business)
  57202. {
  57203. if(BusinessInfo[i][bExists] && BusinessInfo[i][bOwnerID] > 0 && (gettime() - BusinessInfo[i][bTimestamp]) > 2592000)
  57204. {
  57205. SetBusinessOwner(i, INVALID_PLAYER_ID);
  57206. businesses++;
  57207. }
  57208. }
  57209. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has sold all inactive properties.", GetRPName(playerid));
  57210. SendClientMessageEx(playerid, COLOR_WHITE, "* You have sold %i inactive houses, %i inactive garages and %i inactive businesses.", houses, garages, businesses);
  57211. return 1;
  57212. }
  57213. CMD:inactivecheck(playerid, params[])
  57214. {
  57215. new houses, garages, businesses;
  57216. if(PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  57217. {
  57218. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  57219. }
  57220. foreach(new i : House) if(HouseInfo[i][hExists] && HouseInfo[i][hOwnerID] > 0 && (gettime() - HouseInfo[i][hTimestamp]) > 2592000)
  57221. houses++;
  57222. foreach(new i : Garage) if(GarageInfo[i][gExists] && GarageInfo[i][gOwnerID] > 0 && (gettime() - GarageInfo[i][gTimestamp]) > 2592000)
  57223. garages++;
  57224. foreach(new i : Business) if(BusinessInfo[i][bExists] && BusinessInfo[i][bOwnerID] > 0 && (gettime() - BusinessInfo[i][bTimestamp]) > 2592000)
  57225. businesses++;
  57226. SendClientMessageEx(playerid, COLOR_WHITE, "* There are currently %i inactive houses, %i inactive garages and %i inactive businesses.", houses, garages, businesses);
  57227. return 1;
  57228. }
  57229. CMD:setcooldown(playerid, params[])
  57230. {
  57231. new option[12], amount;
  57232. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && PlayerData[playerid][pGangMod] < 1)
  57233. {
  57234. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  57235. }
  57236. if(sscanf(params, "s[12]i", option, amount))
  57237. {
  57238. return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setcooldown [ganginvite] [minutes]");
  57239. }
  57240. if(!strcmp(option, "ganginvite", true))
  57241. {
  57242. if(-1 > amount > gacooldown)
  57243. {
  57244. return SendClientMessageEx(playerid, COLOR_GREY, "Amount must be above -1 and less then %i", gacooldown);
  57245. }
  57246. gacooldown = amount;
  57247. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the invite cooldown for gangs to %i.", GetRPName(playerid), amount);
  57248. }
  57249. return 1;
  57250. }
  57251. CMD:caplimit(playerid, params[])
  57252. {
  57253. new option[8], amount;
  57254. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && PlayerData[playerid][pGangMod] < 1)
  57255. {
  57256. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  57257. }
  57258. if(sscanf(params, "s[8]i", option, amount))
  57259. {
  57260. return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /caplimit [turfs/points] [amount]");
  57261. }
  57262. if(!strcmp(option, "turfs", true))
  57263. {
  57264. if(0 > amount > MAX_TURFS)
  57265. {
  57266. return SendClientMessageEx(playerid, COLOR_GREY, "Amount must be above 0 and less then %i.", MAX_TURFS);
  57267. }
  57268. MaxCapCount[0] = amount;
  57269. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the max active turf claim limit for gangs to %i.", GetRPName(playerid), amount);
  57270. }
  57271. if(!strcmp(option, "points", true))
  57272. {
  57273. if(0 > amount > MAX_POINTS)
  57274. {
  57275. return SendClientMessageEx(playerid, COLOR_GREY, "Amount must be above 0 and less then %i.", MAX_POINTS);
  57276. }
  57277. MaxCapCount[1] = amount;
  57278. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the max active point cap limit for gangs to %i.", GetRPName(playerid), amount);
  57279. }
  57280. SaveServerInfo();
  57281. return 1;
  57282. }
  57283. CMD:setmotd(playerid, params[])
  57284. {
  57285. if(PlayerData[playerid][pAdmin] < GENERAL_MANAGER && !PlayerData[playerid][pHelperManager] && PlayerData[playerid][pHelper] < 4)
  57286. {
  57287. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  57288. }
  57289. new option[8], newval[128];
  57290. if(sscanf(params, "s[8]s[128]", option, newval))
  57291. {
  57292. return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setmotd [admin/helper/global] [text ('none' to reset)]");
  57293. }
  57294. if(strfind(newval, "|") != -1)
  57295. {
  57296. return SendClientMessage(playerid, COLOR_GREY, "You may not include the '|' character in the MOTD.");
  57297. }
  57298. if(!strcmp(option, "global", true))
  57299. {
  57300. if(PlayerData[playerid][pAdmin] < GENERAL_MANAGER) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  57301. if(!strcmp(newval, "none", true))
  57302. {
  57303. gServerMOTD[0] = 0;
  57304. SendClientMessage(playerid, COLOR_WHITE, "* You have reset the Global MOTD text.");
  57305. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has reset the global MOTD.", GetRPName(playerid));
  57306. }
  57307. else
  57308. {
  57309. strcpy(gServerMOTD, newval, 128);
  57310. SendClientMessageEx(playerid, COLOR_WHITE, "* You have changed the Global MOTD text to '%s'.", gServerMOTD);
  57311. SendAdminMessage(COLOR_YELLOW, "AdmCmd: %s has set the global MOTD to '%s'", GetRPName(playerid), gServerMOTD);
  57312. }
  57313. }
  57314. if(!strcmp(option, "admin", true))
  57315. {
  57316. if(PlayerData[playerid][pAdmin] < GENERAL_MANAGER) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  57317. if(!strcmp(newval, "none", true))
  57318. {
  57319. adminMOTD[0] = 0;
  57320. SendClientMessage(playerid, COLOR_WHITE, "* You have reset the Admin MOTD text.");
  57321. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has reset the admin MOTD.", GetRPName(playerid));
  57322. }
  57323. else
  57324. {
  57325. strcpy(adminMOTD, newval, 128);
  57326. SendClientMessageEx(playerid, COLOR_WHITE, "* You have changed the Admin MOTD text to '%s'.", adminMOTD);
  57327. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the admin MOTD to '%s'", GetRPName(playerid), adminMOTD);
  57328. }
  57329. }
  57330. if(!strcmp(option, "helper", true))
  57331. {
  57332. if(!strcmp(newval, "none", true))
  57333. {
  57334. helperMOTD[0] = 0;
  57335. SendClientMessage(playerid, COLOR_WHITE, "* You have reset the Helper MOTD text.");
  57336. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has reset the helper MOTD.", GetRPName(playerid));
  57337. }
  57338. else
  57339. {
  57340. strcpy(helperMOTD, newval, 128);
  57341. SendClientMessageEx(playerid, COLOR_WHITE, "* You have changed the Helper MOTD text to '%s'.", helperMOTD);
  57342. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the helper MOTD to '%s'", GetRPName(playerid), helperMOTD);
  57343. }
  57344. }
  57345. SaveServerInfo();
  57346. return 1;
  57347. }
  57348. /*CMD:setmotd(playerid, params[])
  57349. {
  57350. if(PlayerData[playerid][pAdmin] < GENERAL_MANAGER && !PlayerData[playerid][pDeveloper])
  57351. {
  57352. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  57353. }
  57354. if(isnull(params))
  57355. {
  57356. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setmotd [text ('none' to reset)]");
  57357. }
  57358. if(strfind(params, "|") != -1)
  57359. {
  57360. return SendClientMessage(playerid, COLOR_GREY, "You may not include the '|' character in the MOTD.");
  57361. }
  57362. if(!strcmp(params, "none", true))
  57363. {
  57364. gServerMOTD[0] = 0;
  57365. SendClientMessage(playerid, COLOR_WHITE, "You have reset the MOTD text.");
  57366. }
  57367. else
  57368. {
  57369. strcpy(gServerMOTD, params, 128);
  57370. SendClientMessageEx(playerid, COLOR_WHITE, "You have changed the MOTD text to '%s'.", gServerMOTD);
  57371. }
  57372. SaveServerInfo();
  57373. return 1;
  57374. }*/
  57375. CMD:makeformeradmin(playerid, params[])
  57376. {
  57377. new targetid, status;
  57378. if(PlayerData[playerid][pAdmin] < MANAGEMENT && !PlayerData[playerid][pAdminPersonnel])
  57379. {
  57380. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  57381. }
  57382. if(sscanf(params, "ui", targetid, status) || !(0 <= status <= 1))
  57383. {
  57384. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /makeformeradmin [playerid] [status (0/1)]");
  57385. return 1;
  57386. }
  57387. PlayerData[targetid][pFormerAdmin] = status;
  57388. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET FormerAdmin = %i WHERE uid = %i", PlayerData[targetid][pFormerAdmin], PlayerData[targetid][pID]);
  57389. mysql_tquery(connectionID, queryBuffer);
  57390. if(status)
  57391. {
  57392. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has made %s a Former Admin.", GetRPName(playerid), GetRPName(targetid));
  57393. Log_Write("log_admin", "%s (uid: %i) has made %s (uid: %i) a Former Admin.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  57394. SendClientMessageEx(playerid, COLOR_AQUA, "You have made %s a {FF6347}Former Admin{33CCFF}.", GetRPName(targetid));
  57395. SendClientMessageEx(targetid, COLOR_AQUA, "%s has made you a {FF6347}Former Admin{33CCFF}.", GetRPName(playerid));
  57396. }
  57397. else
  57398. {
  57399. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has removed %s's Former Admin status.", GetRPName(playerid), GetRPName(targetid));
  57400. Log_Write("log_admin", "%s (uid: %i) has removed %s's (uid: %i) Former Admin status.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  57401. SendClientMessageEx(playerid, COLOR_AQUA, "You have removed %s's {FF6347}Former Admin{33CCFF} status.", GetRPName(targetid));
  57402. SendClientMessageEx(targetid, COLOR_AQUA, "%s has removed your {FF6347}Former Admin{33CCFF} status.", GetRPName(playerid));
  57403. }
  57404. return 1;
  57405. }
  57406. CMD:setstaff(playerid, params[])
  57407. {
  57408. new targetid, option[16], status;
  57409. if(PlayerData[playerid][pAdmin] < MANAGEMENT && !PlayerData[playerid][pAdminPersonnel])
  57410. {
  57411. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  57412. }
  57413. if(sscanf(params, "us[16]i", targetid, option, status) || !(0 <= status <= 1))
  57414. {
  57415. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setstaff [playerid] [option] [status (0/1)]");
  57416. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: FactionMod, GangMod, BanAppealer, AdminPersonnel, PublicRelations, GameAffairs");
  57417. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: DynamicAdmin, Scripter, ComplaintMod, HumanResources, BusinessMod");
  57418. return 1;
  57419. }
  57420. if(!IsPlayerConnected(targetid))
  57421. {
  57422. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  57423. }
  57424. if(!PlayerData[targetid][pLogged])
  57425. {
  57426. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet.");
  57427. }
  57428. if(PlayerData[targetid][pAdmin] < 1)
  57429. {
  57430. return SendClientMessage(playerid, COLOR_GREY, "Target player must be an administrator!");
  57431. }
  57432. if(!strcmp(option, "businessmod", true))
  57433. {
  57434. PlayerData[targetid][pWebDev] = status;
  57435. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET webdev = %i WHERE uid = %i", PlayerData[targetid][pWebDev], PlayerData[targetid][pID]);
  57436. mysql_tquery(connectionID, queryBuffer);
  57437. if(status)
  57438. {
  57439. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has made %s a business moderator.", GetRPName(playerid), GetRPName(targetid));
  57440. Log_Write("log_admin", "%s (uid: %i) has made %s (uid: %i) a business moderator.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  57441. SendClientMessageEx(playerid, COLOR_AQUA, "You have made %s a {FF6347}business moderator{33CCFF}.", GetRPName(targetid));
  57442. SendClientMessageEx(targetid, COLOR_AQUA, "%s has made you a {FF6347}business moderator{33CCFF}.", GetRPName(playerid));
  57443. }
  57444. else
  57445. {
  57446. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has removed %s's business moderator status.", GetRPName(playerid), GetRPName(targetid));
  57447. Log_Write("log_admin", "%s (uid: %i) has removed %s's (uid: %i) business moderator status.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  57448. SendClientMessageEx(playerid, COLOR_AQUA, "You have removed %s's {FF6347}business moderator{33CCFF} status.", GetRPName(targetid));
  57449. SendClientMessageEx(targetid, COLOR_AQUA, "%s has removed your {FF6347}business moderator{33CCFF} status.", GetRPName(playerid));
  57450. }
  57451. }
  57452. if(!strcmp(option, "factionmod", true))
  57453. {
  57454. PlayerData[targetid][pFactionMod] = status;
  57455. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET factionmod = %i WHERE uid = %i", PlayerData[targetid][pFactionMod], PlayerData[targetid][pID]);
  57456. mysql_tquery(connectionID, queryBuffer);
  57457. if(status)
  57458. {
  57459. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has made %s a faction moderator.", GetRPName(playerid), GetRPName(targetid));
  57460. Log_Write("log_admin", "%s (uid: %i) has made %s (uid: %i) a faction moderator.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  57461. SendClientMessageEx(playerid, COLOR_AQUA, "You have made %s a {FF6347}faction moderator{33CCFF}.", GetRPName(targetid));
  57462. SendClientMessageEx(targetid, COLOR_AQUA, "%s has made you a {FF6347}faction moderator{33CCFF}.", GetRPName(playerid));
  57463. }
  57464. else
  57465. {
  57466. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has removed %s's faction moderator status.", GetRPName(playerid), GetRPName(targetid));
  57467. Log_Write("log_admin", "%s (uid: %i) has removed %s's (uid: %i) faction moderator status.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  57468. SendClientMessageEx(playerid, COLOR_AQUA, "You have removed %s's {FF6347}faction moderator{33CCFF} status.", GetRPName(targetid));
  57469. SendClientMessageEx(targetid, COLOR_AQUA, "%s has removed your {FF6347}faction moderator{33CCFF} status.", GetRPName(playerid));
  57470. }
  57471. }
  57472. else if(!strcmp(option, "gangmod", true))
  57473. {
  57474. PlayerData[targetid][pGangMod] = status;
  57475. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET gangmod = %i WHERE uid = %i", PlayerData[targetid][pGangMod], PlayerData[targetid][pID]);
  57476. mysql_tquery(connectionID, queryBuffer);
  57477. if(status)
  57478. {
  57479. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has made %s a gang moderator.", GetRPName(playerid), GetRPName(targetid));
  57480. Log_Write("log_admin", "%s (uid: %i) has made %s (uid: %i) a gang moderator.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  57481. SendClientMessageEx(playerid, COLOR_AQUA, "You have made %s a {FF6347}gang moderator{33CCFF}.", GetRPName(targetid));
  57482. SendClientMessageEx(targetid, COLOR_AQUA, "%s has made you a {FF6347}gang moderator{33CCFF}.", GetRPName(playerid));
  57483. }
  57484. else
  57485. {
  57486. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has removed %s's gang moderator status.", GetRPName(playerid), GetRPName(targetid));
  57487. Log_Write("log_admin", "%s (uid: %i) has removed %s's (uid: %i) gang moderator status.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  57488. SendClientMessageEx(playerid, COLOR_AQUA, "You have removed %s's {FF6347}gang moderator{33CCFF} status.", GetRPName(targetid));
  57489. SendClientMessageEx(targetid, COLOR_AQUA, "%s has removed your {FF6347}gang moderator{33CCFF} status.", GetRPName(playerid));
  57490. }
  57491. }
  57492. else if(!strcmp(option, "banappealer", true))
  57493. {
  57494. PlayerData[targetid][pBanAppealer] = status;
  57495. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET banappealer = %i WHERE uid = %i", PlayerData[targetid][pBanAppealer], PlayerData[targetid][pID]);
  57496. mysql_tquery(connectionID, queryBuffer);
  57497. if(status)
  57498. {
  57499. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has made %s a ban appealer.", GetRPName(playerid), GetRPName(targetid));
  57500. Log_Write("log_admin", "%s (uid: %i) has made %s (uid: %i) a ban appealer.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  57501. SendClientMessageEx(playerid, COLOR_AQUA, "You have made %s a {FF6347}ban appealer{33CCFF}.", GetRPName(targetid));
  57502. SendClientMessageEx(targetid, COLOR_AQUA, "%s has made you a {FF6347}ban appealer{33CCFF}.", GetRPName(playerid));
  57503. }
  57504. else
  57505. {
  57506. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has removed %s's ban appealer status.", GetRPName(playerid), GetRPName(targetid));
  57507. Log_Write("log_admin", "%s (uid: %i) has removed %s's (uid: %i) ban appealer status.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  57508. SendClientMessageEx(playerid, COLOR_AQUA, "You have removed %s's {FF6347}ban appealer{33CCFF} status.", GetRPName(targetid));
  57509. SendClientMessageEx(targetid, COLOR_AQUA, "%s has removed your {FF6347}ban appealer{33CCFF} status.", GetRPName(playerid));
  57510. }
  57511. }
  57512. else if(!strcmp(option, "scripter", true))
  57513. {
  57514. if(PlayerData[playerid][pAdmin] < MANAGEMENT) return SendClientMessage(playerid, COLOR_GREY, "You must be server management to set someone as a scripter.");
  57515. PlayerData[targetid][pDeveloper] = status;
  57516. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET scripter = %i WHERE uid = %i", PlayerData[targetid][pDeveloper], PlayerData[targetid][pID]);
  57517. mysql_tquery(connectionID, queryBuffer);
  57518. if(status)
  57519. {
  57520. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has made %s a developer.", GetRPName(playerid), GetRPName(targetid));
  57521. Log_Write("log_admin", "%s (uid: %i) has made %s (uid: %i) a developer.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  57522. SendClientMessageEx(playerid, COLOR_AQUA, "You have made %s a {FF6347}developer{33CCFF}.", GetRPName(targetid));
  57523. SendClientMessageEx(targetid, COLOR_AQUA, "%s has made you a {FF6347}developer{33CCFF}.", GetRPName(playerid));
  57524. }
  57525. else
  57526. {
  57527. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has removed %s's developer status.", GetRPName(playerid), GetRPName(targetid));
  57528. Log_Write("log_admin", "%s (uid: %i) has removed %s's (uid: %i) developer status.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  57529. SendClientMessageEx(playerid, COLOR_AQUA, "You have removed %s's {FF6347}developer{33CCFF} status.", GetRPName(targetid));
  57530. SendClientMessageEx(targetid, COLOR_AQUA, "%s has removed your {FF6347}developer{33CCFF} status.", GetRPName(playerid));
  57531. }
  57532. }
  57533. else if(!strcmp(option, "publicrelations", true))
  57534. {
  57535. PlayerData[targetid][pHelperManager] = status;
  57536. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET helpermanager = %i WHERE uid = %i", PlayerData[targetid][pHelperManager], PlayerData[targetid][pID]);
  57537. mysql_tquery(connectionID, queryBuffer);
  57538. if(status)
  57539. {
  57540. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has made %s a Public Relations.", GetRPName(playerid), GetRPName(targetid));
  57541. Log_Write("log_admin", "%s (uid: %i) has made %s (uid: %i) a Public Relations.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  57542. SendClientMessageEx(playerid, COLOR_AQUA, "You have made %s a {FF6347}Public Relations{33CCFF}.", GetRPName(targetid));
  57543. SendClientMessageEx(targetid, COLOR_AQUA, "%s has made you a {FF6347}Public Relations{33CCFF}.", GetRPName(playerid));
  57544. }
  57545. else
  57546. {
  57547. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has removed %s's Public Relations status.", GetRPName(playerid), GetRPName(targetid));
  57548. Log_Write("log_admin", "%s (uid: %i) has removed %s's (uid: %i) Public Relations status.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  57549. SendClientMessageEx(playerid, COLOR_AQUA, "You have removed %s's {FF6347}Public Relations{33CCFF} status.", GetRPName(targetid));
  57550. SendClientMessageEx(targetid, COLOR_AQUA, "%s has removed your {FF6347}PR{33CCFF} status.", GetRPName(playerid));
  57551. }
  57552. }
  57553. else if(!strcmp(option, "dynamicadmin", true))
  57554. {
  57555. PlayerData[targetid][pDynamicAdmin] = status;
  57556. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET dynamicadmin = %i WHERE uid = %i", PlayerData[targetid][pDynamicAdmin], PlayerData[targetid][pID]);
  57557. mysql_tquery(connectionID, queryBuffer);
  57558. if(status)
  57559. {
  57560. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has made %s a dynamic admin.", GetRPName(playerid), GetRPName(targetid));
  57561. Log_Write("log_admin", "%s (uid: %i) has made %s (uid: %i) a dynamic admin.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  57562. SendClientMessageEx(playerid, COLOR_AQUA, "You have made %s a {FF6347}dynamic admin{33CCFF}.", GetRPName(targetid));
  57563. SendClientMessageEx(targetid, COLOR_AQUA, "%s has made you a {FF6347}dynamic admin{33CCFF}.", GetRPName(playerid));
  57564. }
  57565. else
  57566. {
  57567. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has removed %s's dynamic admin status.", GetRPName(playerid), GetRPName(targetid));
  57568. Log_Write("log_admin", "%s (uid: %i) has removed %s's (uid: %i) dynamic admin status.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  57569. SendClientMessageEx(playerid, COLOR_AQUA, "You have removed %s's {FF6347}dynamic admin{33CCFF} status.", GetRPName(targetid));
  57570. SendClientMessageEx(targetid, COLOR_AQUA, "%s has removed your {FF6347}dynamic admin{33CCFF} status.", GetRPName(playerid));
  57571. }
  57572. }
  57573. else if(!strcmp(option, "adminpersonnel", true))
  57574. {
  57575. if(PlayerData[playerid][pAdmin] < MANAGEMENT) return SendClientMessage(playerid, COLOR_GREY, "You must be server management to set someone as AP.");
  57576. PlayerData[targetid][pAdminPersonnel] = status;
  57577. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET adminpersonnel = %i WHERE uid = %i", PlayerData[targetid][pAdminPersonnel], PlayerData[targetid][pID]);
  57578. mysql_tquery(connectionID, queryBuffer);
  57579. if(status)
  57580. {
  57581. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has made %s admin personnel.", GetRPName(playerid), GetRPName(targetid));
  57582. Log_Write("log_admin", "%s (uid: %i) has made %s (uid: %i) admin perosnnel.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  57583. SendClientMessageEx(playerid, COLOR_AQUA, "You have made %s {FF6347}admin personnel{33CCFF}.", GetRPName(targetid));
  57584. SendClientMessageEx(targetid, COLOR_AQUA, "%s has made you {FF6347}admin personnel{33CCFF}.", GetRPName(playerid));
  57585. }
  57586. else
  57587. {
  57588. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has removed %s's admin personnel status.", GetRPName(playerid), GetRPName(targetid));
  57589. Log_Write("log_admin", "%s (uid: %i) has removed %s's (uid: %i) admin personnel status.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  57590. SendClientMessageEx(playerid, COLOR_AQUA, "You have removed %s's {FF6347}admin personnel{33CCFF} status.", GetRPName(targetid));
  57591. SendClientMessageEx(targetid, COLOR_AQUA, "%s has removed your {FF6347}admin personnel{33CCFF} status.", GetRPName(playerid));
  57592. }
  57593. }
  57594. else if(!strcmp(option, "gameaffairs", true))
  57595. {
  57596. PlayerData[targetid][pGameAffairs] = status;
  57597. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET gameaffairs = %i WHERE uid = %i", PlayerData[targetid][pGameAffairs], PlayerData[targetid][pID]);
  57598. mysql_tquery(connectionID, queryBuffer);
  57599. if(status)
  57600. {
  57601. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has made %s a part of the department of game affairs.", GetRPName(playerid), GetRPName(targetid));
  57602. Log_Write("log_admin", "%s (uid: %i) has made %s (uid: %i) a part of the department of game affairs.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  57603. SendClientMessageEx(playerid, COLOR_AQUA, "You have made %s a part of the department of {FF6347}game affairs{33CCFF}.", GetRPName(targetid));
  57604. SendClientMessageEx(targetid, COLOR_AQUA, "%s has made you a part of the department of{FF6347}game affairs{33CCFF}.", GetRPName(playerid));
  57605. }
  57606. else
  57607. {
  57608. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has removed %s's game affairs status.", GetRPName(playerid), GetRPName(targetid));
  57609. Log_Write("log_admin", "%s (uid: %i) has removed %s's (uid: %i) game affairs status.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  57610. SendClientMessageEx(playerid, COLOR_AQUA, "You have removed %s's {FF6347}game affairs{33CCFF} status.", GetRPName(targetid));
  57611. SendClientMessageEx(targetid, COLOR_AQUA, "%s has removed your {FF6347}game affairs{33CCFF} status.", GetRPName(playerid));
  57612. }
  57613. }
  57614. else if(!strcmp(option, "humanresources", true))
  57615. {
  57616. PlayerData[targetid][pHumanResources] = status;
  57617. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET humanresources = %i WHERE uid = %i", PlayerData[targetid][pHumanResources], PlayerData[targetid][pID]);
  57618. mysql_tquery(connectionID, queryBuffer);
  57619. if(status)
  57620. {
  57621. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has made %s a part of the human resources.", GetRPName(playerid), GetRPName(targetid));
  57622. Log_Write("log_admin", "%s (uid: %i) has made %s (uid: %i) a part of the human resources.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  57623. SendClientMessageEx(playerid, COLOR_AQUA, "You have made %s a part of the {FF6347}human resources{33CCFF}.", GetRPName(targetid));
  57624. SendClientMessageEx(targetid, COLOR_AQUA, "%s has made you a part of the {FF6347}human resources{33CCFF}.", GetRPName(playerid));
  57625. }
  57626. else
  57627. {
  57628. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has removed %s's human resources status.", GetRPName(playerid), GetRPName(targetid));
  57629. Log_Write("log_admin", "%s (uid: %i) has removed %s's (uid: %i) human resources status.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  57630. SendClientMessageEx(playerid, COLOR_AQUA, "You have removed %s's {FF6347}human resources{33CCFF} status.", GetRPName(targetid));
  57631. SendClientMessageEx(targetid, COLOR_AQUA, "%s has removed your {FF6347}human resources{33CCFF} status.", GetRPName(playerid));
  57632. }
  57633. }
  57634. else if(!strcmp(option, "complaintmod", true))
  57635. {
  57636. PlayerData[targetid][pComplaintMod] = status;
  57637. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET complaintmod = %i WHERE uid = %i", PlayerData[targetid][pComplaintMod], PlayerData[targetid][pID]);
  57638. mysql_tquery(connectionID, queryBuffer);
  57639. if(status)
  57640. {
  57641. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has made %s a complaint moderator status.", GetRPName(playerid), GetRPName(targetid));
  57642. Log_Write("log_admin", "%s (uid: %i) has made %s (uid: %i) a complaint moderator status.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  57643. SendClientMessageEx(playerid, COLOR_AQUA, "You have made %s a {FF6347}complaint moderator{33CCFF} status.", GetRPName(targetid));
  57644. SendClientMessageEx(targetid, COLOR_AQUA, "%s has made you a {FF6347}complaint moderator{33CCFF} status.", GetRPName(playerid));
  57645. }
  57646. else
  57647. {
  57648. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has removed %s's complaint moderator.", GetRPName(playerid), GetRPName(targetid));
  57649. Log_Write("log_admin", "%s (uid: %i) has removed %s's (uid: %i) complaint moderator.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  57650. SendClientMessageEx(playerid, COLOR_AQUA, "You have removed %s's {FF6347}complaint moderator{33CCFF} status.", GetRPName(targetid));
  57651. SendClientMessageEx(targetid, COLOR_AQUA, "%s has removed your {FF6347}complaint moderator{33CCFF} status.", GetRPName(playerid));
  57652. }
  57653. }
  57654. return 1;
  57655. }
  57656. CMD:renamecmd(playerid, params[])
  57657. {
  57658. new cmd[64], newcmd[64];
  57659. if(PlayerData[playerid][pAdmin] < MANAGEMENT && !PlayerData[playerid][pDeveloper])
  57660. {
  57661. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  57662. }
  57663. if(sscanf(params, "s[64]s[64]", cmd, newcmd))
  57664. {
  57665. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /renamecmd [old] [new] (64 chars)");
  57666. }
  57667. if(PC_CommandExists(cmd))
  57668. {
  57669. PC_RenameCommand(cmd, newcmd);
  57670. SendClientMessageEx(playerid, COLOR_AQUA, "You've renamed command %s to %s.", cmd, newcmd);
  57671. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s renamed /%s to /%s", GetRPName(playerid), cmd, newcmd);
  57672. }
  57673. return 1;
  57674. }
  57675. CMD:createalias(playerid, params[])
  57676. {
  57677. new cmd[64], alias[64];
  57678. if(PlayerData[playerid][pAdmin] < MANAGEMENT && !PlayerData[playerid][pDeveloper])
  57679. {
  57680. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  57681. }
  57682. if(sscanf(params, "s[64]s[64]", cmd, alias))
  57683. {
  57684. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /createalias [cmd] [newcmd] (64 chars)");
  57685. }
  57686. if(PC_CommandExists(cmd))
  57687. {
  57688. PC_RegAlias(cmd, alias);
  57689. SendClientMessageEx(playerid, COLOR_AQUA, "You've created alias %s for %s.", alias, cmd);
  57690. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s created a alias for /%s (/%s)", GetRPName(playerid), cmd, alias);
  57691. }
  57692. return 1;
  57693. }
  57694. /*CMD:deletecmd(playerid, params[])
  57695. {
  57696. if(PlayerData[playerid][pAdmin] < MANAGEMENT && !PlayerData[playerid][pDeveloper])
  57697. {
  57698. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  57699. }
  57700. if(sscanf(param, "s[64]s[64]", oldcmd, "confirm"))
  57701. {
  57702. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /deletecmd [name] [confirm]");
  57703. }
  57704. if(PC_CommandExists(oldcmd))
  57705. {
  57706. PC_DeleteCommand(oldcmd);
  57707. }
  57708. }*/
  57709. CMD:changelist(playerid, params[])
  57710. {
  57711. new slot, option[10], param[64];
  57712. if(PlayerData[playerid][pAdmin] < GENERAL_MANAGER && !PlayerData[playerid][pDeveloper])
  57713. {
  57714. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  57715. }
  57716. if(sscanf(params, "s[10]S()[64]", option, param))
  57717. {
  57718. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /changelist [view | edit | clear]");
  57719. }
  57720. if(!strcmp(option, "view", true))
  57721. {
  57722. mysql_tquery(connectionID, "SELECT * FROM changes ORDER BY slot", "OnQueryFinished", "ii", THREAD_LIST_CHANGES, playerid);
  57723. }
  57724. else if(!strcmp(option, "edit", true))
  57725. {
  57726. if(sscanf(param, "is[64]", slot, param))
  57727. {
  57728. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /changelist [edit] [slot (1-10)] [text]");
  57729. }
  57730. if(!(1 <= slot <= 10))
  57731. {
  57732. return SendClientMessage(playerid, COLOR_GREY, "Invalid slot.");
  57733. }
  57734. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO changes VALUES(%i, '%e') ON DUPLICATE KEY UPDATE text = '%e'", slot, param, param);
  57735. mysql_tquery(connectionID, queryBuffer);
  57736. SendClientMessageEx(playerid, COLOR_AQUA, "* Change text for slot %i changed to '%s'.", slot, param);
  57737. }
  57738. else if(!strcmp(option, "clear", true))
  57739. {
  57740. if(sscanf(param, "i", slot))
  57741. {
  57742. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /changelist [clear] [slot (1-10)]");
  57743. }
  57744. if(!(1 <= slot <= 10))
  57745. {
  57746. return SendClientMessage(playerid, COLOR_GREY, "Invalid slot.");
  57747. }
  57748. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM changes WHERE slot = %i", slot);
  57749. mysql_tquery(connectionID, queryBuffer);
  57750. SendClientMessageEx(playerid, COLOR_AQUA, "* Change text for slot %i cleared.", slot);
  57751. }
  57752. return 1;
  57753. }
  57754. CMD:forceaduty(playerid, params[])
  57755. {
  57756. new targetid;
  57757. if(PlayerData[playerid][pAdmin] < GENERAL_MANAGER && !PlayerData[playerid][pAdminPersonnel])
  57758. {
  57759. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  57760. }
  57761. if(sscanf(params, "u", targetid))
  57762. {
  57763. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /forceaduty [playerid]");
  57764. }
  57765. if(!IsPlayerConnected(targetid))
  57766. {
  57767. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  57768. }
  57769. if(PlayerData[targetid][pAdmin] < LEVEL_TRIAL_ADMIN)
  57770. {
  57771. return SendClientMessage(playerid, COLOR_GREY, "That player needs to be at least a level 2 administrator.");
  57772. }
  57773. if(PlayerData[targetid][pAdmin] > PlayerData[playerid][pAdmin])
  57774. {
  57775. return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be forced into admin duty.");
  57776. }
  57777. if(!PlayerData[targetid][pAdminDuty])
  57778. {
  57779. SendClientMessageEx(targetid, COLOR_WHITE, "%s has forced you to be on admin duty.", GetRPName(playerid));
  57780. }
  57781. else
  57782. {
  57783. SendClientMessageEx(targetid, COLOR_WHITE, "%s has forced you to be off admin duty.", GetRPName(playerid));
  57784. }
  57785. callcmd::aduty(targetid, "\1");
  57786. return 1;
  57787. }
  57788. CMD:listhelp(playerid, params[])
  57789. {
  57790. if(PlayerData[playerid][pHelper] < 1)
  57791. {
  57792. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  57793. }
  57794. SendClientMessage(playerid, COLOR_NAVYBLUE, "_____ Help Requests _____");
  57795. foreach(new i : Player)
  57796. {
  57797. if(!isnull(PlayerData[i][pHelpRequest]))
  57798. {
  57799. SendClientMessageEx(playerid, COLOR_GREY2, "* %s[%i] asks: %s", GetRPName(i), i, PlayerData[i][pHelpRequest]);
  57800. }
  57801. }
  57802. SendClientMessage(playerid, COLOR_AQUA, "* Use /accepthelp [id] or /denyhelp [id] to handle help requests.");
  57803. SendClientMessage(playerid, COLOR_AQUA, "* Use /answerhelp [id] [msg] to PM an answer without the need to teleport.");
  57804. return 1;
  57805. }
  57806. CMD:accepthelp(playerid, params[])
  57807. {
  57808. new targetid;
  57809. if(PlayerData[playerid][pHelper] < 1)
  57810. {
  57811. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  57812. }
  57813. if(PlayerData[playerid][pPaintball] > 0)
  57814. {
  57815. return SendClientMessage(playerid, COLOR_GREY, "You need to leave the paintball arena first.");
  57816. }
  57817. if(sscanf(params, "u", targetid))
  57818. {
  57819. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /accepthelp [playerid]");
  57820. }
  57821. if(!IsPlayerConnected(targetid))
  57822. {
  57823. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  57824. }
  57825. if(isnull(PlayerData[targetid][pHelpRequest]))
  57826. {
  57827. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't requested any help since they connected.");
  57828. }
  57829. if(!PlayerData[playerid][pAcceptedHelp])
  57830. {
  57831. SavePlayerVariables(playerid);
  57832. }
  57833. TeleportToPlayer(playerid, targetid, false);
  57834. TogglePlayerControllable(targetid, 0);
  57835. SetTimerEx("UnfreezeNewbie", 5000, false, "i", targetid);
  57836. SetPlayerHealth(playerid, 32767);
  57837. //SetScriptArmour(playerid, 0.0);
  57838. PlayerData[playerid][pHelpRequests]++;
  57839. PlayerData[playerid][pAcceptedHelp] = 1;
  57840. PlayerData[targetid][pHelpRequest][0] = 0;
  57841. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET helprequests = %i WHERE uid = %i", PlayerData[playerid][pHelpRequests], PlayerData[playerid][pID]);
  57842. mysql_tquery(connectionID, queryBuffer);
  57843. SendHelperMessage(COLOR_LIGHTRED, "Helper: %s has accepted %s's help request.", GetRPName(playerid), GetRPName(targetid));
  57844. SendClientMessageEx(playerid, COLOR_WHITE, "You accepted %s's help request and were sent to their position. /return to go back.", GetRPName(targetid));
  57845. SendClientMessageEx(targetid, COLOR_GREEN, "%s has accepted your help request. They are now assisting you.", GetRPName(playerid));
  57846. return 1;
  57847. }
  57848. CMD:denyhelp(playerid, params[])
  57849. {
  57850. new targetid;
  57851. if(PlayerData[playerid][pHelper] < 1)
  57852. {
  57853. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  57854. }
  57855. if(sscanf(params, "u", targetid))
  57856. {
  57857. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /denyhelp [playerid]");
  57858. }
  57859. if(!IsPlayerConnected(targetid))
  57860. {
  57861. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  57862. }
  57863. if(isnull(PlayerData[targetid][pHelpRequest]))
  57864. {
  57865. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't requested any help since they connected.");
  57866. }
  57867. PlayerData[targetid][pHelpRequest][0] = 0;
  57868. SendHelperMessage(COLOR_LIGHTRED, "Helper: %s has denied %s's help request.", GetRPName(playerid), GetRPName(targetid));
  57869. SendClientMessageEx(playerid, COLOR_WHITE, "You denied %s's help request.", GetRPName(targetid));
  57870. SendClientMessageEx(targetid, COLOR_LIGHTRED, "* %s has denied your help request.", GetRPName(playerid));
  57871. return 1;
  57872. }
  57873. CMD:sta(playerid, params[])
  57874. {
  57875. new targetid;
  57876. if(PlayerData[playerid][pHelper] < 1)
  57877. {
  57878. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  57879. }
  57880. if(sscanf(params, "u", targetid))
  57881. {
  57882. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sta [playerid] (Sends /helpme to admins)");
  57883. }
  57884. if(!IsPlayerConnected(targetid))
  57885. {
  57886. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  57887. }
  57888. if(isnull(PlayerData[targetid][pHelpRequest]))
  57889. {
  57890. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't requested any help since they connected.");
  57891. }
  57892. AddReportToQueue(targetid, PlayerData[targetid][pHelpRequest]);
  57893. PlayerData[targetid][pHelpRequest][0] = 0;
  57894. SendHelperMessage(COLOR_LIGHTRED, "Helper: %s has sent %s's help request to all online admins.", GetRPName(playerid), GetRPName(targetid));
  57895. SendClientMessageEx(playerid, COLOR_WHITE, "You sent %s's help request to all online admins.", GetRPName(targetid));
  57896. SendClientMessageEx(targetid, COLOR_AQUA, "* %s has sent your help request to all online admins.", GetRPName(playerid));
  57897. return 1;
  57898. }
  57899. CMD:return(playerid, params[])
  57900. {
  57901. if(PlayerData[playerid][pHelper] < 1)
  57902. {
  57903. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  57904. }
  57905. if(!PlayerData[playerid][pAcceptedHelp])
  57906. {
  57907. return SendClientMessage(playerid, COLOR_GREY, "You haven't accepted any help requests.");
  57908. }
  57909. SetPlayerHealth(playerid, PlayerData[playerid][pHealth]);
  57910. SetScriptArmour(playerid, PlayerData[playerid][pArmor]);
  57911. SetPlayerPos(playerid, PlayerData[playerid][pPosX], PlayerData[playerid][pPosY], PlayerData[playerid][pPosZ]);
  57912. SetPlayerFacingAngle(playerid, PlayerData[playerid][pPosA]);
  57913. SetPlayerInterior(playerid, PlayerData[playerid][pInterior]);
  57914. SetPlayerVirtualWorld(playerid, PlayerData[playerid][pWorld]);
  57915. SetCameraBehindPlayer(playerid);
  57916. SendClientMessage(playerid, COLOR_WHITE, "You were returned to your previous position.");
  57917. PlayerData[playerid][pAcceptedHelp] = 0;
  57918. return 1;
  57919. }
  57920. CMD:answerhelp(playerid, params[])
  57921. {
  57922. new targetid, msg[128];
  57923. if(PlayerData[playerid][pHelper] < 1)
  57924. {
  57925. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  57926. }
  57927. if(sscanf(params, "us[128]", targetid, msg))
  57928. {
  57929. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /answerhelp [playerid] [message]");
  57930. }
  57931. if(!IsPlayerConnected(targetid))
  57932. {
  57933. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  57934. }
  57935. if(isnull(PlayerData[targetid][pHelpRequest]))
  57936. {
  57937. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't requested any help since they connected.");
  57938. }
  57939. PlayerData[playerid][pHelpRequests]++;
  57940. PlayerData[targetid][pHelpRequest][0] = 0;
  57941. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET helprequests = %i WHERE uid = %i", PlayerData[playerid][pHelpRequests], PlayerData[playerid][pID]);
  57942. mysql_tquery(connectionID, queryBuffer);
  57943. if(strlen(msg) > MAX_SPLIT_LENGTH)
  57944. {
  57945. SendClientMessageEx(targetid, COLOR_YELLOW, "* Answer from %s: %.*s... *", GetRPName(playerid), MAX_SPLIT_LENGTH, msg);
  57946. SendClientMessageEx(targetid, COLOR_YELLOW, "* Answer from %s: ...%s *", GetRPName(playerid), msg[MAX_SPLIT_LENGTH]);
  57947. }
  57948. else
  57949. {
  57950. SendClientMessageEx(targetid, COLOR_YELLOW, "* Answer from %s: %s *", GetRPName(playerid), msg);
  57951. }
  57952. SendHelperMessage(COLOR_LIGHTRED, "Helper: %s has answered %s's help request.", GetRPName(playerid), GetRPName(targetid));
  57953. return 1;
  57954. }
  57955. CMD:hc(playerid, params[])
  57956. {
  57957. if(PlayerData[playerid][pHelper] < 1 && PlayerData[playerid][pAdmin] < 1)
  57958. {
  57959. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  57960. }
  57961. if(isnull(params))
  57962. {
  57963. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /hc [helper chat]");
  57964. }
  57965. if(PlayerData[playerid][pToggleHelper])
  57966. {
  57967. return SendClientMessage(playerid, COLOR_GREY, "You can't speak in the helper chat as you have it toggled.");
  57968. }
  57969. foreach(new i : Player)
  57970. {
  57971. if((PlayerData[i][pHelper] > 0 || PlayerData[playerid][pAdmin] > 0) && !PlayerData[i][pToggleHelper])
  57972. {
  57973. if(strlen(params) > MAX_SPLIT_LENGTH)
  57974. {
  57975. SendStaffMessage(0xBDF38BFF, "* %s %s: %.*s... *", GetStaffRank(playerid), GetRPName(playerid), MAX_SPLIT_LENGTH, params);
  57976. SendStaffMessage(0xBDF38BFF, "* %s %s: ...%s *", GetStaffRank(playerid), GetRPName(playerid), params[MAX_SPLIT_LENGTH]);
  57977. }
  57978. else
  57979. {
  57980. SendStaffMessage(0xBDF38BFF, "* %s %s: %s *", GetStaffRank(playerid), GetRPName(playerid), params);
  57981. }
  57982. return 1;
  57983. }
  57984. /*if(PlayerData[playerid][pAdmin] > 0 && !PlayerData[i][pToggleHelper])
  57985. {
  57986. if(strlen(params) > MAX_SPLIT_LENGTH)
  57987. {
  57988. SendStaffMessage(0xBDF38BFF, "* %s %s: %.*s... *", GetAdminRank(playerid), GetRPName(playerid), MAX_SPLIT_LENGTH, params);
  57989. SendStaffMessage(0xBDF38BFF, "* %s %s: ...%s *", GetAdminRank(playerid), GetRPName(playerid), params[MAX_SPLIT_LENGTH]);
  57990. }
  57991. else
  57992. {
  57993. SendStaffMessage(0xBDF38BFF, "* %s %s: %s *", GetAdminRank(playerid), GetRPName(playerid), params);
  57994. }
  57995. return 1;
  57996. }*/
  57997. }
  57998. return 1;
  57999. }
  58000. CMD:hh(playerid, params[])
  58001. {
  58002. return callcmd::helperhelp(playerid, params);
  58003. }
  58004. CMD:hhelp(playerid, params[])
  58005. {
  58006. return callcmd::helperhelp(playerid, params);
  58007. }
  58008. CMD:helperhelp(playerid, params[])
  58009. {
  58010. if(PlayerData[playerid][pHelper] < 1)
  58011. {
  58012. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  58013. }
  58014. if(PlayerData[playerid][pHelper] >= 1)
  58015. {
  58016. SendClientMessage(playerid, COLOR_AQUA, "LEVEL 1:{DDDDDD} /hc, /listhelp, /accepthelp, /answerhelp, /denyhelp, /sta, /return.");
  58017. }
  58018. if(PlayerData[playerid][pHelper] >= 2)
  58019. {
  58020. SendClientMessage(playerid, COLOR_AQUA, "LEVEL 2:{DDDDDD} /nmute, /hmute, /gmute");
  58021. }
  58022. if(PlayerData[playerid][pHelper] >= 3)
  58023. {
  58024. SendClientMessage(playerid, COLOR_AQUA, "LEVEL 3:{DDDDDD} /olisthelpers, /checknewbie.");
  58025. }
  58026. if(PlayerData[playerid][pHelper] >= 4)
  58027. {
  58028. SendClientMessage(playerid, COLOR_AQUA, "LEVEL 4:{DDDDDD} /setmotd.");
  58029. }
  58030. return 1;
  58031. }
  58032. CMD:activity(playerid, params[])
  58033. {
  58034. new type[16];
  58035. SendClientMessage(playerid, COLOR_NAVYBLUE, "_______ My Properties _______");
  58036. foreach(new i : House)
  58037. {
  58038. if(HouseInfo[i][hExists] && IsHouseOwner(playerid, i))
  58039. {
  58040. if(HouseInfo[i][hType] == -1)
  58041. {
  58042. type = "Other";
  58043. }
  58044. else
  58045. {
  58046. strcpy(type, houseInteriors[HouseInfo[i][hType]][intClass]);
  58047. }
  58048. if((gettime() - HouseInfo[i][hTimestamp]) > 2592000)
  58049. {
  58050. SendClientMessageEx(playerid, COLOR_GREY2, "Your %s house in %s is currently marked as {FF6347}Inactive{C8C8C8}.", type, GetZoneName(HouseInfo[i][hPosX], HouseInfo[i][hPosY], HouseInfo[i][hPosZ]));
  58051. }
  58052. else
  58053. {
  58054. SendClientMessageEx(playerid, COLOR_GREY2, "Your %s house in %s is currently marked as {00AA00}Active{C8C8C8}.", type, GetZoneName(HouseInfo[i][hPosX], HouseInfo[i][hPosY], HouseInfo[i][hPosZ]));
  58055. }
  58056. }
  58057. }
  58058. foreach(new i : Garage)
  58059. {
  58060. if(GarageInfo[i][gExists] && IsGarageOwner(playerid, i))
  58061. {
  58062. if((gettime() - GarageInfo[i][gTimestamp]) > 2592000)
  58063. {
  58064. SendClientMessageEx(playerid, COLOR_GREY2, "Your %s garage in %s is currently marked as {FF6347}Inactive{C8C8C8}.", garageInteriors[GarageInfo[i][gType]][intName], GetZoneName(GarageInfo[i][gPosX], GarageInfo[i][gPosY], GarageInfo[i][gPosZ]));
  58065. }
  58066. else
  58067. {
  58068. SendClientMessageEx(playerid, COLOR_GREY2, "Your %s garage in %s is currently marked as {00AA00}Active{C8C8C8}.", garageInteriors[GarageInfo[i][gType]][intName], GetZoneName(GarageInfo[i][gPosX], GarageInfo[i][gPosY], GarageInfo[i][gPosZ]));
  58069. }
  58070. }
  58071. }
  58072. foreach(new i : Business)
  58073. {
  58074. if(BusinessInfo[i][bExists] && IsBusinessOwner(playerid, i))
  58075. {
  58076. if((gettime() - BusinessInfo[i][bTimestamp]) > 2592000)
  58077. {
  58078. SendClientMessageEx(playerid, COLOR_GREY2, "Your %s business in %s is currently marked as {FF6347}Inactive{C8C8C8}.", bizInteriors[BusinessInfo[i][bType]][intType], GetZoneName(BusinessInfo[i][bPosX], BusinessInfo[i][bPosY], BusinessInfo[i][bPosZ]));
  58079. }
  58080. else
  58081. {
  58082. SendClientMessageEx(playerid, COLOR_GREY2, "Your %s business in %s is currently marked as {00AA00}Active{C8C8C8}.", bizInteriors[BusinessInfo[i][bType]][intType], GetZoneName(BusinessInfo[i][bPosX], BusinessInfo[i][bPosY], BusinessInfo[i][bPosZ]));
  58083. }
  58084. }
  58085. }
  58086. SendClientMessage(playerid, COLOR_YELLOW, "* Your properties become inactive if you don't enter them for 30+ days.");
  58087. return 1;
  58088. }
  58089. CMD:hlights(playerid, params[])
  58090. {
  58091. new option, houseid = GetNearbyHouseEx(playerid);
  58092. if(houseid == -1 || !IsHouseOwner(playerid, houseid))
  58093. {
  58094. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any house of yours.");
  58095. }
  58096. if(sscanf(params, "i", option) || !(0 <= option <= 1))
  58097. {
  58098. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /hlights [lights (1/0)]");
  58099. }
  58100. if(option)
  58101. {
  58102. SendClientMessage(playerid, COLOR_AQUA, "* You've turned on the lights to this house.");
  58103. }
  58104. else
  58105. {
  58106. SendClientMessage(playerid, COLOR_AQUA, "* You've turned off the lights to this house.");
  58107. }
  58108. HouseInfo[houseid][hLights] = option;
  58109. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET lights = %i WHERE id = %i", option, HouseInfo[houseid][hID]);
  58110. mysql_tquery(connectionID, queryBuffer);
  58111. foreach(new i : Player)
  58112. {
  58113. if(GetInsideHouse(i) == houseid)
  58114. {
  58115. if(HouseInfo[houseid][hLights] == 1)
  58116. {
  58117. TextDrawHideForPlayer(i, houseLights);
  58118. }
  58119. else
  58120. {
  58121. TextDrawShowForPlayer(i, houseLights);
  58122. }
  58123. }
  58124. }
  58125. return 1;
  58126. }
  58127. CMD:setrent(playerid, params[])
  58128. {
  58129. new price, houseid = GetNearbyHouseEx(playerid);
  58130. if(houseid == -1 || !IsHouseOwner(playerid, houseid))
  58131. {
  58132. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any house of yours.");
  58133. }
  58134. if(sscanf(params, "i", price))
  58135. {
  58136. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setrent [price ('0' to disable)]");
  58137. }
  58138. if(!(0 <= price <= 10000))
  58139. {
  58140. return SendClientMessage(playerid, COLOR_GREY, "Invalid price. The price must range between $0 and $10,000.");
  58141. }
  58142. HouseInfo[houseid][hRentPrice] = price;
  58143. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET rentprice = %i WHERE id = %i", price, HouseInfo[houseid][hID]);
  58144. mysql_tquery(connectionID, queryBuffer);
  58145. ReloadHouse(houseid);
  58146. SendClientMessageEx(playerid, COLOR_AQUA, "* You've set the rental price to $%i.", price);
  58147. return 1;
  58148. }
  58149. CMD:renthouse(playerid, params[])
  58150. {
  58151. new houseid;
  58152. if((houseid = GetNearbyHouse(playerid)) == -1)
  58153. {
  58154. return SendClientMessage(playerid, COLOR_GREY, "There is no house in range. You must be near a house.");
  58155. }
  58156. /*if(strcmp(params, "confirm", true) != 0)
  58157. {
  58158. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /renthouse [confirm]");
  58159. }*/
  58160. if(!HouseInfo[houseid][hOwnerID])
  58161. {
  58162. return SendClientMessage(playerid, COLOR_GREY, "This house is not owned and therefore cannot be rented.");
  58163. }
  58164. if(!HouseInfo[houseid][hRentPrice])
  58165. {
  58166. return SendClientMessage(playerid, COLOR_GREY, "This house's owner has chosen to disable renting for this house.");
  58167. }
  58168. if(PlayerData[playerid][pCash] < HouseInfo[houseid][hRentPrice])
  58169. {
  58170. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to rent here.");
  58171. }
  58172. if(IsHouseOwner(playerid, houseid))
  58173. {
  58174. return SendClientMessage(playerid, COLOR_GREY, "You are the owner of this house. You can't rent here.");
  58175. }
  58176. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT COUNT(*) FROM "#TABLE_USERS" WHERE rentinghouse = %i", HouseInfo[houseid][hID]);
  58177. mysql_tquery(connectionID, queryBuffer, "OnPlayerRentHouse", "ii", playerid, houseid);
  58178. return 1;
  58179. }
  58180. CMD:unrent(playerid, params[])
  58181. {
  58182. if(!PlayerData[playerid][pRentingHouse])
  58183. {
  58184. return SendClientMessage(playerid, COLOR_GREY, "You are not renting at any property. You can't use this command.");
  58185. }
  58186. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET rentinghouse = 0 WHERE uid = %i", PlayerData[playerid][pID]);
  58187. mysql_tquery(connectionID, queryBuffer);
  58188. PlayerData[playerid][pRentingHouse] = 0;
  58189. SendClientMessage(playerid, COLOR_WHITE, "You have ripped up your rental contract.");
  58190. return 1;
  58191. }
  58192. CMD:tenants(playerid, params[])
  58193. {
  58194. new houseid = GetNearbyHouseEx(playerid);
  58195. if(houseid == -1 || !IsHouseOwner(playerid, houseid))
  58196. {
  58197. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any house of yours.");
  58198. }
  58199. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT username, lastlogin FROM "#TABLE_USERS" WHERE rentinghouse = %i ORDER BY lastlogin DESC", HouseInfo[houseid][hID]);
  58200. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LIST_TENANTS, playerid);
  58201. return 1;
  58202. }
  58203. CMD:evict(playerid, params[])
  58204. {
  58205. new username[MAX_PLAYER_NAME], houseid = GetNearbyHouseEx(playerid);
  58206. if(houseid == -1 || !IsHouseOwner(playerid, houseid))
  58207. {
  58208. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any house of yours.");
  58209. }
  58210. if(sscanf(params, "s[24]", username))
  58211. {
  58212. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /evict [username]");
  58213. }
  58214. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid FROM "#TABLE_USERS" WHERE username = '%e' AND rentinghouse = %i", username, HouseInfo[houseid][hID]);
  58215. mysql_tquery(connectionID, queryBuffer, "OnPlayerEvict", "is", playerid, username);
  58216. return 1;
  58217. }
  58218. CMD:evictall(playerid, params[])
  58219. {
  58220. new houseid = GetNearbyHouseEx(playerid);
  58221. if(houseid == -1 || !IsHouseOwner(playerid, houseid))
  58222. {
  58223. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any house of yours.");
  58224. }
  58225. foreach(new i : Player)
  58226. {
  58227. if(PlayerData[i][pLogged] && PlayerData[i][pRentingHouse] == HouseInfo[houseid][hID])
  58228. {
  58229. PlayerData[i][pRentingHouse] = 0;
  58230. SendClientMessage(i, COLOR_RED, "You have been evicted from your home by the owner.");
  58231. }
  58232. }
  58233. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET rentinghouse = 0 WHERE rentinghouse = %i", HouseInfo[houseid][hID]);
  58234. mysql_tquery(connectionID, queryBuffer);
  58235. SendClientMessage(playerid, COLOR_WHITE, "You have evicted all tenants from your home.");
  58236. return 1;
  58237. }
  58238. CMD:houseinvite(playerid, params[])
  58239. {
  58240. new targetid, houseid = GetNearbyHouseEx(playerid);
  58241. if(houseid == -1 || !IsHouseOwner(playerid, houseid))
  58242. {
  58243. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any house of yours.");
  58244. }
  58245. if(sscanf(params, "i", targetid))
  58246. {
  58247. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /houseinvite [playerid]");
  58248. }
  58249. if(!IsPlayerConnected(targetid))
  58250. {
  58251. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  58252. }
  58253. if(targetid == playerid)
  58254. {
  58255. return SendClientMessage(playerid, COLOR_GREY, "You can't invite yourself to your own home.");
  58256. }
  58257. PlayerData[targetid][pInviteOffer] = playerid;
  58258. PlayerData[targetid][pInviteHouse] = houseid;
  58259. SendClientMessageEx(targetid, COLOR_AQUA, "* %s has offered you an invitation to their house in %s. (/accept invite)", GetRPName(playerid), GetZoneName(HouseInfo[houseid][hPosX], HouseInfo[houseid][hPosY], HouseInfo[houseid][hPosZ]));
  58260. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered %s an invitation to your house.", GetRPName(targetid));
  58261. return 1;
  58262. }
  58263. CMD:givehousekeys(playerid, params[])
  58264. {
  58265. new targetid, houseid = GetInsideHouse(playerid), option;
  58266. if(houseid == -1 || !IsHouseOwner(playerid, houseid))
  58267. {
  58268. return SendClientMessage(playerid, COLOR_GREY, "You are not in your house");
  58269. }
  58270. if(sscanf(params, "di", targetid, option))
  58271. {
  58272. return SendClientMessage(playerid, COLOR_GREY, "Usage: /givehousekeys [playerid] [0/1]");
  58273. }
  58274. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  58275. {
  58276. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  58277. }
  58278. switch(option)
  58279. {
  58280. case 0:
  58281. {
  58282. PlayerData[targetid][pHouseKeys] = -1;
  58283. SendClientMessageEx(playerid, COLOR_GREY, "You have taken %s's house keys", GetRPName(targetid));
  58284. }
  58285. case 1:
  58286. {
  58287. PlayerData[targetid][pHouseKeys] = houseid;
  58288. SendClientMessageEx(playerid, COLOR_GREY, "You have given %s a copy of your house keys", GetRPName(targetid));
  58289. }
  58290. }
  58291. return 1;
  58292. }
  58293. CMD:creategarage(playerid, params[])
  58294. {
  58295. new size[8], type = -1, Float:x, Float:y, Float:z, Float:a;
  58296. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pDynamicAdmin])
  58297. {
  58298. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  58299. }
  58300. if(sscanf(params, "s[8]", size))
  58301. {
  58302. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /creategarage [small/medium/large]");
  58303. }
  58304. if(GetNearbyGarage(playerid) >= 0)
  58305. {
  58306. return SendClientMessage(playerid, COLOR_GREY, "There is a garage in range. Find somewhere else to create this one.");
  58307. }
  58308. if(GetPlayerInterior(playerid) > 0 || GetPlayerVirtualWorld(playerid) > 0)
  58309. {
  58310. return SendClientMessage(playerid, COLOR_GREY, "You cannot create garages indoors.");
  58311. }
  58312. if(!strcmp(size, "small", true)) {
  58313. type = 0;
  58314. } else if(!strcmp(size, "medium", true)) {
  58315. type = 1;
  58316. } else if(!strcmp(size, "large", true)) {
  58317. type = 2;
  58318. }
  58319. if(type == -1)
  58320. {
  58321. SendClientMessage(playerid, COLOR_GREY, "Invalid size. Valid sizes range from Small, Medium and Large.");
  58322. }
  58323. else
  58324. {
  58325. GetPlayerPos(playerid, x, y, z);
  58326. GetPlayerFacingAngle(playerid, a);
  58327. for(new i = 0; i < MAX_GARAGES; i ++)
  58328. {
  58329. if(!GarageInfo[i][gExists])
  58330. {
  58331. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO garages (type, price, pos_x, pos_y, pos_z, pos_a, exit_x, exit_y, exit_z, exit_a) VALUES(%i, %i, '%f', '%f', '%f', '%f', '%f', '%f', '%f', '%f')", type, garageInteriors[type][intPrice], x, y, z, a, x - 3.0 * floatsin(-a, degrees), y - 3.0 * floatcos(-a, degrees), z, a - 180.0);
  58332. mysql_tquery(connectionID, queryBuffer, "OnAdminCreateGarage", "iiiffff", playerid, i, type, x, y, z, a);
  58333. return 1;
  58334. }
  58335. }
  58336. SendClientMessage(playerid, COLOR_GREY, "Garage slots are currently full. Ask developers to increase the internal limit.");
  58337. }
  58338. return 1;
  58339. }
  58340. CMD:editgarage(playerid, params[])
  58341. {
  58342. new garageid, option[10], param[32];
  58343. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pDynamicAdmin])
  58344. {
  58345. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  58346. }
  58347. if(sscanf(params, "is[10]S()[32]", garageid, option, param))
  58348. {
  58349. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editgarage [garageid] [option]");
  58350. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Entrance, Exit, Type, Owner, Price, Locked, Freeze");
  58351. return 1;
  58352. }
  58353. if(!(0 <= garageid < MAX_GARAGES) || !GarageInfo[garageid][gExists])
  58354. {
  58355. return SendClientMessage(playerid, COLOR_GREY, "Invalid garage.");
  58356. }
  58357. if(!strcmp(option, "entrance", true))
  58358. {
  58359. if(GetPlayerInterior(playerid) > 0 || GetPlayerVirtualWorld(playerid) > 0)
  58360. {
  58361. return SendClientMessage(playerid, COLOR_GREY, "You cannot create garages indoors.");
  58362. }
  58363. GetPlayerPos(playerid, GarageInfo[garageid][gPosX], GarageInfo[garageid][gPosY], GarageInfo[garageid][gPosZ]);
  58364. GetPlayerFacingAngle(playerid, GarageInfo[garageid][gPosA]);
  58365. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE garages SET pos_x = '%f', pos_y = '%f', pos_z = '%f', pos_a = '%f' WHERE id = %i", GarageInfo[garageid][gPosX], GarageInfo[garageid][gPosY], GarageInfo[garageid][gPosZ], GarageInfo[garageid][gPosA], GarageInfo[garageid][gID]);
  58366. mysql_tquery(connectionID, queryBuffer);
  58367. ReloadGarage(garageid);
  58368. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the entrance of garage %i.", garageid);
  58369. }
  58370. else if(!strcmp(option, "freeze", true))
  58371. {
  58372. new status;
  58373. if(sscanf(param, "i", status) || !(0 <= status <= 1))
  58374. {
  58375. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editgarage [garageid] [freeze] [0/1]");
  58376. }
  58377. GarageInfo[garageid][gFreeze] = status;
  58378. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE garages SET freeze = %i WHERE id = %i", GarageInfo[garageid][gFreeze], GarageInfo[garageid][gID]);
  58379. mysql_tquery(connectionID, queryBuffer);
  58380. ReloadGarage(garageid);
  58381. if(status)
  58382. SendClientMessageEx(playerid, COLOR_AQUA, "* You've enabled freeze & object loading for entrance %i.", garageid);
  58383. else
  58384. SendClientMessageEx(playerid, COLOR_AQUA, "* You've disabled freeze & object loading for entrance %i.", garageid);
  58385. }
  58386. else if(!strcmp(option, "exit", true))
  58387. {
  58388. if(GetPlayerInterior(playerid) > 0 || GetPlayerVirtualWorld(playerid) > 0)
  58389. {
  58390. return SendClientMessage(playerid, COLOR_GREY, "You cannot create garages indoors.");
  58391. }
  58392. GetPlayerPos(playerid, GarageInfo[garageid][gExitX], GarageInfo[garageid][gExitY], GarageInfo[garageid][gExitZ]);
  58393. GetPlayerFacingAngle(playerid, GarageInfo[garageid][gExitA]);
  58394. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE garages SET exit_x = '%f', exit_y = '%f', exit_z = '%f', exit_a = '%f' WHERE id = %i", GarageInfo[garageid][gExitX], GarageInfo[garageid][gExitY], GarageInfo[garageid][gExitZ], GarageInfo[garageid][gExitA], GarageInfo[garageid][gID]);
  58395. mysql_tquery(connectionID, queryBuffer);
  58396. ReloadGarage(garageid);
  58397. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the vehicle exit spawn of garage %i.", garageid);
  58398. }
  58399. else if(!strcmp(option, "type", true))
  58400. {
  58401. new size[8], type = -1;
  58402. if(sscanf(param, "s[8]", size))
  58403. {
  58404. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editgarage [garageid] [type] [small/medium/large]");
  58405. }
  58406. if(!strcmp(size, "small", true)) {
  58407. type = 0;
  58408. } else if(!strcmp(size, "medium", true)) {
  58409. type = 1;
  58410. } else if(!strcmp(size, "large", true)) {
  58411. type = 2;
  58412. }
  58413. if(type == -1)
  58414. {
  58415. return SendClientMessage(playerid, COLOR_GREY, "Invalid type.");
  58416. }
  58417. GarageInfo[garageid][gType] = type;
  58418. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE garages SET type = %i WHERE id = %i", type, GarageInfo[garageid][gID]);
  58419. mysql_tquery(connectionID, queryBuffer);
  58420. ReloadGarage(garageid);
  58421. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the type of garage %i to %s.", garageid, size);
  58422. }
  58423. else if(!strcmp(option, "owner", true))
  58424. {
  58425. new targetid;
  58426. if(sscanf(param, "u", targetid))
  58427. {
  58428. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /editgarage [garageid] [owner] [playerid]");
  58429. }
  58430. if(!IsPlayerConnected(targetid))
  58431. {
  58432. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  58433. }
  58434. if(!PlayerData[targetid][pLogged])
  58435. {
  58436. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet.");
  58437. }
  58438. SetGarageOwner(garageid, targetid);
  58439. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the owner of garage %i to %s.", garageid, GetRPName(targetid));
  58440. }
  58441. else if(!strcmp(option, "price", true))
  58442. {
  58443. new price;
  58444. if(sscanf(param, "i", price))
  58445. {
  58446. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editgarage [garageid] [price] [value]");
  58447. }
  58448. if(price < 0)
  58449. {
  58450. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $0.");
  58451. }
  58452. GarageInfo[garageid][gPrice] = price;
  58453. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE garages SET price = %i WHERE id = %i", GarageInfo[garageid][gPrice], GarageInfo[garageid][gID]);
  58454. mysql_tquery(connectionID, queryBuffer);
  58455. ReloadGarage(garageid);
  58456. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the price of garage %i to $%i.", garageid, price);
  58457. }
  58458. else if(!strcmp(option, "locked", true))
  58459. {
  58460. new locked;
  58461. if(sscanf(param, "i", locked) || !(0 <= locked <= 1))
  58462. {
  58463. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editgarage [garageid] [locked] [0/1]");
  58464. }
  58465. GarageInfo[garageid][gLocked] = locked;
  58466. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE garages SET locked = %i WHERE id = %i", GarageInfo[garageid][gLocked], GarageInfo[garageid][gID]);
  58467. mysql_tquery(connectionID, queryBuffer);
  58468. ReloadGarage(garageid);
  58469. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the lock state of garage %i to %i.", garageid, locked);
  58470. }
  58471. return 1;
  58472. }
  58473. CMD:removegarage(playerid, params[])
  58474. {
  58475. new garageid;
  58476. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pDynamicAdmin])
  58477. {
  58478. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  58479. }
  58480. if(sscanf(params, "i", garageid))
  58481. {
  58482. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /removegarage [garageid]");
  58483. }
  58484. if(!(0 <= garageid < MAX_GARAGES) || !GarageInfo[garageid][gExists])
  58485. {
  58486. return SendClientMessage(playerid, COLOR_GREY, "Invalid garage.");
  58487. }
  58488. DestroyDynamic3DTextLabel(GarageInfo[garageid][gText]);
  58489. DestroyDynamicPickup(GarageInfo[garageid][gPickup]);
  58490. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM garages WHERE id = %i", GarageInfo[garageid][gID]);
  58491. mysql_tquery(connectionID, queryBuffer);
  58492. GarageInfo[garageid][gExists] = 0;
  58493. GarageInfo[garageid][gID] = 0;
  58494. GarageInfo[garageid][gOwnerID] = 0;
  58495. Iter_Remove(Garage, garageid);
  58496. SendClientMessageEx(playerid, COLOR_AQUA, "* You have removed garage %i.", garageid);
  58497. return 1;
  58498. }
  58499. CMD:gotogarage(playerid, params[])
  58500. {
  58501. new garageid;
  58502. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  58503. {
  58504. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  58505. }
  58506. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  58507. {
  58508. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  58509. }
  58510. if(sscanf(params, "i", garageid))
  58511. {
  58512. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /gotogarage [garageid]");
  58513. }
  58514. if(!(0 <= garageid < MAX_GARAGES) || !GarageInfo[garageid][gExists])
  58515. {
  58516. return SendClientMessage(playerid, COLOR_GREY, "Invalid garage.");
  58517. }
  58518. GameTextForPlayer(playerid, "~w~Teleported", 5000, 1);
  58519. SetPlayerPos(playerid, GarageInfo[garageid][gPosX], GarageInfo[garageid][gPosY], GarageInfo[garageid][gPosZ]);
  58520. SetPlayerFacingAngle(playerid, GarageInfo[garageid][gPosA]);
  58521. SetPlayerInterior(playerid, 0);
  58522. SetPlayerVirtualWorld(playerid, 0);
  58523. SetCameraBehindPlayer(playerid);
  58524. return 1;
  58525. }
  58526. CMD:garagehelp(playerid, params[])
  58527. {
  58528. SendClientMessage(playerid, COLOR_GREEN, "_______________________________________");
  58529. SendClientMessage(playerid, COLOR_WHITE, "** GARAGE HELP ** type a command for more information.");
  58530. SendClientMessage(playerid, COLOR_GREY, "** GARAGE ** /buygarage /lock /upgradegarage /sellgarage /sellmygarage /garageinfo");
  58531. SendClientMessage(playerid, COLOR_GREY, "** GARAGE ** /repair /refuel");
  58532. return 1;
  58533. }
  58534. CMD:buygarage(playerid, params[])
  58535. {
  58536. new garageid;
  58537. if((garageid = GetNearbyGarage(playerid)) == -1)
  58538. {
  58539. return SendClientMessage(playerid, COLOR_GREY, "There is no garage in range. You must be near a garage.");
  58540. }
  58541. if(strcmp(params, "confirm", true) != 0)
  58542. {
  58543. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /buygarage [confirm]");
  58544. }
  58545. if(GarageInfo[garageid][gOwnerID])
  58546. {
  58547. return SendClientMessage(playerid, COLOR_GREY, "This garage already has an owner.");
  58548. }
  58549. if(PlayerData[playerid][pCash] < GarageInfo[garageid][gPrice])
  58550. {
  58551. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this garage.");
  58552. }
  58553. if(GetPlayerAssetCount(playerid, LIMIT_GARAGES) >= GetPlayerAssetLimit(playerid, LIMIT_GARAGES))
  58554. {
  58555. return SendClientMessageEx(playerid, COLOR_GREY, "You currently own %i/%i garages. You can't own anymore unless you upgrade your asset perk.", GetPlayerAssetCount(playerid, LIMIT_GARAGES), GetPlayerAssetLimit(playerid, LIMIT_GARAGES));
  58556. }
  58557. SetGarageOwner(garageid, playerid);
  58558. GivePlayerCash(playerid, -GarageInfo[garageid][gPrice]);
  58559. SendClientMessageEx(playerid, COLOR_GREEN, "You paid %s to make this garage yours! /garagehelp for a list of commands.", FormatNumber(GarageInfo[garageid][gPrice]));
  58560. Log_Write("log_property", "%s (uid: %i) purchased %s garage (id: %i) for $%i.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], garageInteriors[GarageInfo[garageid][gType]][intName], GarageInfo[garageid][gID], GarageInfo[garageid][gPrice]);
  58561. return 1;
  58562. }
  58563. CMD:upgradegarage(playerid, params[])
  58564. {
  58565. new garageid = GetNearbyGarageEx(playerid);
  58566. if(garageid == -1 || !IsGarageOwner(playerid, garageid))
  58567. {
  58568. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any garage of yours.");
  58569. }
  58570. if(GarageInfo[garageid][gType] >= 2)
  58571. {
  58572. return SendClientMessage(playerid, COLOR_GREY, "Your garage is already at its maximum possible size. You cannot upgrade it further.");
  58573. }
  58574. if(isnull(params) || strcmp(params, "confirm", true) != 0)
  58575. {
  58576. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /upgradegarage [confirm]");
  58577. SendClientMessageEx(playerid, COLOR_SYNTAX, "The next garage size available is %s and costs %s to upgrade to.", garageInteriors[GarageInfo[garageid][gType] + 1][intName], FormatNumber(garageInteriors[GarageInfo[garageid][gType] + 1][intPrice]));
  58578. return 1;
  58579. }
  58580. if(PlayerData[playerid][pCash] < garageInteriors[GarageInfo[garageid][gType] + 1][intPrice])
  58581. {
  58582. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to upgrade your garage.");
  58583. }
  58584. foreach(new i: Vehicle)
  58585. {
  58586. if(IsVehicleInGarage(i, garageid))
  58587. {
  58588. return SendClientMessage(playerid, COLOR_GREY, "You must remove all vehicles from your garage before proceeding.");
  58589. }
  58590. }
  58591. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT id FROM vehicles WHERE ownerid = %i AND interior > 0 AND world = %i", PlayerData[playerid][pID], GarageInfo[garageid][gWorld]);
  58592. mysql_tquery(connectionID, queryBuffer, "OnPlayerUpgradeGarage", "ii", playerid, garageid);
  58593. return 1;
  58594. }
  58595. CMD:sellgarage(playerid, params[])
  58596. {
  58597. new garageid = GetNearbyGarageEx(playerid), targetid, amount;
  58598. if(garageid == -1 || !IsGarageOwner(playerid, garageid))
  58599. {
  58600. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any garage of yours.");
  58601. }
  58602. if(sscanf(params, "ui", targetid, amount))
  58603. {
  58604. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sellgarage [playerid] [amount]");
  58605. }
  58606. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  58607. {
  58608. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  58609. }
  58610. if(targetid == playerid)
  58611. {
  58612. return SendClientMessage(playerid, COLOR_GREY, "You can't sell to yourself.");
  58613. }
  58614. if(amount < 1)
  58615. {
  58616. return SendClientMessage(playerid, COLOR_GREY, "You must specify an amount above zero.");
  58617. }
  58618. PlayerData[targetid][pGarageOffer] = playerid;
  58619. PlayerData[targetid][pGarageOffered] = garageid;
  58620. PlayerData[targetid][pGaragePrice] = amount;
  58621. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered you their garage for %s (/accept garage).", GetRPName(playerid), FormatNumber(amount));
  58622. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered %s to buy your garage for %s.", GetRPName(targetid), FormatNumber(amount));
  58623. return 1;
  58624. }
  58625. CMD:sellmygarage(playerid, params[])
  58626. {
  58627. new garageid = GetNearbyGarageEx(playerid);
  58628. if(garageid == -1 || !IsGarageOwner(playerid, garageid))
  58629. {
  58630. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any garage of yours.");
  58631. }
  58632. if(strcmp(params, "confirm", true) != 0)
  58633. {
  58634. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sellmygarage [confirm]");
  58635. SendClientMessageEx(playerid, COLOR_SYNTAX, "This command sells your garage back to the state. You will receive %s back.", FormatNumber(percent(GarageInfo[garageid][gPrice], 75)));
  58636. return 1;
  58637. }
  58638. SetGarageOwner(garageid, INVALID_PLAYER_ID);
  58639. GivePlayerCash(playerid, percent(GarageInfo[garageid][gPrice], 75));
  58640. SendClientMessageEx(playerid, COLOR_GREEN, "You have sold your garage to the state and received %s back.", FormatNumber(percent(GarageInfo[garageid][gPrice], 75)));
  58641. Log_Write("log_property", "%s (uid: %i) sold their %s garage (id: %i) to the state for $%i", GetPlayerNameEx(playerid), PlayerData[playerid][pID], garageInteriors[GarageInfo[garageid][gType]][intName], GarageInfo[garageid][gID], percent(GarageInfo[garageid][gPrice], 75));
  58642. return 1;
  58643. }
  58644. CMD:garageinfo(playerid, params[])
  58645. {
  58646. new garageid = GetNearbyGarageEx(playerid);
  58647. if(garageid == -1 || !IsGarageOwner(playerid, garageid))
  58648. {
  58649. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any garage of yours.");
  58650. }
  58651. SendClientMessageEx(playerid, COLOR_NAVYBLUE, "_______ Garage ID %i _______", garageid);
  58652. SendClientMessageEx(playerid, COLOR_GREY2, "Value: %s - Size: %s - Location: %s - Active: %s - Locked: %s", FormatNumber(GarageInfo[garageid][gPrice]), garageInteriors[GarageInfo[garageid][gType]][intName], GetZoneName(GarageInfo[garageid][gPosX], GarageInfo[garageid][gPosY], GarageInfo[garageid][gPosZ]), (gettime() - GarageInfo[garageid][gTimestamp] > 2592000) ? ("{FF6347}No{C8C8C8}") : ("Yes"), (GarageInfo[garageid][gLocked]) ? ("Yes") : ("No"));
  58653. return 1;
  58654. }
  58655. CMD:createdealership(playerid, params[])
  58656. {
  58657. new type = 9, Float:x, Float:y, Float:z, Float:a;
  58658. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pDynamicAdmin] && !PlayerData[playerid][pWebDev])
  58659. {
  58660. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  58661. }
  58662. if(GetNearbyBusiness(playerid) >= 0)
  58663. {
  58664. return SendClientMessage(playerid, COLOR_GREY, "There is a business in range. Find somewhere else to create this one.");
  58665. }
  58666. GetPlayerPos(playerid, x, y, z);
  58667. GetPlayerFacingAngle(playerid, a);
  58668. for(new i = 0; i < MAX_BUSINESSES; i ++)
  58669. {
  58670. if(!BusinessInfo[i][bExists])
  58671. {
  58672. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO businesses (type, price, pos_x, pos_y, pos_z, pos_a, int_x, int_y, int_z, int_a, interior, outsideint, outsidevw) VALUES(%i, %i, '%f', '%f', '%f', '%f', '%f', '%f', '%f', '%f', %i, %i, %i)", type, bizInteriors[type][intPrice], x, y, z, a - 180.0,
  58673. bizInteriors[type][intX], bizInteriors[type][intY], type, bizInteriors[type][intA], bizInteriors[type][intID], GetPlayerInterior(playerid), GetPlayerVirtualWorld(playerid));
  58674. mysql_tquery(connectionID, queryBuffer, "OnAdminCreateBusiness", "iiiffff", playerid, i, type, x, y, z, a);
  58675. return 1;
  58676. }
  58677. }
  58678. SendClientMessage(playerid, COLOR_GREY, "Business slots are currently full. Ask developers to increase the internal limit.");
  58679. return 1;
  58680. }
  58681. CMD:createbiz(playerid, params[])
  58682. {
  58683. new type, Float:x, Float:y, Float:z, Float:a;
  58684. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pDynamicAdmin] && !PlayerData[playerid][pWebDev])
  58685. {
  58686. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  58687. }
  58688. if(sscanf(params, "i", type))
  58689. {
  58690. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /createbiz [type]");
  58691. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: (1) 24/7 (2) Gun Shop (3) Clothes Shop (4) Gym (5) Restaurant (6) Ad Agency (7) Club/Bar (8) Tool Shop");
  58692. return 1;
  58693. }
  58694. if(!(1 <= type <= sizeof(bizInteriors)))
  58695. {
  58696. return SendClientMessage(playerid, COLOR_GREY, "Invalid type.");
  58697. }
  58698. if(GetNearbyBusiness(playerid) >= 0)
  58699. {
  58700. return SendClientMessage(playerid, COLOR_GREY, "There is a business in range. Find somewhere else to create this one.");
  58701. }
  58702. GetPlayerPos(playerid, x, y, z);
  58703. GetPlayerFacingAngle(playerid, a);
  58704. type--;
  58705. for(new i = 0; i < MAX_BUSINESSES; i ++)
  58706. {
  58707. if(!BusinessInfo[i][bExists])
  58708. {
  58709. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO businesses (type, price, pos_x, pos_y, pos_z, pos_a, int_x, int_y, int_z, int_a, interior, outsideint, outsidevw) VALUES(%i, %i, '%f', '%f', '%f', '%f', '%f', '%f', '%f', '%f', %i, %i, %i)", type, bizInteriors[type][intPrice], x, y, z, a - 180.0,
  58710. bizInteriors[type][intX], bizInteriors[type][intY], bizInteriors[type][intZ], bizInteriors[type][intA], bizInteriors[type][intID], GetPlayerInterior(playerid), GetPlayerVirtualWorld(playerid));
  58711. mysql_tquery(connectionID, queryBuffer, "OnAdminCreateBusiness", "iiiffff", playerid, i, type, x, y, z, a);
  58712. return 1;
  58713. }
  58714. }
  58715. SendClientMessage(playerid, COLOR_GREY, "Business slots are currently full. Ask developers to increase the internal limit.");
  58716. return 1;
  58717. }
  58718. CMD:editbiz(playerid, params[])
  58719. {
  58720. new businessid, option[14], param[32];
  58721. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pDynamicAdmin] && !PlayerData[playerid][pWebDev])
  58722. {
  58723. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  58724. }
  58725. if(sscanf(params, "is[14]S()[32]", businessid, option, param))
  58726. {
  58727. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editbiz [businessid] [option]");
  58728. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Entrance, Exit, Interior, World, Type, Owner, Price, EntryFee, Products, Materials, Locked, Vehspawn");
  58729. return 1;
  58730. }
  58731. if(!(0 <= businessid < MAX_BUSINESSES) || !BusinessInfo[businessid][bExists])
  58732. {
  58733. return SendClientMessage(playerid, COLOR_GREY, "Invalid business.");
  58734. }
  58735. if(!strcmp(option, "entrance", true))
  58736. {
  58737. GetPlayerPos(playerid, BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ]);
  58738. GetPlayerFacingAngle(playerid, BusinessInfo[businessid][bPosA]);
  58739. BusinessInfo[businessid][bOutsideInt] = GetPlayerInterior(playerid);
  58740. BusinessInfo[businessid][bOutsideVW] = GetPlayerVirtualWorld(playerid);
  58741. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET pos_x = '%f', pos_y = '%f', pos_z = '%f', pos_a = '%f', outsideint = %i, outsidevw = %i WHERE id = %i", BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], BusinessInfo[businessid][bPosA], BusinessInfo[businessid][bOutsideInt], BusinessInfo[businessid][bOutsideVW], BusinessInfo[businessid][bID]);
  58742. mysql_tquery(connectionID, queryBuffer);
  58743. ReloadBusiness(businessid);
  58744. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the entrance of business %i.", businessid);
  58745. }
  58746. else if(!strcmp(option, "vehspawn", true))
  58747. {
  58748. GetPlayerPos(playerid, BusinessInfo[businessid][cVehicle][0], BusinessInfo[businessid][cVehicle][1], BusinessInfo[businessid][cVehicle][2]);
  58749. GetPlayerFacingAngle(playerid, BusinessInfo[businessid][cVehicle][3]);
  58750. format(queryBuffer, sizeof(queryBuffer), "UPDATE `businesses` SET `cVehicleX` = %.4f, `cVehicleY` = %.4f, `cVehicleZ` = %.4f, `cVehicleA` = %.4f WHERE id = %i",
  58751. BusinessInfo[businessid][cVehicle][0],BusinessInfo[businessid][cVehicle][1],BusinessInfo[businessid][cVehicle][2],BusinessInfo[businessid][cVehicle][3], BusinessInfo[businessid][bID]);
  58752. mysql_tquery(connectionID, queryBuffer);
  58753. SendAdminMessage(COLOR_RED, "Admin: %s has edited the vehicle spawn of business %i.", GetRPName(playerid), businessid);
  58754. }
  58755. else if(!strcmp(option, "exit", true))
  58756. {
  58757. new type = -1;
  58758. for(new i = 0; i < sizeof(bizInteriors); i ++)
  58759. {
  58760. if(IsPlayerInRangeOfPoint(playerid, 100.0, bizInteriors[i][intX], bizInteriors[i][intY], bizInteriors[i][intZ]))
  58761. {
  58762. type = i;
  58763. }
  58764. }
  58765. GetPlayerPos(playerid, BusinessInfo[businessid][bIntX], BusinessInfo[businessid][bIntY], BusinessInfo[businessid][bIntZ]);
  58766. GetPlayerFacingAngle(playerid, BusinessInfo[businessid][bIntA]);
  58767. BusinessInfo[businessid][bInterior] = GetPlayerInterior(playerid);
  58768. BusinessInfo[businessid][bType] = type;
  58769. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET type = %i, int_x = '%f', int_y = '%f', int_z = '%f', int_a = '%f', interior = %i WHERE id = %i", type, BusinessInfo[businessid][bIntX], BusinessInfo[businessid][bIntY], BusinessInfo[businessid][bIntZ], BusinessInfo[businessid][bIntA], BusinessInfo[businessid][bInterior], BusinessInfo[businessid][bID]);
  58770. mysql_tquery(connectionID, queryBuffer);
  58771. ReloadBusiness(businessid);
  58772. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the exit of business %i.", businessid);
  58773. }
  58774. else if(!strcmp(option, "interior", true))
  58775. {
  58776. new string[1024];
  58777. for(new i = 0; i < sizeof(bizInteriorArray); i ++)
  58778. {
  58779. format(string, sizeof(string), "%s\n%s", string, bizInteriorArray[i][intName]);
  58780. }
  58781. PlayerData[playerid][pSelected] = businessid;
  58782. Dialog_Show(playerid, DIALOG_BIZINTERIOR, DIALOG_STYLE_LIST, "Choose an interior to set for this business.", string, "Select", "Cancel");
  58783. }
  58784. else if(!strcmp(option, "world", true))
  58785. {
  58786. new worldid;
  58787. if(sscanf(param, "i", worldid))
  58788. {
  58789. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editbiz [businessid] [world] [vw]");
  58790. }
  58791. BusinessInfo[businessid][bWorld] = worldid;
  58792. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET world = %i WHERE id = %i", BusinessInfo[businessid][bWorld], BusinessInfo[businessid][bID]);
  58793. mysql_tquery(connectionID, queryBuffer);
  58794. ReloadBusiness(businessid);
  58795. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the virtual world of business %i to %i.", businessid, worldid);
  58796. }
  58797. else if(!strcmp(option, "type", true))
  58798. {
  58799. new type;
  58800. if(sscanf(param, "i", type))
  58801. {
  58802. SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /editbiz [businessid] [type] [value (1-%i)]", sizeof(bizInteriors));
  58803. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: (1) 24/7 (2) Gun Shop (3) Clothes Shop (4) Gym (5) Restaurant (6) Ad Agency (7) Club/Bar (8) Tool Shop");
  58804. return 1;
  58805. }
  58806. if(!(1 <= type <= sizeof(bizInteriors)))
  58807. {
  58808. return SendClientMessage(playerid, COLOR_GREY, "Invalid type.");
  58809. }
  58810. BusinessInfo[businessid][bType] = type-1;
  58811. BusinessInfo[businessid][bInterior] = bizInteriors[type][intID];
  58812. BusinessInfo[businessid][bIntX] = bizInteriors[type][intX];
  58813. BusinessInfo[businessid][bIntY] = bizInteriors[type][intY];
  58814. BusinessInfo[businessid][bIntZ] = bizInteriors[type][intZ];
  58815. BusinessInfo[businessid][bIntA] = bizInteriors[type][intA];
  58816. ClearProducts(businessid);
  58817. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET type = %i, int_x = '%f', int_y = '%f', int_z = '%f', int_a = '%f', interior = %i, world = %i WHERE id = %i", type-1, BusinessInfo[businessid][bIntX], BusinessInfo[businessid][bIntY], BusinessInfo[businessid][bIntZ], BusinessInfo[businessid][bIntA], BusinessInfo[businessid][bInterior], BusinessInfo[businessid][bWorld], BusinessInfo[businessid][bID]);
  58818. mysql_tquery(connectionID, queryBuffer);
  58819. ReloadBusiness(businessid);
  58820. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the type of business %i to %i.", businessid, type);
  58821. }
  58822. else if(!strcmp(option, "owner", true))
  58823. {
  58824. new targetid;
  58825. if(sscanf(param, "u", targetid))
  58826. {
  58827. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /editbiz [businessid] [owner] [playerid]");
  58828. }
  58829. if(!IsPlayerConnected(targetid))
  58830. {
  58831. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  58832. }
  58833. if(!PlayerData[targetid][pLogged])
  58834. {
  58835. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet.");
  58836. }
  58837. SetBusinessOwner(businessid, targetid);
  58838. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the owner of business %i to %s.", businessid, GetRPName(targetid));
  58839. Log_Write("log_property", "%s (uid: %i) has edited business id owner to (id: %s).", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid));
  58840. }
  58841. else if(!strcmp(option, "price", true))
  58842. {
  58843. new price;
  58844. if(sscanf(param, "i", price))
  58845. {
  58846. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editbiz [businessid] [price] [value]");
  58847. }
  58848. if(price < 0)
  58849. {
  58850. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $0.");
  58851. }
  58852. BusinessInfo[businessid][bPrice] = price;
  58853. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET price = %i WHERE id = %i", BusinessInfo[businessid][bPrice], BusinessInfo[businessid][bID]);
  58854. mysql_tquery(connectionID, queryBuffer);
  58855. ReloadBusiness(businessid);
  58856. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the price of business %i to $%i.", businessid, price);
  58857. }
  58858. else if(!strcmp(option, "entryfee", true))
  58859. {
  58860. new price;
  58861. if(sscanf(param, "i", price))
  58862. {
  58863. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editbiz [businessid] [entryfee] [value]");
  58864. }
  58865. if(price < 0)
  58866. {
  58867. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $0.");
  58868. }
  58869. BusinessInfo[businessid][bEntryFee] = price;
  58870. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET entryfee = %i WHERE id = %i", BusinessInfo[businessid][bEntryFee], BusinessInfo[businessid][bID]);
  58871. mysql_tquery(connectionID, queryBuffer);
  58872. ReloadBusiness(businessid);
  58873. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the entry fee of business %i to $%i.", businessid, price);
  58874. }
  58875. else if(!strcmp(option, "products", true))
  58876. {
  58877. new amount;
  58878. if(sscanf(param, "i", amount))
  58879. {
  58880. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editbiz [businessid] [products] [value]");
  58881. }
  58882. BusinessInfo[businessid][bProducts] = amount;
  58883. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET products = %i WHERE id = %i", BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  58884. mysql_tquery(connectionID, queryBuffer);
  58885. ReloadBusiness(businessid);
  58886. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the products amount of business %i to %i.", businessid, amount);
  58887. }
  58888. else if(!strcmp(option, "materials", true))
  58889. {
  58890. new amount;
  58891. if(sscanf(param, "i", amount))
  58892. {
  58893. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editbiz [businessid] [materials] [value]");
  58894. }
  58895. BusinessInfo[businessid][bMaterials] = amount;
  58896. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET materials = %i WHERE id = %i", BusinessInfo[businessid][bMaterials], BusinessInfo[businessid][bID]);
  58897. mysql_tquery(connectionID, queryBuffer);
  58898. ReloadBusiness(businessid);
  58899. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the materials amount of business %i to %i.", businessid, amount);
  58900. }
  58901. else if(!strcmp(option, "locked", true))
  58902. {
  58903. new locked;
  58904. if(sscanf(param, "i", locked) || !(0 <= locked <= 1))
  58905. {
  58906. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editbiz [businessid] [locked] [0/1]");
  58907. }
  58908. BusinessInfo[businessid][bLocked] = locked;
  58909. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET locked = %i WHERE id = %i", BusinessInfo[businessid][bLocked], BusinessInfo[businessid][bID]);
  58910. mysql_tquery(connectionID, queryBuffer);
  58911. ReloadBusiness(businessid);
  58912. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the lock state of business %i to %i.", businessid, locked);
  58913. }
  58914. return 1;
  58915. }
  58916. CMD:removebiz(playerid, params[])
  58917. {
  58918. new businessid;
  58919. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pDynamicAdmin] && !PlayerData[playerid][pWebDev])
  58920. {
  58921. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  58922. }
  58923. if(sscanf(params, "i", businessid))
  58924. {
  58925. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /removebiz [businessid]");
  58926. }
  58927. if(!(0 <= businessid < MAX_HOUSES) || !BusinessInfo[businessid][bExists])
  58928. {
  58929. return SendClientMessage(playerid, COLOR_GREY, "Invalid business.");
  58930. }
  58931. ClearProducts(businessid);
  58932. DestroyDynamic3DTextLabel(BusinessInfo[businessid][bText]);
  58933. DestroyDynamicPickup(BusinessInfo[businessid][bPickup]);
  58934. //DestroyDynamicMapIcon(BusinessInfo[businessid][bMapIcon]);
  58935. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM businesses WHERE id = %i", BusinessInfo[businessid][bID]);
  58936. mysql_tquery(connectionID, queryBuffer);
  58937. BusinessInfo[businessid][bExists] = 0;
  58938. BusinessInfo[businessid][bID] = 0;
  58939. BusinessInfo[businessid][bOwnerID] = 0;
  58940. Iter_Remove(Business, businessid);
  58941. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has removed business id %i.", GetRPName(playerid), businessid);
  58942. SendClientMessageEx(playerid, COLOR_AQUA, "* You have removed business %i.", businessid);
  58943. return 1;
  58944. }
  58945. CMD:gotobiz(playerid, params[])
  58946. {
  58947. new businessid;
  58948. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN && !PlayerData[playerid][pWebDev])
  58949. {
  58950. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  58951. }
  58952. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  58953. {
  58954. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  58955. }
  58956. if(sscanf(params, "i", businessid))
  58957. {
  58958. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /gotobiz [businessid]");
  58959. }
  58960. if(!(0 <= businessid < MAX_HOUSES) || !BusinessInfo[businessid][bExists])
  58961. {
  58962. return SendClientMessage(playerid, COLOR_GREY, "Invalid business.");
  58963. }
  58964. GameTextForPlayer(playerid, "~w~Teleported", 5000, 1);
  58965. SetPlayerPos(playerid, BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ]);
  58966. SetPlayerFacingAngle(playerid, BusinessInfo[businessid][bPosA]);
  58967. SetPlayerInterior(playerid, BusinessInfo[businessid][bOutsideInt]);
  58968. SetPlayerVirtualWorld(playerid, BusinessInfo[businessid][bOutsideVW]);
  58969. SetCameraBehindPlayer(playerid);
  58970. return 1;
  58971. }
  58972. CMD:bizhelp(playerid, params[])
  58973. {
  58974. SendClientMessage(playerid, COLOR_GREEN, "_______________________________________");
  58975. SendClientMessage(playerid, COLOR_WHITE, "** BUSINESS HELP ** type a command for more information.");
  58976. SendClientMessage(playerid, COLOR_GREY, "** BUSINESS ** /buybiz /lock /bwithdraw /bdeposit /entryfee /sellbiz /sellmybiz /bizinfo");
  58977. SendClientMessage(playerid, COLOR_GREY, "** BUSINESS ** /bdepositmats /bwithdrawmats /bname");
  58978. return 1;
  58979. }
  58980. CMD:buybiz(playerid, params[])
  58981. {
  58982. return SendClientMessage(playerid, COLOR_GREY, "This command has been disabled, if you want to buy a business you must request it on our forums");
  58983. }
  58984. CMD:buyadminbiz1(playerid, params[])
  58985. {
  58986. new businessid;
  58987. if((businessid = GetNearbyBusiness(playerid)) == -1)
  58988. {
  58989. return SendClientMessage(playerid, COLOR_GREY, "There is no business in range. You must be near a business.");
  58990. }
  58991. if(strcmp(params, "confirm", true) != 0)
  58992. {
  58993. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /buybiz [confirm]");
  58994. }
  58995. if(BusinessInfo[businessid][bOwnerID])
  58996. {
  58997. return SendClientMessage(playerid, COLOR_GREY, "This business already has an owner.");
  58998. }
  58999. if(PlayerData[playerid][pCash] < BusinessInfo[businessid][bPrice])
  59000. {
  59001. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this business.");
  59002. }
  59003. if(GetPlayerAssetCount(playerid, LIMIT_BUSINESSES) >= GetPlayerAssetLimit(playerid, LIMIT_BUSINESSES))
  59004. {
  59005. return SendClientMessageEx(playerid, COLOR_GREY, "You currently own %i/%i businesses. You can't own anymore unless you upgrade your asset perk.", GetPlayerAssetCount(playerid, LIMIT_BUSINESSES), GetPlayerAssetLimit(playerid, LIMIT_BUSINESSES));
  59006. }
  59007. SetBusinessOwner(businessid, playerid);
  59008. GivePlayerCash(playerid, -BusinessInfo[businessid][bPrice]);
  59009. SendClientMessageEx(playerid, COLOR_GREEN, "You paid $%i for this %s. /bizhelp for a list of commands.", BusinessInfo[businessid][bPrice], bizInteriors[BusinessInfo[businessid][bType]][intType]);
  59010. Log_Write("log_property", "%s (uid: %i) purchased %s (id: %i) for $%i.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], bizInteriors[BusinessInfo[businessid][bType]][intType], BusinessInfo[businessid][bID], BusinessInfo[businessid][bPrice]);
  59011. return 1;
  59012. }
  59013. CMD:bwithdraw(playerid, params[])
  59014. {
  59015. new businessid = GetInsideBusiness(playerid), amount;
  59016. if(businessid == -1 || !IsBusinessOwner(playerid, businessid))
  59017. {
  59018. return SendClientMessage(playerid, COLOR_GREY, "You are not inside any business of yours.");
  59019. }
  59020. if(sscanf(params, "i", amount))
  59021. {
  59022. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /bwithdraw [amount] (%s available)", FormatNumber(BusinessInfo[businessid][bCash]));
  59023. }
  59024. if(amount < 1 || amount > BusinessInfo[businessid][bCash])
  59025. {
  59026. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  59027. }
  59028. BusinessInfo[businessid][bCash] -= amount;
  59029. GivePlayerCash(playerid, amount);
  59030. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bID]);
  59031. mysql_tquery(connectionID, queryBuffer);
  59032. SendClientMessageEx(playerid, COLOR_AQUA, "* You have withdrawn %s from the business vault. There is now %s remaining.", FormatNumber(amount), FormatNumber(BusinessInfo[businessid][bCash]));
  59033. return 1;
  59034. }
  59035. CMD:bdeposit(playerid, params[])
  59036. {
  59037. new businessid = GetInsideBusiness(playerid), amount;
  59038. if(businessid == -1 || !IsBusinessOwner(playerid, businessid))
  59039. {
  59040. return SendClientMessage(playerid, COLOR_GREY, "You are not inside any business of yours.");
  59041. }
  59042. if(sscanf(params, "i", amount))
  59043. {
  59044. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /bdeposit [amount] (%s available)", FormatNumber(BusinessInfo[businessid][bCash]));
  59045. }
  59046. if(amount < 1 || amount > PlayerData[playerid][pCash])
  59047. {
  59048. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  59049. }
  59050. if(PlayerData[playerid][pAdminDuty])
  59051. {
  59052. return SendClientMessage(playerid, COLOR_GREY, "You cannot use this command while on admin duty");
  59053. }
  59054. BusinessInfo[businessid][bCash] += amount;
  59055. GivePlayerCash(playerid, -amount);
  59056. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bID]);
  59057. mysql_tquery(connectionID, queryBuffer);
  59058. SendClientMessageEx(playerid, COLOR_AQUA, "* You have deposited %s in the business vault. There is now %s available.", FormatNumber(amount), FormatNumber(BusinessInfo[businessid][bCash]));
  59059. return 1;
  59060. }
  59061. CMD:bwithdrawmats(playerid, params[])
  59062. {
  59063. new businessid = GetInsideBusiness(playerid), amount;
  59064. if(businessid == -1 || !IsBusinessOwner(playerid, businessid))
  59065. {
  59066. return SendClientMessage(playerid, COLOR_GREY, "You are not inside any business of yours.");
  59067. }
  59068. if(BusinessInfo[businessid][bType] != BUSINESS_TOOLSHOP)
  59069. {
  59070. return SendClientMessage(playerid, COLOR_GREY, "This command can only be used in tool shops.");
  59071. }
  59072. if(sscanf(params, "i", amount))
  59073. {
  59074. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /bwithdrawmats [amount] (%i available)", BusinessInfo[businessid][bMaterials]);
  59075. }
  59076. if(amount < 1 || amount > BusinessInfo[businessid][bMaterials])
  59077. {
  59078. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  59079. }
  59080. if(PlayerData[playerid][pMaterials] + amount > GetPlayerCapacity(playerid, CAPACITY_MATERIALS))
  59081. {
  59082. return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i materials. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pMaterials], GetPlayerCapacity(playerid, CAPACITY_MATERIALS));
  59083. }
  59084. BusinessInfo[businessid][bMaterials] -= amount;
  59085. PlayerData[playerid][pMaterials] += amount;
  59086. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET materials = %i WHERE id = %i", BusinessInfo[businessid][bMaterials], BusinessInfo[businessid][bID]);
  59087. mysql_tquery(connectionID, queryBuffer);
  59088. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET materials = %i WHERE uid = %i", PlayerData[playerid][pMaterials], PlayerData[playerid][pID]);
  59089. mysql_tquery(connectionID, queryBuffer);
  59090. SendClientMessageEx(playerid, COLOR_AQUA, "* You have withdrawn %i materials from the business vault. There is now %i remaining.", amount, BusinessInfo[businessid][bMaterials]);
  59091. return 1;
  59092. }
  59093. CMD:bdepositmats(playerid, params[])
  59094. {
  59095. new businessid = GetInsideBusiness(playerid), amount;
  59096. if(businessid == -1 || !IsBusinessOwner(playerid, businessid))
  59097. {
  59098. return SendClientMessage(playerid, COLOR_GREY, "You are not inside any business of yours.");
  59099. }
  59100. if(BusinessInfo[businessid][bType] != BUSINESS_TOOLSHOP)
  59101. {
  59102. return SendClientMessage(playerid, COLOR_GREY, "This command can only be used in tool shops.");
  59103. }
  59104. if(sscanf(params, "i", amount))
  59105. {
  59106. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /bdepositmats [amount] (%i available)", BusinessInfo[businessid][bMaterials]);
  59107. }
  59108. if(amount < 1 || amount > PlayerData[playerid][pMaterials])
  59109. {
  59110. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  59111. }
  59112. BusinessInfo[businessid][bMaterials] += amount;
  59113. PlayerData[playerid][pMaterials] -= amount;
  59114. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET materials = %i WHERE id = %i", BusinessInfo[businessid][bMaterials], BusinessInfo[businessid][bID]);
  59115. mysql_tquery(connectionID, queryBuffer);
  59116. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET materials = %i WHERE uid = %i", PlayerData[playerid][pMaterials], PlayerData[playerid][pID]);
  59117. mysql_tquery(connectionID, queryBuffer);
  59118. SendClientMessageEx(playerid, COLOR_AQUA, "* You have deposited %i materials in the business vault. There is now %i available.", amount, BusinessInfo[businessid][bMaterials]);
  59119. return 1;
  59120. }
  59121. CMD:sellbiz(playerid, params[])
  59122. {
  59123. new businessid = GetNearbyBusinessEx(playerid), targetid, amount;
  59124. if(businessid == -1 || !IsBusinessOwner(playerid, businessid))
  59125. {
  59126. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any business of yours.");
  59127. }
  59128. if(sscanf(params, "ui", targetid, amount))
  59129. {
  59130. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sellbiz [playerid] [amount]");
  59131. }
  59132. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  59133. {
  59134. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  59135. }
  59136. if(targetid == playerid)
  59137. {
  59138. return SendClientMessage(playerid, COLOR_GREY, "You can't sell to yourself.");
  59139. }
  59140. if(amount < 1)
  59141. {
  59142. return SendClientMessage(playerid, COLOR_GREY, "You must specify an amount above zero.");
  59143. }
  59144. PlayerData[targetid][pBizOffer] = playerid;
  59145. PlayerData[targetid][pBizOffered] = businessid;
  59146. PlayerData[targetid][pBizPrice] = amount;
  59147. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered you their business for %s (/accept business).", GetRPName(playerid), FormatNumber(amount));
  59148. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered %s to buy your business for %s.", GetRPName(targetid), FormatNumber(amount));
  59149. return 1;
  59150. }
  59151. CMD:sellmybiz(playerid, params[])
  59152. {
  59153. new businessid = GetNearbyBusinessEx(playerid);
  59154. if(businessid == -1 || !IsBusinessOwner(playerid, businessid))
  59155. {
  59156. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any business of yours.");
  59157. }
  59158. if(strcmp(params, "confirm", true) != 0)
  59159. {
  59160. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sellmybiz [confirm]");
  59161. SendClientMessageEx(playerid, COLOR_SYNTAX, "This command sells your business back to the state. You will receive %s back.", FormatNumber(percent(BusinessInfo[businessid][bPrice], 75)));
  59162. return 1;
  59163. }
  59164. SetBusinessOwner(businessid, INVALID_PLAYER_ID);
  59165. GivePlayerCash(playerid, percent(BusinessInfo[businessid][bPrice], 75));
  59166. SendClientMessageEx(playerid, COLOR_GREEN, "You have sold your business to the state and received %s back.", FormatNumber(percent(BusinessInfo[businessid][bPrice], 75)));
  59167. Log_Write("log_property", "%s (uid: %i) sold their %s business (id: %i) to the state for %s", GetPlayerNameEx(playerid), PlayerData[playerid][pID], bizInteriors[BusinessInfo[businessid][bType]][intType], BusinessInfo[businessid][bID], percent(BusinessInfo[businessid][bPrice], 75));
  59168. return 1;
  59169. }
  59170. CMD:bizinfo(playerid, params[])
  59171. {
  59172. new businessid = GetNearbyBusinessEx(playerid);
  59173. if(businessid == -1 || !IsBusinessOwner(playerid, businessid))
  59174. {
  59175. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any business of yours.");
  59176. }
  59177. SendClientMessageEx(playerid, COLOR_NAVYBLUE, "_______ Business ID %i _______", businessid);
  59178. SendClientMessageEx(playerid, COLOR_GREY2, "Value: %s - Type: %s - Location: %s - Active: %s - Status: %s", FormatNumber(BusinessInfo[businessid][bPrice]), bizInteriors[BusinessInfo[businessid][bType]][intType], GetZoneName(BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ]), (gettime() - BusinessInfo[businessid][bTimestamp] > 2592000) ? ("{FF6347}No{C8C8C8}") : ("Yes"), (BusinessInfo[businessid][bLocked]) ? ("Closed") : ("Opened"));
  59179. SendClientMessageEx(playerid, COLOR_GREY2, "Vault: %s - Entry Fee: %s - Products: %i - Materials: %i", FormatNumber(BusinessInfo[businessid][bCash]), FormatNumber(BusinessInfo[businessid][bEntryFee]), BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bMaterials]);
  59180. return 1;
  59181. }
  59182. CMD:entryfee(playerid, params[])
  59183. {
  59184. new businessid = GetNearbyBusinessEx(playerid), amount;
  59185. if(businessid == -1 || !IsBusinessOwner(playerid, businessid))
  59186. {
  59187. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any business of yours.");
  59188. }
  59189. if(sscanf(params, "i", amount))
  59190. {
  59191. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /entryfee [amount]");
  59192. }
  59193. if(amount < 0 || amount > 5000)
  59194. {
  59195. return SendClientMessage(playerid, COLOR_GREY, "The entry fee can't be below $0 or above $5,000.");
  59196. }
  59197. BusinessInfo[businessid][bEntryFee] = amount;
  59198. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET entryfee = %i WHERE id = %i", BusinessInfo[businessid][bEntryFee], BusinessInfo[businessid][bID]);
  59199. mysql_tquery(connectionID, queryBuffer);
  59200. ReloadBusiness(businessid);
  59201. SendClientMessageEx(playerid, COLOR_AQUA, "* You have set the entry fee to $%i.", amount);
  59202. return 1;
  59203. }
  59204. CMD:iha(playerid, params[])
  59205. {
  59206. return callcmd::installhousealarm(playerid, params);
  59207. }
  59208. CMD:installhousealarm(playerid, params[])
  59209. {
  59210. new houseid = GetInsideHouse(playerid);
  59211. if(houseid == -1 || !IsHouseOwner(playerid, houseid))
  59212. {
  59213. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any house of yours.");
  59214. }
  59215. if(HouseInfo[houseid][hAlarm] == 1)
  59216. {
  59217. return SendClientMessage(playerid, COLOR_GREY, "This house has an installed alarm system already");
  59218. }
  59219. if(PlayerData[playerid][pHouseAlarm] == 0)
  59220. {
  59221. return SendClientMessage(playerid, COLOR_GREY, "You don't have a house alarm, you can buy one from a tool shop");
  59222. }
  59223. PlayerData[playerid][pHouseAlarm] = 0;
  59224. HouseInfo[houseid][hAlarm] = 1;
  59225. SendClientMessage(playerid, COLOR_YELLOW, "You've sucessfully installed your house alarm, now it's legal protected by the Police.");
  59226. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET alarm = %i WHERE id = %i", HouseInfo[houseid][hAlarm], HouseInfo[houseid][hID]);
  59227. mysql_tquery(connectionID, queryBuffer);
  59228. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET housealarm = %i WHERE uid = %i", PlayerData[playerid][pHouseAlarm], PlayerData[playerid][pID]);
  59229. mysql_tquery(connectionID, queryBuffer);
  59230. return 1;
  59231. }
  59232. CMD:uha(playerid, params[])
  59233. {
  59234. return callcmd::uninstallhousealarm(playerid, params);
  59235. }
  59236. CMD:uninstallhousealarm(playerid, params[])
  59237. {
  59238. new houseid = GetInsideHouse(playerid);
  59239. if(houseid == -1 || !IsHouseOwner(playerid, houseid))
  59240. {
  59241. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any house of yours.");
  59242. }
  59243. if(HouseInfo[houseid][hAlarm] == 0)
  59244. {
  59245. return SendClientMessage(playerid, COLOR_GREY, "This house doesn't have an installed alarm system.");
  59246. }
  59247. PlayerData[playerid][pHouseAlarm] += 1;
  59248. HouseInfo[houseid][hAlarm] = 0;
  59249. SendClientMessage(playerid, COLOR_YELLOW, "You've sucessfully uninstalled your house alarm, now it's not anymore protected by the Police.");
  59250. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET alarm = %i WHERE id = %i", HouseInfo[houseid][hAlarm], HouseInfo[houseid][hID]);
  59251. mysql_tquery(connectionID, queryBuffer);
  59252. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET housealarm = %i WHERE uid = %i", PlayerData[playerid][pHouseAlarm], PlayerData[playerid][pID]);
  59253. mysql_tquery(connectionID, queryBuffer);
  59254. return 1;
  59255. }
  59256. CMD:buy(playerid, params[])
  59257. {
  59258. if( IsPlayerInAnyVehicle( playerid ) ) return SCM( playerid, COLOR_GREY, "You cant purchase from a vehicle." );
  59259. if(IsPlayerAtFoodPlace(playerid))
  59260. {
  59261. return ShowDialogToPlayer(playerid, DIALOG_FOOD);
  59262. }
  59263. new businessid = GetInsideBusiness(playerid), title[64];
  59264. if(businessid == -1)
  59265. {
  59266. return SendClientMessage(playerid, COLOR_GREY, "You are not inside of any business where you can buy stuff.");
  59267. }
  59268. if(BusinessInfo[businessid][bProducts] <= 0)
  59269. {
  59270. return SendClientMessage(playerid, COLOR_GREY, "This business is out of stock.");
  59271. }
  59272. format(title, sizeof(title), "%s's %s [%i products]", BusinessInfo[businessid][bOwner], bizInteriors[BusinessInfo[businessid][bType]][intType], BusinessInfo[businessid][bProducts]);
  59273. switch(BusinessInfo[businessid][bType])
  59274. {
  59275. case BUSINESS_DEALERSHIP:
  59276. {
  59277. ShowDealershipPreviewMenu(playerid, businessid);
  59278. }
  59279. case BUSINESS_STORE:
  59280. {
  59281. Dialog_Show(playerid, DIALOG_BUY, DIALOG_STYLE_LIST, title, "Mobile phone ($600)\nWalkie talkie ($300)\nCigars ($500)\nSpraycans ($100)\nCamera ($200)\nMP3 player ($50)\nFishing rod ($50)\nFish bait ($300)\nMuriatic acid ($300)\nBaking soda ($30)\nPocket watch ($600)\nGPS system ($150)\nGasoline can ($70)\nRope ($40)\nBoombox ($300)\nBlindfold rag($30)", "Select", "Cancel");
  59282. }
  59283. case BUSINESS_GUNSHOP:
  59284. {
  59285. Dialog_Show(playerid, DIALOG_BUY, DIALOG_STYLE_LIST, title, "9mm pistol ($15000)\nShotgun ($25000)\nRifle ($40000)\nLight armor ($15000)\nMedium Armor($25000)", "Select", "Cancel");
  59286. }
  59287. case BUSINESS_CLOTHES:
  59288. {
  59289. Dialog_Show(playerid, DIALOG_BUY, DIALOG_STYLE_LIST, title, "Clothes ($1000)\nGlasses ($500)\nBandanas & masks ($375)\nHats & caps ($240)\nMisc clothing ($500)", "Select", "Cancel");
  59290. }
  59291. case BUSINESS_GYM:
  59292. {
  59293. Dialog_Show(playerid, DIALOG_BUY, DIALOG_STYLE_LIST, title, "Normal (Free)\nBoxing ($4725)\nKung Fu ($7650)\nKneehead ($9275)\nGrabkick ($1250)\nElbow ($2950)", "Select", "Cancel");
  59294. }
  59295. case BUSINESS_RESTAURANT:
  59296. {
  59297. Dialog_Show(playerid, DIALOG_BUY, DIALOG_STYLE_LIST, title, "Water ($10)\nSprunk ($30)\nFrench fries ($40)\nHamburger ($40)\nCheeseburger ($50)\nMac & cheese ($60)\nClub sandwich ($70)\nFish & chips ($80)\nPan pizza ($110)", "Select", "Cancel");
  59298. }
  59299. case BUSINESS_BARCLUB:
  59300. {
  59301. Dialog_Show(playerid, DIALOG_BUY, DIALOG_STYLE_LIST, title, "Water ($10)\nSprunk ($30)\nBeer ($45)\nWine ($300)\nWhiskey ($500)", "Select", "Cancel");
  59302. }
  59303. case BUSINESS_TOOLSHOP:
  59304. {
  59305. Dialog_Show(playerid, DIALOG_BUY, DIALOG_STYLE_TABLIST_HEADERS, title, "Item\tCost\nFirst aid kit\t1000 materials\nBody repair kit\t10000 materials\nPolice scanner\t5000 materials\nRimkit\t4000 materials\nHelmet\t500 materials\nHouse Alarm\t2500 materials\nAuto Vehicle CMD\t4500 materials\nCrowbar\t2500 Materials", "Select", "Cancel");
  59306. }
  59307. }
  59308. return 1;
  59309. }
  59310. CMD:advertise(playerid, params[])
  59311. {
  59312. return callcmd::ad(playerid, params);
  59313. }
  59314. CMD:ad(playerid, params[])
  59315. {
  59316. new businessid = GetInsideBusiness(playerid);
  59317. if((PlayerData[playerid][pDonator] == 0) && (businessid == -1 || BusinessInfo[businessid][bType] != 5))
  59318. {
  59319. return SendClientMessage(playerid, COLOR_GREY, "You are not inside of any advertisement business.");
  59320. }
  59321. if(PlayerData[playerid][pAdMuted])
  59322. {
  59323. return SendClientMessage(playerid, COLOR_GREY, "You are muted from submitting advertisements. /report for an unmute.");
  59324. }
  59325. if(!PlayerData[playerid][pPhone])
  59326. {
  59327. return SendClientMessage(playerid, COLOR_GREY, "You don't have a mobile phone. You need a phone so people can contact you.");
  59328. }
  59329. if(PlayerData[playerid][pTogglePhone] == 1)
  59330. {
  59331. return SendClientMessage(playerid, COLOR_GREY, "You can not /ad while your phone is turned off");
  59332. }
  59333. if(PlayerData[playerid][pHours] < 2)
  59334. {
  59335. return SendClientMessage(playerid, COLOR_GREY, "You need to play at least 2 hours in order to post an advertisement.");
  59336. }
  59337. if(gettime() - gLastAd < 30)
  59338. {
  59339. return SendClientMessage(playerid, COLOR_GREY, "Advertisements can only be posted every 30 seconds.");
  59340. }
  59341. if(PlayerData[playerid][pJailTime] > 0) {
  59342. SendClientMessage(playerid, COLOR_GREY, "You can't use advertisements while in jail.");
  59343. }
  59344. ShowDialogToPlayer(playerid, DIALOG_ADNEW);
  59345. return 1;
  59346. }
  59347. CMD:mark(playerid, params[])
  59348. {
  59349. new slot;
  59350. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  59351. {
  59352. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  59353. }
  59354. if(sscanf(params, "i", slot))
  59355. {
  59356. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /mark [slot (1-3)]");
  59357. }
  59358. if(!(1 <= slot <= 3))
  59359. {
  59360. return SendClientMessage(playerid, COLOR_GREY, "Invalid slot.");
  59361. }
  59362. slot--;
  59363. GetPlayerPos(playerid, MarkedPositions[playerid][slot][mPosX], MarkedPositions[playerid][slot][mPosY], MarkedPositions[playerid][slot][mPosZ]);
  59364. GetPlayerFacingAngle(playerid, MarkedPositions[playerid][slot][mPosA]);
  59365. MarkedPositions[playerid][slot][mInterior] = GetPlayerInterior(playerid);
  59366. MarkedPositions[playerid][slot][mWorld] = GetPlayerVirtualWorld(playerid);
  59367. SendClientMessageEx(playerid, COLOR_AQUA, "* Position saved in slot %i.", slot + 1);
  59368. return 1;
  59369. }
  59370. CMD:gotomark(playerid, params[])
  59371. {
  59372. new slot;
  59373. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  59374. {
  59375. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  59376. }
  59377. if(sscanf(params, "i", slot))
  59378. {
  59379. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /gotomark [slot (1-3)]");
  59380. }
  59381. if(!(1 <= slot <= 3))
  59382. {
  59383. return SendClientMessage(playerid, COLOR_GREY, "Invalid slot.");
  59384. }
  59385. if(MarkedPositions[playerid][slot-1][mPosX] == 0.0 && MarkedPositions[playerid][slot-1][mPosY] == 0.0 && MarkedPositions[playerid][slot-1][mPosZ] == 0.0)
  59386. {
  59387. return SendClientMessage(playerid, COLOR_GREY, "There is no position in the slot selected.");
  59388. }
  59389. slot--;
  59390. GameTextForPlayer(playerid, "~w~Teleported", 5000, 1);
  59391. SetPlayerPos(playerid, MarkedPositions[playerid][slot][mPosX], MarkedPositions[playerid][slot][mPosY], MarkedPositions[playerid][slot][mPosZ]);
  59392. SetPlayerFacingAngle(playerid, MarkedPositions[playerid][slot][mPosA]);
  59393. SetPlayerInterior(playerid, MarkedPositions[playerid][slot][mInterior]);
  59394. SetPlayerVirtualWorld(playerid, MarkedPositions[playerid][slot][mWorld]);
  59395. SetCameraBehindPlayer(playerid);
  59396. return 1;
  59397. }
  59398. CMD:createentrance(playerid, params[])
  59399. {
  59400. new name[40], Float:x, Float:y, Float:z, Float:a;
  59401. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pDynamicAdmin])
  59402. {
  59403. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  59404. }
  59405. if(sscanf(params, "s[40]", name))
  59406. {
  59407. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /createentrance [name]");
  59408. }
  59409. if(GetNearbyEntrance(playerid) >= 0)
  59410. {
  59411. return SendClientMessage(playerid, COLOR_GREY, "There is an entrance in range. Find somewhere else to create this one.");
  59412. }
  59413. GetPlayerPos(playerid, x, y, z);
  59414. GetPlayerFacingAngle(playerid, a);
  59415. for(new i = 0; i < MAX_ENTRANCES; i ++)
  59416. {
  59417. if(!EntranceInfo[i][eExists])
  59418. {
  59419. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO entrances (name, pos_x, pos_y, pos_z, pos_a, outsideint, outsidevw) VALUES('%e', '%f', '%f', '%f', '%f', %i, %i)", name, x, y, z, a - 180.0, GetPlayerInterior(playerid), GetPlayerVirtualWorld(playerid));
  59420. mysql_tquery(connectionID, queryBuffer, "OnAdminCreateEntrance", "iisffff", playerid, i, name, x, y, z, a);
  59421. return 1;
  59422. }
  59423. }
  59424. SendClientMessage(playerid, COLOR_GREY, "Entrance slots are currently full. Ask developers to increase the internal limit.");
  59425. return 1;
  59426. }
  59427. CMD:editentrance(playerid, params[])
  59428. {
  59429. new entranceid, option[14], param[64];
  59430. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pDynamicAdmin])
  59431. {
  59432. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  59433. }
  59434. if(sscanf(params, "is[14]S()[64]", entranceid, option, param))
  59435. {
  59436. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editentrance [entranceid] [option]");
  59437. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Exterior, Interior, Name, Icon, World, Owner, Locked, Radius, AdminLevel");
  59438. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Faction, Gang, VIP, Vehicles, Freeze, Label, Password, Type, MapIcon, Color");
  59439. return 1;
  59440. }
  59441. if(!(0 <= entranceid < MAX_ENTRANCES) || !EntranceInfo[entranceid][eExists])
  59442. {
  59443. return SendClientMessage(playerid, COLOR_GREY, "Invalid entrance.");
  59444. }
  59445. if(!strcmp(option, "exterior", true))
  59446. {
  59447. GetPlayerPos(playerid, EntranceInfo[entranceid][ePosX], EntranceInfo[entranceid][ePosY], EntranceInfo[entranceid][ePosZ]);
  59448. GetPlayerFacingAngle(playerid, EntranceInfo[entranceid][ePosA]);
  59449. EntranceInfo[entranceid][eOutsideInt] = GetPlayerInterior(playerid);
  59450. EntranceInfo[entranceid][eOutsideVW] = GetPlayerVirtualWorld(playerid);
  59451. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET pos_x = '%f', pos_y = '%f', pos_z = '%f', pos_a = '%f', outsideint = %i, outsidevw = %i WHERE id = %i", EntranceInfo[entranceid][ePosX], EntranceInfo[entranceid][ePosY], EntranceInfo[entranceid][ePosZ], EntranceInfo[entranceid][ePosA], EntranceInfo[entranceid][eOutsideInt], EntranceInfo[entranceid][eOutsideVW], EntranceInfo[entranceid][eID]);
  59452. mysql_tquery(connectionID, queryBuffer);
  59453. ReloadEntrance(entranceid);
  59454. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the exterior of entrance %i.", entranceid);
  59455. }
  59456. else if(!strcmp(option, "interior", true))
  59457. {
  59458. GetPlayerPos(playerid, EntranceInfo[entranceid][eIntX], EntranceInfo[entranceid][eIntY], EntranceInfo[entranceid][eIntZ]);
  59459. GetPlayerFacingAngle(playerid, EntranceInfo[entranceid][eIntA]);
  59460. EntranceInfo[entranceid][eInterior] = GetPlayerInterior(playerid);
  59461. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET int_x = '%f', int_y = '%f', int_z = '%f', int_a = '%f', interior = %i WHERE id = %i", EntranceInfo[entranceid][eIntX], EntranceInfo[entranceid][eIntY], EntranceInfo[entranceid][eIntZ], EntranceInfo[entranceid][eIntA], EntranceInfo[entranceid][eInterior], EntranceInfo[entranceid][eID]);
  59462. mysql_tquery(connectionID, queryBuffer);
  59463. ReloadEntrance(entranceid);
  59464. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the interior of entrance %i.", entranceid);
  59465. }
  59466. else if(!strcmp(option, "name", true))
  59467. {
  59468. new name[32];
  59469. if(sscanf(param, "s[32]", name))
  59470. {
  59471. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editentrance [entranceid] [name] [text]");
  59472. }
  59473. strcpy(EntranceInfo[entranceid][eName], name, 32);
  59474. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET name = '%e' WHERE id = %i", EntranceInfo[entranceid][eName], EntranceInfo[entranceid][eID]);
  59475. mysql_tquery(connectionID, queryBuffer);
  59476. ReloadEntrance(entranceid);
  59477. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the name of entrance %i to '%s'.", entranceid, name);
  59478. }
  59479. else if(!strcmp(option, "icon", true))
  59480. {
  59481. new iconid;
  59482. if(sscanf(param, "i", iconid))
  59483. {
  59484. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editentrance [entranceid] [icon] [iconid (19300 = hide)]");
  59485. }
  59486. if(!IsValidModel(iconid))
  59487. {
  59488. return SendClientMessage(playerid, COLOR_GREY, "Invalid model ID.");
  59489. }
  59490. EntranceInfo[entranceid][eIcon] = iconid;
  59491. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET iconid = %i WHERE id = %i", EntranceInfo[entranceid][eIcon], EntranceInfo[entranceid][eID]);
  59492. mysql_tquery(connectionID, queryBuffer);
  59493. ReloadEntrance(entranceid);
  59494. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the pickup icon model of entrance %i to %i.", entranceid, iconid);
  59495. }
  59496. else if(!strcmp(option, "world", true))
  59497. {
  59498. new worldid;
  59499. if(sscanf(param, "i", worldid))
  59500. {
  59501. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editentrance [entranceid] [world] [vw]");
  59502. }
  59503. EntranceInfo[entranceid][eWorld] = worldid;
  59504. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET world = %i WHERE id = %i", EntranceInfo[entranceid][eWorld], EntranceInfo[entranceid][eID]);
  59505. mysql_tquery(connectionID, queryBuffer);
  59506. ReloadEntrance(entranceid);
  59507. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the virtual world of entrance %i to %i.", entranceid, worldid);
  59508. }
  59509. else if(!strcmp(option, "owner", true))
  59510. {
  59511. new targetid;
  59512. if(!isnull(param) && !strcmp(param, "none", true))
  59513. {
  59514. SetEntranceOwner(entranceid, INVALID_PLAYER_ID);
  59515. return SendClientMessageEx(playerid, COLOR_AQUA, "* You've reset the owner of entrance %i.", entranceid);
  59516. }
  59517. if(sscanf(param, "u", targetid))
  59518. {
  59519. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /editentrance [entranceid] [owner] [playerid/none]");
  59520. }
  59521. if(!IsPlayerConnected(targetid))
  59522. {
  59523. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  59524. }
  59525. if(!PlayerData[targetid][pLogged])
  59526. {
  59527. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet.");
  59528. }
  59529. SetEntranceOwner(entranceid, targetid);
  59530. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the owner of entrance %i to %s.", entranceid, GetRPName(targetid));
  59531. }
  59532. else if(!strcmp(option, "locked", true))
  59533. {
  59534. new locked;
  59535. if(sscanf(param, "i", locked) || !(0 <= locked <= 1))
  59536. {
  59537. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editentrance [entranceid] [locked] [0/1]");
  59538. }
  59539. EntranceInfo[entranceid][eLocked] = locked;
  59540. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET locked = %i WHERE id = %i", EntranceInfo[entranceid][eLocked], EntranceInfo[entranceid][eID]);
  59541. mysql_tquery(connectionID, queryBuffer);
  59542. ReloadEntrance(entranceid);
  59543. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the lock state of entrance %i to %i.", entranceid, locked);
  59544. }
  59545. else if(!strcmp(option, "radius", true))
  59546. {
  59547. new Float:radius;
  59548. if(sscanf(param, "f", radius))
  59549. {
  59550. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editentrance [entranceid] [radius] [range]");
  59551. }
  59552. if(!(1.0 <= radius <= 20.0))
  59553. {
  59554. return SendClientMessage(playerid, COLOR_GREY, "The entry radius must range between 1.0 and 20.0.");
  59555. }
  59556. EntranceInfo[entranceid][eRadius] = radius;
  59557. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET radius = '%f' WHERE id = %i", EntranceInfo[entranceid][eRadius], EntranceInfo[entranceid][eID]);
  59558. mysql_tquery(connectionID, queryBuffer);
  59559. ReloadEntrance(entranceid);
  59560. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the entry radius of entrance %i to %.1f.", entranceid, radius);
  59561. }
  59562. else if(!strcmp(option, "adminlevel", true))
  59563. {
  59564. new level;
  59565. if(sscanf(param, "i", level))
  59566. {
  59567. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editentrance [entranceid] [adminlevel] [level]");
  59568. }
  59569. if(!(0 <= level <= 7))
  59570. {
  59571. return SendClientMessage(playerid, COLOR_GREY, "Invalid level. Valid levels range from 0 to 7.");
  59572. }
  59573. EntranceInfo[entranceid][eAdminLevel] = level;
  59574. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET adminlevel = %i WHERE id = %i", EntranceInfo[entranceid][eAdminLevel], EntranceInfo[entranceid][eID]);
  59575. mysql_tquery(connectionID, queryBuffer);
  59576. ReloadEntrance(entranceid);
  59577. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the admin level of entrance %i to %i.", entranceid, level);
  59578. }
  59579. else if(!strcmp(option, "faction", true))
  59580. {
  59581. new type;
  59582. if(sscanf(param, "i", type))
  59583. {
  59584. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editentrance [entranceid] [faction] [type]");
  59585. SendClientMessage(playerid, COLOR_SYNTAX, "List of types: (0) None (1) Police (2) Medic (3) News (4) Government (5) Hitman (6) Federal");
  59586. return 1;
  59587. }
  59588. if(!(0 <= type <= 6))
  59589. {
  59590. return SendClientMessage(playerid, COLOR_GREY, "Invalid type.");
  59591. }
  59592. EntranceInfo[entranceid][eFactionType] = type;
  59593. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET factiontype = %i WHERE id = %i", EntranceInfo[entranceid][eFactionType], EntranceInfo[entranceid][eID]);
  59594. mysql_tquery(connectionID, queryBuffer);
  59595. ReloadEntrance(entranceid);
  59596. if(type == FACTION_NONE)
  59597. SendClientMessageEx(playerid, COLOR_AQUA, "* You've reset the faction type of entrance %i.", entranceid);
  59598. else
  59599. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the faction type of entrance %i to %s (%i).", entranceid, factionTypes[type], type);
  59600. }
  59601. else if(!strcmp(option, "gang", true))
  59602. {
  59603. new gangid;
  59604. if(sscanf(param, "i", gangid))
  59605. {
  59606. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editentrance [entranceid] [gang] [gangid]");
  59607. }
  59608. if(!(-1 <= gangid < MAX_GANGS) || (gangid >= 0 && !GangInfo[gangid][gSetup]))
  59609. {
  59610. return SendClientMessage(playerid, COLOR_GREY, "Invalid gang.");
  59611. }
  59612. EntranceInfo[entranceid][eGang] = gangid;
  59613. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET gang = %i WHERE id = %i", EntranceInfo[entranceid][eGang], EntranceInfo[entranceid][eID]);
  59614. mysql_tquery(connectionID, queryBuffer);
  59615. ReloadEntrance(entranceid);
  59616. if(gangid == -1)
  59617. SendClientMessageEx(playerid, COLOR_AQUA, "* You've reset the gang of entrance %i.", entranceid);
  59618. else
  59619. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the gang of entrance %i to %s (%i).", entranceid, GangInfo[gangid][gName], gangid);
  59620. }
  59621. else if(!strcmp(option, "vip", true))
  59622. {
  59623. new rankid;
  59624. if(sscanf(param, "i", rankid))
  59625. {
  59626. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editentrance [entranceid] [vip] [rankid]");
  59627. SendClientMessage(playerid, COLOR_SYNTAX, "List of ranks: (0) None (1) Silver (2) Gold (3) Legendary");
  59628. return 1;
  59629. }
  59630. if(!(0 <= rankid <= 3))
  59631. {
  59632. return SendClientMessage(playerid, COLOR_GREY, "Invalid VIP rank.");
  59633. }
  59634. EntranceInfo[entranceid][eVIP] = rankid;
  59635. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET vip = %i WHERE id = %i", EntranceInfo[entranceid][eVIP], EntranceInfo[entranceid][eID]);
  59636. mysql_tquery(connectionID, queryBuffer);
  59637. ReloadEntrance(entranceid);
  59638. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the VIP rank of entrance %i to {D909D9}%s{33CCFF} (%i).", entranceid, GetVIPRank(rankid), rankid);
  59639. }
  59640. else if(!strcmp(option, "vehicles", true))
  59641. {
  59642. new status;
  59643. if(sscanf(param, "i", status) || !(0 <= status <= 1))
  59644. {
  59645. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editentrance [entranceid] [vehicles] [0/1]");
  59646. }
  59647. EntranceInfo[entranceid][eVehicles] = status;
  59648. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET vehicles = %i WHERE id = %i", EntranceInfo[entranceid][eVehicles], EntranceInfo[entranceid][eID]);
  59649. mysql_tquery(connectionID, queryBuffer);
  59650. ReloadEntrance(entranceid);
  59651. if(status)
  59652. SendClientMessageEx(playerid, COLOR_AQUA, "* You've allowed vehicle entry for entrance %i.", entranceid);
  59653. else
  59654. SendClientMessageEx(playerid, COLOR_AQUA, "* You've disallowed vehicle entry for entrance %i.", entranceid);
  59655. }
  59656. else if(!strcmp(option, "freeze", true))
  59657. {
  59658. new status;
  59659. if(sscanf(param, "i", status) || !(0 <= status <= 1))
  59660. {
  59661. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editentrance [entranceid] [freeze] [0/1]");
  59662. }
  59663. EntranceInfo[entranceid][eFreeze] = status;
  59664. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET freeze = %i WHERE id = %i", EntranceInfo[entranceid][eFreeze], EntranceInfo[entranceid][eID]);
  59665. mysql_tquery(connectionID, queryBuffer);
  59666. ReloadEntrance(entranceid);
  59667. if(status)
  59668. SendClientMessageEx(playerid, COLOR_AQUA, "* You've enabled freeze & object loading for entrance %i.", entranceid);
  59669. else
  59670. SendClientMessageEx(playerid, COLOR_AQUA, "* You've disabled freeze & object loading for entrance %i.", entranceid);
  59671. }
  59672. else if(!strcmp(option, "label", true))
  59673. {
  59674. new status;
  59675. if(sscanf(param, "i", status) || !(0 <= status <= 1))
  59676. {
  59677. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editentrance [entranceid] [label] [0/1]");
  59678. }
  59679. EntranceInfo[entranceid][eLabel] = status;
  59680. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET label = %i WHERE id = %i", EntranceInfo[entranceid][eLabel], EntranceInfo[entranceid][eID]);
  59681. mysql_tquery(connectionID, queryBuffer);
  59682. ReloadEntrance(entranceid);
  59683. if(status)
  59684. SendClientMessageEx(playerid, COLOR_AQUA, "* You've enabled the 3D text label for entrance %i.", entranceid);
  59685. else
  59686. SendClientMessageEx(playerid, COLOR_AQUA, "* You've disabled the 3D text label for entrance %i.", entranceid);
  59687. }
  59688. else if(!strcmp(option, "password", true))
  59689. {
  59690. if(isnull(param))
  59691. {
  59692. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editentrance [entranceid] [password] [text ('none' to reset)]");
  59693. }
  59694. strcpy(EntranceInfo[entranceid][ePassword], param, 64);
  59695. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET password = '%e' WHERE id = %i", EntranceInfo[entranceid][ePassword], EntranceInfo[entranceid][eID]);
  59696. mysql_tquery(connectionID, queryBuffer);
  59697. ReloadEntrance(entranceid);
  59698. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the password of entrance %i to '%s'.", entranceid, param);
  59699. }
  59700. else if(!strcmp(option, "type", true))
  59701. {
  59702. new type;
  59703. if(sscanf(param, "i", type))
  59704. {
  59705. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editentrance [entranceid] [type] [type id]");
  59706. SendClientMessage(playerid, COLOR_SYNTAX, "List of types: (0) None (1) Duel Arena (2) Repair");
  59707. return 1;
  59708. }
  59709. if(!(0 <= type <= 2))
  59710. {
  59711. return SendClientMessage(playerid, COLOR_GREY, "Invalid type.");
  59712. }
  59713. EntranceInfo[entranceid][eType] = type;
  59714. if(type == 1)
  59715. {
  59716. EntranceInfo[entranceid][eIntX] = 1419.6472;
  59717. EntranceInfo[entranceid][eIntY] = 4.0132;
  59718. EntranceInfo[entranceid][eIntZ] = 1002.3906;
  59719. EntranceInfo[entranceid][eIntA] = 90.0000;
  59720. EntranceInfo[entranceid][eInterior] = 1;
  59721. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET int_x = '%f', int_y = '%f', int_z = '%f', int_a = '%f', interior = %i, type = %i WHERE id = %i", EntranceInfo[entranceid][eIntX], EntranceInfo[entranceid][eIntY], EntranceInfo[entranceid][eIntZ], EntranceInfo[entranceid][eIntA], EntranceInfo[entranceid][eInterior], EntranceInfo[entranceid][eType], EntranceInfo[entranceid][eID]);
  59722. mysql_tquery(connectionID, queryBuffer);
  59723. }
  59724. else
  59725. {
  59726. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET type = %i WHERE id = %i", EntranceInfo[entranceid][eType], EntranceInfo[entranceid][eID]);
  59727. mysql_tquery(connectionID, queryBuffer);
  59728. }
  59729. ReloadEntrance(entranceid);
  59730. SendClientMessageEx(playerid, COLOR_AQUA, "* You've set the special type for entrance %i to %i.", entranceid, type);
  59731. }
  59732. else if(!strcmp(option, "mapicon", true))
  59733. {
  59734. new type;
  59735. if(sscanf(param, "i", type))
  59736. {
  59737. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editentrance [entranceid] [mapicon] [type (0-63)]");
  59738. }
  59739. if(!(0 <= type <= 63))
  59740. {
  59741. return SendClientMessage(playerid, COLOR_GREY, "Invalid map icon.");
  59742. }
  59743. EntranceInfo[entranceid][eMapIcon] = type;
  59744. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET mapicon = %i WHERE id = %i", EntranceInfo[entranceid][eMapIcon], EntranceInfo[entranceid][eID]);
  59745. mysql_tquery(connectionID, queryBuffer);
  59746. ReloadEntrance(entranceid);
  59747. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the map icon of entrance %i to %i.", entranceid, type);
  59748. }
  59749. else if(!strcmp(option, "color", true))
  59750. {
  59751. new color;
  59752. if(sscanf(param, "h", color))
  59753. {
  59754. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editentrance [entranceid] [color] [0xRRGGBBAA]");
  59755. }
  59756. EntranceInfo[entranceid][eColor] = (color & ~0xFF) | 0xFF;
  59757. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET color = %i WHERE id = %i", EntranceInfo[entranceid][eColor], EntranceInfo[entranceid][eID]);
  59758. mysql_tquery(connectionID, queryBuffer);
  59759. ReloadEntrance(entranceid);
  59760. SendClientMessageEx(playerid, COLOR_AQUA, "* You have set the {%06x}color{33CCFF} of entrance ID %i.", color >>> 8, entranceid);
  59761. }
  59762. return 1;
  59763. }
  59764. CMD:removeentrance(playerid, params[])
  59765. {
  59766. new entranceid;
  59767. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pDynamicAdmin])
  59768. {
  59769. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  59770. }
  59771. if(sscanf(params, "i", entranceid))
  59772. {
  59773. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /removeentrance [entranceid]");
  59774. }
  59775. if(!(0 <= entranceid < MAX_ENTRANCES) || !EntranceInfo[entranceid][eExists])
  59776. {
  59777. return SendClientMessage(playerid, COLOR_GREY, "Invalid entrance.");
  59778. }
  59779. DestroyDynamic3DTextLabel(EntranceInfo[entranceid][eText]);
  59780. DestroyDynamicPickup(EntranceInfo[entranceid][ePickup]);
  59781. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM entrances WHERE id = %i", EntranceInfo[entranceid][eID]);
  59782. mysql_tquery(connectionID, queryBuffer);
  59783. EntranceInfo[entranceid][eExists] = 0;
  59784. EntranceInfo[entranceid][eID] = 0;
  59785. EntranceInfo[entranceid][eOwnerID] = 0;
  59786. Iter_Remove(Entrance, entranceid);
  59787. SendClientMessageEx(playerid, COLOR_AQUA, "* You have removed entrance %i.", entranceid);
  59788. return 1;
  59789. }
  59790. CMD:gotoentrance(playerid, params[])
  59791. {
  59792. new entranceid;
  59793. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  59794. {
  59795. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  59796. }
  59797. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  59798. {
  59799. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  59800. }
  59801. if(sscanf(params, "i", entranceid))
  59802. {
  59803. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /gotoentrance [entranceid]");
  59804. }
  59805. if(!(0 <= entranceid < MAX_ENTRANCES) || !EntranceInfo[entranceid][eExists])
  59806. {
  59807. return SendClientMessage(playerid, COLOR_GREY, "Invalid entrance.");
  59808. }
  59809. GameTextForPlayer(playerid, "~w~Teleported", 5000, 1);
  59810. SetPlayerPos(playerid, EntranceInfo[entranceid][ePosX], EntranceInfo[entranceid][ePosY], EntranceInfo[entranceid][ePosZ]);
  59811. SetPlayerFacingAngle(playerid, EntranceInfo[entranceid][ePosA]);
  59812. SetPlayerInterior(playerid, EntranceInfo[entranceid][eOutsideInt]);
  59813. SetPlayerVirtualWorld(playerid, EntranceInfo[entranceid][eOutsideVW]);
  59814. SetCameraBehindPlayer(playerid);
  59815. return 1;
  59816. }
  59817. CMD:angle(playerid, params[])
  59818. {
  59819. new Float:a;
  59820. GetPlayerFacingAngle(playerid, a);
  59821. SendClientMessageEx(playerid, COLOR_WHITE, "Your facing angle is {00aa00}%f.", a);
  59822. return 1;
  59823. }
  59824. CMD:join(playerid, params[])
  59825. {
  59826. for(new i = 0; i < sizeof(jobLocations); i ++)
  59827. {
  59828. if(IsPlayerInRangeOfPoint(playerid, 3.0, jobLocations[i][jobX], jobLocations[i][jobY], jobLocations[i][jobZ]))
  59829. {
  59830. if(PlayerData[playerid][pJob] != JOB_NONE)
  59831. {
  59832. if(PlayerData[playerid][pDonator] >= 2)
  59833. {
  59834. if(PlayerData[playerid][pSecondJob] != JOB_NONE)
  59835. {
  59836. return SendClientMessage(playerid, COLOR_GREY, "You have two jobs already. Please quit one of them before getting another one.");
  59837. }
  59838. if(PlayerData[playerid][pJob] == i)
  59839. {
  59840. return SendClientMessage(playerid, COLOR_GREY, "You have this job already.");
  59841. }
  59842. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET secondjob = %i WHERE uid = %i", i, PlayerData[playerid][pID]);
  59843. mysql_tquery(connectionID, queryBuffer);
  59844. ApplyActorAnimation(jobLocations[i][jobActor], "PED", "IDLE_CHAT", 4.1, 1, 1, 1, 1, 1);
  59845. PlayerData[playerid][pSecondJob] = i;
  59846. SendClientMessageEx(playerid, COLOR_WHITE, "You are now a {FF0000}%s{ffffff}. Use /jobhelp for a list of commands related to your new job.", jobLocations[i][jobName]);
  59847. }
  59848. else
  59849. {
  59850. SendClientMessage(playerid, COLOR_GREY, "You have a job already. Please quit your current job before getting another one.");
  59851. }
  59852. return 1;
  59853. }
  59854. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET job = %i WHERE uid = %i", i, PlayerData[playerid][pID]);
  59855. mysql_tquery(connectionID, queryBuffer);
  59856. // ApplyActorAnimation(jobLocations[i][jobActor], "PED", "IDLE_CHAT", 4.1, 1, 1, 1, 1, 1);
  59857. PlayerData[playerid][pJob] = i;
  59858. SendClientMessageEx(playerid, COLOR_WHITE, "You are now a {ffff00}%s{ffffff}. Use /jobhelp for a list of commands related to your new job.", jobLocations[i][jobName]);
  59859. return 1;
  59860. }
  59861. }
  59862. SendClientMessage(playerid, COLOR_GREY, "You are not in range of any job icon.");
  59863. return 1;
  59864. }
  59865. CMD:quitjob(playerid, params[])
  59866. {
  59867. new slot;
  59868. if(PlayerData[playerid][pDonator] >= 2 && sscanf(params, "i", slot))
  59869. {
  59870. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /quitjob [1/2]");
  59871. }
  59872. if((PlayerData[playerid][pDonator] < 2) || (PlayerData[playerid][pDonator] >= 2 && slot == 1))
  59873. {
  59874. if(PlayerData[playerid][pJob] == JOB_NONE)
  59875. {
  59876. return SendClientMessage(playerid, COLOR_GREY, "You don't have a job which you can quit.");
  59877. }
  59878. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET job = -1 WHERE uid = %i", PlayerData[playerid][pID]);
  59879. mysql_tquery(connectionID, queryBuffer);
  59880. SendClientMessageEx(playerid, COLOR_AQUA, "You have quit your job as a {00AA00}%s{33CCFF}.", GetJobName(PlayerData[playerid][pJob]));
  59881. PlayerData[playerid][pJob] = JOB_NONE;
  59882. RemovePlayerFromVehicle(playerid);
  59883. }
  59884. else if(slot == 2 && PlayerData[playerid][pDonator] >= 2)
  59885. {
  59886. if(PlayerData[playerid][pSecondJob] == JOB_NONE)
  59887. {
  59888. return SendClientMessage(playerid, COLOR_GREY, "You don't have a job in this slot which you can quit.");
  59889. }
  59890. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET secondjob = -1 WHERE uid = %i", PlayerData[playerid][pID]);
  59891. mysql_tquery(connectionID, queryBuffer);
  59892. SendClientMessageEx(playerid, COLOR_AQUA, "You have quit your secondary job as a {00AA00}%s{33CCFF}.", GetJobName(PlayerData[playerid][pSecondJob]));
  59893. PlayerData[playerid][pSecondJob] = JOB_NONE;
  59894. RemovePlayerFromVehicle(playerid);
  59895. }
  59896. return 1;
  59897. }
  59898. CMD:getpizza(playerid, params[])
  59899. {
  59900. new houseid;
  59901. if(!PlayerHasJob(playerid, JOB_PIZZAMAN))
  59902. {
  59903. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you are not a Pizzaman.");
  59904. }
  59905. if(PlayerData[playerid][pPizzaCooldown] > 0)
  59906. {
  59907. return SendClientMessageEx(playerid, COLOR_GREY, "You need to wait %i more seconds before you can load another pizza.", PlayerData[playerid][pPizzaCooldown]);
  59908. }
  59909. if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 448)
  59910. {
  59911. return SendClientMessage(playerid, COLOR_GREY, "You need to be driving a pizza bike.");
  59912. }
  59913. /*if(PlayerData[playerid][pPizzas] > 0)
  59914. {
  59915. return SendClientMessage(playerid, COLOR_GREY, "You have pizzas already. Deliver them first.");
  59916. }*/
  59917. if(!IsPlayerInRangeOfPoint(playerid, 6.0, jobLocations[JOB_PIZZAMAN][jobX], jobLocations[JOB_PIZZAMAN][jobY], jobLocations[JOB_PIZZAMAN][jobZ]))
  59918. {
  59919. return SendClientMessage(playerid, COLOR_GREY, "You must be closer to the job icon at the pizza stacks.");
  59920. }
  59921. if((houseid = GetRandomHouse(playerid)) == -1)
  59922. {
  59923. return SendClientMessage(playerid, COLOR_GREY, "There are no houses in the server to deliver pizza to. Ask an admin to set them up.");
  59924. }
  59925. PlayerData[playerid][pDistance] = GetPlayerDistanceFromPoint(playerid, HouseInfo[houseid][hPosX], HouseInfo[houseid][hPosY], HouseInfo[houseid][hPosZ]);
  59926. PlayerData[playerid][pPizzas] = 1;
  59927. PlayerData[playerid][pLastPizza] = gettime();
  59928. PlayerData[playerid][pPizzaTime] = 0;
  59929. PlayerData[playerid][pPizzaCooldown] = 60;
  59930. PlayerData[playerid][pCP] = CHECKPOINT_PIZZA;
  59931. SetPlayerCheckpoint(playerid, HouseInfo[houseid][hPosX], HouseInfo[houseid][hPosY], HouseInfo[houseid][hPosZ], 2.0);
  59932. SendClientMessageEx(playerid, COLOR_AQUA, "* You loaded your bike with a hot and ready pizza. Deliver it to %s.", GetZoneName(HouseInfo[houseid][hPosX], HouseInfo[houseid][hPosY], HouseInfo[houseid][hPosZ]));
  59933. return 1;
  59934. }
  59935. CMD:load(playerid, params[])
  59936. {
  59937. if(!PlayerHasJob(playerid, JOB_COURIER))
  59938. {
  59939. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you are not a Courier.");
  59940. }
  59941. if(PlayerData[playerid][pCourierCooldown] > 0)
  59942. {
  59943. return SendClientMessageEx(playerid, COLOR_GREY, "You need to wait %i more seconds before you can load another delivery.", PlayerData[playerid][pCourierCooldown]);
  59944. }
  59945. if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 414 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 498 && GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
  59946. {
  59947. return SendClientMessage(playerid, COLOR_GREY, "You need to be driving a Mule or a Boxville.");
  59948. }
  59949. if(!IsPlayerInRangeOfPoint(playerid, 8.0, 1766.9261,-2048.9807,13.8355))
  59950. {
  59951. return SendClientMessage(playerid, COLOR_GREY, "You are not at the loading dock.");
  59952. }
  59953. if(PlayerData[playerid][pShipment] >= 0)
  59954. {
  59955. return SendClientMessage(playerid, COLOR_GREY, "You have a shipment loaded already. You need to deliver it first.");
  59956. }
  59957. Dialog_Show(playerid, DIALOG_PICKLOAD, DIALOG_STYLE_LIST, "Choose the load you want to deliver.", "Grocery supplies\nAmmunition\nClothing items\nFood & drinks\nBeverages\nTools & equipment", "Select", "Cancel");
  59958. return 1;
  59959. }
  59960. CMD:deliver(playerid, params[])
  59961. {
  59962. new businessid, products, amount;
  59963. if(!PlayerHasJob(playerid, JOB_COURIER))
  59964. {
  59965. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you are not a Courier.");
  59966. }
  59967. if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 414 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 498 && GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
  59968. {
  59969. return SendClientMessage(playerid, COLOR_GREY, "You need to be driving a Mule or a Boxville.");
  59970. }
  59971. if(PlayerData[playerid][pShipment] == -1)
  59972. {
  59973. return SendClientMessage(playerid, COLOR_GREY, "You have no shipment loaded which you can deliver.");
  59974. }
  59975. if((businessid = GetNearbyBusiness(playerid, 7.0)) == -1 || BusinessInfo[businessid][bType] != PlayerData[playerid][pShipment])
  59976. {
  59977. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of a business which accepts this type of load.");
  59978. }
  59979. if(gettime() - PlayerData[playerid][pLastLoad] < 20 && PlayerData[playerid][pAdmin] < JUNIOR_ADMIN && !PlayerData[playerid][pKicked])
  59980. {
  59981. PlayerData[playerid][pACWarns]++;
  59982. if(PlayerData[playerid][pACWarns] < MAX_ANTICHEAT_WARNINGS)
  59983. {
  59984. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] is possibly teleport delivering (time: %i).", GetRPName(playerid), playerid, gettime() - PlayerData[playerid][pLastLoad]);
  59985. }
  59986. else
  59987. {
  59988. SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was autobanned by %s, reason: Teleport delivering", GetRPName(playerid), SERVER_ANTICHEAT);
  59989. BanPlayer(playerid, SERVER_ANTICHEAT, "Teleport delivering");
  59990. }
  59991. }
  59992. products = (GetJobLevel(playerid, JOB_COURIER) * 5) + 5;
  59993. if(PlayerData[playerid][pShipment] == BUSINESS_STORE) {
  59994. amount = (GetJobLevel(playerid, JOB_COURIER) * 200) + 470;
  59995. } else if(PlayerData[playerid][pShipment] == BUSINESS_GUNSHOP) {
  59996. amount = (GetJobLevel(playerid, JOB_COURIER) * 200) + 525;
  59997. } else if(PlayerData[playerid][pShipment] == BUSINESS_CLOTHES) {
  59998. amount = (GetJobLevel(playerid, JOB_COURIER) * 200) + 545;
  59999. } else if(PlayerData[playerid][pShipment] == BUSINESS_RESTAURANT) {
  60000. amount = (GetJobLevel(playerid, JOB_COURIER) * 200) + 490;
  60001. } else if(PlayerData[playerid][pShipment] == BUSINESS_BARCLUB) {
  60002. amount = (GetJobLevel(playerid, JOB_COURIER) * 200) + 440;
  60003. } else if(PlayerData[playerid][pShipment] == BUSINESS_TOOLSHOP) {
  60004. amount = (GetJobLevel(playerid, JOB_COURIER) * 200) + 560;
  60005. }
  60006. amount += floatround(GetPlayerDistanceFromPoint(playerid, -63.4372, -1121.4932, 1.1103) / 2.0);
  60007. if(PlayerData[playerid][pLaborUpgrade] > 0)
  60008. {
  60009. amount += percent(amount, PlayerData[playerid][pLaborUpgrade]);
  60010. }
  60011. SendClientMessageEx(playerid, COLOR_AQUA, "* You have earned {00AA00}$%i{33CCFF} for delivering %i products.", amount, products);
  60012. GivePlayerCash(playerid, amount);
  60013. BusinessInfo[businessid][bProducts] += products;
  60014. PlayerData[playerid][pShipment] = -1;
  60015. PlayerData[playerid][pCourierCooldown] = 120;
  60016. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET products = %i WHERE id = %i", BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]);
  60017. mysql_tquery(connectionID, queryBuffer);
  60018. IncreaseJobSkill(playerid, JOB_COURIER);
  60019. return 1;
  60020. }
  60021. CMD:skill(playerid, params[])
  60022. {
  60023. ShowDialogToPlayer(playerid, DIALOG_SKILL);
  60024. }
  60025. CMD:skillss(playerid, params[])
  60026. {
  60027. if(isnull(params))
  60028. {
  60029. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /skill [option]");
  60030. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Courier, Fishing, Bodyguard, WeaponDealer, Mechanic, DrugSmuggler, Lawyer, Detective, Thief");
  60031. return 1;
  60032. }
  60033. if(!strcmp(params, "courier", true))
  60034. {
  60035. SendClientMessageEx(playerid, COLOR_GREEN, "Your courier skill level is %i/5.", GetJobLevel(playerid, JOB_COURIER));
  60036. if(GetJobLevel(playerid, JOB_COURIER) < 5)
  60037. {
  60038. if(PlayerData[playerid][pCourierSkill] < 50) {
  60039. SendClientMessageEx(playerid, COLOR_GREEN, "You need to deliver %i more shipments in order to level up.", 50 - PlayerData[playerid][pCourierSkill]);
  60040. } else if(PlayerData[playerid][pCourierSkill] < 100) {
  60041. SendClientMessageEx(playerid, COLOR_GREEN, "You need to deliver %i more shipments in order to level up.", 100 - PlayerData[playerid][pCourierSkill]);
  60042. } else if(PlayerData[playerid][pCourierSkill] < 200) {
  60043. SendClientMessageEx(playerid, COLOR_GREEN, "You need to deliver %i more shipments in order to level up.", 200 - PlayerData[playerid][pCourierSkill]);
  60044. } else if(PlayerData[playerid][pCourierSkill] < 350) {
  60045. SendClientMessageEx(playerid, COLOR_GREEN, "You need to deliver %i more shipments in order to level up.", 350 - PlayerData[playerid][pCourierSkill]);
  60046. }
  60047. }
  60048. else
  60049. {
  60050. SendClientMessage(playerid, COLOR_GREEN, "You have reached the maximum skill level for this job.");
  60051. }
  60052. }
  60053. else if(!strcmp(params, "fishing", true))
  60054. {
  60055. SendClientMessageEx(playerid, COLOR_GREEN, "Your fishing skill level is %i/5.", GetJobLevel(playerid, JOB_FISHERMAN));
  60056. if(GetJobLevel(playerid, JOB_FISHERMAN) < 5)
  60057. {
  60058. if(PlayerData[playerid][pFishingSkill] < 50) {
  60059. SendClientMessageEx(playerid, COLOR_GREEN, "You need to catch %i more fish in order to level up.", 50 - PlayerData[playerid][pFishingSkill]);
  60060. } else if(PlayerData[playerid][pFishingSkill] < 100) {
  60061. SendClientMessageEx(playerid, COLOR_GREEN, "You need to catch %i more fish in order to level up.", 100 - PlayerData[playerid][pFishingSkill]);
  60062. } else if(PlayerData[playerid][pFishingSkill] < 200) {
  60063. SendClientMessageEx(playerid, COLOR_GREEN, "You need to catch %i more fish in order to level up.", 200 - PlayerData[playerid][pFishingSkill]);
  60064. } else if(PlayerData[playerid][pFishingSkill] < 350) {
  60065. SendClientMessageEx(playerid, COLOR_GREEN, "You need to catch %i more fish in order to level up.", 350 - PlayerData[playerid][pFishingSkill]);
  60066. }
  60067. }
  60068. else
  60069. {
  60070. SendClientMessage(playerid, COLOR_GREEN, "You have reached the maximum skill level for this job.");
  60071. }
  60072. }
  60073. else if(!strcmp(params, "bodyguard", true))
  60074. {
  60075. SendClientMessageEx(playerid, COLOR_GREEN, "Your bodyguard skill level is %i/5.", GetJobLevel(playerid, JOB_BODYGUARD));
  60076. if(GetJobLevel(playerid, JOB_BODYGUARD) < 5)
  60077. {
  60078. if(PlayerData[playerid][pGuardSkill] < 25) {
  60079. SendClientMessageEx(playerid, COLOR_GREEN, "You need to sell %i more vests in order to level up.", 25 - PlayerData[playerid][pGuardSkill]);
  60080. } else if(PlayerData[playerid][pGuardSkill] < 50) {
  60081. SendClientMessageEx(playerid, COLOR_GREEN, "You need to sell %i more vests in order to level up.", 50 - PlayerData[playerid][pGuardSkill]);
  60082. } else if(PlayerData[playerid][pGuardSkill] < 100) {
  60083. SendClientMessageEx(playerid, COLOR_GREEN, "You need to sell %i more vests in order to level up.", 100 - PlayerData[playerid][pGuardSkill]);
  60084. } else if(PlayerData[playerid][pGuardSkill] < 200) {
  60085. SendClientMessageEx(playerid, COLOR_GREEN, "You need to sell %i more vests in order to level up.", 200 - PlayerData[playerid][pGuardSkill]);
  60086. }
  60087. }
  60088. else
  60089. {
  60090. SendClientMessage(playerid, COLOR_GREEN, "You have reached the maximum skill level for this job.");
  60091. }
  60092. }
  60093. else if(!strcmp(params, "weapondealer", true))
  60094. {
  60095. SendClientMessageEx(playerid, COLOR_GREEN, "Your weapons dealer skill level is %i/5.", GetJobLevel(playerid, JOB_WEAPONDEALER));
  60096. if(GetJobLevel(playerid, JOB_WEAPONDEALER) < 5)
  60097. {
  60098. if(PlayerData[playerid][pWeaponSkill] < 50) {
  60099. SendClientMessageEx(playerid, COLOR_GREEN, "You need to sell %i more weapons in order to level up.", 50 - PlayerData[playerid][pWeaponSkill]);
  60100. } else if(PlayerData[playerid][pWeaponSkill] < 100) {
  60101. SendClientMessageEx(playerid, COLOR_GREEN, "You need to sell %i more weapons in order to level up.", 100 - PlayerData[playerid][pWeaponSkill]);
  60102. } else if(PlayerData[playerid][pWeaponSkill] < 200) {
  60103. SendClientMessageEx(playerid, COLOR_GREEN, "You need to sell %i more weapons in order to level up.", 200 - PlayerData[playerid][pWeaponSkill]);
  60104. } else if(PlayerData[playerid][pWeaponSkill] < 500) {
  60105. SendClientMessageEx(playerid, COLOR_GREEN, "You need to sell %i more weapons in order to level up.", 500 - PlayerData[playerid][pWeaponSkill]);
  60106. }
  60107. }
  60108. else
  60109. {
  60110. SendClientMessage(playerid, COLOR_GREEN, "You have reached the maximum skill level for this job.");
  60111. }
  60112. }
  60113. else if(!strcmp(params, "mechanic", true))
  60114. {
  60115. SendClientMessageEx(playerid, COLOR_GREEN, "Your mechanic skill level is %i/5.", GetJobLevel(playerid, JOB_MECHANIC));
  60116. if(GetJobLevel(playerid, JOB_MECHANIC) < 5)
  60117. {
  60118. if(PlayerData[playerid][pMechanicSkill] < 25) {
  60119. SendClientMessageEx(playerid, COLOR_GREEN, "You need to fix & refuel %i more vehicles in order to level up.", 25 - PlayerData[playerid][pMechanicSkill]);
  60120. } else if(PlayerData[playerid][pMechanicSkill] < 50) {
  60121. SendClientMessageEx(playerid, COLOR_GREEN, "You need to fix & refuel %i more vehicles in order to level up.", 50 - PlayerData[playerid][pMechanicSkill]);
  60122. } else if(PlayerData[playerid][pMechanicSkill] < 100) {
  60123. SendClientMessageEx(playerid, COLOR_GREEN, "You need to fix & refuel %i more vehicles in order to level up.", 100 - PlayerData[playerid][pMechanicSkill]);
  60124. } else if(PlayerData[playerid][pMechanicSkill] < 200) {
  60125. SendClientMessageEx(playerid, COLOR_GREEN, "You need to fix & refuel %i more vehicles in order to level up.", 200 - PlayerData[playerid][pMechanicSkill]);
  60126. }
  60127. }
  60128. else
  60129. {
  60130. SendClientMessage(playerid, COLOR_GREEN, "You have reached the maximum skill level for this job.");
  60131. }
  60132. }
  60133. else if(!strcmp(params, "drugsmuggler", true))
  60134. {
  60135. SendClientMessageEx(playerid, COLOR_GREEN, "Your drug smuggler skill level is %i/5.", GetJobLevel(playerid, JOB_DRUGDEALER));
  60136. if(GetJobLevel(playerid, JOB_DRUGDEALER) < 5)
  60137. {
  60138. if(PlayerData[playerid][pSmugglerSkill] < 25) {
  60139. SendClientMessageEx(playerid, COLOR_GREEN, "You need to smuggle %i more packages in order to level up.", 25 - PlayerData[playerid][pSmugglerSkill]);
  60140. } else if(PlayerData[playerid][pSmugglerSkill] < 50) {
  60141. SendClientMessageEx(playerid, COLOR_GREEN, "You need to smuggle %i more packages in order to level up.", 50 - PlayerData[playerid][pSmugglerSkill]);
  60142. } else if(PlayerData[playerid][pSmugglerSkill] < 75) {
  60143. SendClientMessageEx(playerid, COLOR_GREEN, "You need to smuggle %i more packages in order to level up.", 75 - PlayerData[playerid][pSmugglerSkill]);
  60144. } else if(PlayerData[playerid][pSmugglerSkill] < 100) {
  60145. SendClientMessageEx(playerid, COLOR_GREEN, "You need to smuggle %i more packages in order to level up.", 100 - PlayerData[playerid][pSmugglerSkill]);
  60146. }
  60147. }
  60148. else
  60149. {
  60150. SendClientMessage(playerid, COLOR_GREEN, "You have reached the maximum skill level for this job.");
  60151. }
  60152. }
  60153. else if(!strcmp(params, "lawyer", true))
  60154. {
  60155. SendClientMessageEx(playerid, COLOR_GREEN, "Your lawyer skill level is %i/5.", GetJobLevel(playerid, JOB_LAWYER));
  60156. if(GetJobLevel(playerid, JOB_LAWYER) < 5)
  60157. {
  60158. if(PlayerData[playerid][pLawyerSkill] < 25) {
  60159. SendClientMessageEx(playerid, COLOR_GREEN, "You need to defend %i more clients in order to level up.", 25 - PlayerData[playerid][pLawyerSkill]);
  60160. } else if(PlayerData[playerid][pLawyerSkill] < 50) {
  60161. SendClientMessageEx(playerid, COLOR_GREEN, "You need to defend %i more clients in order to level up.", 50 - PlayerData[playerid][pLawyerSkill]);
  60162. } else if(PlayerData[playerid][pLawyerSkill] < 100) {
  60163. SendClientMessageEx(playerid, COLOR_GREEN, "You need to defend %i more clients in order to level up.", 100 - PlayerData[playerid][pLawyerSkill]);
  60164. } else if(PlayerData[playerid][pLawyerSkill] < 200) {
  60165. SendClientMessageEx(playerid, COLOR_GREEN, "You need to defend %i more clients in order to level up.", 200 - PlayerData[playerid][pLawyerSkill]);
  60166. }
  60167. }
  60168. else
  60169. {
  60170. SendClientMessage(playerid, COLOR_GREEN, "You have reached the maximum skill level for this job.");
  60171. }
  60172. }
  60173. else if(!strcmp(params, "detective", true))
  60174. {
  60175. SendClientMessageEx(playerid, COLOR_GREEN, "Your detective skill level is %i/5.", GetJobLevel(playerid, JOB_DETECTIVE));
  60176. if(GetJobLevel(playerid, JOB_DETECTIVE) < 5)
  60177. {
  60178. if(PlayerData[playerid][pDetectiveSkill] < 50) {
  60179. SendClientMessageEx(playerid, COLOR_GREEN, "You need to find %i more people in order to level up.", 50 - PlayerData[playerid][pDetectiveSkill]);
  60180. } else if(PlayerData[playerid][pDetectiveSkill] < 100) {
  60181. SendClientMessageEx(playerid, COLOR_GREEN, "You need to find %i more people in order to level up.", 100 - PlayerData[playerid][pDetectiveSkill]);
  60182. } else if(PlayerData[playerid][pDetectiveSkill] < 200) {
  60183. SendClientMessageEx(playerid, COLOR_GREEN, "You need to find %i more people in order to level up.", 200 - PlayerData[playerid][pDetectiveSkill]);
  60184. } else if(PlayerData[playerid][pDetectiveSkill] < 400) {
  60185. SendClientMessageEx(playerid, COLOR_GREEN, "You need to find %i more people in order to level up.", 400 - PlayerData[playerid][pDetectiveSkill]);
  60186. }
  60187. }
  60188. else
  60189. {
  60190. SendClientMessage(playerid, COLOR_GREEN, "You have reached the maximum skill level for this job.");
  60191. }
  60192. }
  60193. else
  60194. {
  60195. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /skill [option]");
  60196. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Courier, Fishing, Bodyguard, WeaponDealer, Mechanic, DrugSmuggler, Lawyer, Detective, Thief");
  60197. }
  60198. return 1;
  60199. }
  60200. CMD:fish(playerid, params[])
  60201. {
  60202. if(!PlayerHasJob(playerid, JOB_FISHERMAN))
  60203. {
  60204. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a Fisherman.");
  60205. }
  60206. if(!PlayerData[playerid][pFishingRod])
  60207. {
  60208. return SendClientMessage(playerid, COLOR_GREY, "You don't have a fishing rod. You need a fishing rod to fish!");
  60209. }
  60210. if(PlayerData[playerid][pFishTime] > 0)
  60211. {
  60212. return SendClientMessage(playerid, COLOR_GREY, "You are fishing already. Wait for your line to be reeled in first.");
  60213. }
  60214. if(PlayerData[playerid][pFishWeight] >= 1500)
  60215. {
  60216. return SendClientMessage(playerid, COLOR_GREY, "You have too much fish and can't fish any longer.");
  60217. }
  60218. if(IsABoat(GetPlayerVehicleID(playerid)))
  60219. {
  60220. //return SendClientMessage(playerid, COLOR_GREY, "You are not close to anywhere where you can fish.");
  60221. }
  60222. else if(!IsPlayerAtFishingPlace(playerid) && GetPlayerState(playerid) != PLAYER_STATE_ONFOOT)
  60223. {
  60224. return SendClientMessage(playerid, COLOR_GREY, "You must be onfoot in order to use this command.");
  60225. }
  60226. ApplyAnimation(playerid, "SAMP", "FishingIdle", 4.1, 0, 0, 0, 1, 0, 1);
  60227. SetPlayerAttachedObject(playerid, 9, 18632, 6, 0.112999, 0.024000, 0.000000, -172.999954, 28.499994, 0.000000);
  60228. ShowActionBubble(playerid, "* %s reels the line of their fishing rod into the water.", GetRPName(playerid));
  60229. PlayerData[playerid][pFishTime] = 6;
  60230. if(PlayerData[playerid][pFishingBait] > 0)
  60231. {
  60232. PlayerData[playerid][pFishingBait]--;
  60233. PlayerData[playerid][pUsedBait] = 1;
  60234. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET fishingbait = fishingbait - 1 WHERE uid = %i", PlayerData[playerid][pID]);
  60235. mysql_tquery(connectionID, queryBuffer);
  60236. //SendClientMessage(playerid, COLOR_AQUA, "* You used one fish bait. Your odds of catching a bigger fish are increased!");
  60237. }
  60238. else
  60239. {
  60240. PlayerData[playerid][pUsedBait] = 0;
  60241. }
  60242. return 1;
  60243. }
  60244. CMD:sellfish(playerid, params[])
  60245. {
  60246. new businessid;
  60247. if(!PlayerHasJob(playerid, JOB_FISHERMAN))
  60248. {
  60249. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a Fisherman.");
  60250. }
  60251. if((businessid = GetInsideBusiness(playerid)) == -1 || BusinessInfo[businessid][bType] != BUSINESS_STORE)
  60252. {
  60253. return SendClientMessage(playerid, COLOR_GREY, "You are not inside any Supermarket business.");
  60254. }
  60255. if(!PlayerData[playerid][pFishWeight])
  60256. {
  60257. return SendClientMessage(playerid, COLOR_GREY, "You have no fish which you can sell.");
  60258. }
  60259. new amount = (PlayerData[playerid][pFishWeight] * 1) + random(300)+50;
  60260. if(PlayerData[playerid][pLaborUpgrade] > 0)
  60261. {
  60262. amount += percent(amount, PlayerData[playerid][pLaborUpgrade]);
  60263. }
  60264. SendClientMessageEx(playerid, COLOR_AQUA, "* You earned {00AA00}$%i{33CCFF} for selling %i kg of fish.", amount, PlayerData[playerid][pFishWeight]);
  60265. GivePlayerCash(playerid, amount);
  60266. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET fishweight = 0 WHERE uid = %i", PlayerData[playerid][pID]);
  60267. mysql_tquery(connectionID, queryBuffer);
  60268. PlayerData[playerid][pFishWeight] = 0;
  60269. return 1;
  60270. }
  60271. CMD:myfish(playerid, params[])
  60272. {
  60273. if(!PlayerHasJob(playerid, JOB_FISHERMAN))
  60274. {
  60275. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a Fisherman.");
  60276. }
  60277. SendClientMessage(playerid, COLOR_NAVYBLUE, "_______ My Fish _______");
  60278. SendClientMessageEx(playerid, COLOR_GREY2, "You have %i/1500 kg of fish in your inventory.", PlayerData[playerid][pFishWeight]);
  60279. return 1;
  60280. }
  60281. CMD:sellvest(playerid, params[])
  60282. {
  60283. new targetid, amount;
  60284. if(!PlayerHasJob(playerid, JOB_BODYGUARD))
  60285. {
  60286. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a Bodyguard.");
  60287. }
  60288. if(sscanf(params, "ui", targetid, amount))
  60289. {
  60290. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sellvest [playerid] [amount]");
  60291. }
  60292. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  60293. {
  60294. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  60295. }
  60296. if(targetid == playerid)
  60297. {
  60298. return SendClientMessage(playerid, COLOR_GREY, "You can't sell to yourself.");
  60299. }
  60300. if(amount < 500 || amount > 2500)
  60301. {
  60302. return SendClientMessage(playerid, COLOR_GREY, "The amount specified must range between $500 and $2500.");
  60303. }
  60304. if(gettime() - PlayerData[playerid][pLastSell] < 10)
  60305. {
  60306. return SendClientMessageEx(playerid, COLOR_GREY, "You can only use this command every 10 seconds. Please wait %i more seconds.", 10 - (gettime() - PlayerData[playerid][pLastSell]));
  60307. }
  60308. if(GetPlayerArmourEx(targetid) >= 50.0 + (GetJobLevel(playerid, JOB_BODYGUARD) * 5))
  60309. {
  60310. return SendClientMessage(playerid, COLOR_GREY, "That player already has a vest.");
  60311. }
  60312. PlayerData[playerid][pLastSell] = gettime();
  60313. PlayerData[targetid][pVestOffer] = playerid;
  60314. PlayerData[targetid][pVestPrice] = amount;
  60315. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered you a vest with %.1f points of armor for %s (/accept vest).", GetRPName(playerid), 50.0 + (GetJobLevel(playerid, JOB_BODYGUARD) * 5), FormatNumber(amount));
  60316. SendClientMessageEx(playerid, COLOR_AQUA, "* You offered %s a vest with %.1f points of armor for %s.", GetRPName(targetid), 50.0 + (GetJobLevel(playerid, JOB_BODYGUARD) * 5), FormatNumber(amount));
  60317. return 1;
  60318. }
  60319. /*CMD:smugglemats(playerid, params[])
  60320. {
  60321. if(!PlayerHasJob(playerid, JOB_WEAPONDEALER))
  60322. {
  60323. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a Weapons Dealer.");
  60324. }
  60325. if(!IsPlayerInRangeOfPoint(playerid, 3.0, 1421.6913, -1318.4719, 13.5547) && !IsPlayerInRangeOfPoint(playerid, 3.0, 2393.4885, -2008.5726, 13.3467))
  60326. {
  60327. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any materials pickup.");
  60328. }
  60329. if(PlayerData[playerid][pCP] != CHECKPOINT_NONE)
  60330. {
  60331. return SendClientMessage(playerid, COLOR_GREY, "You must cancel your active checkpoint first. /cancelcp to cancel it.");
  60332. }
  60333. if(PlayerData[playerid][pCash] < 150)
  60334. {
  60335. return SendClientMessage(playerid, COLOR_GREY, "You need at least $300 in cash to smuggle materials.");
  60336. }
  60337. if(PlayerData[playerid][pMaterials] + 250 > GetPlayerCapacity(playerid, CAPACITY_MATERIALS))
  60338. {
  60339. return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i materials. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pMaterials], GetPlayerCapacity(playerid, CAPACITY_MATERIALS));
  60340. }
  60341. PlayerData[playerid][pCP] = CHECKPOINT_MATS;
  60342. PlayerData[playerid][pSmuggleTime] = gettime();
  60343. PlayerData[playerid][pDedication] = 1;
  60344. GivePlayerCash(playerid, -150);
  60345. SendClientMessage(playerid, COLOR_AQUA, "* You paid $150 for a load of materials. Smuggle them to the depot to collect them.");
  60346. if(IsPlayerInRangeOfPoint(playerid, 3.0, 1421.6913, -1318.4719, 13.5547))
  60347. {
  60348. AddPointMoney(POINT_MATPICKUP1, 75);
  60349. SetPlayerCheckpoint(playerid, 2173.2129, -2264.1548, 13.3467, 3.0);
  60350. PlayerData[playerid][pSmuggleMats] = 1;
  60351. }
  60352. else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2393.4885, -2008.5726, 13.3467))
  60353. {
  60354. AddPointMoney(POINT_MATPICKUP2, 75);
  60355. SetPlayerCheckpoint(playerid, 2288.0918, -1105.6555, 37.9766, 3.0);
  60356. PlayerData[playerid][pSmuggleMats] = 2;
  60357. }
  60358. return 1;
  60359. }*/
  60360. CMD:smugglemats(playerid, params[])
  60361. {
  60362. if(!PlayerHasJob(playerid, JOB_WEAPONDEALER))
  60363. {
  60364. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a Weapons Dealer.");
  60365. }
  60366. if(!IsPlayerInRangeOfPoint(playerid, 3.0, 1421.6913, -1318.4719, 13.5547) && !IsPlayerInRangeOfPoint(playerid, 3.0, 2393.4885, -2008.5726, 13.3467) && !IsPlayerInRangeOfPoint(playerid, 20.0, 714.5344, -1565.1694, 1.7680) && !IsPlayerInRangeOfPoint(playerid, 20.0, 2112.3240,-2432.8130,13.5469))
  60367. {
  60368. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any materials pickup.");
  60369. }
  60370. if(PlayerData[playerid][pCP] != CHECKPOINT_NONE)
  60371. {
  60372. return SendClientMessage(playerid, COLOR_GREY, "You must cancel your active checkpoint first. /cancelcp to cancel it.");
  60373. }
  60374. if(PlayerData[playerid][pCash] < 50)
  60375. {
  60376. return SendClientMessage(playerid, COLOR_GREY, "You need at least $50 in cash to smuggle materials.");
  60377. }
  60378. if(PlayerData[playerid][pMaterials] + 250 > GetPlayerCapacity(playerid, CAPACITY_MATERIALS))
  60379. {
  60380. return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i materials. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pMaterials], GetPlayerCapacity(playerid, CAPACITY_MATERIALS));
  60381. }
  60382. PlayerData[playerid][pCP] = CHECKPOINT_MATS;
  60383. PlayerData[playerid][pSmuggleTime] = gettime();
  60384. GivePlayerCash(playerid, -150);
  60385. SendClientMessage(playerid, COLOR_AQUA, "* You paid $150 for a load of materials. Smuggle them to the depot to collect them.");
  60386. if(IsPlayerInRangeOfPoint(playerid, 3.0, 1421.6913, -1318.4719, 13.5547))
  60387. {
  60388. AddPointMoney(POINT_MATPICKUP1, 25);
  60389. SetPlayerCheckpoint(playerid, 2173.2129, -2264.1548, 13.3467, 3.0);
  60390. PlayerData[playerid][pSmuggleMats] = 1;
  60391. }
  60392. else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2393.4885, -2008.5726, 13.3467))
  60393. {
  60394. AddPointMoney(POINT_MATPICKUP2, 25);
  60395. SetPlayerCheckpoint(playerid, 2288.0918, -1105.6555, 37.9766, 3.0);
  60396. PlayerData[playerid][pSmuggleMats] = 2;
  60397. }
  60398. else if(IsPlayerInRangeOfPoint(playerid, 20.0, 714.5344, -1565.1694, 1.76807))
  60399. {
  60400. //AddPointMoney(POINT_MATPICKUP2, 25);
  60401. SetPlayerCheckpoint(playerid, 29.0318,-1399.3555,1.7680, 20.0);
  60402. PlayerData[playerid][pSmuggleMats] = 3;
  60403. }
  60404. else if(IsPlayerInRangeOfPoint(playerid, 20.0, 2112.3240, -2432.8130, 13.5469))
  60405. {
  60406. // get random checkpoint
  60407. new rand = random(5);
  60408. switch(rand)
  60409. {
  60410. case 0: { SetPlayerCheckpoint(playerid, -1368.1206,-203.7393,14.1484, 30.0); }
  60411. case 1: { SetPlayerCheckpoint(playerid, 310.8307,2033.6459,17.6406, 30.0); }
  60412. case 2: { SetPlayerCheckpoint(playerid, 401.2192,2502.6482,16.4844, 30.0); }
  60413. case 3: { SetPlayerCheckpoint(playerid, 1582.8756,1356.8186,10.8556, 30.0); }
  60414. case 4: { SetPlayerCheckpoint(playerid, 1574.8552,1505.5690,10.8361, 30.0); }
  60415. }
  60416. PlayerData[playerid][pSmuggleMats] = 4;
  60417. }
  60418. return 1;
  60419. }
  60420. CMD:getmats(playerid, params[])
  60421. {
  60422. return callcmd::smugglemats(playerid, params);
  60423. }
  60424. CMD:sellgun(playerid, params[])
  60425. {
  60426. new targetid, weapon[10], price;
  60427. if(!PlayerHasJob(playerid, JOB_WEAPONDEALER) && PlayerData[playerid][pDonator] < 3)
  60428. {
  60429. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a Weapons Dealer.");
  60430. }
  60431. if(PlayerData[playerid][pHours] < 2 || PlayerData[playerid][pWeaponRestricted] > 0)
  60432. {
  60433. return SendClientMessage(playerid, COLOR_GREY, "You are either weapon restricted or you played less than two playing hours.");
  60434. }
  60435. if(IsPlayerInAnyVehicle(playerid))
  60436. {
  60437. return SendClientMessage(playerid, COLOR_GREY, "You can't sell weapons from within a vehicle.");
  60438. }
  60439. if(sscanf(params, "us[10]I(0)", targetid, weapon, price))
  60440. {
  60441. SendClientMessageEx(playerid, COLOR_NAVYBLUE, "_______ Weapons Crafting _______");
  60442. if(GetJobLevel(playerid, JOB_WEAPONDEALER) >= 1) {
  60443. SendClientMessage(playerid, COLOR_WHITE, "Level 1: Bat [50], Shovel [50], Golfclub [50], Poolcue [50]");
  60444. SendClientMessage(playerid, COLOR_WHITE, "Level 1: Katana [50], Dildo [50], Flowers [50], Cane [50]");
  60445. SendClientMessage(playerid, COLOR_WHITE, "Level 1: 9mm [100], Sdpistol [150], Shotgun [200]");
  60446. } if(GetJobLevel(playerid, JOB_WEAPONDEALER) >= 2) {
  60447. SendClientMessage(playerid, COLOR_WHITE, "Level 2: MP5 [1000], Deagle [2000]");
  60448. } if(GetJobLevel(playerid, JOB_WEAPONDEALER) >= 3) {
  60449. SendClientMessage(playerid, COLOR_WHITE, "Level 3: Uzi [500], Tec9 [500], Rifle [1000]");
  60450. } if(GetJobLevel(playerid, JOB_WEAPONDEALER) >= 4) {
  60451. SendClientMessage(playerid, COLOR_WHITE, "Level 4: Ak47 [3500], M4 [4500]");
  60452. } if(GetJobLevel(playerid, JOB_WEAPONDEALER) >= 5 || PlayerData[playerid][pDonator] >= 3) {
  60453. if(PlayerData[playerid][pDonator] >= 3) {
  60454. SendClientMessage(playerid, COLOR_VIP, "(VIP){FFFFFF} Level 5: Spas12 [5000], Sniper [5000]");
  60455. } else {
  60456. SendClientMessage(playerid, COLOR_WHITE, "Level 5: Spas12 [7500], Sniper [7500]");
  60457. }
  60458. }
  60459. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sellgun [playerid] [name] [price]");
  60460. return 1;
  60461. }
  60462. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  60463. {
  60464. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  60465. }
  60466. if(PlayerData[targetid][pHours] < 2 || PlayerData[targetid][pWeaponRestricted] > 0)
  60467. {
  60468. return SendClientMessage(playerid, COLOR_GREY, "That player is either weapon restricted or played less than two playing hours.");
  60469. }
  60470. if(gettime() - PlayerData[playerid][pLastSell] < 10)
  60471. {
  60472. return SendClientMessageEx(playerid, COLOR_GREY, "You can only use this command every 10 seconds. Please wait %i more seconds.", 10 - (gettime() - PlayerData[playerid][pLastSell]));
  60473. }
  60474. if(PlayerData[playerid][pTazedTime] > 0 || PlayerData[playerid][pInjured] > 0 || PlayerData[playerid][pHospital] > 0 || PlayerData[playerid][pCuffed] > 0 || PlayerData[playerid][pTied] > 0 || PlayerData[playerid][pJailTime] > 0)
  60475. {
  60476. return SendClientMessage(playerid, COLOR_GREY, "You are unable to use this command at the moment.");
  60477. }
  60478. if(price < 0)
  60479. {
  60480. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $0.");
  60481. }
  60482. if(!strcmp(weapon, "bat", true))
  60483. {
  60484. if(PlayerData[playerid][pMaterials] < 50)
  60485. {
  60486. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon.");
  60487. }
  60488. if(PlayerHasWeapon(targetid, 5))
  60489. {
  60490. return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already.");
  60491. }
  60492. if(targetid == playerid)
  60493. {
  60494. SellWeapon(playerid, targetid, 5);
  60495. }
  60496. else if(price < 1)
  60497. {
  60498. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1.");
  60499. }
  60500. else
  60501. {
  60502. PlayerData[playerid][pLastSell] = gettime();
  60503. PlayerData[targetid][pSellOffer] = playerid;
  60504. PlayerData[targetid][pSellType] = ITEM_SELLGUN;
  60505. PlayerData[targetid][pSellExtra] = 5;
  60506. PlayerData[targetid][pSellPrice] = price;
  60507. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered to sell you a baseball bat for $%i. (/accept weapon)", GetRPName(playerid), price);
  60508. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered to sell %s a baseball bat for $%i.", GetRPName(targetid), price);
  60509. }
  60510. }
  60511. else if(!strcmp(weapon, "shovel", true))
  60512. {
  60513. if(PlayerData[playerid][pMaterials] < 50)
  60514. {
  60515. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon.");
  60516. }
  60517. if(PlayerHasWeapon(targetid, 6))
  60518. {
  60519. return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already.");
  60520. }
  60521. if(targetid == playerid)
  60522. {
  60523. SellWeapon(playerid, targetid, 6);
  60524. }
  60525. else if(price < 1)
  60526. {
  60527. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1.");
  60528. }
  60529. else
  60530. {
  60531. PlayerData[playerid][pLastSell] = gettime();
  60532. PlayerData[targetid][pSellOffer] = playerid;
  60533. PlayerData[targetid][pSellType] = ITEM_SELLGUN;
  60534. PlayerData[targetid][pSellExtra] = 6;
  60535. PlayerData[targetid][pSellPrice] = price;
  60536. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered to sell you a shovel for $%i. (/accept weapon)", GetRPName(playerid), price);
  60537. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered to sell %s a shovel for $%i.", GetRPName(targetid), price);
  60538. }
  60539. }
  60540. else if(!strcmp(weapon, "golfclub", true))
  60541. {
  60542. if(PlayerData[playerid][pMaterials] < 50)
  60543. {
  60544. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon.");
  60545. }
  60546. if(PlayerHasWeapon(targetid, 2))
  60547. {
  60548. return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already.");
  60549. }
  60550. if(targetid == playerid)
  60551. {
  60552. SellWeapon(playerid, targetid, 2);
  60553. }
  60554. else if(price < 1)
  60555. {
  60556. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1.");
  60557. }
  60558. else
  60559. {
  60560. PlayerData[playerid][pLastSell] = gettime();
  60561. PlayerData[targetid][pSellOffer] = playerid;
  60562. PlayerData[targetid][pSellType] = ITEM_SELLGUN;
  60563. PlayerData[targetid][pSellExtra] = 2;
  60564. PlayerData[targetid][pSellPrice] = price;
  60565. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered to sell you a golf club for $%i. (/accept weapon)", GetRPName(playerid), price);
  60566. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered to sell %s a golf club for $%i.", GetRPName(targetid), price);
  60567. }
  60568. }
  60569. else if(!strcmp(weapon, "poolcue", true))
  60570. {
  60571. if(PlayerData[playerid][pMaterials] < 50)
  60572. {
  60573. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon.");
  60574. }
  60575. if(PlayerHasWeapon(targetid, 7))
  60576. {
  60577. return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already.");
  60578. }
  60579. if(targetid == playerid)
  60580. {
  60581. SellWeapon(playerid, targetid, 7);
  60582. }
  60583. else if(price < 1)
  60584. {
  60585. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1.");
  60586. }
  60587. else
  60588. {
  60589. PlayerData[playerid][pLastSell] = gettime();
  60590. PlayerData[targetid][pSellOffer] = playerid;
  60591. PlayerData[targetid][pSellType] = ITEM_SELLGUN;
  60592. PlayerData[targetid][pSellExtra] = 7;
  60593. PlayerData[targetid][pSellPrice] = price;
  60594. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered to sell you a pool cue for $%i. (/accept weapon)", GetRPName(playerid), price);
  60595. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered to sell %s a pool cue for $%i.", GetRPName(targetid), price);
  60596. }
  60597. }
  60598. else if(!strcmp(weapon, "katana", true))
  60599. {
  60600. if(PlayerData[playerid][pMaterials] < 50)
  60601. {
  60602. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon.");
  60603. }
  60604. if(PlayerHasWeapon(targetid, 8))
  60605. {
  60606. return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already.");
  60607. }
  60608. if(targetid == playerid)
  60609. {
  60610. SellWeapon(playerid, targetid, 8);
  60611. }
  60612. else if(price < 1)
  60613. {
  60614. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1.");
  60615. }
  60616. else
  60617. {
  60618. PlayerData[playerid][pLastSell] = gettime();
  60619. PlayerData[targetid][pSellOffer] = playerid;
  60620. PlayerData[targetid][pSellType] = ITEM_SELLGUN;
  60621. PlayerData[targetid][pSellExtra] = 8;
  60622. PlayerData[targetid][pSellPrice] = price;
  60623. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered to sell you a katana for $%i. (/accept weapon)", GetRPName(playerid), price);
  60624. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered to sell %s a katana for $%i.", GetRPName(targetid), price);
  60625. }
  60626. }
  60627. else if(!strcmp(weapon, "dildo", true))
  60628. {
  60629. if(PlayerData[playerid][pMaterials] < 50)
  60630. {
  60631. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon.");
  60632. }
  60633. if(PlayerHasWeapon(targetid, 10))
  60634. {
  60635. return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already.");
  60636. }
  60637. if(targetid == playerid)
  60638. {
  60639. SellWeapon(playerid, targetid, 10);
  60640. }
  60641. else if(price < 1)
  60642. {
  60643. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1.");
  60644. }
  60645. else
  60646. {
  60647. PlayerData[playerid][pLastSell] = gettime();
  60648. PlayerData[targetid][pSellOffer] = playerid;
  60649. PlayerData[targetid][pSellType] = ITEM_SELLGUN;
  60650. PlayerData[targetid][pSellExtra] = 10;
  60651. PlayerData[targetid][pSellPrice] = price;
  60652. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered to sell you a dildo for $%i. (/accept weapon)", GetRPName(playerid), price);
  60653. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered to sell %s a dildo for $%i.", GetRPName(targetid), price);
  60654. }
  60655. }
  60656. else if(!strcmp(weapon, "flowers", true))
  60657. {
  60658. if(PlayerData[playerid][pMaterials] < 50)
  60659. {
  60660. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon.");
  60661. }
  60662. if(PlayerHasWeapon(targetid, 14))
  60663. {
  60664. return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already.");
  60665. }
  60666. if(targetid == playerid)
  60667. {
  60668. SellWeapon(playerid, targetid, 14);
  60669. }
  60670. else if(price < 1)
  60671. {
  60672. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1.");
  60673. }
  60674. else
  60675. {
  60676. PlayerData[playerid][pLastSell] = gettime();
  60677. PlayerData[targetid][pSellOffer] = playerid;
  60678. PlayerData[targetid][pSellType] = ITEM_SELLGUN;
  60679. PlayerData[targetid][pSellExtra] = 14;
  60680. PlayerData[targetid][pSellPrice] = price;
  60681. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered to sell you flowers for $%i. (/accept weapon)", GetRPName(playerid), price);
  60682. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered to sell %s flowers for $%i.", GetRPName(targetid), price);
  60683. }
  60684. }
  60685. else if(!strcmp(weapon, "cane", true))
  60686. {
  60687. if(PlayerData[playerid][pMaterials] < 50)
  60688. {
  60689. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon.");
  60690. }
  60691. if(PlayerHasWeapon(targetid, 15))
  60692. {
  60693. return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already.");
  60694. }
  60695. if(targetid == playerid)
  60696. {
  60697. SellWeapon(playerid, targetid, 15);
  60698. }
  60699. else if(price < 1)
  60700. {
  60701. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1.");
  60702. }
  60703. else
  60704. {
  60705. PlayerData[playerid][pLastSell] = gettime();
  60706. PlayerData[targetid][pSellOffer] = playerid;
  60707. PlayerData[targetid][pSellType] = ITEM_SELLGUN;
  60708. PlayerData[targetid][pSellExtra] = 15;
  60709. PlayerData[targetid][pSellPrice] = price;
  60710. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered to sell you a cane for $%i. (/accept weapon)", GetRPName(playerid), price);
  60711. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered to sell %s a cane for $%i.", GetRPName(targetid), price);
  60712. }
  60713. }
  60714. else if(!strcmp(weapon, "9mm", true))
  60715. {
  60716. if(PlayerData[playerid][pMaterials] < 100)
  60717. {
  60718. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon.");
  60719. }
  60720. if(PlayerHasWeapon(targetid, 22))
  60721. {
  60722. return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already.");
  60723. }
  60724. if(targetid == playerid)
  60725. {
  60726. SellWeapon(playerid, targetid, 22);
  60727. }
  60728. else if(price < 1)
  60729. {
  60730. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1.");
  60731. }
  60732. else
  60733. {
  60734. PlayerData[playerid][pLastSell] = gettime();
  60735. PlayerData[targetid][pSellOffer] = playerid;
  60736. PlayerData[targetid][pSellType] = ITEM_SELLGUN;
  60737. PlayerData[targetid][pSellExtra] = 22;
  60738. PlayerData[targetid][pSellPrice] = price;
  60739. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered to sell you a 9mm for $%i. (/accept weapon)", GetRPName(playerid), price);
  60740. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered to sell %s a 9mm for $%i.", GetRPName(targetid), price);
  60741. }
  60742. }
  60743. else if(!strcmp(weapon, "sdpistol", true))
  60744. {
  60745. if(PlayerData[playerid][pMaterials] < 150)
  60746. {
  60747. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon.");
  60748. }
  60749. if(PlayerHasWeapon(targetid, 23))
  60750. {
  60751. return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already.");
  60752. }
  60753. if(targetid == playerid)
  60754. {
  60755. SellWeapon(playerid, targetid, 23);
  60756. }
  60757. else if(price < 1)
  60758. {
  60759. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1.");
  60760. }
  60761. else
  60762. {
  60763. PlayerData[targetid][pSellOffer] = playerid;
  60764. PlayerData[targetid][pSellType] = ITEM_SELLGUN;
  60765. PlayerData[targetid][pSellExtra] = 23;
  60766. PlayerData[targetid][pSellPrice] = price;
  60767. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered to sell you a silenced pistol for $%i. (/accept weapon)", GetRPName(playerid), price);
  60768. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered to sell %s a silenced pistol for $%i.", GetRPName(targetid), price);
  60769. }
  60770. }
  60771. else if(!strcmp(weapon, "shotgun", true))
  60772. {
  60773. if(PlayerData[playerid][pMaterials] < 200)
  60774. {
  60775. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon.");
  60776. }
  60777. if(PlayerHasWeapon(targetid, 25))
  60778. {
  60779. return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already.");
  60780. }
  60781. if(targetid == playerid)
  60782. {
  60783. SellWeapon(playerid, targetid, 25);
  60784. }
  60785. else if(price < 1)
  60786. {
  60787. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1.");
  60788. }
  60789. else
  60790. {
  60791. PlayerData[targetid][pSellOffer] = playerid;
  60792. PlayerData[targetid][pSellType] = ITEM_SELLGUN;
  60793. PlayerData[targetid][pSellExtra] = 25;
  60794. PlayerData[targetid][pSellPrice] = price;
  60795. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered to sell you a shotgun for $%i. (/accept weapon)", GetRPName(playerid), price);
  60796. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered to sell %s a shotgun for $%i.", GetRPName(targetid), price);
  60797. }
  60798. }
  60799. else if(!strcmp(weapon, "mp5", true))
  60800. {
  60801. if(GetJobLevel(playerid, JOB_WEAPONDEALER) < 2)
  60802. {
  60803. return SendClientMessage(playerid, COLOR_GREY, "Your skill level is not high enough to craft this weapon.");
  60804. }
  60805. if(PlayerData[playerid][pMaterials] < 1000)
  60806. {
  60807. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon.");
  60808. }
  60809. if(PlayerHasWeapon(targetid, 29))
  60810. {
  60811. return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already.");
  60812. }
  60813. if(targetid == playerid)
  60814. {
  60815. SellWeapon(playerid, targetid, 29);
  60816. }
  60817. else if(price < 1)
  60818. {
  60819. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1.");
  60820. }
  60821. else
  60822. {
  60823. PlayerData[targetid][pSellOffer] = playerid;
  60824. PlayerData[targetid][pSellType] = ITEM_SELLGUN;
  60825. PlayerData[targetid][pSellExtra] = 29;
  60826. PlayerData[targetid][pSellPrice] = price;
  60827. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered to sell you an MP5 for $%i. (/accept weapon)", GetRPName(playerid), price);
  60828. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered to sell %s an MP5 for $%i.", GetRPName(targetid), price);
  60829. }
  60830. }
  60831. else if(!strcmp(weapon, "deagle", true))
  60832. {
  60833. if(GetJobLevel(playerid, JOB_WEAPONDEALER) < 2)
  60834. {
  60835. return SendClientMessage(playerid, COLOR_GREY, "Your skill level is not high enough to craft this weapon.");
  60836. }
  60837. if(PlayerData[playerid][pMaterials] < 2000)
  60838. {
  60839. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon.");
  60840. }
  60841. if(PlayerHasWeapon(targetid, 24))
  60842. {
  60843. return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already.");
  60844. }
  60845. if(targetid == playerid)
  60846. {
  60847. SellWeapon(playerid, targetid, 24);
  60848. }
  60849. else if(price < 1)
  60850. {
  60851. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1.");
  60852. }
  60853. else
  60854. {
  60855. PlayerData[targetid][pSellOffer] = playerid;
  60856. PlayerData[targetid][pSellType] = ITEM_SELLGUN;
  60857. PlayerData[targetid][pSellExtra] = 24;
  60858. PlayerData[targetid][pSellPrice] = price;
  60859. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered to sell you a Desert Eagle for $%i. (/accept weapon)", GetRPName(playerid), price);
  60860. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered to sell %s a Desert Eagle for $%i.", GetRPName(targetid), price);
  60861. }
  60862. }
  60863. else if(!strcmp(weapon, "uzi", true))
  60864. {
  60865. if(GetJobLevel(playerid, JOB_WEAPONDEALER) < 3)
  60866. {
  60867. return SendClientMessage(playerid, COLOR_GREY, "Your skill level is not high enough to craft this weapon.");
  60868. }
  60869. if(PlayerData[playerid][pMaterials] < 500)
  60870. {
  60871. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon.");
  60872. }
  60873. if(PlayerHasWeapon(targetid, 28))
  60874. {
  60875. return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already.");
  60876. }
  60877. if(targetid == playerid)
  60878. {
  60879. SellWeapon(playerid, targetid, 28);
  60880. }
  60881. else if(price < 1)
  60882. {
  60883. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1.");
  60884. }
  60885. else
  60886. {
  60887. PlayerData[targetid][pSellOffer] = playerid;
  60888. PlayerData[targetid][pSellType] = ITEM_SELLGUN;
  60889. PlayerData[targetid][pSellExtra] = 28;
  60890. PlayerData[targetid][pSellPrice] = price;
  60891. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered to sell you a Micro Uzi for $%i. (/accept weapon)", GetRPName(playerid), price);
  60892. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered to sell %s a Micro Uzi for $%i.", GetRPName(targetid), price);
  60893. }
  60894. }
  60895. else if(!strcmp(weapon, "tec9", true))
  60896. {
  60897. if(GetJobLevel(playerid, JOB_WEAPONDEALER) < 3)
  60898. {
  60899. return SendClientMessage(playerid, COLOR_GREY, "Your skill level is not high enough to craft this weapon.");
  60900. }
  60901. if(PlayerData[playerid][pMaterials] < 500)
  60902. {
  60903. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon.");
  60904. }
  60905. if(PlayerHasWeapon(targetid, 32))
  60906. {
  60907. return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already.");
  60908. }
  60909. if(targetid == playerid)
  60910. {
  60911. SellWeapon(playerid, targetid, 32);
  60912. }
  60913. else if(price < 1)
  60914. {
  60915. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1.");
  60916. }
  60917. else
  60918. {
  60919. PlayerData[targetid][pSellOffer] = playerid;
  60920. PlayerData[targetid][pSellType] = ITEM_SELLGUN;
  60921. PlayerData[targetid][pSellExtra] = 32;
  60922. PlayerData[targetid][pSellPrice] = price;
  60923. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered to sell you a Tec-9 for $%i. (/accept weapon)", GetRPName(playerid), price);
  60924. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered to sell %s a Tec-9 for $%i.", GetRPName(targetid), price);
  60925. }
  60926. }
  60927. else if(!strcmp(weapon, "ak47", true))
  60928. {
  60929. if(GetJobLevel(playerid, JOB_WEAPONDEALER) < 4)
  60930. {
  60931. return SendClientMessage(playerid, COLOR_GREY, "Your skill level is not high enough to craft this weapon.");
  60932. }
  60933. if(PlayerData[playerid][pMaterials] < 3500)
  60934. {
  60935. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon.");
  60936. }
  60937. if(PlayerHasWeapon(targetid, 30))
  60938. {
  60939. return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already.");
  60940. }
  60941. if(targetid == playerid)
  60942. {
  60943. SellWeapon(playerid, targetid, 30);
  60944. }
  60945. else if(price < 1)
  60946. {
  60947. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1.");
  60948. }
  60949. else
  60950. {
  60951. PlayerData[targetid][pSellOffer] = playerid;
  60952. PlayerData[targetid][pSellType] = ITEM_SELLGUN;
  60953. PlayerData[targetid][pSellExtra] = 30;
  60954. PlayerData[targetid][pSellPrice] = price;
  60955. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered to sell you an AK-47 for $%i. (/accept weapon)", GetRPName(playerid), price);
  60956. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered to sell %s an AK-47 for $%i.", GetRPName(targetid), price);
  60957. }
  60958. }
  60959. else if(!strcmp(weapon, "m4", true))
  60960. {
  60961. if(GetJobLevel(playerid, JOB_WEAPONDEALER) < 4)
  60962. {
  60963. return SendClientMessage(playerid, COLOR_GREY, "Your skill level is not high enough to craft this weapon.");
  60964. }
  60965. if(PlayerData[playerid][pMaterials] < 4500)
  60966. {
  60967. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon.");
  60968. }
  60969. if(PlayerHasWeapon(targetid, 31))
  60970. {
  60971. return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already.");
  60972. }
  60973. if(targetid == playerid)
  60974. {
  60975. SellWeapon(playerid, targetid, 31);
  60976. }
  60977. else if(price < 1)
  60978. {
  60979. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1.");
  60980. }
  60981. else
  60982. {
  60983. PlayerData[targetid][pSellOffer] = playerid;
  60984. PlayerData[targetid][pSellType] = ITEM_SELLGUN;
  60985. PlayerData[targetid][pSellExtra] = 31;
  60986. PlayerData[targetid][pSellPrice] = price;
  60987. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered to sell you an M4 for $%i. (/accept weapon)", GetRPName(playerid), price);
  60988. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered to sell %s an M4 for $%i.", GetRPName(targetid), price);
  60989. }
  60990. }
  60991. else if(!strcmp(weapon, "spas12", true))
  60992. {
  60993. new cost;
  60994. if(PlayerData[playerid][pDonator] == 3)
  60995. cost = 5000;
  60996. else
  60997. cost = 7500;
  60998. if(GetJobLevel(playerid, JOB_WEAPONDEALER) < 5 && PlayerData[playerid][pDonator] < 3)
  60999. {
  61000. return SendClientMessage(playerid, COLOR_GREY, "Your skill level is not high enough to craft this weapon.");
  61001. }
  61002. if(PlayerData[playerid][pMaterials] < cost)
  61003. {
  61004. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon.");
  61005. }
  61006. if(PlayerHasWeapon(targetid, 27))
  61007. {
  61008. return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already.");
  61009. }
  61010. if(targetid == playerid)
  61011. {
  61012. SellWeapon(playerid, targetid, 27);
  61013. }
  61014. else if(price < 1)
  61015. {
  61016. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1.");
  61017. }
  61018. else
  61019. {
  61020. PlayerData[targetid][pSellOffer] = playerid;
  61021. PlayerData[targetid][pSellType] = ITEM_SELLGUN;
  61022. PlayerData[targetid][pSellExtra] = 27;
  61023. PlayerData[targetid][pSellPrice] = price;
  61024. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered to sell you a SPAS-12 for $%i. (/accept weapon)", GetRPName(playerid), price);
  61025. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered to sell %s a SPAS-12 for $%i.", GetRPName(targetid), price);
  61026. }
  61027. }
  61028. else if(!strcmp(weapon, "sniper", true))
  61029. {
  61030. new cost;
  61031. if(PlayerData[playerid][pDonator] == 3)
  61032. cost = 5000;
  61033. else
  61034. cost = 7500;
  61035. if(GetJobLevel(playerid, JOB_WEAPONDEALER) < 5 && PlayerData[playerid][pDonator] < 3)
  61036. {
  61037. return SendClientMessage(playerid, COLOR_GREY, "Your skill level is not high enough to craft this weapon.");
  61038. }
  61039. if(PlayerData[playerid][pMaterials] < cost)
  61040. {
  61041. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon.");
  61042. }
  61043. if(PlayerHasWeapon(targetid, 34))
  61044. {
  61045. return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already.");
  61046. }
  61047. if(targetid == playerid)
  61048. {
  61049. SellWeapon(playerid, targetid, 34);
  61050. }
  61051. else if(price < 1)
  61052. {
  61053. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1.");
  61054. }
  61055. else
  61056. {
  61057. PlayerData[targetid][pSellOffer] = playerid;
  61058. PlayerData[targetid][pSellType] = ITEM_SELLGUN;
  61059. PlayerData[targetid][pSellExtra] = 34;
  61060. PlayerData[targetid][pSellPrice] = price;
  61061. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered to sell you a sniper rifle or $%i. (/accept weapon)", GetRPName(playerid), price);
  61062. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered to sell %s a sniper rifle for $%i.", GetRPName(targetid), price);
  61063. }
  61064. }
  61065. return 1;
  61066. }
  61067. CMD:buycomps(playerid, params[])
  61068. {
  61069. new amount, price, cost = 1200 - (GetJobLevel(playerid, JOB_MECHANIC) * 200);
  61070. if(!PlayerHasJob(playerid, JOB_MECHANIC))
  61071. {
  61072. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command unless you're a Mechanic.");
  61073. }
  61074. if(!IsPlayerInRangeOfPoint(playerid, 3.0, 1952.1062,-1558.4139,13.7161))
  61075. {
  61076. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the component shop.");
  61077. }
  61078. if(sscanf(params, "i", amount))
  61079. {
  61080. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /buycomps [amount]");
  61081. SendClientMessageEx(playerid, COLOR_SYNTAX, "You are paying $%i per component at your current skill level.", cost);
  61082. return 1;
  61083. }
  61084. if(!(1 <= amount <= 10))
  61085. {
  61086. return SendClientMessage(playerid, COLOR_GREY, "The amount must range between 1 and 10.");
  61087. }
  61088. if(PlayerData[playerid][pComponents] + amount > 50)
  61089. {
  61090. return SendClientMessage(playerid, COLOR_GREY, "You can't carry more than 50 components.");
  61091. }
  61092. price = amount * cost;
  61093. if(PlayerData[playerid][pCash] < price)
  61094. {
  61095. SendClientMessageEx(playerid, COLOR_GREY, "You can't afford to purchase %i components for $%i.", amount, price);
  61096. }
  61097. else
  61098. {
  61099. PlayerData[playerid][pComponents] += amount;
  61100. GivePlayerCash(playerid, -price);
  61101. SendClientMessageEx(playerid, COLOR_AQUA, "* You have purchased %i components for $%i.", amount, price);
  61102. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET components = %i WHERE uid = %i", PlayerData[playerid][pComponents], PlayerData[playerid][pID]);
  61103. mysql_tquery(connectionID, queryBuffer);
  61104. }
  61105. return 1;
  61106. }
  61107. CMD:repair(playerid, params[])
  61108. {
  61109. new vehicleid = GetPlayerVehicleID(playerid), Float:health;
  61110. if(!PlayerHasJob(playerid, JOB_MECHANIC) && PlayerData[playerid][pDonator] < 3)
  61111. {
  61112. return SendClientMessage(playerid, COLOR_GREY, "You must either be a mechanic, or a Legendary VIP to use this command.");
  61113. }
  61114. if(GetInsideGarage(playerid) >= 0)
  61115. {
  61116. if(gettime() - PlayerData[playerid][pLastRepair] < 20)
  61117. {
  61118. return SendClientMessageEx(playerid, COLOR_GREY, "You can only repair a vehicle every 20 seconds. Please wait %i more seconds.", 20 - (gettime() - PlayerData[playerid][pLastRepair]));
  61119. }
  61120. if(!vehicleid)
  61121. {
  61122. return SendClientMessage(playerid, COLOR_GREY, "You are not inside of any vehicle.");
  61123. }
  61124. if(!VehicleHasEngine(vehicleid))
  61125. {
  61126. return SendClientMessage(playerid, COLOR_GREY, "This vehicle has no engine which can be repaired.");
  61127. }
  61128. GetVehicleHealth(vehicleid, health);
  61129. if(health >= 1000.0)
  61130. {
  61131. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't need to be repaired.");
  61132. }
  61133. else
  61134. {
  61135. PlayerData[playerid][pLastRepair] = gettime();
  61136. SetVehicleHealth(vehicleid, 1000.0);
  61137. ShowActionBubble(playerid, "* %s repairs the vehicle.", GetRPName(playerid));
  61138. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  61139. }
  61140. }
  61141. else if(PlayerHasJob(playerid, JOB_MECHANIC) && PlayerData[playerid][pDonator] < 3)
  61142. {
  61143. if(PlayerData[playerid][pDonator] < 3 && PlayerData[playerid][pComponents] <= 0)
  61144. {
  61145. return SendClientMessage(playerid, COLOR_GREY, "You have no components left.");
  61146. }
  61147. if(gettime() - PlayerData[playerid][pLastRepair] < 20)
  61148. {
  61149. return SendClientMessageEx(playerid, COLOR_GREY, "You can only repair a vehicle every 20 seconds. Please wait %i more seconds.", 20 - (gettime() - PlayerData[playerid][pLastRepair]));
  61150. }
  61151. if(!vehicleid)
  61152. {
  61153. return SendClientMessage(playerid, COLOR_GREY, "You are not inside of any vehicle.");
  61154. }
  61155. if(!VehicleHasEngine(vehicleid))
  61156. {
  61157. return SendClientMessage(playerid, COLOR_GREY, "This vehicle has no engine which can be repaired.");
  61158. }
  61159. GetVehicleHealth(vehicleid, health);
  61160. if(health >= 1000.0)
  61161. {
  61162. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't need to be repaired.");
  61163. }
  61164. else
  61165. {
  61166. PlayerData[playerid][pComponents]--;
  61167. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET components = %i WHERE uid = %i", PlayerData[playerid][pComponents], PlayerData[playerid][pID]);
  61168. mysql_tquery(connectionID, queryBuffer);
  61169. PlayerData[playerid][pLastRepair] = gettime();
  61170. SetVehicleHealth(vehicleid, 1000.0);
  61171. if(GetJobLevel(playerid, JOB_MECHANIC) == 5)
  61172. {
  61173. RepairVehicle(vehicleid);
  61174. SendClientMessage(playerid, COLOR_WHITE, "You have repaired the health and bodywork on this vehicle..");
  61175. }
  61176. else
  61177. {
  61178. SendClientMessage(playerid, COLOR_WHITE, "You have repaired this vehicle to maximum health.");
  61179. }
  61180. ShowActionBubble(playerid, "* %s repairs the vehicle.", GetRPName(playerid));
  61181. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  61182. IncreaseJobSkill(playerid, JOB_MECHANIC);
  61183. }
  61184. }
  61185. else if(PlayerData[playerid][pDonator] == 3)
  61186. {
  61187. if(PlayerData[playerid][pDonator] < 3 && !PlayerData[playerid][pComponents])
  61188. {
  61189. return SendClientMessage(playerid, COLOR_GREY, "You have no components left.");
  61190. }
  61191. if(gettime() - PlayerData[playerid][pLastRepair] < 20)
  61192. {
  61193. return SendClientMessageEx(playerid, COLOR_GREY, "You can only repair a vehicle every 20 seconds. Please wait %i more seconds.", 20 - (gettime() - PlayerData[playerid][pLastRepair]));
  61194. }
  61195. if(!vehicleid)
  61196. {
  61197. return SendClientMessage(playerid, COLOR_GREY, "You are not inside of any vehicle.");
  61198. }
  61199. if(!VehicleHasEngine(vehicleid))
  61200. {
  61201. return SendClientMessage(playerid, COLOR_GREY, "This vehicle has no engine which can be repaired.");
  61202. }
  61203. GetVehicleHealth(vehicleid, health);
  61204. if(health >= 1000.0)
  61205. {
  61206. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't need to be repaired.");
  61207. }
  61208. else
  61209. {
  61210. SendClientMessage(playerid, COLOR_VIP, "VIP Perk: You repaired this vehicle free of charge.");
  61211. PlayerData[playerid][pLastRepair] = gettime();
  61212. SetVehicleHealth(vehicleid, 1000.0);
  61213. ShowActionBubble(playerid, "* %s repairs the vehicle.", GetRPName(playerid));
  61214. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  61215. IncreaseJobSkill(playerid, JOB_MECHANIC);
  61216. }
  61217. }
  61218. return 1;
  61219. }
  61220. CMD:refill(playerid, params[])
  61221. {
  61222. new vehicleid = GetPlayerVehicleID(playerid);
  61223. if(!PlayerHasJob(playerid, JOB_MECHANIC))
  61224. {
  61225. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command unless you're a Mechanic.");
  61226. }
  61227. if(!PlayerData[playerid][pComponents])
  61228. {
  61229. return SendClientMessage(playerid, COLOR_GREY, "You have no components left.");
  61230. }
  61231. if(gettime() - PlayerData[playerid][pLastRefuel] < 20)
  61232. {
  61233. return SendClientMessageEx(playerid, COLOR_GREY, "You can only refuel a vehicle every 20 seconds. Please wait %i more seconds.", 20 - (gettime() - PlayerData[playerid][pLastRefuel]));
  61234. }
  61235. if(!vehicleid)
  61236. {
  61237. return SendClientMessage(playerid, COLOR_GREY, "You are not inside of any vehicle.");
  61238. }
  61239. if(!VehicleHasEngine(vehicleid))
  61240. {
  61241. return SendClientMessage(playerid, COLOR_GREY, "This vehicle has no engine which can be refueled.");
  61242. }
  61243. if(vehicleFuel[vehicleid] >= 100)
  61244. {
  61245. return SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't need to be refueled.");
  61246. }
  61247. if(vehicleFuel[vehicleid] + 10 >= 100)
  61248. {
  61249. vehicleFuel[vehicleid] = 100;
  61250. }
  61251. else
  61252. {
  61253. vehicleFuel[vehicleid] += 10;
  61254. }
  61255. PlayerData[playerid][pComponents]--;
  61256. PlayerData[playerid][pLastRefuel] = gettime();
  61257. ShowActionBubble(playerid, "* %s pours some gasoline to the vehicle.", GetRPName(playerid));
  61258. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  61259. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET components = %i WHERE uid = %i", PlayerData[playerid][pComponents], PlayerData[playerid][pID]);
  61260. mysql_tquery(connectionID, queryBuffer);
  61261. IncreaseJobSkill(playerid, JOB_MECHANIC);
  61262. return 1;
  61263. }
  61264. CMD:nos(playerid, params[])
  61265. {
  61266. new vehicleid = GetPlayerVehicleID(playerid);
  61267. if(!PlayerHasJob(playerid, JOB_MECHANIC) && PlayerData[playerid][pDonator] != 3)
  61268. {
  61269. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command unless you're a Mechanic.");
  61270. }
  61271. if(PlayerData[playerid][pDonator] == 0 && !PlayerData[playerid][pComponents])
  61272. {
  61273. return SendClientMessage(playerid, COLOR_GREY, "You have no components left.");
  61274. }
  61275. if(!vehicleid)
  61276. {
  61277. return SendClientMessage(playerid, COLOR_GREY, "You are not inside of any vehicle.");
  61278. }
  61279. switch(GetVehicleModel(vehicleid))
  61280. {
  61281. case 581, 523, 462, 521, 463, 522, 461, 448, 468, 586, 509, 481, 510, 472, 473, 493, 595, 484, 430, 453, 452, 446, 454, 590, 569, 537, 538, 570, 449:
  61282. return SendClientMessage(playerid, COLOR_GREY, "This vehicle can't be modified with nitrous.");
  61283. }
  61284. if(GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), GetVehicleComponentType(1010)) != 1010 && GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), GetVehicleComponentType(1009)) != 1009 && GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), GetVehicleComponentType(1008)) != 1008)
  61285. {
  61286. if(PlayerData[playerid][pDonator] < 3)
  61287. {
  61288. PlayerData[playerid][pComponents]--;
  61289. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET components = %i WHERE uid = %i", PlayerData[playerid][pComponents], PlayerData[playerid][pID]);
  61290. mysql_tquery(connectionID, queryBuffer);
  61291. }
  61292. else
  61293. {
  61294. SendClientMessage(playerid, COLOR_VIP, "VIP Perk: You added nitrous to this vehicle free of charge.");
  61295. }
  61296. AddVehicleComponent(vehicleid, 1009);
  61297. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  61298. ShowActionBubble(playerid, "* %s attaches a 2x NOS Canister on the engine feed.", GetRPName(playerid));
  61299. }
  61300. else {
  61301. SendClientMessage(playerid, COLOR_GREY, "This vehicle has nos already");
  61302. }
  61303. return 1;
  61304. }
  61305. CMD:hyd(playerid, params[])
  61306. {
  61307. new vehicleid = GetPlayerVehicleID(playerid);
  61308. if(!PlayerHasJob(playerid, JOB_MECHANIC) && PlayerData[playerid][pDonator] != 3)
  61309. {
  61310. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command unless you're a Mechanic.");
  61311. }
  61312. if(PlayerData[playerid][pMechanicSkill] < 2)
  61313. {
  61314. return SendClientMessage(playerid, COLOR_GREY, "You must be a skill level 2 mechanic to use this command.");
  61315. }
  61316. if(PlayerData[playerid][pDonator] == 0 && !PlayerData[playerid][pComponents])
  61317. {
  61318. return SendClientMessage(playerid, COLOR_GREY, "You have no components left.");
  61319. }
  61320. if(!vehicleid)
  61321. {
  61322. return SendClientMessage(playerid, COLOR_GREY, "You are not inside of any vehicle.");
  61323. }
  61324. if(PlayerData[playerid][pDonator] < 3)
  61325. {
  61326. PlayerData[playerid][pComponents]--;
  61327. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET components = %i WHERE uid = %i", PlayerData[playerid][pComponents], PlayerData[playerid][pID]);
  61328. mysql_tquery(connectionID, queryBuffer);
  61329. }
  61330. else
  61331. {
  61332. SendClientMessage(playerid, COLOR_VIP, "VIP Perk: You added hydraulics to this vehicle free of charge.");
  61333. }
  61334. AddVehicleComponent(vehicleid, 1087);
  61335. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  61336. ShowActionBubble(playerid, "* %s attaches a set of hydraulics to the vehicle.", GetRPName(playerid));
  61337. return 1;
  61338. }
  61339. CMD:tow(playerid, params[])
  61340. {
  61341. if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 525)
  61342. {
  61343. return SendClientMessage(playerid, COLOR_GREY, "You must be in a tow truck to use this command.");
  61344. }
  61345. if(!PlayerHasJob(playerid, JOB_MECHANIC) && !IsLawEnforcement(playerid))
  61346. {
  61347. return SendClientMessage(playerid, COLOR_GREY, "You must be a Mechanic or a Law Enforcement Officer to use this command.");
  61348. }
  61349. if(PlayerData[playerid][pMechanicSkill] < 3 && !IsLawEnforcement(playerid))
  61350. {
  61351. return SendClientMessage(playerid, COLOR_GREY, "You must be a skill level 3 mechanic to use this command.");
  61352. }
  61353. new Float:pX, Float:pY, Float:pZ;
  61354. GetPlayerPos(playerid, pX, pY, pZ);
  61355. new Float:vX, Float:vY, Float:vZ;
  61356. new Found = 0;
  61357. new vid = 0;
  61358. while ((vid<MAX_VEHICLES) && (!Found)) {
  61359. vid++;
  61360. GetVehiclePos(vid, vX, vY, vZ);
  61361. if ((floatabs(pX - vX)<7.0) && (floatabs(pY - vY)<7.0) && (floatabs(pZ - vZ)<7.0) && (vid != GetPlayerVehicleID(playerid))) {
  61362. Found = 1;
  61363. if (IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))) {
  61364. DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
  61365. }
  61366. AttachTrailerToVehicle(vid, GetPlayerVehicleID(playerid));
  61367. ShowActionBubble(playerid, "* %s lowers their tow hook, attaching it to the vehicle.", GetRPName(playerid));
  61368. ShowActionBubble(playerid, "* %s raises the tow hook, locking the vehicle in place..", GetRPName(playerid));
  61369. }
  61370. }
  61371. if (!Found) {
  61372. SendClientMessage(playerid, COLOR_GREY, "There is no vehicle in range that you can tow.");
  61373. }
  61374. return 1;
  61375. }
  61376. stock IsRefuelableVehicle(vehicleid)
  61377. {
  61378. new modelid = GetVehicleModel(vehicleid);
  61379. switch (modelid)
  61380. {
  61381. case 481, 509, 510: return 0; // Bikes
  61382. }
  61383. return 1;
  61384. }
  61385. CMD:stoptow(playerid, params[])
  61386. {
  61387. if(!PlayerHasJob(playerid, JOB_MECHANIC) && !IsLawEnforcement(playerid))
  61388. {
  61389. return SendClientMessage(playerid, COLOR_GREY, "You must be a Mechanic or a Law Enforcement Officer to use this command.");
  61390. }
  61391. if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 525)
  61392. {
  61393. return SendClientMessage(playerid, COLOR_GREY, "You must be in a tow truck to use this command.");
  61394. }
  61395. if(!IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
  61396. {
  61397. SendClientMessage(playerid, COLOR_GREY, "You are not towing a vehicle.");
  61398. }
  61399. DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
  61400. ShowActionBubble(playerid, "* %s lowers their tow hook, detaching it from the vehicle.", GetRPName(playerid));
  61401. return 1;
  61402. }
  61403. CMD:fill(playerid, params[])
  61404. {
  61405. return callcmd::refuel(playerid, params);
  61406. }
  61407. CMD:refuel(playerid, params[])
  61408. {
  61409. new vehicleid = GetPlayerVehicleID(playerid);
  61410. if(!IsPlayerAtFuelStation(playerid) && GetInsideGarage(playerid) == -1)
  61411. {
  61412. return SendClientMessage(playerid, COLOR_GREY, "You need to be at a gas station or inside of a garage.");
  61413. }
  61414. if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
  61415. {
  61416. return SendClientMessage(playerid, COLOR_GREY, "You are not driving any vehicle.");
  61417. }
  61418. if(!VehicleHasEngine(vehicleid))
  61419. {
  61420. return SendClientMessage(playerid, COLOR_GREY, "This vehicle has no engine and can't be refilled.");
  61421. }
  61422. if(vehicleFuel[vehicleid] >= 100)
  61423. {
  61424. return SendClientMessage(playerid, COLOR_GREY, "The fuel tank in this vehicle is already full.");
  61425. }
  61426. if(PlayerData[playerid][pCash] < (100 - vehicleFuel[vehicleid]) * 2)
  61427. {
  61428. return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough cash. It will cost you at least $%i.", (100 - vehicleFuel[vehicleid]) * 2);
  61429. }
  61430. if (!IsRefuelableVehicle(vehicleid)) return SendClientMessageEx(playerid,COLOR_RED,"This vehicle does not need fuel.");
  61431. if(PlayerData[playerid][pRefuel] != INVALID_VEHICLE_ID)
  61432. {
  61433. GivePlayerCash(playerid, -PlayerData[playerid][pRefuelAmount]);
  61434. SetVehicleParams(vehicleid, VEHICLE_ENGINE, 1);
  61435. SendClientMessageEx(playerid, COLOR_AQUA, "* You've refilled your vehicle's gas tank for $%i.", PlayerData[playerid][pRefuelAmount]);
  61436. PlayerData[playerid][pRefuel] = INVALID_VEHICLE_ID;
  61437. PlayerData[playerid][pRefuelAmount] = 0;
  61438. }
  61439. else
  61440. {
  61441. PlayerData[playerid][pRefuel] = vehicleid;
  61442. SetVehicleParams(vehicleid, VEHICLE_ENGINE, 0);
  61443. PlayerData[playerid][pRefuelAmount] = 0;
  61444. ShowActionBubble(playerid, "* %s begins to refuel their vehicle's gas tank.", GetRPName(playerid));
  61445. SendClientMessageEx(playerid, COLOR_WHITE, "This will take about %i seconds. You will be notified once completed.", 100 - vehicleFuel[vehicleid]);
  61446. }
  61447. return 1;
  61448. }
  61449. CMD:withdraw(playerid, params[])
  61450. {
  61451. new amount;
  61452. if(!IsPlayerInRangeOfPoint(playerid, 10.0, 1667.4260, -972.6691, 683.6873))
  61453. {
  61454. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the bank.");
  61455. }
  61456. if(sscanf(params, "i", amount))
  61457. {
  61458. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /withdraw [amount] ($%i available)", PlayerData[playerid][pBank]);
  61459. }
  61460. if(amount < 1 || amount > PlayerData[playerid][pBank])
  61461. {
  61462. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  61463. }
  61464. PlayerData[playerid][pBank] -= amount;
  61465. GivePlayerCash(playerid, amount);
  61466. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET bank = %i WHERE uid = %i", PlayerData[playerid][pBank], PlayerData[playerid][pID]);
  61467. mysql_tquery(connectionID, queryBuffer);
  61468. SendClientMessageEx(playerid, COLOR_AQUA, "You have withdrawn {00AA00}%s{33CCFF} from your bank account. Your new balance is %s.", FormatNumber(amount), FormatNumber(PlayerData[playerid][pBank]));
  61469. return 1;
  61470. }
  61471. CMD:deposit(playerid, params[])
  61472. {
  61473. new amount;
  61474. if(!IsPlayerInRangeOfPoint(playerid, 10.0, 1667.4260, -972.6691, 683.6873))
  61475. {
  61476. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the bank.");
  61477. }
  61478. if(sscanf(params, "i", amount))
  61479. {
  61480. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /deposit [amount]");
  61481. }
  61482. if(amount < 1 || amount > PlayerData[playerid][pCash])
  61483. {
  61484. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  61485. }
  61486. if(PlayerData[playerid][pAdminDuty])
  61487. {
  61488. return SendClientMessage(playerid, COLOR_GREY, "You cannot use this command while on admin duty");
  61489. }
  61490. PlayerData[playerid][pBank] += amount;
  61491. GivePlayerCash(playerid, -amount);
  61492. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET bank = %i WHERE uid = %i", PlayerData[playerid][pBank], PlayerData[playerid][pID]);
  61493. mysql_tquery(connectionID, queryBuffer);
  61494. SendClientMessageEx(playerid, COLOR_AQUA, "You have deposited {00AA00}%s{33CCFF} into your bank account. Your new balance is %s.", FormatNumber(amount), FormatNumber(PlayerData[playerid][pBank]));
  61495. return 1;
  61496. }
  61497. CMD:wiretransfer(playerid, params[])
  61498. {
  61499. new targetid, amount;
  61500. if(!IsPlayerInRangeOfPoint(playerid, 10.0, 1667.4260, -972.6691, 683.6873))
  61501. {
  61502. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the bank.");
  61503. }
  61504. if(PlayerData[playerid][pLevel] < 2)
  61505. {
  61506. return SendClientMessage(playerid, COLOR_GREY, "You can only use this command if you are level 2+.");
  61507. }
  61508. if(sscanf(params, "ui", targetid, amount))
  61509. {
  61510. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /wiretransfer [playerid] [amount]");
  61511. }
  61512. if(!IsPlayerConnected(targetid) || !PlayerData[targetid][pLogged])
  61513. {
  61514. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or hasn't logged in yet.");
  61515. }
  61516. if(amount < 1 || amount > PlayerData[playerid][pBank])
  61517. {
  61518. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  61519. }
  61520. if(targetid == playerid)
  61521. {
  61522. return SendClientMessage(playerid, COLOR_GREY, "You can't transfer funds to yourself.");
  61523. }
  61524. if(PlayerData[playerid][pAdminDuty])
  61525. {
  61526. return SendClientMessage(playerid, COLOR_GREY, "You cannot use this command while on admin duty");
  61527. }
  61528. PlayerData[targetid][pBank] += amount;
  61529. PlayerData[playerid][pBank] -= amount;
  61530. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET bank = %i WHERE uid = %i", PlayerData[playerid][pBank], PlayerData[playerid][pID]);
  61531. mysql_tquery(connectionID, queryBuffer);
  61532. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET bank = %i WHERE uid = %i", PlayerData[targetid][pBank], PlayerData[targetid][pID]);
  61533. mysql_tquery(connectionID, queryBuffer);
  61534. SendClientMessageEx(playerid, COLOR_AQUA, "You have transferred {00AA00}%s{33CCFF} to %s. Your new balance is %s.", FormatNumber(amount), GetRPName(targetid), FormatNumber(PlayerData[playerid][pBank]));
  61535. SendClientMessageEx(targetid, COLOR_AQUA, "%s has transferred {00AA00}%s{33CCFF} to your bank account.", GetRPName(playerid), FormatNumber(amount));
  61536. Log_Write("log_give", "%s (uid: %i) (IP: %s) transferred $%i to %s (uid: %i) (IP: %s)", GetRPName(playerid), PlayerData[playerid][pID], GetPlayerIP(playerid), amount, GetRPName(targetid), PlayerData[targetid][pID], GetPlayerIP(targetid));
  61537. if(!strcmp(GetPlayerIP(playerid), GetPlayerIP(targetid)))
  61538. {
  61539. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s (IP: %s) has transferred %s to %s (IP: %s).", GetRPName(playerid), GetPlayerIP(playerid), FormatNumber(amount), GetRPName(targetid), GetPlayerIP(targetid));
  61540. }
  61541. return 1;
  61542. }
  61543. CMD:balance(playerid, params[])
  61544. {
  61545. if(!IsPlayerInRangeOfPoint(playerid, 10.0, 1667.4260, -972.6691, 683.6873))
  61546. {
  61547. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the bank.");
  61548. }
  61549. SendClientMessageEx(playerid, COLOR_GREEN, "Your bank account balance is $%i.", PlayerData[playerid][pBank]);
  61550. return 1;
  61551. }
  61552. CMD:rtold(playerid, params[])
  61553. {
  61554. return callcmd::rsmsold(playerid, params);
  61555. }
  61556. //CMD:rs(playerid, params[])
  61557. //{
  61558. //return callcmd::rsms(playerid, params);
  61559. //}
  61560. CMD:rsmsold(playerid, params[])
  61561. {
  61562. if(isnull(params))
  61563. {
  61564. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /rsms [text]");
  61565. }
  61566. if(PlayerData[playerid][pTextFrom] == INVALID_PLAYER_ID)
  61567. {
  61568. return SendClientMessage(playerid, COLOR_GREY, "You haven't received a text by anyone since you joined the server.");
  61569. }
  61570. if(PlayerData[PlayerData[playerid][pTextFrom]][pJailType] > 0)
  61571. {
  61572. return SendClientMessage(playerid, COLOR_GREY, "That player is currently imprisoned and cannot use their phone.");
  61573. }
  61574. if(PlayerData[PlayerData[playerid][pTextFrom]][pTogglePhone])
  61575. {
  61576. return SendClientMessage(playerid, COLOR_GREY, "That player has their mobile phone switched off.");
  61577. }
  61578. if(PlayerData[playerid][pTazedTime] > 0 || PlayerData[playerid][pInjured] > 0 || PlayerData[playerid][pHospital] > 0 || PlayerData[playerid][pCuffed] > 0 || PlayerData[playerid][pTied] > 0 || PlayerData[playerid][pJailTime] > 0)
  61579. {
  61580. return SendClientMessage(playerid, COLOR_GREY, "You are unable to use your cellphone at the moment.");
  61581. }
  61582. PlayerData[PlayerData[playerid][pTextFrom]][pTextFrom] = playerid;
  61583. ShowActionBubble(playerid, "* %s takes out a cellphone and sends a message.", GetRPName(playerid));
  61584. SendClientMessageEx(PlayerData[playerid][pTextFrom], COLOR_YELLOW, "* SMS from %s: %s, Ph: %i *", GetRPName(playerid), params, PlayerData[playerid][pPhone]);
  61585. SendClientMessageEx(playerid, COLOR_YELLOW, "* SMS to %s: %s, Ph: %i *", GetRPName(PlayerData[playerid][pTextFrom]), params, PlayerData[PlayerData[playerid][pTextFrom]][pPhone]);
  61586. GivePlayerCash(playerid, -1);
  61587. GameTextForPlayer(playerid, "~w~Text sent!~n~~r~-$1", 5000, 1);
  61588. return 1;
  61589. }
  61590. CMD:told(playerid, params[])
  61591. {
  61592. return callcmd::smsold(playerid, params);
  61593. }
  61594. CMD:smsold(playerid, params[])
  61595. {
  61596. new number, msg[128];
  61597. if(sscanf(params, "is[128]", number, msg))
  61598. {
  61599. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sms [number] [message]");
  61600. }
  61601. if(!PlayerData[playerid][pPhone])
  61602. {
  61603. return SendClientMessage(playerid, COLOR_GREY, "You don't have a cellphone and therefore can't use this command.");
  61604. }
  61605. if(PlayerData[playerid][pTogglePhone])
  61606. {
  61607. return SendClientMessage(playerid, COLOR_GREY, "You can't use your mobile phone right now as you have it toggled.");
  61608. }
  61609. if(number == 0 || number == PlayerData[playerid][pPhone])
  61610. {
  61611. return SendClientMessage(playerid, COLOR_GREY, "Invalid number.");
  61612. }
  61613. if(PlayerData[playerid][pTazedTime] > 0 || PlayerData[playerid][pInjured] > 0 || PlayerData[playerid][pHospital] > 0 || PlayerData[playerid][pCuffed] > 0 || PlayerData[playerid][pTied] > 0 || PlayerData[playerid][pJailTime] > 0)
  61614. {
  61615. return SendClientMessage(playerid, COLOR_GREY, "You are unable to use your cellphone at the moment.");
  61616. }
  61617. foreach(new i : Player)
  61618. {
  61619. if(PlayerData[i][pPhone] == number)
  61620. {
  61621. if(PlayerData[i][pJailType] > 0)
  61622. {
  61623. return SendClientMessage(playerid, COLOR_GREY, "That player is currently imprisoned and cannot use their phone.");
  61624. }
  61625. if(PlayerData[i][pTogglePhone])
  61626. {
  61627. return SendClientMessage(playerid, COLOR_GREY, "That player has their mobile phone switched off.");
  61628. }
  61629. ShowActionBubble(playerid, "* %s takes out his cellphone and sends a message.", GetRPName(playerid));
  61630. if(strlen(msg) > MAX_SPLIT_LENGTH)
  61631. {
  61632. SendClientMessageEx(i, COLOR_YELLOW, "* SMS from %s: %.*s..., Ph: %i *", GetRPName(playerid), MAX_SPLIT_LENGTH, msg, PlayerData[playerid][pPhone]);
  61633. SendClientMessageEx(i, COLOR_YELLOW, "* SMS from %s: ...%s, Ph: %i *", GetRPName(playerid), msg[MAX_SPLIT_LENGTH], PlayerData[playerid][pPhone]);
  61634. SendClientMessageEx(playerid, COLOR_YELLOW, "* SMS to %s: %.*s..., Ph: %i *", GetRPName(i), MAX_SPLIT_LENGTH, msg, PlayerData[i][pPhone]);
  61635. SendClientMessageEx(playerid, COLOR_YELLOW, "* SMS to %s: ...%s, Ph: %i *", GetRPName(i), msg[MAX_SPLIT_LENGTH], PlayerData[i][pPhone]);
  61636. }
  61637. else
  61638. {
  61639. SendClientMessageEx(i, COLOR_YELLOW, "* SMS from %s: %s, Ph: %i *", GetRPName(playerid), msg, PlayerData[playerid][pPhone]);
  61640. SendClientMessageEx(playerid, COLOR_YELLOW, "* SMS to %s: %s, Ph: %i *", GetRPName(i), msg, PlayerData[i][pPhone]);
  61641. }
  61642. if(PlayerData[i][pTextFrom] == INVALID_PLAYER_ID)
  61643. {
  61644. SendClientMessage(i, COLOR_WHITE, "* You can use '/rsms [message]' to reply to this text message.");
  61645. }
  61646. PlayerData[i][pTextFrom] = playerid;
  61647. GivePlayerCash(playerid, -1);
  61648. GameTextForPlayer(playerid, "~w~Text sent!~n~~r~-$1", 5000, 1);
  61649. return 1;
  61650. }
  61651. }
  61652. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT username, jailtype, togglephone FROM "#TABLE_USERS" WHERE phone = %i", number);
  61653. mysql_tquery(connectionID, queryBuffer, "OnPlayerSendTextMessage", "iis", playerid, number, msg);
  61654. return 1;
  61655. }
  61656. CMD:texts(playerid, params[])
  61657. {
  61658. if(!PlayerData[playerid][pPhone])
  61659. {
  61660. return SendClientMessage(playerid, COLOR_GREY, "You don't have a cellphone and therefore can't use this command.");
  61661. }
  61662. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM texts WHERE recipient_number = %i ORDER BY date DESC", PlayerData[playerid][pPhone]);
  61663. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_VIEW_TEXTS, playerid);
  61664. return 1;
  61665. }
  61666. CMD:h(playerid, params[])
  61667. {
  61668. return callcmd::hangup(playerid, params);
  61669. }
  61670. CMD:hangup(playerid, params[])
  61671. {
  61672. if (!PlayerData[playerid][pCalling])
  61673. {
  61674. return SendErrorMessage(playerid, "There are no calls to hangup.");
  61675. }
  61676. else
  61677. {
  61678. HangupCall(playerid);
  61679. SendInfoMessage(playerid, "You have ended the call.");
  61680. }
  61681. return 1;
  61682. }
  61683. CMD:phone(playerid, params[])
  61684. {
  61685. if (!PlayerData[playerid][pPhone])
  61686. return SendErrorMessage(playerid, "You don't have any phone setup.");
  61687. if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CUFFED || PlayerData[playerid][pInjured] > 0 || PlayerData[playerid][pHospital] > 0 || PlayerData[playerid][pMiningTime] > 0 || PlayerData[playerid][pTazedTime] > 0 || PlayerData[playerid][pCuffed] > 0 || PlayerData[playerid][pLootTime] > 0)
  61688. {
  61689. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use phone at this moment.");
  61690. }
  61691. OpenPhone(playerid);
  61692. ShowActionBubble(playerid, "* %s takes out their phone.", GetRPName(playerid));
  61693. return 1;
  61694. }
  61695. CMD:answer(playerid, params[])
  61696. {
  61697. if (!IsCallIncoming(playerid) && !IsPlayerNearRingingPayphone(playerid))
  61698. {
  61699. return SendErrorMessage(playerid, "There are no incoming calls to answer.");
  61700. }
  61701. else
  61702. {
  61703. new payphone = GetClosestPayphone(playerid);
  61704. if (IsValidPayphoneID(payphone) && Payphones[payphone][phCaller] != INVALID_PLAYER_ID)
  61705. {
  61706. PlayerData[playerid][pCalling] = 2;
  61707. PlayerData[playerid][pCaller] = Payphones[payphone][phCaller];
  61708. PlayerData[Payphones[payphone][phCaller]][pCalling] = 2;
  61709. PlayerData[Payphones[payphone][phCaller]][pCaller] = playerid;
  61710. PlayerPlaySound(Payphones[payphone][phCaller], 20601, 0.0, 0.0, 0.0);
  61711. AssignPayphone(playerid, payphone);
  61712. SendInfoMessage(playerid, "You have answered the call. Use /hangup to hang up.");
  61713. SendInfoMessage(PlayerData[playerid][pCaller], "The other line has picked up the call. Use /hangup to hang up.");
  61714. }
  61715. else
  61716. {
  61717. PlayerData[playerid][pCalling] = 2;
  61718. PlayerData[PlayerData[playerid][pCaller]][pCalling] = 2;
  61719. SendInfoMessage(playerid, "You have answered the call from %s. Use /hangup to hang up.", GetRPName(PlayerData[playerid][pCaller]));
  61720. SendInfoMessage(PlayerData[playerid][pCaller], "The other line has picked up the call. Use /hangup to hang up.");
  61721. }
  61722. SetPlayerCellphoneAction(playerid, true);
  61723. PlayerPlaySound(playerid, 20601, 0.0, 0.0, 0.0);
  61724. }
  61725. return 1;
  61726. }
  61727. CMD:call(playerid, params[])
  61728. {
  61729. new nam1[64], payphone = GetClosestPayphone(playerid);
  61730. if (!PlayerData[playerid][pPhone] && payphone == -1)
  61731. {
  61732. return SendErrorMessage(playerid, "You don't have any phone setup.");
  61733. }
  61734. else if(PlayerData[playerid][pTazedTime] > 0 || PlayerData[playerid][pHospital] > 0 || PlayerData[playerid][pCuffed] > 0 || PlayerData[playerid][pTied] > 0 || PlayerData[playerid][pJailTime] > 0)
  61735. {
  61736. return SendClientMessage(playerid, COLOR_GREY, "You are unable to use your cellphone at the moment.");
  61737. }
  61738. else if (PlayerData[playerid][pTogglePhone] && payphone == -1)
  61739. {
  61740. return SendErrorMessage(playerid, "Your phone is turned off. Use /phone to turn it on.");
  61741. }
  61742. else if (sscanf(params, "s[64]", nam1))
  61743. {
  61744. SendSyntaxMessage(playerid, "/call [number/contact name]");
  61745. SendClientMessage(playerid, COLOR_SYNTAX, "Special numbers: 911, 6324(taxi), 8294(mechanic)");
  61746. return 1;
  61747. }
  61748. else
  61749. {
  61750. if(IsNumeric(nam1) && strval(nam1) > 0)
  61751. {
  61752. new tmpNumber = strval(nam1);
  61753. CallNumber(playerid, tmpNumber, payphone);
  61754. }
  61755. else
  61756. {
  61757. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT Contact, Number FROM `rp_contacts` WHERE Contact LIKE '%%%e%%'", nam1);
  61758. mysql_tquery(connectionID, queryBuffer, "OnPlayerCallContact", "d", playerid);
  61759. }
  61760. }
  61761. return 1;
  61762. }
  61763. forward SendWarningMessage(playerid);
  61764. public SendWarningMessage(playerid)
  61765. {
  61766. new Float:x, Float:y, Float:z;
  61767. GetPlayerPos(playerid, x, y, z);
  61768. for(new e = 0; e < MAX_FACTIONS; e++)
  61769. {
  61770. if(FactionInfo[e][fType] == FACTION_POLICE || FactionInfo[e][fType] == FACTION_FEDERAL || FactionInfo[e][fType] == FACTION_ARMY)
  61771. {
  61772. SendFactionMessage(e, COLOR_YELLOW, "WARNING: A illegal delivering truck has been spoted at %s.", GetZoneName(x, y, z));
  61773. }
  61774. }
  61775. return 1;
  61776. }
  61777. CMD:tog(playerid, params[])
  61778. {
  61779. return callcmd::toggle(playerid, params);
  61780. }
  61781. RefreshPlayerTextdraws(playerid)
  61782. {
  61783. if(!PlayerData[playerid][pToggleTextdraws])
  61784. {
  61785. if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING)
  61786. {
  61787. TextDrawHideForPlayer(playerid, TimeTD);
  61788. PlayerTextDrawHide(playerid, PlayerData[playerid][pText][0]);
  61789. PlayerTextDrawHide(playerid, PlayerData[playerid][pText][3]);
  61790. PlayerTextDrawHide(playerid, PlayerData[playerid][pText][4]);
  61791. }
  61792. else
  61793. {
  61794. if(PlayerData[playerid][pWatch] && PlayerData[playerid][pWatchOn])
  61795. {
  61796. TextDrawShowForPlayer(playerid, TimeTD);
  61797. }
  61798. if(PlayerData[playerid][pGPS] && PlayerData[playerid][pGPSOn])
  61799. {
  61800. PlayerTextDrawShow(playerid, PlayerData[playerid][pText][0]);
  61801. }
  61802. if(!PlayerData[playerid][pToggleHUD])
  61803. {
  61804. PlayerTextDrawShow(playerid, PlayerData[playerid][pText][3]);
  61805. PlayerTextDrawShow(playerid, PlayerData[playerid][pText][4]);
  61806. }
  61807. }
  61808. }
  61809. }
  61810. CMD:toggle(playerid, params[])
  61811. {
  61812. if(PlayerData[playerid][pLogged])
  61813. {
  61814. ShowDialogToPlayer(playerid, DIALOG_SETTINGS);
  61815. }
  61816. return 1;
  61817. }
  61818. CMD:otoggle(playerid, params[])
  61819. {
  61820. if(isnull(params))
  61821. {
  61822. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /(tog)gle [option]");
  61823. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Textdraws, OOC, Global, Phone, Whisper, Bugged, Newbie, WalkieTalkie, Radio, Streams, News");
  61824. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: SpawnCam, HUD, Admin, Helper, VIP, Reports, Faction, Gang, PM, Points, Turfs");
  61825. return 1;
  61826. }
  61827. if(!strcmp(params, "textdraws", true))
  61828. {
  61829. if(!PlayerData[playerid][pToggleTextdraws])
  61830. {
  61831. PlayerTextDrawHide(playerid, PlayerData[playerid][pText][0]);
  61832. PlayerTextDrawHide(playerid, PlayerData[playerid][pText][1]);
  61833. PlayerTextDrawHide(playerid, PlayerData[playerid][pText][2]);
  61834. PlayerTextDrawHide(playerid, PlayerData[playerid][pText][3]);
  61835. PlayerTextDrawHide(playerid, PlayerData[playerid][pText][4]);
  61836. TextDrawHideForPlayer(playerid, TimeTD);
  61837. PlayerData[playerid][pToggleTextdraws] = 1;
  61838. SendClientMessage(playerid, COLOR_AQUA, "Textdraws toggled. You will no longer see any textdraws.");
  61839. }
  61840. else
  61841. {
  61842. // if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && VehicleHasEngine(GetPlayerVehicleID(playerid)))
  61843. // {
  61844. // PlayerTextDrawShow(playerid, PlayerData[playerid][pText][1]);
  61845. // PlayerTextDrawShow(playerid, PlayerData[playerid][pText][2]);
  61846. // }
  61847. if(PlayerData[playerid][pGPSOn])
  61848. {
  61849. PlayerTextDrawShow(playerid, PlayerData[playerid][pText][0]);
  61850. }
  61851. if(PlayerData[playerid][pWatchOn])
  61852. {
  61853. TextDrawShowForPlayer(playerid, TimeTD);
  61854. }
  61855. if(!PlayerData[playerid][pToggleHUD])
  61856. {
  61857. PlayerTextDrawShow(playerid, PlayerData[playerid][pText][3]);
  61858. PlayerTextDrawShow(playerid, PlayerData[playerid][pText][4]);
  61859. }
  61860. PlayerData[playerid][pToggleTextdraws] = 0;
  61861. SendClientMessage(playerid, COLOR_AQUA, "Textdraws enabled. You will now see textdraws again.");
  61862. }
  61863. }
  61864. else if(!strcmp(params, "ooc", true))
  61865. {
  61866. if(!PlayerData[playerid][pToggleOOC])
  61867. {
  61868. PlayerData[playerid][pToggleOOC] = 1;
  61869. SendClientMessage(playerid, COLOR_AQUA, "OOC chat toggled. You will no longer see any messages in /o.");
  61870. }
  61871. else
  61872. {
  61873. PlayerData[playerid][pToggleOOC] = 0;
  61874. SendClientMessage(playerid, COLOR_AQUA, "OOC chat enabled. You will now see messages in /o again.");
  61875. }
  61876. }
  61877. else if(!strcmp(params, "points", true))
  61878. {
  61879. if(!PlayerData[playerid][pTogglePoints])
  61880. {
  61881. PlayerData[playerid][pTogglePoints] = 1;
  61882. SendClientMessage(playerid, COLOR_AQUA, "Points toggled. You will no longer see any point messages.");
  61883. }
  61884. else
  61885. {
  61886. PlayerData[playerid][pTogglePoints] = 0;
  61887. SendClientMessage(playerid, COLOR_AQUA, "Points enabled. You will now see point messages.");
  61888. }
  61889. }
  61890. else if(!strcmp(params, "turfs", true))
  61891. {
  61892. if(!PlayerData[playerid][pToggleTurfs])
  61893. {
  61894. PlayerData[playerid][pToggleTurfs] = 1;
  61895. SendClientMessage(playerid, COLOR_AQUA, "Turfs toggled. You will no longer see any turf messages.");
  61896. }
  61897. else
  61898. {
  61899. PlayerData[playerid][pToggleTurfs] = 0;
  61900. SendClientMessage(playerid, COLOR_AQUA, "Turfs enabled. You will now see turf messages.");
  61901. }
  61902. }
  61903. else if(!strcmp(params, "global", true))
  61904. {
  61905. if(!PlayerData[playerid][pToggleGlobal])
  61906. {
  61907. PlayerData[playerid][pToggleGlobal] = 1;
  61908. SendClientMessage(playerid, COLOR_AQUA, "Global chat toggled. You will no longer see any messages in /g.");
  61909. }
  61910. else
  61911. {
  61912. PlayerData[playerid][pToggleGlobal] = 0;
  61913. SendClientMessage(playerid, COLOR_AQUA, "Global chat enabled. You can now speak to other players in /g.");
  61914. }
  61915. }
  61916. else if(!strcmp(params, "phone", true))
  61917. {
  61918. if(!PlayerData[playerid][pTogglePhone])
  61919. {
  61920. if(PlayerData[playerid][pCallLine] != INVALID_PLAYER_ID)
  61921. {
  61922. return SendClientMessage(playerid, COLOR_GREY, "You can't do this while in a call.");
  61923. }
  61924. PlayerData[playerid][pTogglePhone] = 1;
  61925. SendClientMessage(playerid, COLOR_AQUA, "Phone toggled. You will no longer receive calls or texts.");
  61926. }
  61927. else
  61928. {
  61929. PlayerData[playerid][pTogglePhone] = 0;
  61930. SendClientMessage(playerid, COLOR_AQUA, "Phone enabled. You can now receive calls and texts again.");
  61931. }
  61932. }
  61933. else if(!strcmp(params, "whisper", true))
  61934. {
  61935. if(!PlayerData[playerid][pToggleWhisper])
  61936. {
  61937. PlayerData[playerid][pToggleWhisper] = 1;
  61938. SendClientMessage(playerid, COLOR_AQUA, "Whispers toggled. You will no longer receive any whispers from players.");
  61939. }
  61940. else
  61941. {
  61942. PlayerData[playerid][pToggleWhisper] = 0;
  61943. SendClientMessage(playerid, COLOR_AQUA, "Whispers enabled. You will now receive whispers from players again.");
  61944. }
  61945. }
  61946. else if(!strcmp(params, "pm", true))
  61947. {
  61948. if(!PlayerData[playerid][pTogglePM])
  61949. {
  61950. PlayerData[playerid][pTogglePM] = 1;
  61951. SendClientMessage(playerid, COLOR_AQUA, "PM toggled. You will no longer receive any private message from players.");
  61952. }
  61953. else
  61954. {
  61955. PlayerData[playerid][pTogglePM] = 0;
  61956. SendClientMessage(playerid, COLOR_AQUA, "PM enabled. You will now receive private message from players again.");
  61957. }
  61958. }
  61959. else if(!strcmp(params, "bugged", true))
  61960. {
  61961. if(GetFactionType(playerid) != FACTION_FEDERAL)
  61962. return SendClientMessage(playerid, COLOR_GREY, "You must be a federal agent to use the bug channel.");
  61963. if(!PlayerData[playerid][pToggleBug])
  61964. {
  61965. PlayerData[playerid][pToggleBug] = 1;
  61966. SendClientMessage(playerid, COLOR_AQUA, "Bug channel toggled. You will no longer receive any recordings from bugged players.");
  61967. }
  61968. else
  61969. {
  61970. PlayerData[playerid][pToggleBug] = 0;
  61971. SendClientMessage(playerid, COLOR_AQUA, "Bug channel enabled. You will now receive recordings from bugged players again.");
  61972. }
  61973. }
  61974. else if(!strcmp(params, "admin", true))
  61975. {
  61976. if(!PlayerData[playerid][pAdmin] && !PlayerData[playerid][pDeveloper] && !PlayerData[playerid][pFormerAdmin])
  61977. {
  61978. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to toggle this feature.");
  61979. }
  61980. if(!PlayerData[playerid][pToggleAdmin])
  61981. {
  61982. PlayerData[playerid][pToggleAdmin] = 1;
  61983. SendClientMessage(playerid, COLOR_AQUA, "Admin chat toggled. You will no longer see any messages in admin chat.");
  61984. }
  61985. else
  61986. {
  61987. PlayerData[playerid][pToggleAdmin] = 0;
  61988. SendClientMessage(playerid, COLOR_AQUA, "Admin chat enabled. You will now see messages in admin chat again.");
  61989. }
  61990. }
  61991. else if(!strcmp(params, "reports", true))
  61992. {
  61993. if(PlayerData[playerid][pAdmin] < 1)
  61994. {
  61995. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to toggle this feature.");
  61996. }
  61997. if(!PlayerData[playerid][pToggleReports])
  61998. {
  61999. PlayerData[playerid][pToggleReports] = 1;
  62000. SendClientMessage(playerid, COLOR_AQUA, "Reports toggled. You will no longer see any incoming reports.");
  62001. }
  62002. else
  62003. {
  62004. PlayerData[playerid][pToggleReports] = 0;
  62005. SendClientMessage(playerid, COLOR_AQUA, "Reports enabled. You will now see incoming reports again.");
  62006. }
  62007. }
  62008. else if(!strcmp(params, "helper", true))
  62009. {
  62010. if(!PlayerData[playerid][pHelper])
  62011. {
  62012. return SendClientMessage(playerid, COLOR_GREY, "You are not a helper and therefore cannot toggle this feature.");
  62013. }
  62014. if(!PlayerData[playerid][pToggleHelper])
  62015. {
  62016. PlayerData[playerid][pToggleHelper] = 1;
  62017. SendClientMessage(playerid, COLOR_AQUA, "Helper chat toggled. You will no longer see any messages in helper chat.");
  62018. }
  62019. else
  62020. {
  62021. PlayerData[playerid][pToggleHelper] = 0;
  62022. SendClientMessage(playerid, COLOR_AQUA, "Helper chat enabled. You will now see messages in helper chat again.");
  62023. }
  62024. }
  62025. else if(!strcmp(params, "newbie", true))
  62026. {
  62027. if(!PlayerData[playerid][pToggleNewbie])
  62028. {
  62029. PlayerData[playerid][pToggleNewbie] = 1;
  62030. SendClientMessage(playerid, COLOR_AQUA, "Newbie chat toggled. You will no longer see any messages in newbie chat.");
  62031. }
  62032. else
  62033. {
  62034. PlayerData[playerid][pToggleNewbie] = 0;
  62035. SendClientMessage(playerid, COLOR_AQUA, "Newbie chat enabled. You will now see messages in newbie chat again.");
  62036. }
  62037. }
  62038. else if(!strcmp(params, "walkietalkie", true))
  62039. {
  62040. if(!PlayerData[playerid][pWalkieTalkie])
  62041. {
  62042. return SendClientMessage(playerid, COLOR_GREY, "You don't have a walkie talkie.");
  62043. }
  62044. if(!PlayerData[playerid][pToggleWT])
  62045. {
  62046. PlayerData[playerid][pToggleWT] = 1;
  62047. SendClientMessage(playerid, COLOR_AQUA, "Walkie talkie toggled. You will no longer receive any messages on your walkie talkie.");
  62048. }
  62049. else
  62050. {
  62051. PlayerData[playerid][pToggleWT] = 0;
  62052. SendClientMessage(playerid, COLOR_AQUA, "Walkie talkie enabled. You will now receive messages on your walkie talkie again.");
  62053. }
  62054. }
  62055. else if(!strcmp(params, "radio", true))
  62056. {
  62057. if(PlayerData[playerid][pFaction] == -1)
  62058. {
  62059. return SendClientMessage(playerid, COLOR_GREY, "You are not apart of a faction and therefore can't toggle your radio.");
  62060. }
  62061. if(!PlayerData[playerid][pToggleRadio])
  62062. {
  62063. PlayerData[playerid][pToggleRadio] = 1;
  62064. SendClientMessage(playerid, COLOR_AQUA, "Radio chat toggled. You will no longer receive any messages on your radio.");
  62065. }
  62066. else
  62067. {
  62068. PlayerData[playerid][pToggleRadio] = 0;
  62069. SendClientMessage(playerid, COLOR_AQUA, "Radio chat enabled. You will now receive messages on your radio again.");
  62070. }
  62071. }
  62072. else if(!strcmp(params, "streams", true))
  62073. {
  62074. if(!PlayerData[playerid][pToggleMusic])
  62075. {
  62076. PlayerData[playerid][pToggleMusic] = 1;
  62077. StopAudioStreamForPlayer(playerid);
  62078. SendClientMessage(playerid, COLOR_AQUA, "Music streams toggled. You will no longer hear any music played locally & globally.");
  62079. }
  62080. else
  62081. {
  62082. PlayerData[playerid][pToggleMusic] = 0;
  62083. SendClientMessage(playerid, COLOR_AQUA, "Music streams enabled. You will now hear music played locally & globally again.");
  62084. }
  62085. }
  62086. else if(!strcmp(params, "vip", true))
  62087. {
  62088. if(!PlayerData[playerid][pDonator])
  62089. {
  62090. return SendClientMessage(playerid, COLOR_GREY, "You are not a VIP member and therefore cannot toggle this feature.");
  62091. }
  62092. if(!PlayerData[playerid][pToggleVIP])
  62093. {
  62094. PlayerData[playerid][pToggleVIP] = 1;
  62095. SendClientMessage(playerid, COLOR_AQUA, "VIP chat toggled. You will no longer see any messages in VIP chat.");
  62096. }
  62097. else
  62098. {
  62099. PlayerData[playerid][pToggleVIP] = 0;
  62100. SendClientMessage(playerid, COLOR_AQUA, "VIP chat enabled. You will now see messages in VIP chat again.");
  62101. }
  62102. }
  62103. else if(!strcmp(params, "faction", true))
  62104. {
  62105. if(PlayerData[playerid][pFaction] == -1)
  62106. {
  62107. return SendClientMessage(playerid, COLOR_GREY, "You are not apart of a faction and therefore can't toggle this chat.");
  62108. }
  62109. if(!PlayerData[playerid][pToggleFaction])
  62110. {
  62111. PlayerData[playerid][pToggleFaction] = 1;
  62112. SendClientMessage(playerid, COLOR_AQUA, "Faction chat toggled. You will no longer see any messages in faction chat.");
  62113. }
  62114. else
  62115. {
  62116. PlayerData[playerid][pToggleFaction] = 0;
  62117. SendClientMessage(playerid, COLOR_AQUA, "Faction chat enabled. You will now see messages in faction chat again.");
  62118. }
  62119. }
  62120. else if(!strcmp(params, "gang", true))
  62121. {
  62122. if(PlayerData[playerid][pGang] == -1)
  62123. {
  62124. return SendClientMessage(playerid, COLOR_GREY, "You are not a gang member and therefore can't toggle this chat.");
  62125. }
  62126. if(!PlayerData[playerid][pToggleGang])
  62127. {
  62128. PlayerData[playerid][pToggleGang] = 1;
  62129. SendClientMessage(playerid, COLOR_AQUA, "Gang chat toggled. You will no longer see any messages in gang chat.");
  62130. }
  62131. else
  62132. {
  62133. PlayerData[playerid][pToggleGang] = 0;
  62134. SendClientMessage(playerid, COLOR_AQUA, "Gang chat enabled. You will now see messages in gang chat again.");
  62135. }
  62136. }
  62137. else if(!strcmp(params, "news", true))
  62138. {
  62139. if(!PlayerData[playerid][pToggleNews])
  62140. {
  62141. PlayerData[playerid][pToggleNews] = 1;
  62142. SendClientMessage(playerid, COLOR_AQUA, "News chat toggled. You will no longer see any news broadcasts.");
  62143. }
  62144. else
  62145. {
  62146. PlayerData[playerid][pToggleNews] = 0;
  62147. SendClientMessage(playerid, COLOR_AQUA, "News chat enabled. You will now see news broadcasts again.");
  62148. }
  62149. }
  62150. else if(!strcmp(params, "lands", true))
  62151. {
  62152. callcmd::lands(playerid, "\1");
  62153. }
  62154. else if(!strcmp(params, "turfs", true))
  62155. {
  62156. callcmd::turfs(playerid, "\1");
  62157. }
  62158. else if(!strcmp(params, "spawncam", true))
  62159. {
  62160. if(!PlayerData[playerid][pToggleCam])
  62161. {
  62162. PlayerData[playerid][pToggleCam] = 1;
  62163. SendClientMessage(playerid, COLOR_AQUA, "Spawn camera toggled. You will no longer see the camera effects upon spawning.");
  62164. }
  62165. else
  62166. {
  62167. PlayerData[playerid][pToggleCam] = 0;
  62168. SendClientMessage(playerid, COLOR_AQUA, "Spawn camera enabled. You will now see the camera effects when you spawn again.");
  62169. }
  62170. }
  62171. else if(!strcmp(params, "hud", true))
  62172. {
  62173. if(!PlayerData[playerid][pToggleHUD])
  62174. {
  62175. PlayerData[playerid][pToggleHUD] = 1;
  62176. SendClientMessage(playerid, COLOR_AQUA, "HUD toggled. You will no longer see your health & armor indicators.");
  62177. PlayerTextDrawHide(playerid, PlayerData[playerid][pText][3]);
  62178. PlayerTextDrawHide(playerid, PlayerData[playerid][pText][4]);
  62179. }
  62180. else
  62181. {
  62182. PlayerData[playerid][pToggleHUD] = 0;
  62183. SendClientMessage(playerid, COLOR_AQUA, "HUD enabled. You will now see your health & armor indicators again.");
  62184. PlayerTextDrawShow(playerid, PlayerData[playerid][pText][3]);
  62185. PlayerTextDrawShow(playerid, PlayerData[playerid][pText][4]);
  62186. }
  62187. }
  62188. else
  62189. {
  62190. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /(tog)gle [option]");
  62191. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Textdraws, OOC, Global, Phone, Whisper, Bugged, Newbie, WalkieTalkie, Radio, Streams, News");
  62192. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: SpawnCam, HUD, Admin, Helper, VIP, Reports, Faction, Gang");
  62193. }
  62194. return 1;
  62195. }
  62196. CMD:locate(playerid, params[])
  62197. {
  62198. if(isnull(params))
  62199. {
  62200. return ShowDialogToPlayer(playerid, DIALOG_LOCATE);
  62201. }
  62202. else
  62203. {
  62204. LocateMethod(playerid, params);
  62205. }
  62206. return 1;
  62207. }
  62208. CMD:findjob(playerid, params[])
  62209. {
  62210. return Dialog_Show(playerid, DIALOG_LOCATELIST1, DIALOG_STYLE_LIST, "GPS - Select Destination", "Pizzaman\nCourier\nFisherman\nBodyguard\nWeapon Dealer\nMechanic\nMiner\nSweeper\nTaxi Driver\nDrug Dealer\nLawyer\nDetective\nThief\nGarbage Man\nFarmer", "Select", "Close");
  62211. }
  62212. LocateMethod(playerid, params[])
  62213. {
  62214. if(isnull(params))
  62215. {
  62216. SendClientMessage(playerid, COLOR_GREY, "Null Error - failed to locate properly - contact a developer.");
  62217. return 1;
  62218. }
  62219. if(!strcmp(params, "dmv", true))
  62220. {
  62221. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62222. SetPlayerCheckpoint(playerid, 1219.2590, -1812.1093, 16.5938, 3.0);
  62223. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of DMV.");
  62224. }
  62225. else if(!strcmp(params, "dealership", true))
  62226. {
  62227. new businessid = GetClosestBusiness(playerid, BUSINESS_DEALERSHIP);
  62228. if(businessid == -1)
  62229. {
  62230. return SendClientMessage(playerid, COLOR_GREY, "There are no businesses of this type to be found.");
  62231. }
  62232. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62233. SetPlayerCheckpoint(playerid, BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 3.0);
  62234. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the closest supermarket to you.");
  62235. }
  62236. else if(!strcmp(params, "boatdealer", true))
  62237. {
  62238. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62239. SetPlayerCheckpoint(playerid, 154.2223, -1946.3030, 5.1920, 3.0);
  62240. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the boat dealership.");
  62241. }
  62242. else if(!strcmp(params, "airdealer", true))
  62243. {
  62244. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62245. SetPlayerCheckpoint(playerid, 1892.6315, -2328.6721, 13.5469, 3.0);
  62246. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the aircraft dealership.");
  62247. }
  62248. else if(!strcmp(params, "bank", true))
  62249. {
  62250. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62251. SetPlayerCheckpoint(playerid, 1465.1348, -1010.5063, 26.8438, 3.0);
  62252. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the bank.");
  62253. }
  62254. else if(!strcmp(params, "paintball", true))
  62255. {
  62256. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62257. SetPlayerCheckpoint(playerid, 1286.2870,-1349.8572,13.5689, 3.0);
  62258. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of paintball.");
  62259. }
  62260. else if(!strcmp(params, "casino", true))
  62261. {
  62262. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62263. SetPlayerCheckpoint(playerid, 1022.5992, -1122.8069, 23.8710, 3.0);
  62264. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the casino.");
  62265. }
  62266. else if(!strcmp(params, "vip", true))
  62267. {
  62268. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62269. SetPlayerCheckpoint(playerid, 1015.6364, -1550.5270, 14.8594, 3.0);
  62270. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the VIP lounge.");
  62271. }
  62272. else if(!strcmp(params, "smuggledrugs", true))
  62273. {
  62274. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62275. SetPlayerCheckpoint(playerid, 52.0937, -292.2513, 1.7001, 3.0);
  62276. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the drug smuggling spot.");
  62277. }
  62278. else if(!strcmp(params, "matpickup1", true))
  62279. {
  62280. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62281. SetPlayerCheckpoint(playerid, 1421.6913, -1318.4719, 13.5547, 3.0);
  62282. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the 1st materials pickup.");
  62283. }
  62284. else if(!strcmp(params, "matpickup2", true))
  62285. {
  62286. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62287. SetPlayerCheckpoint(playerid, 2393.4885, -2008.5726, 13.3467, 3.0);
  62288. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the 2nd materials pickup.");
  62289. }
  62290. else if(!strcmp(params, "matfactory1", true))
  62291. {
  62292. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62293. SetPlayerCheckpoint(playerid, 2173.2129, -2264.1548, 13.3467, 3.0);
  62294. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the 1st materials factory.");
  62295. }
  62296. else if(!strcmp(params, "matfactory2", true))
  62297. {
  62298. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62299. SetPlayerCheckpoint(playerid, 2288.0918, -1105.6555, 37.9766, 3.0);
  62300. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the 2nd materials factory.");
  62301. }
  62302. else if(!strcmp(params, "heisenbergs", true))
  62303. {
  62304. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62305. SetPlayerCheckpoint(playerid, -65.0972, -1574.3820, 2.6107, 3.0);
  62306. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of Heisenberg's meth cooking trailer.");
  62307. }
  62308. else if(!strcmp(params, "aiportdepot", true))
  62309. {
  62310. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62311. SetPlayerCheckpoint(playerid, 2112.3240, -2432.8130, 13.5469, 3.0);
  62312. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of LSI Materials Depot.");
  62313. }
  62314. else if(!strcmp(params, "marinadepot", true))
  62315. {
  62316. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62317. SetPlayerCheckpoint(playerid, 714.5344, -1565.1694, 1.7680, 3.0);
  62318. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of Marina materials depot.");
  62319. }
  62320. else if(!strcmp(params, "pizzaman", true))
  62321. {
  62322. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62323. SetPlayerCheckpoint(playerid, jobLocations[JOB_PIZZAMAN][jobX], jobLocations[JOB_PIZZAMAN][jobY], jobLocations[JOB_PIZZAMAN][jobZ], 3.0);
  62324. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the Pizzaman job.");
  62325. }
  62326. else if(!strcmp(params, "courier", true))
  62327. {
  62328. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62329. SetPlayerCheckpoint(playerid, jobLocations[JOB_COURIER][jobX], jobLocations[JOB_COURIER][jobY], jobLocations[JOB_COURIER][jobZ], 3.0);
  62330. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the Courier job.");
  62331. }
  62332. else if(!strcmp(params, "fisherman", true))
  62333. {
  62334. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62335. SetPlayerCheckpoint(playerid, jobLocations[JOB_FISHERMAN][jobX], jobLocations[JOB_FISHERMAN][jobY], jobLocations[JOB_FISHERMAN][jobZ], 3.0);
  62336. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the Fisherman job.");
  62337. }
  62338. else if(!strcmp(params, "bodyguard", true))
  62339. {
  62340. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62341. SetPlayerCheckpoint(playerid, jobLocations[JOB_BODYGUARD][jobX], jobLocations[JOB_BODYGUARD][jobY], jobLocations[JOB_BODYGUARD][jobZ], 3.0);
  62342. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the Bodyguard job.");
  62343. }
  62344. else if(!strcmp(params, "weapondealer", true))
  62345. {
  62346. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62347. SetPlayerCheckpoint(playerid, jobLocations[JOB_WEAPONDEALER][jobX], jobLocations[JOB_WEAPONDEALER][jobY], jobLocations[JOB_WEAPONDEALER][jobZ], 3.0);
  62348. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the Weapons Dealer job.");
  62349. }
  62350. else if(!strcmp(params, "mechanic", true))
  62351. {
  62352. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62353. SetPlayerCheckpoint(playerid, jobLocations[JOB_MECHANIC][jobX], jobLocations[JOB_MECHANIC][jobY], jobLocations[JOB_MECHANIC][jobZ], 3.0);
  62354. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the Mechanic job.");
  62355. }
  62356. else if(!strcmp(params, "miner", true))
  62357. {
  62358. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62359. SetPlayerCheckpoint(playerid, jobLocations[JOB_MINER][jobX], jobLocations[JOB_MINER][jobY], jobLocations[JOB_MINER][jobZ], 3.0);
  62360. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the Miner job.");
  62361. }
  62362. else if(!strcmp(params, "sweeper", true))
  62363. {
  62364. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62365. SetPlayerCheckpoint(playerid, jobLocations[JOB_SWEEPER][jobX], jobLocations[JOB_SWEEPER][jobY], jobLocations[JOB_SWEEPER][jobZ], 3.0);
  62366. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the Sweeper job.");
  62367. }
  62368. else if(!strcmp(params, "taxidriver", true))
  62369. {
  62370. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62371. SetPlayerCheckpoint(playerid, jobLocations[JOB_TAXIDRIVER][jobX], jobLocations[JOB_TAXIDRIVER][jobY], jobLocations[JOB_TAXIDRIVER][jobZ], 3.0);
  62372. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the Taxi Driver job.");
  62373. }
  62374. else if(!strcmp(params, "drugdealer", true))
  62375. {
  62376. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62377. SetPlayerCheckpoint(playerid, jobLocations[JOB_DRUGDEALER][jobX], jobLocations[JOB_DRUGDEALER][jobY], jobLocations[JOB_DRUGDEALER][jobZ], 3.0);
  62378. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the Drug Dealer job.");
  62379. }
  62380. else if(!strcmp(params, "lawyer", true))
  62381. {
  62382. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62383. SetPlayerCheckpoint(playerid, jobLocations[JOB_LAWYER][jobX], jobLocations[JOB_LAWYER][jobY], jobLocations[JOB_LAWYER][jobZ], 3.0);
  62384. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the Lawyer job.");
  62385. }
  62386. else if(!strcmp(params, "detective", true))
  62387. {
  62388. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62389. SetPlayerCheckpoint(playerid, 1554.8918, -1675.6486, 16.1953, 3.0);
  62390. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the Detective job.");
  62391. }
  62392. else if(!strcmp(params, "thief", true))
  62393. {
  62394. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62395. SetPlayerCheckpoint(playerid, 1577.1469, -1475.1631, 14.2195, 3.0);
  62396. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the Thief job.");
  62397. }
  62398. else if(!strcmp(params, "garbageman", true)) //here
  62399. {
  62400. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62401. SetPlayerCheckpoint(playerid, 2441.6909, -2115.9131, 13.5469, 3.0);
  62402. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the Garbage man job.");
  62403. }
  62404. else if(!strcmp(params, "farmer", true))
  62405. {
  62406. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62407. SetPlayerCheckpoint(playerid, -366.3515, -1412.8286, 25.7266, 3.0);
  62408. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the Farmer job.");
  62409. }
  62410. else if(!strcmp(params, "supermarket", true))
  62411. {
  62412. new businessid = GetClosestBusiness(playerid, BUSINESS_STORE);
  62413. if(businessid == -1)
  62414. {
  62415. return SendClientMessage(playerid, COLOR_GREY, "There are no businesses of this type to be found.");
  62416. }
  62417. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62418. SetPlayerCheckpoint(playerid, BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 3.0);
  62419. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the closest supermarket to you.");
  62420. }
  62421. else if(!strcmp(params, "gunshop", true))
  62422. {
  62423. new businessid = GetClosestBusiness(playerid, BUSINESS_GUNSHOP);
  62424. if(businessid == -1)
  62425. {
  62426. return SendClientMessage(playerid, COLOR_GREY, "There are no businesses of this type to be found.");
  62427. }
  62428. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62429. SetPlayerCheckpoint(playerid, BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 3.0);
  62430. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the closest gun shop to you.");
  62431. }
  62432. else if(!strcmp(params, "clothesshop", true))
  62433. {
  62434. new businessid = GetClosestBusiness(playerid, BUSINESS_CLOTHES);
  62435. if(businessid == -1)
  62436. {
  62437. return SendClientMessage(playerid, COLOR_GREY, "There are no businesses of this type to be found.");
  62438. }
  62439. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62440. SetPlayerCheckpoint(playerid, BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 3.0);
  62441. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the closest clothes shop to you.");
  62442. }
  62443. else if(!strcmp(params, "gym", true))
  62444. {
  62445. new businessid = GetClosestBusiness(playerid, BUSINESS_GYM);
  62446. if(businessid == -1)
  62447. {
  62448. return SendClientMessage(playerid, COLOR_GREY, "There are no businesses of this type to be found.");
  62449. }
  62450. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62451. SetPlayerCheckpoint(playerid, BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 3.0);
  62452. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the closest gym to you.");
  62453. }
  62454. else if(!strcmp(params, "restaurant", true))
  62455. {
  62456. new businessid = GetClosestBusiness(playerid, BUSINESS_RESTAURANT);
  62457. if(businessid == -1)
  62458. {
  62459. return SendClientMessage(playerid, COLOR_GREY, "There are no businesses of this type to be found.");
  62460. }
  62461. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62462. SetPlayerCheckpoint(playerid, BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 3.0);
  62463. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the closest restaurant to you.");
  62464. }
  62465. else if(!strcmp(params, "adagency", true))
  62466. {
  62467. new businessid = GetClosestBusiness(playerid, BUSINESS_AGENCY);
  62468. if(businessid == -1)
  62469. {
  62470. return SendClientMessage(playerid, COLOR_GREY, "There are no businesses of this type to be found.");
  62471. }
  62472. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62473. SetPlayerCheckpoint(playerid, BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 3.0);
  62474. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the closest advertisement agency to you.");
  62475. }
  62476. else if(!strcmp(params, "club", true))
  62477. {
  62478. new businessid = GetClosestBusiness(playerid, BUSINESS_BARCLUB);
  62479. if(businessid == -1)
  62480. {
  62481. return SendClientMessage(playerid, COLOR_GREY, "There are no businesses of this type to be found.");
  62482. }
  62483. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62484. SetPlayerCheckpoint(playerid, BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 3.0);
  62485. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the closest club/bar to you.");
  62486. }
  62487. else if(!strcmp(params, "toolshop", true))
  62488. {
  62489. new businessid = GetClosestBusiness(playerid, BUSINESS_TOOLSHOP);
  62490. if(businessid == -1)
  62491. {
  62492. return SendClientMessage(playerid, COLOR_GREY, "There are no businesses of this type to be found.");
  62493. }
  62494. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62495. SetPlayerCheckpoint(playerid, BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 3.0);
  62496. SendClientMessage(playerid, COLOR_WHITE, "* Checkpoint marked at the location of the closest tool shop to you.");
  62497. }
  62498. else
  62499. {
  62500. for(new x = 0; x < MAX_LOCATIONS; x++)
  62501. {
  62502. if(!strcmp(params, LocationInfo[x][locName], true))
  62503. {
  62504. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  62505. SetPlayerCheckpoint(playerid, LocationInfo[x][locPosX], LocationInfo[x][locPosY], LocationInfo[x][locPosZ], 3.0);
  62506. SendClientMessageEx(playerid, COLOR_WHITE, "* Checkpoint marked at the location of %s", LocationInfo[x][locName]);
  62507. break;
  62508. }
  62509. if(x == MAX_LOCATIONS - 1)
  62510. {
  62511. SendClientMessageEx(playerid, COLOR_SYNTAX, "Unable to locate '%s'. Contact an administrator!", params);
  62512. break;
  62513. }
  62514. }
  62515. /*SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /locate [option]");
  62516. SendClientMessage(playerid, COLOR_SYNTAX, "Business Types: Supermarket, GunShop, ClothesShop, Gym, Restaurant, AdAgency, Club, ToolShop");
  62517. SendClientMessage(playerid, COLOR_SYNTAX, "General Locations: DMV, Bank, Paintball, Casino, VIP, Smuggledrugs, MatPickup1, MatPickup2");
  62518. SendClientMessage(playerid, COLOR_SYNTAX, "General Locations: Dealership, AirDealer, BoatDealer, MatFactory1, MatFactory2, Heisenbergs");
  62519. SendClientMessage(playerid, COLOR_SYNTAX, "Scripted Jobs: Pizzaman, Courier, Fisherman, Bodyguard, WeaponDealer, Mechanic, Miner, Sweeper");
  62520. SendClientMessage(playerid, COLOR_SYNTAX, "Scripted Jobs: TaxiDriver, DrugDealer, Lawyer, Detective, Thief");*/
  62521. }
  62522. return 1;
  62523. }
  62524. CMD:ccp(playerid, params[])
  62525. {
  62526. return callcmd::cancelcp(playerid, params);
  62527. }
  62528. CMD:kcp(playerid, params[])
  62529. {
  62530. return callcmd::cancelcp(playerid, params);
  62531. }
  62532. CMD:killcp(playerid, params[])
  62533. {
  62534. return callcmd::cancelcp(playerid, params);
  62535. }
  62536. CMD:killcheckpoint(playerid, params[])
  62537. {
  62538. return callcmd::cancelcp(playerid, params);
  62539. }
  62540. CMD:cancelcp(playerid, params[])
  62541. {
  62542. CancelActiveCheckpoint(playerid);
  62543. SendClientMessage(playerid, COLOR_WHITE, "You have cancelled all active checkpoints.");
  62544. return 1;
  62545. }
  62546. CMD:afk(playerid, params[])
  62547. {
  62548. new targetid;
  62549. if(sscanf(params, "u", targetid))
  62550. {
  62551. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /afk [playerid]");
  62552. }
  62553. if(!IsPlayerConnected(targetid))
  62554. {
  62555. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  62556. }
  62557. if(PlayerData[targetid][pAdmin] >= 8 && PlayerData[playerid][pAdmin] < MANAGEMENT)
  62558. {
  62559. return SendClientMessage(playerid, COLOR_GREY, "You're not authorized to check that player's AFK status.");
  62560. }
  62561. if(PlayerData[targetid][pAFK])
  62562. {
  62563. SendClientMessageEx(playerid, COLOR_WHITE, "* %s has been marked as Away from keyboard for %i minutes.", GetRPName(targetid), PlayerData[targetid][pAFKTime] / 60);
  62564. }
  62565. else
  62566. {
  62567. SendClientMessageEx(playerid, COLOR_WHITE, "* %s is currently not marked as Away from keyboard.", GetRPName(targetid));
  62568. }
  62569. return 1;
  62570. }
  62571. CMD:afklist(playerid, params[])
  62572. {
  62573. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  62574. {
  62575. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  62576. }
  62577. SendClientMessage(playerid, COLOR_NAVYBLUE, "_______ Away from Keyboard _______");
  62578. foreach(new i : Player)
  62579. {
  62580. if(PlayerData[i][pAdmin] >= MANAGEMENT && PlayerData[playerid][pAdmin] < MANAGEMENT)
  62581. continue;
  62582. if(PlayerData[i][pAFK])
  62583. {
  62584. SendClientMessageEx(playerid, COLOR_GREY2, "(ID: %i) %s - Time: %i seconds", i, GetRPName(i), PlayerData[i][pAFKTime]);
  62585. }
  62586. }
  62587. return 1;
  62588. }
  62589. CMD:atm(playerid, params[])
  62590. {
  62591. for(new i = 0; i < sizeof(atmMachines); i ++)
  62592. {
  62593. if(IsPlayerInRangeOfPoint(playerid, 3.0, atmMachines[i][atmX], atmMachines[i][atmY], atmMachines[i][atmZ]))
  62594. {
  62595. ShowDialogToPlayer(playerid, DIALOG_ATM);
  62596. return 1;
  62597. }
  62598. }
  62599. if(GetNearbyAtm(playerid) >= 0)
  62600. {
  62601. ShowDialogToPlayer(playerid, DIALOG_ATM);
  62602. return 1;
  62603. }
  62604. SendClientMessage(playerid, COLOR_GREY, "You are not in range of any ATM machines.");
  62605. return 1;
  62606. }
  62607. CMD:fixplayerid(playerid, params[])
  62608. {
  62609. new targetid;
  62610. if(PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  62611. {
  62612. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  62613. }
  62614. if(sscanf(params, "i", targetid))
  62615. {
  62616. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /fixplayerid [playerid]");
  62617. SendClientMessage(playerid, COLOR_SYNTAX, "Sometimes player IDs can become bugged causing sscanf to not identify that ID until server restart.");
  62618. SendClientMessage(playerid, COLOR_SYNTAX, "(e.g. a command used upon a valid player ID saying the player is disconnected, invalid or offline.)");
  62619. return 1;
  62620. }
  62621. if(!IsPlayerConnected(targetid))
  62622. {
  62623. SSCANF_Leave(targetid);
  62624. }
  62625. else
  62626. {
  62627. SSCANF_Join(targetid, GetPlayerNameEx(targetid), IsPlayerNPC(targetid));
  62628. }
  62629. SendClientMessageEx(playerid, COLOR_WHITE, "* Player ID %i has been fixed.", targetid);
  62630. return 1;
  62631. }
  62632. /*CMD:showrcon(playerid, params[])
  62633. {
  62634. if(!PlayerData[playerid][pDeveloper])
  62635. {
  62636. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  62637. }
  62638. new
  62639. rcon_password[128];
  62640. GetServerVarAsString("rcon_password", rcon_password, sizeof(rcon_password));
  62641. SendClientMessageEx(playerid, COLOR_WHITE, "* RCON Password: %s", rcon_password);
  62642. return 1;
  62643. }*/
  62644. CMD:disablevpn(playerid, params[])
  62645. {
  62646. new status;
  62647. if(PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  62648. {
  62649. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  62650. }
  62651. if(sscanf(params, "i", status) || !(0 <= status <= 1))
  62652. {
  62653. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /disablevpn [0/1]");
  62654. }
  62655. if(status) {
  62656. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has disabled joining with VPN.", GetRPName(playerid));
  62657. } else {
  62658. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has enabled joining with VPN.", GetRPName(playerid));
  62659. }
  62660. gDisabledVPN = status;
  62661. return 1;
  62662. }
  62663. /* CMD:anticheat(playerid, params[])
  62664. {
  62665. new status;
  62666. if(PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  62667. {
  62668. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  62669. }
  62670. if(sscanf(params, "i", status) || !(0 <= status <= 1))
  62671. {
  62672. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /anticheat [0/1]");
  62673. }
  62674. if(status) {
  62675. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has enabled the server anticheat.", GetRPName(playerid));
  62676. } else {
  62677. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has disabled the server anticheat.", GetRPName(playerid));
  62678. }
  62679. gAnticheat = status;
  62680. return 1;
  62681. }
  62682. */
  62683. CMD:anims(playerid, params[])
  62684. {
  62685. return callcmd::animhelp(playerid, params);
  62686. }
  62687. CMD:animhelp(playerid, params[])
  62688. {
  62689. SendClientMessage(playerid, COLOR_GREEN, "______________________________________________________________________________");
  62690. SendClientMessage(playerid, COLOR_GREY2, "/dance, /wave, /point, /salute, /laugh, /cry, /deal, /sit, /lay, /fall, /handsup.");
  62691. SendClientMessage(playerid, COLOR_GREY2, "/tired, /cower, /crack, /injured, /fishing, /reload, /aim, /bomb, /checktime.");
  62692. SendClientMessage(playerid, COLOR_GREY2, "/dodge, /stop, /scratch, /what, /wash, /come, /hitch, /cpr, /slapass, /drunk.");
  62693. SendClientMessage(playerid, COLOR_GREY2, "/vomit, /fucku, /taichi, /shifty, /smoke, /chat, /lean, /wank, /crossarms.");
  62694. SendClientMessage(playerid, COLOR_GREY2, "/ghands, /rap, /dj, /walk, /fuckme, /bj, /kiss, /piss, /robman, /eat, /stopanim.");
  62695. SendClientMessage(playerid, COLOR_GREEN, "______________________________________________________________________________");
  62696. return 1;
  62697. }
  62698. CMD:dance(playerid, params[])
  62699. {
  62700. new count, animname[32], animlib[32];
  62701. if(!PlayerUseAnims(playerid))
  62702. {
  62703. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  62704. }
  62705. switch(strval(params))
  62706. {
  62707. case 1..4: SetPlayerSpecialAction(playerid, (SPECIAL_ACTION_DANCE1 + (strval(params) - 1)));
  62708. case 5: ApplyAnimationEx(playerid, "DANCING", "DAN_Down_A", 4.1, 1, 0, 0, 0, 0);
  62709. case 6: ApplyAnimationEx(playerid, "DANCING", "DAN_Left_A", 4.1, 1, 0, 0, 0, 0);
  62710. case 7: ApplyAnimationEx(playerid, "DANCING", "DAN_Loop_A", 4.1, 1, 0, 0, 0, 0);
  62711. case 8: ApplyAnimationEx(playerid, "DANCING", "DAN_Right_A", 4.1, 1, 0, 0, 0, 0);
  62712. case 9: ApplyAnimationEx(playerid, "DANCING", "DAN_Up_A", 4.1, 1, 0, 0, 0, 0);
  62713. case 10: ApplyAnimationEx(playerid, "DANCING", "dnce_M_a", 4.1, 1, 0, 0, 0, 0);
  62714. case 11: ApplyAnimationEx(playerid, "DANCING", "dnce_M_b", 4.1, 1, 0, 0, 0, 0);
  62715. case 12: ApplyAnimationEx(playerid, "DANCING", "dnce_M_c", 4.1, 1, 0, 0, 0, 0);
  62716. case 13: ApplyAnimationEx(playerid, "DANCING", "dnce_M_d", 4.1, 1, 0, 0, 0, 0);
  62717. case 14: ApplyAnimationEx(playerid, "DANCING", "dnce_M_e", 4.1, 1, 0, 0, 0, 0);
  62718. default: SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /dance [1-14]");
  62719. }
  62720. foreach(new i : Player)
  62721. {
  62722. if(IsPlayerInRangeOfPlayer(i, playerid, 20.0))
  62723. {
  62724. GetAnimationName(GetPlayerAnimationIndex(i), animlib, sizeof(animlib), animname, sizeof(animname));
  62725. if((SPECIAL_ACTION_DANCE1 <= GetPlayerSpecialAction(i) <= SPECIAL_ACTION_DANCE4) || !strcmp(animlib, "DANCING", true))
  62726. {
  62727. count++;
  62728. }
  62729. }
  62730. }
  62731. if(count >= 5)
  62732. {
  62733. foreach(new i : Player)
  62734. {
  62735. if(IsPlayerInRangeOfPlayer(i, playerid, 20.0))
  62736. {
  62737. GetAnimationName(GetPlayerAnimationIndex(i), animlib, sizeof(animlib), animname, sizeof(animname));
  62738. if((SPECIAL_ACTION_DANCE1 <= GetPlayerSpecialAction(i) <= SPECIAL_ACTION_DANCE4) || !strcmp(animlib, "DANCING", true))
  62739. {
  62740. AwardAchievement(i, "Flash mob");
  62741. }
  62742. }
  62743. }
  62744. }
  62745. return 1;
  62746. }
  62747. CMD:wave(playerid, params[])
  62748. {
  62749. if(!PlayerUseAnims(playerid))
  62750. {
  62751. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  62752. }
  62753. switch(strval(params))
  62754. {
  62755. case 1: ApplyAnimationEx(playerid, "ON_LOOKERS", "wave_loop", 4.1, 1, 0, 0, 0, 0);
  62756. case 2: ApplyAnimationEx(playerid, "PED", "endchat_03", 4.1, 0, 0, 0, 0, 0);
  62757. case 3: ApplyAnimationEx(playerid, "KISSING", "gfwave2", 4.1, 0, 0, 0, 0, 0);
  62758. default: SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /wave [1-3]");
  62759. }
  62760. return 1;
  62761. }
  62762. CMD:point(playerid, params[])
  62763. {
  62764. if(!PlayerUseAnims(playerid))
  62765. {
  62766. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  62767. }
  62768. switch(strval(params))
  62769. {
  62770. case 1: ApplyAnimationEx(playerid, "ON_LOOKERS", "panic_point", 4.1, 0, 0, 0, 0, 0);
  62771. case 2: ApplyAnimationEx(playerid, "ON_LOOKERS", "point_loop", 4.1, 1, 0, 0, 0, 0);
  62772. default: SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /point [1-2]");
  62773. }
  62774. return 1;
  62775. }
  62776. CMD:salute(playerid, params[])
  62777. {
  62778. if(!PlayerUseAnims(playerid))
  62779. {
  62780. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  62781. }
  62782. ApplyAnimationEx(playerid, "ON_LOOKERS", "Pointup_loop", 4.1, 1, 0, 0, 0, 0);
  62783. return 1;
  62784. }
  62785. CMD:laugh(playerid, params[])
  62786. {
  62787. if(!PlayerUseAnims(playerid))
  62788. {
  62789. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  62790. }
  62791. ApplyAnimationEx(playerid, "RAPPING", "Laugh_01", 4.1, 1, 0, 0, 0, 0);
  62792. return 1;
  62793. }
  62794. CMD:cry(playerid, params[])
  62795. {
  62796. if(!PlayerUseAnims(playerid))
  62797. {
  62798. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  62799. }
  62800. ApplyAnimationEx(playerid, "GRAVEYARD", "mrnF_loop", 4.1, 1, 0, 0, 0, 0);
  62801. return 1;
  62802. }
  62803. CMD:deal(playerid, params[])
  62804. {
  62805. if(!PlayerUseAnims(playerid))
  62806. {
  62807. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  62808. }
  62809. ApplyAnimationEx(playerid, "DEALER", "shop_pay", 4.1, 0, 0, 0, 0, 0);
  62810. return 1;
  62811. }
  62812. CMD:sit(playerid, params[])
  62813. {
  62814. if(!PlayerUseAnims(playerid))
  62815. {
  62816. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  62817. }
  62818. switch(strval(params))
  62819. {
  62820. case 1: ApplyAnimationEx(playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 0, 0, 0, 0);
  62821. case 2: ApplyAnimationEx(playerid, "BEACH", "ParkSit_W_loop", 4.1, 1, 0, 0, 0, 0);
  62822. case 3: ApplyAnimationEx(playerid, "MISC", "SEAT_LR", 4.1, 0, 0, 0, 1, 0);
  62823. case 4: ApplyAnimationEx(playerid, "MISC", "Seat_talk_01", 4.1, 1, 0, 0, 0, 0);
  62824. case 5: ApplyAnimationEx(playerid, "PED", "SEAT_down", 4.1, 0, 0, 0, 1, 0);
  62825. case 6: ApplyAnimationEx(playerid, "INT_OFFICE", "OFF_Sit_Bored_Loop", 4.1, 1, 0, 0, 0, 0);
  62826. case 7: ApplyAnimationEx(playerid, "INT_OFFICE", "OFF_Sit_Read", 4.1, 1, 0, 0, 0, 0);
  62827. case 8: ApplyAnimationEx(playerid, "INT_OFFICE", "OFF_Sit_Crash", 4.1, 1, 0, 0, 0, 0);
  62828. case 9: ApplyAnimationEx(playerid, "FOOD", "FF_Sit_Eat1", 4.1, 1, 0, 0, 0, 0);
  62829. case 10: ApplyAnimationEx(playerid, "CRIB", "PED_Console_Loop", 4.1, 0, 0, 0, 1, 0);
  62830. default: SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sit [1-10]");
  62831. }
  62832. return 1;
  62833. }
  62834. CMD:camera(playerid, params[])
  62835. {
  62836. if(!PlayerUseAnims(playerid))
  62837. {
  62838. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  62839. }
  62840. switch(strval(params))
  62841. {
  62842. case 1: ApplyAnimationEx(playerid, "CAMERA", "camcrch_comeon", 4.1, 1, 0, 0, 0, 0);
  62843. case 2: ApplyAnimationEx(playerid, "CAMERA", "camcrch_idleloop", 4.1, 1, 0, 0, 0, 0);
  62844. case 3: ApplyAnimationEx(playerid, "CAMERA", "camcrch_stay", 4.1, 0, 0, 0, 1, 0);
  62845. case 4: ApplyAnimationEx(playerid, "CAMERA", "camcrch_to_camstnd", 4.1, 1, 0, 0, 0, 0);
  62846. case 5: ApplyAnimationEx(playerid, "CAMERA", "camstnd_comeon", 4.1, 0, 0, 0, 1, 0);
  62847. case 6: ApplyAnimationEx(playerid, "CAMERA", "camstnd_idleloop", 4.1, 1, 0, 0, 0, 0);
  62848. case 7: ApplyAnimationEx(playerid, "CAMERA", "camstnd_lkabt", 4.1, 1, 0, 0, 0, 0);
  62849. case 8: ApplyAnimationEx(playerid, "CAMERA", "camstnd_to_camcrch", 4.1, 1, 0, 0, 0, 0);
  62850. case 9: ApplyAnimationEx(playerid, "CAMERA", "piccrch_in", 4.1, 1, 0, 0, 0, 0);
  62851. case 10: ApplyAnimationEx(playerid, "CAMERA", "piccrch_out", 4.1, 0, 0, 0, 1, 0);
  62852. case 11: ApplyAnimationEx(playerid, "CAMERA", "piccrch_take", 4.1, 1, 0, 0, 0, 0);
  62853. case 12: ApplyAnimationEx(playerid, "CAMERA", "picstnd_in", 4.1, 1, 0, 0, 0, 0);
  62854. case 13: ApplyAnimationEx(playerid, "CAMERA", "picstnd_out", 4.1, 1, 0, 0, 0, 0);
  62855. case 14: ApplyAnimationEx(playerid, "CAMERA", "picstnd_take", 4.1, 0, 0, 0, 1, 0);
  62856. default: SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: {ffffff}/camera [1-14]");
  62857. }
  62858. return 1;
  62859. }
  62860. CMD:lay(playerid, params[])
  62861. {
  62862. if(!PlayerUseAnims(playerid))
  62863. {
  62864. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  62865. }
  62866. switch(strval(params))
  62867. {
  62868. case 1: ApplyAnimationEx(playerid, "BEACH", "bather", 4.1, 1, 0, 0, 0, 0);
  62869. case 2: ApplyAnimationEx(playerid, "BEACH", "Lay_Bac_Loop", 4.1, 1, 0, 0, 0, 0);
  62870. case 3: ApplyAnimationEx(playerid, "BEACH", "SitnWait_loop_W", 4.1, 1, 0, 0, 0, 0);
  62871. default: SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /lay [1-3]");
  62872. }
  62873. return 1;
  62874. }
  62875. CMD:fall(playerid, params[])
  62876. {
  62877. if(!PlayerUseAnims(playerid))
  62878. {
  62879. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  62880. }
  62881. switch(strval(params))
  62882. {
  62883. case 1: ApplyAnimationEx(playerid, "PED", "KO_skid_front", 4.1, 0, 0, 0, 1, 0);
  62884. case 2: ApplyAnimationEx(playerid, "PED", "KO_skid_back", 4.1, 0, 0, 0, 1, 0);
  62885. case 3: ApplyAnimationEx(playerid, "PED", "KO_shot_face", 4.1, 0, 1, 1, 1, 0);
  62886. case 4: ApplyAnimationEx(playerid, "PED", "KO_shot_front", 4.1, 0, 1, 1, 1, 0);
  62887. case 5: ApplyAnimationEx(playerid, "PED", "KO_shot_stom", 4.1, 0, 1, 1, 1, 0);
  62888. case 6: ApplyAnimationEx(playerid, "PED", "BIKE_fallR", 4.1, 0, 1, 1, 0, 0);
  62889. default: SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /fall [1-6]");
  62890. }
  62891. return 1;
  62892. }
  62893. CMD:handsup(playerid, params[])
  62894. {
  62895. if(!PlayerUseAnims(playerid))
  62896. {
  62897. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  62898. }
  62899. ApplyAnimationEx(playerid, "SHOP", "SHP_HandsUp_Scr", 4.1, 0, 0, 0, 1, 0);
  62900. return 1;
  62901. }
  62902. CMD:tired(playerid, params[])
  62903. {
  62904. if(!PlayerUseAnims(playerid))
  62905. {
  62906. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  62907. }
  62908. switch(strval(params))
  62909. {
  62910. case 1: ApplyAnimationEx(playerid, "PED", "IDLE_tired", 4.1, 1, 0, 0, 0, 0);
  62911. case 2: ApplyAnimationEx(playerid, "FAT", "IDLE_tired", 4.1, 1, 0, 0, 0, 0);
  62912. default: SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /tired [1-2]");
  62913. }
  62914. return 1;
  62915. }
  62916. CMD:hide(playerid, params[])
  62917. {
  62918. return callcmd::cower(playerid, params);
  62919. }
  62920. CMD:cover(playerid, params[])
  62921. {
  62922. return callcmd::cower(playerid, params);
  62923. }
  62924. CMD:cower(playerid, params[])
  62925. {
  62926. if(!PlayerUseAnims(playerid))
  62927. {
  62928. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  62929. }
  62930. ApplyAnimationEx(playerid, "PED", "cower", 4.1, 1, 0, 0, 0, 0);
  62931. return 1;
  62932. }
  62933. CMD:crack(playerid, params[])
  62934. {
  62935. if(!PlayerUseAnims(playerid))
  62936. {
  62937. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  62938. }
  62939. switch(strval(params))
  62940. {
  62941. case 1: ApplyAnimationEx(playerid, "CRACK", "crckdeth1", 4.1, 0, 0, 0, 1, 0);
  62942. case 2: ApplyAnimationEx(playerid, "CRACK", "crckdeth2", 4.1, 1, 0, 0, 0, 0);
  62943. case 3: ApplyAnimationEx(playerid, "CRACK", "crckdeth3", 4.1, 0, 0, 0, 1, 0);
  62944. case 4: ApplyAnimationEx(playerid, "CRACK", "crckdeth4", 4.1, 0, 0, 0, 1, 0);
  62945. default: SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /crack [1-4]");
  62946. }
  62947. return 1;
  62948. }
  62949. CMD:injured(playerid, params[])
  62950. {
  62951. if(!PlayerUseAnims(playerid))
  62952. {
  62953. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  62954. }
  62955. switch(strval(params))
  62956. {
  62957. case 1: ApplyAnimationEx(playerid, "SWAT", "gnstwall_injurd", 4.1, 1, 0, 0, 0, 0);
  62958. case 2: ApplyAnimationEx(playerid, "SWEET", "Sweet_injuredloop", 4.1, 1, 0, 0, 0, 0);
  62959. default: SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /injured [1-2]");
  62960. }
  62961. return 1;
  62962. }
  62963. CMD:fishing(playerid, params[])
  62964. {
  62965. if(!PlayerUseAnims(playerid))
  62966. {
  62967. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  62968. }
  62969. ApplyAnimationEx(playerid, "SAMP", "FishingIdle", 4.1, 0, 0, 0, 1, 0);
  62970. return 1;
  62971. }
  62972. CMD:reload(playerid, params[])
  62973. {
  62974. if(!PlayerUseAnims(playerid))
  62975. {
  62976. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  62977. }
  62978. switch(strval(params))
  62979. {
  62980. case 1: ApplyAnimationEx(playerid, "BUDDY", "buddy_reload", 4.1, 0, 0, 0, 0, 0);
  62981. case 2: ApplyAnimationEx(playerid, "PYTHON", "python_reload", 4.1, 0, 0, 0, 0, 0);
  62982. case 3: ApplyAnimationEx(playerid, "UZI", "UZI_reload", 4.1, 0, 0, 0, 0, 0);
  62983. case 4: ApplyAnimationEx(playerid, "RIFLE", "RIFLE_load", 4.1, 0, 0, 0, 0, 0);
  62984. default: SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /reload [1-4]");
  62985. }
  62986. return 1;
  62987. }
  62988. CMD:aim(playerid, params[])
  62989. {
  62990. if(!PlayerUseAnims(playerid))
  62991. {
  62992. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  62993. }
  62994. switch(strval(params))
  62995. {
  62996. case 1: ApplyAnimationEx(playerid, "SHOP", "ROB_loop", 4.1, 1, 0, 0, 0, 0);
  62997. case 2: ApplyAnimationEx(playerid, "PED", "ARRESTgun", 4.1, 0, 0, 0, 1, 0);
  62998. default: SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /aim [1-2]");
  62999. }
  63000. return 1;
  63001. }
  63002. CMD:bomb(playerid, params[])
  63003. {
  63004. if(!PlayerUseAnims(playerid))
  63005. {
  63006. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  63007. }
  63008. ApplyAnimationEx(playerid, "BOMBER", "BOM_Plant", 4.1, 0, 0, 0, 0, 0);
  63009. return 1;
  63010. }
  63011. CMD:checktime(playerid, params[])
  63012. {
  63013. if(!PlayerUseAnims(playerid))
  63014. {
  63015. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  63016. }
  63017. ApplyAnimationEx(playerid, "COP_AMBIENT", "Coplook_watch", 4.1, 0, 0, 0, 0, 0);
  63018. return 1;
  63019. }
  63020. CMD:dodge(playerid, params[])
  63021. {
  63022. if(!PlayerUseAnims(playerid))
  63023. {
  63024. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  63025. }
  63026. ApplyAnimationEx(playerid, "DODGE", "Crush_Jump", 4.1, 0, 0, 0, 0, 0);
  63027. return 1;
  63028. }
  63029. CMD:stop(playerid, params[])
  63030. {
  63031. if(!PlayerUseAnims(playerid))
  63032. {
  63033. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  63034. }
  63035. ApplyAnimationEx(playerid, "PED", "endchat_01", 4.1, 0, 0, 0, 0, 0);
  63036. return 1;
  63037. }
  63038. CMD:scratch(playerid, params[])
  63039. {
  63040. if(!PlayerUseAnims(playerid))
  63041. {
  63042. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  63043. }
  63044. ApplyAnimationEx(playerid, "MISC", "Scratchballs_01", 4.1, 0, 0, 0, 0, 0);
  63045. return 1;
  63046. }
  63047. CMD:what(playerid, params[])
  63048. {
  63049. if(!PlayerUseAnims(playerid))
  63050. {
  63051. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  63052. }
  63053. ApplyAnimationEx(playerid, "RIOT", "RIOT_ANGRY", 4.1, 0, 0, 0, 0, 0);
  63054. return 1;
  63055. }
  63056. CMD:wash(playerid, params[])
  63057. {
  63058. if(!PlayerUseAnims(playerid))
  63059. {
  63060. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  63061. }
  63062. ApplyAnimationEx(playerid, "BD_FIRE", "wash_up", 4.1, 0, 0, 0, 0, 0);
  63063. return 1;
  63064. }
  63065. CMD:come(playerid, params[])
  63066. {
  63067. if(!PlayerUseAnims(playerid))
  63068. {
  63069. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  63070. }
  63071. ApplyAnimationEx(playerid, "WUZI", "Wuzi_follow", 4.1, 0, 0, 0, 0, 0);
  63072. return 1;
  63073. }
  63074. CMD:hitch(playerid, params[])
  63075. {
  63076. if(!PlayerUseAnims(playerid))
  63077. {
  63078. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  63079. }
  63080. ApplyAnimationEx(playerid, "MISC", "Hiker_Pose", 4.1, 0, 0, 0, 1, 0);
  63081. return 1;
  63082. }
  63083. CMD:cpr(playerid, params[])
  63084. {
  63085. if(!PlayerUseAnims(playerid))
  63086. {
  63087. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  63088. }
  63089. ApplyAnimationEx(playerid, "MEDIC", "CPR", 4.1, 0, 0, 0, 0, 0);
  63090. return 1;
  63091. }
  63092. CMD:slapass(playerid, params[])
  63093. {
  63094. if(!PlayerUseAnims(playerid))
  63095. {
  63096. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  63097. }
  63098. ApplyAnimationEx(playerid, "SWEET", "sweet_ass_slap", 4.1, 0, 0, 0, 0, 0);
  63099. return 1;
  63100. }
  63101. CMD:drunk(playerid, params[])
  63102. {
  63103. if(!PlayerUseAnims(playerid))
  63104. {
  63105. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  63106. }
  63107. ApplyAnimationEx(playerid, "PED", "WALK_DRUNK", 4.1, 1, 1, 1, 1, 1);
  63108. return 1;
  63109. }
  63110. CMD:vomit(playerid, params[])
  63111. {
  63112. if(!PlayerUseAnims(playerid))
  63113. {
  63114. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  63115. }
  63116. ApplyAnimationEx(playerid, "FOOD", "EAT_Vomit_P", 4.1, 0, 0, 0, 0, 0);
  63117. return 1;
  63118. }
  63119. CMD:fucku(playerid, params[])
  63120. {
  63121. if(!PlayerUseAnims(playerid))
  63122. {
  63123. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  63124. }
  63125. ApplyAnimationEx(playerid, "PED", "fucku", 4.1, 0, 0, 0, 0, 0);
  63126. return 1;
  63127. }
  63128. CMD:taichi(playerid, params[])
  63129. {
  63130. if(!PlayerUseAnims(playerid))
  63131. {
  63132. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  63133. }
  63134. ApplyAnimationEx(playerid, "PARK", "Tai_Chi_Loop", 4.1, 1, 0, 0, 0, 0);
  63135. return 1;
  63136. }
  63137. CMD:shifty(playerid, params[])
  63138. {
  63139. if(!PlayerUseAnims(playerid))
  63140. {
  63141. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  63142. }
  63143. ApplyAnimationEx(playerid, "SHOP", "ROB_Shifty", 4.1, 0, 0, 0, 0, 0);
  63144. return 1;
  63145. }
  63146. CMD:smoke(playerid, params[])
  63147. {
  63148. if(!PlayerUseAnims(playerid))
  63149. {
  63150. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  63151. }
  63152. switch(strval(params))
  63153. {
  63154. case 1: ApplyAnimationEx(playerid, "SMOKING", "M_smklean_loop", 4.1, 1, 0, 0, 0, 0);
  63155. case 2: ApplyAnimationEx(playerid, "SMOKING", "M_smk_in", 4.1, 0, 0, 0, 0, 0);
  63156. default: SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /smoke [1-2]");
  63157. }
  63158. return 1;
  63159. }
  63160. CMD:chat(playerid, params[])
  63161. {
  63162. if(!PlayerUseAnims(playerid))
  63163. {
  63164. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  63165. }
  63166. switch(strval(params))
  63167. {
  63168. case 1: ApplyAnimationEx(playerid, "PED", "IDLE_CHAT", 4.1, 1, 1, 1, 1, 1);
  63169. case 2: ApplyAnimationEx(playerid, "GANGS", "prtial_gngtlkA", 4.1, 1, 1, 1, 1, 1);
  63170. case 3: ApplyAnimationEx(playerid, "GANGS", "prtial_gngtlkB", 4.1, 1, 1, 1, 1, 1);
  63171. case 4: ApplyAnimationEx(playerid, "GANGS", "prtial_gngtlkC", 4.1, 1, 1, 1, 1, 1);
  63172. case 5: ApplyAnimationEx(playerid, "GANGS", "prtial_gngtlkD", 4.1, 1, 1, 1, 1, 1);
  63173. case 6: ApplyAnimationEx(playerid, "GANGS", "prtial_gngtlkE", 4.1, 1, 1, 1, 1, 1);
  63174. case 7: ApplyAnimationEx(playerid, "GANGS", "prtial_gngtlkF", 4.1, 1, 1, 1, 1, 1);
  63175. case 8: ApplyAnimationEx(playerid, "GANGS", "prtial_gngtlkG", 4.1, 1, 1, 1, 1, 1);
  63176. case 9: ApplyAnimationEx(playerid, "GANGS", "prtial_gngtlkH", 4.1, 1, 1, 1, 1, 1);
  63177. default: SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /chat [1-9]");
  63178. }
  63179. return 1;
  63180. }
  63181. CMD:lean(playerid, params[])
  63182. {
  63183. if(!PlayerUseAnims(playerid))
  63184. {
  63185. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  63186. }
  63187. switch(strval(params))
  63188. {
  63189. case 1: ApplyAnimationEx(playerid, "GANGS", "leanIDLE", 4.1, 1, 0, 0, 0, 0);
  63190. case 2: ApplyAnimationEx(playerid, "MISC", "Plyrlean_loop", 4.1, 1, 0, 0, 0, 0);
  63191. default: SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /lean [1-2]");
  63192. }
  63193. return 1;
  63194. }
  63195. CMD:wank(playerid, params[])
  63196. {
  63197. if(!PlayerUseAnims(playerid))
  63198. {
  63199. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  63200. }
  63201. ApplyAnimationEx(playerid, "PAULNMAC", "wank_loop", 4.1, 1, 0, 0, 0, 0);
  63202. return 1;
  63203. }
  63204. CMD:traffic(playerid, params[])
  63205. {
  63206. if(!PlayerUseAnims(playerid))
  63207. {
  63208. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  63209. }
  63210. switch(strval(params))
  63211. {
  63212. case 1: ApplyAnimationEx(playerid, "POLICE", "CopTraf_Stop", 4.1, 0, 0, 0, 0, 0);
  63213. case 2: ApplyAnimationEx(playerid, "POLICE", "CopTraf_Come", 4.1, 0, 0, 0, 0, 0);
  63214. default: SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /traffic [1-2]");
  63215. }
  63216. return 1;
  63217. }
  63218. CMD:rap(playerid, params[])
  63219. {
  63220. if(!PlayerUseAnims(playerid))
  63221. {
  63222. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  63223. }
  63224. switch(strval(params))
  63225. {
  63226. case 1: ApplyAnimationEx(playerid, "RAPPING", "RAP_A_LOOP", 4.1, 1, 0, 0, 0, 0);
  63227. case 2: ApplyAnimationEx(playerid, "RAPPING", "RAP_B_LOOP", 4.1, 1, 0, 0, 0, 0);
  63228. case 3: ApplyAnimationEx(playerid, "RAPPING", "RAP_C_LOOP", 4.1, 1, 0, 0, 0, 0);
  63229. default: SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /rap [1-3]");
  63230. }
  63231. return 1;
  63232. }
  63233. CMD:dj(playerid, params[])
  63234. {
  63235. if(!PlayerUseAnims(playerid))
  63236. {
  63237. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  63238. }
  63239. switch(strval(params))
  63240. {
  63241. case 1: ApplyAnimationEx(playerid, "SCRATCHING", "scdldlp", 4.1, 1, 0, 0, 0, 0);
  63242. case 2: ApplyAnimationEx(playerid, "SCRATCHING", "scdlulp", 4.1, 1, 0, 0, 0, 0);
  63243. case 3: ApplyAnimationEx(playerid, "SCRATCHING", "scdrdlp", 4.1, 1, 0, 0, 0, 0);
  63244. case 4: ApplyAnimationEx(playerid, "SCRATCHING", "scdrulp", 4.1, 1, 0, 0, 0, 0);
  63245. default: SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /dj [1-4]");
  63246. }
  63247. return 1;
  63248. }
  63249. CMD:crossarms(playerid, params[])
  63250. {
  63251. if(!PlayerUseAnims(playerid))
  63252. {
  63253. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  63254. }
  63255. switch(strval(params))
  63256. {
  63257. case 1: ApplyAnimationEx(playerid, "COP_AMBIENT", "Coplook_loop", 4.1, 1, 0, 0, 0, 0);
  63258. case 2: ApplyAnimationEx(playerid, "DEALER", "DEALER_IDLE", 4.1, 1, 0, 0, 0, 0);
  63259. case 3: ApplyAnimationEx(playerid, "GRAVEYARD", "mrnM_loop", 4.1, 1, 0, 0, 0, 0);
  63260. default: SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /crossarms [1-3]");
  63261. }
  63262. return 1;
  63263. }
  63264. CMD:ghands(playerid, params[])
  63265. {
  63266. if(!PlayerUseAnims(playerid))
  63267. {
  63268. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  63269. }
  63270. switch(strval(params))
  63271. {
  63272. case 1: ApplyAnimationEx(playerid, "GHANDS", "gsign1", 4.1, 0, 0, 0, 0, 0);
  63273. case 2: ApplyAnimationEx(playerid, "GHANDS", "gsign1LH", 4.1, 0, 0, 0, 0, 0);
  63274. case 3: ApplyAnimationEx(playerid, "GHANDS", "gsign2", 4.1, 0, 0, 0, 0, 0);
  63275. case 4: ApplyAnimationEx(playerid, "GHANDS", "gsign2LH", 4.1, 0, 0, 0, 0, 0);
  63276. case 5: ApplyAnimationEx(playerid, "GHANDS", "gsign3", 4.1, 0, 0, 0, 0, 0);
  63277. case 6: ApplyAnimationEx(playerid, "GHANDS", "gsign3LH", 4.1, 0, 0, 0, 0, 0);
  63278. case 7: ApplyAnimationEx(playerid, "GHANDS", "gsign4", 4.1, 0, 0, 0, 0, 0);
  63279. case 8: ApplyAnimationEx(playerid, "GHANDS", "gsign4LH", 4.1, 0, 0, 0, 0, 0);
  63280. case 9: ApplyAnimationEx(playerid, "GHANDS", "gsign5", 4.1, 0, 0, 0, 0, 0);
  63281. case 10: ApplyAnimationEx(playerid, "GHANDS", "gsign5LH", 4.1, 0, 0, 0, 0, 0);
  63282. default: SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /ghands [1-10]");
  63283. }
  63284. return 1;
  63285. }
  63286. CMD:walk(playerid, params[])
  63287. {
  63288. if(!PlayerUseAnims(playerid))
  63289. {
  63290. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  63291. }
  63292. switch(strval(params))
  63293. {
  63294. case 1: ApplyAnimationEx(playerid, "PED", "WALK_gang1", 4.1, 1, 1, 1, 1, 1);
  63295. case 2: ApplyAnimationEx(playerid, "PED", "WALK_gang2", 4.1, 1, 1, 1, 1, 1);
  63296. case 3: ApplyAnimationEx(playerid, "PED", "WALK_civi", 4.1, 1, 1, 1, 1, 1);
  63297. case 4: ApplyAnimationEx(playerid, "PED", "WALK_armed", 4.1, 1, 1, 1, 1, 1);
  63298. case 5: ApplyAnimationEx(playerid, "PED", "WALK_fat", 4.1, 1, 1, 1, 1, 1);
  63299. case 6: ApplyAnimationEx(playerid, "PED", "WALK_fatold", 4.1, 1, 1, 1, 1, 1);
  63300. case 7: ApplyAnimationEx(playerid, "PED", "WALK_old", 4.1, 1, 1, 1, 1, 1);
  63301. case 8: ApplyAnimationEx(playerid, "PED", "WALK_player", 4.1, 1, 1, 1, 1, 1);
  63302. case 9: ApplyAnimationEx(playerid, "PED", "WALK_shuffle", 4.1, 1, 1, 1, 1, 1);
  63303. case 10: ApplyAnimationEx(playerid, "PED", "WALK_Wuzi", 4.1, 1, 1, 1, 1, 1);
  63304. case 11: ApplyAnimationEx(playerid, "PED", "WOMAN_walkbusy", 4.1, 1, 1, 1, 1, 1);
  63305. case 12: ApplyAnimationEx(playerid, "PED", "WOMAN_walkfatold", 4.1, 1, 1, 1, 1, 1);
  63306. case 13: ApplyAnimationEx(playerid, "PED", "WOMAN_walknorm", 4.1, 1, 1, 1, 1, 1);
  63307. case 14: ApplyAnimationEx(playerid, "PED", "WOMAN_walksexy", 4.1, 1, 1, 1, 1, 1);
  63308. case 15: ApplyAnimationEx(playerid, "PED", "WOMAN_walkpro", 4.1, 1, 1, 1, 1, 1);
  63309. default: SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /walk [1-15]");
  63310. }
  63311. return 1;
  63312. }
  63313. CMD:fuckme(playerid, params[])
  63314. {
  63315. if(!PlayerUseAnims(playerid))
  63316. {
  63317. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  63318. }
  63319. switch(strval(params))
  63320. {
  63321. case 1: ApplyAnimationEx(playerid, "SNM", "SPANKING_IDLEW", 4.1, 0, 1, 1, 1, 0);
  63322. case 2: ApplyAnimationEx(playerid, "SNM", "SPANKING_IDLEP", 4.1, 0, 1, 1, 1, 0);
  63323. case 3: ApplyAnimationEx(playerid, "SNM", "SPANKINGW", 4.1, 0, 1, 1, 1, 0);
  63324. case 4: ApplyAnimationEx(playerid, "SNM", "SPANKINGP", 4.1, 0, 1, 1, 1, 0);
  63325. case 5: ApplyAnimationEx(playerid, "SNM", "SPANKEDW", 4.1, 0, 1, 1, 1, 0);
  63326. case 6: ApplyAnimationEx(playerid, "SNM", "SPANKEDP", 4.1, 0, 1, 1, 1, 0);
  63327. case 7: ApplyAnimationEx(playerid, "SNM", "SPANKING_ENDW", 4.1, 0, 1, 1, 1, 0);
  63328. case 8: ApplyAnimationEx(playerid, "SNM", "SPANKING_ENDP", 4.1, 0, 1, 1, 1, 0);
  63329. default: SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /fuckme [1-8]");
  63330. }
  63331. return 1;
  63332. }
  63333. CMD:bj(playerid, params[])
  63334. {
  63335. if(!PlayerUseAnims(playerid))
  63336. {
  63337. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  63338. }
  63339. switch(strval(params))
  63340. {
  63341. case 1: ApplyAnimationEx(playerid, "BLOWJOBZ", "BJ_COUCH_START_P", 4.1, 0, 1, 1, 1, 0);
  63342. case 2: ApplyAnimationEx(playerid, "BLOWJOBZ", "BJ_COUCH_START_W", 4.1, 0, 1, 1, 1, 0);
  63343. case 3: ApplyAnimationEx(playerid, "BLOWJOBZ", "BJ_COUCH_LOOP_P", 4.1, 0, 1, 1, 1, 0);
  63344. case 4: ApplyAnimationEx(playerid, "BLOWJOBZ", "BJ_COUCH_LOOP_W", 4.1, 0, 1, 1, 1, 0);
  63345. case 5: ApplyAnimationEx(playerid, "BLOWJOBZ", "BJ_COUCH_END_P", 4.1, 0, 1, 1, 1, 0);
  63346. case 6: ApplyAnimationEx(playerid, "BLOWJOBZ", "BJ_COUCH_END_W", 4.1, 0, 1, 1, 1, 0);
  63347. case 7: ApplyAnimationEx(playerid, "BLOWJOBZ", "BJ_STAND_START_P", 4.1, 0, 1, 1, 1, 0);
  63348. case 8: ApplyAnimationEx(playerid, "BLOWJOBZ", "BJ_STAND_START_W", 4.1, 0, 1, 1, 1, 0);
  63349. case 9: ApplyAnimationEx(playerid, "BLOWJOBZ", "BJ_STAND_LOOP_P", 4.1, 1, 0, 0, 0, 0);
  63350. case 10: ApplyAnimationEx(playerid, "BLOWJOBZ", "BJ_STAND_LOOP_W", 4.1, 1, 0, 0, 0, 0);
  63351. case 11: ApplyAnimationEx(playerid, "BLOWJOBZ", "BJ_STAND_END_P", 4.1, 0, 1, 1, 1, 0);
  63352. case 12: ApplyAnimationEx(playerid, "BLOWJOBZ", "BJ_STAND_END_W", 4.1, 0, 1, 1, 1, 0);
  63353. default: SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /bj [1-12]");
  63354. }
  63355. return 1;
  63356. }
  63357. CMD:kiss(playerid, params[])
  63358. {
  63359. if(!PlayerUseAnims(playerid))
  63360. {
  63361. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  63362. }
  63363. ApplyAnimationEx(playerid, "KISSING", "Playa_Kiss_01", 4.0, 0, 0, 0, 0, 0);
  63364. return 1;
  63365. }
  63366. CMD:piss(playerid, params[])
  63367. {
  63368. if(!PlayerUseAnims(playerid) || GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CARRY)
  63369. {
  63370. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  63371. }
  63372. SetPlayerSpecialAction(playerid, 68);
  63373. return 1;
  63374. }
  63375. CMD:robman(playerid, params[])
  63376. {
  63377. if(!PlayerUseAnims(playerid))
  63378. {
  63379. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  63380. }
  63381. ApplyAnimationEx(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 1, 0, 0, 0, 0);
  63382. return 1;
  63383. }
  63384. CMD:eat(playerid, params[])
  63385. {
  63386. if(!PlayerUseAnims(playerid))
  63387. {
  63388. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment.");
  63389. }
  63390. switch(strval(params))
  63391. {
  63392. case 1: ApplyAnimation(playerid, "FOOD", "EAT_Chicken", 4.1, 0, 0, 0, 0, 0);
  63393. case 2: ApplyAnimation(playerid, "FOOD", "EAT_Burger", 4.1, 0, 0, 0, 0, 0);
  63394. case 3: ApplyAnimation(playerid, "FOOD", "EAT_Pizza", 4.1, 0, 0, 0, 0, 0);
  63395. default: SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /eat [1-3]");
  63396. }
  63397. return 1;
  63398. }
  63399. CMD:stopani(playerid, params[])
  63400. {
  63401. return callcmd::stopanim(playerid, params);
  63402. }
  63403. CMD:stopanim(playerid, params[])
  63404. {
  63405. if(!PlayerUseAnims(playerid))
  63406. {
  63407. return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use this command at this moment.");
  63408. }
  63409. PlayerData[playerid][pLoopAnim] = 0;
  63410. ClearAnimations(playerid, 1);
  63411. TextDrawHideForPlayer(playerid, AnimationTD);
  63412. ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0, 1);
  63413. SendClientMessage(playerid, COLOR_GREY, "Animations cleared.");
  63414. return 1;
  63415. }
  63416. CMD:gmx(playerid, params[])
  63417. {
  63418. if(PlayerData[playerid][pAdmin] < GENERAL_MANAGER && !PlayerData[playerid][pDeveloper])
  63419. {
  63420. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  63421. }
  63422. if(isnull(params)) return SCM(playerid, COLOR_GREY, "USAGE: /gmx [confirm] restart the server");
  63423. if(strcmp(params, "confirm", true) != 0)
  63424. {
  63425. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /gmx [confirm]");
  63426. SendClientMessage(playerid, COLOR_SYNTAX, "This command save all player accounts and restarts the server.");
  63427. if(gGMX)
  63428. {
  63429. return SendClientMessage(playerid, COLOR_GREY, "You have already called for a server restart. You can't cancel it.");
  63430. }
  63431. gGMX = 1;
  63432. foreach(new i : Player)
  63433. {
  63434. if(i != playerid)
  63435. {
  63436. if(PlayerData[i][pAdminDuty])
  63437. {
  63438. callcmd::aduty(i, "");
  63439. }
  63440. PlayerData[i][pHurt] = 0;
  63441. TogglePlayerControllable(i, 0);
  63442. SendClientMessageEx(i, COLOR_AQUA, "* %s has initated a server restart. You have been frozen.", GetRPName(playerid));
  63443. }
  63444. SavePlayerVariables(i);
  63445. GameTextForPlayer(i, "~w~Restarting server...", 100000, 3);
  63446. }
  63447. }
  63448. SendClientMessage(playerid, COLOR_WHITE, "* The server will restart once all accounts have been saved.");
  63449. return 1;
  63450. }
  63451. CMD:changepass(playerid, params[])
  63452. {
  63453. Dialog_Show(playerid, DIALOG_CHANGEPASS, DIALOG_STYLE_INPUT, "{00aa00}Old School Roleplay{FFFFFF} | Change password", "Please change your password for security purposes\nEnter your new password below:", "Submit", "Cancel");
  63454. return 1;
  63455. }
  63456. CMD:usecookies(playerid, params[])
  63457. {
  63458. if(PlayerData[playerid][pTazedTime] > 0 || PlayerData[playerid][pInjured] > 0 || PlayerData[playerid][pHospital] > 0 || PlayerData[playerid][pCuffed] > 0 || PlayerData[playerid][pTied] > 0 || PlayerData[playerid][pJoinedEvent] > 0 || PlayerData[playerid][pPaintball])
  63459. {
  63460. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment.");
  63461. }
  63462. if(PlayerData[playerid][pHurt] - 40 > 0)
  63463. {
  63464. return SendClientMessageEx(playerid, COLOR_GREY, "You are too hurt to use this command. Please wait %i seconds before trying again.", (PlayerData[playerid][pHurt] - 40));
  63465. }
  63466. if(IsPlayerInAnyVehicle(playerid))
  63467. {
  63468. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command from within the vehicle.");
  63469. }
  63470. new string[1536] = "Perk\tDescription\tCost", title[64];
  63471. // strcat(string, "\nReplenish\tReplenishes you with full health & armor.\t{00AA00}2 cookies{FFFFFF}");
  63472. // strcat(string, "\nShoutout\tBroadcast your message of choice globally.\t{F7A763}3 cookies{FFFFFF}");
  63473. strcat(string, "\nJail Time\tReduce your IC jailtime by 50 percent.\t{00AA00}5 cookies{FFFFFF}");
  63474. strcat(string, "\nRespect\tGives you 4 respect points.\t{F7A763}6 cookies{FFFFFF}");
  63475. //strcat(string, "\nWeather\tOne time use: change weather globally.\t{F7A763}10 cookies{FFFFFF}");
  63476. // strcat(string, "\nMaterials\tGives you 20000 materials.\t{F7A763}10 cookies{FFFFFF}");
  63477. // strcat(string, "\nWeapons\tGives you a full weapon set.\t{F7A763}10 cookies{FFFFFF}");
  63478. strcat(string, "\nNumber\tChoose a phone number of your choice.\t{00AA00}80 cookies{FFFFFF}");
  63479. strcat(string, "\nJob\tChoose a job to 1x level up.\t{F7A763}100 cookies{FFFFFF}");
  63480. strcat(string, "\nDouble XP\tAwards you with 8 hours of double XP.\t{00AA00}150 cookies{FFFFFF}");
  63481. strcat(string, "\nVehicle\tFree vehicle ticket under $200k value.\t{00AA00}300 cookies{FFFFFF}");
  63482. strcat(string, "\nHouse\tFree house ticket under $250k value.\t{00AA00}350 cookies{FFFFFF}");
  63483. // strcat(string, "\nVIP\t1 month Limited VIP subscription\t{F7A763}100 cookies{FFFFFF}");
  63484. strcat(string, "\nBusiness\tFree business ticket of any type.\t{00AA00}600 cookies{FFFFFF}");
  63485. format(title, sizeof(title), "Cookie rewards (You have %i cookies.)", PlayerData[playerid][pCookies]);
  63486. Dialog_Show(playerid, DIALOG_USECOOKIES, DIALOG_STYLE_TABLIST_HEADERS, title, string, "Redeem", "Cancel");
  63487. return 1;
  63488. }
  63489. CMD:clothing(playerid, params[])
  63490. {
  63491. new string[MAX_PLAYER_CLOTHING * 64], title[64], count;
  63492. for(new i = 0; i < MAX_PLAYER_CLOTHING; i ++)
  63493. {
  63494. if(ClothingInfo[playerid][i][cExists])
  63495. {
  63496. if(ClothingInfo[playerid][i][cAttached]) {
  63497. format(string, sizeof(string), "%s\n{C8C8C8}%i) {00AA00}%s {FFD700}(Attached)", string, i + 1, ClothingInfo[playerid][i][cName]);
  63498. } else {
  63499. format(string, sizeof(string), "%s\n{C8C8C8}%i) {00AA00}%s{FFFFFF}", string, i + 1, ClothingInfo[playerid][i][cName]);
  63500. }
  63501. count++;
  63502. }
  63503. else
  63504. {
  63505. format(string, sizeof(string), "%s\n{C8C8C8}%i) {AFAFAF}Empty Slot{FFFFFF}", string, i + 1);
  63506. }
  63507. }
  63508. format(title, sizeof(title), "My clothing items (%i/%i slots)", count, MAX_PLAYER_CLOTHING);
  63509. Dialog_Show(playerid, DIALOG_CLOTHING, DIALOG_STYLE_LIST, title, string, "Select", "Cancel");
  63510. return 1;
  63511. }
  63512. CMD:wat(playerid, params[])
  63513. {
  63514. for(new i = 0; i < MAX_PLAYER_CLOTHING; i ++)
  63515. {
  63516. ClothingInfo[playerid][i][cAttached] = 1;
  63517. SetPlayerClothing(playerid);
  63518. }
  63519. }
  63520. CMD:dat(playerid, params[])
  63521. {
  63522. for(new i = 0; i < MAX_PLAYER_CLOTHING; i ++)
  63523. {
  63524. if(ClothingInfo[playerid][i][cExists] && ClothingInfo[playerid][i][cAttached])
  63525. {
  63526. RemovePlayerAttachedObject(playerid, ClothingInfo[playerid][i][cAttachedIndex]);
  63527. }
  63528. }
  63529. }
  63530. CMD:taketest(playerid, params[])
  63531. {
  63532. if(!IsPlayerInRangeOfPoint(playerid, 3.0, -2033.2953, -117.4508, 1035.1719))
  63533. {
  63534. return SendClientMessage(playerid, COLOR_GREY, "You are not at the desk in the Licensing department.");
  63535. }
  63536. if(PlayerData[playerid][pCarLicense])
  63537. {
  63538. return SendClientMessage(playerid, COLOR_GREY, "You have your drivers license already.");
  63539. }
  63540. if(PlayerData[playerid][pDrivingTest])
  63541. {
  63542. return SendClientMessage(playerid, COLOR_GREY, "You are already taking your drivers test.");
  63543. }
  63544. if(PlayerData[playerid][pCash] < 400)
  63545. {
  63546. return SendClientMessage(playerid, COLOR_GREY, "You need $400 to pay the licensing fee if you pass the test.");
  63547. }
  63548. SendClientMessage(playerid, COLOR_WHITE, "* You've taken on the drivers test. Go outside and enter one of the vehicles to begin.");
  63549. SendClientMessage(playerid, COLOR_WHITE, "* Once you have passed the test, you will receive your license and pay a $500 licensing fee.");
  63550. PlayerData[playerid][pTestVehicle] = INVALID_VEHICLE_ID;
  63551. PlayerData[playerid][pDrivingTest] = 1;
  63552. PlayerData[playerid][pTestCP] = 0;
  63553. return 1;
  63554. }
  63555. CMD:spawncar(playerid, params[])
  63556. {
  63557. //mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT modelid, pos_x, pos_y, pos_z, world FROM vehicles WHERE ownerid = %i", PlayerData[playerid][pID]);
  63558. //mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LIST_VEHICLES, playerid);
  63559. SendClientMessage(playerid, COLOR_WHITE, "This command was removed. /carstorage if you wish to spawn your car now.");
  63560. return 1;
  63561. }
  63562. CMD:testdmv(playerid, params[])
  63563. {
  63564. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT id, carImpounded, carImpoundPrice FROM vehicles WHERE ownerid = %i", PlayerData[playerid][pID]);
  63565. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_RELEASECAR, playerid);
  63566. return 1;
  63567. }
  63568. CMD:carstorage(playerid, params[])
  63569. {
  63570. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT id, modelid, pos_x, pos_y, pos_z, world, tickets, carImpounded FROM vehicles WHERE ownerid = %i", PlayerData[playerid][pID]);
  63571. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_CAR_STORAGE, playerid);
  63572. return 1;
  63573. }
  63574. CMD:vst(playerid, params[])
  63575. {
  63576. return callcmd::carstorage(playerid, params);
  63577. }
  63578. CMD:vstorage(playerid, params[])
  63579. {
  63580. return callcmd::carstorage(playerid, params);
  63581. }
  63582. CMD:park(playerid, params[])
  63583. {
  63584. new vehicleid = GetPlayerVehicleID(playerid), id = VehicleInfo[vehicleid][vID];
  63585. if(!vehicleid || GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
  63586. {
  63587. return SendClientMessage(playerid, COLOR_GREY, "You are not driving any vehicle of yours.");
  63588. }
  63589. if(!IsVehicleOwner(playerid, vehicleid))
  63590. {
  63591. return SendClientMessage(playerid, COLOR_GREY, "You can't park this vehicle as it doesn't belong to you.");
  63592. }
  63593. ShowActionBubble(playerid, "* %s parks their %s.", GetRPName(playerid), GetVehicleName(vehicleid));
  63594. SendClientMessageEx(playerid, COLOR_AQUA, "You have parked your {00AA00}%s{33CCFF} which will spawn in this spot from now on.", GetVehicleName(vehicleid));
  63595. // Save the vehicle's information.
  63596. GetVehiclePos(vehicleid, VehicleInfo[vehicleid][vPosX], VehicleInfo[vehicleid][vPosY], VehicleInfo[vehicleid][vPosZ]);
  63597. GetVehicleZAngle(vehicleid, VehicleInfo[vehicleid][vPosA]);
  63598. VehicleInfo[vehicleid][vInterior] = GetPlayerInterior(playerid);
  63599. VehicleInfo[vehicleid][vWorld] = GetPlayerVirtualWorld(playerid);
  63600. // Update the database record with the new information, then despawn the vehicle.
  63601. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET pos_x = '%f', pos_y = '%f', pos_z = '%f', pos_a = '%f', interior = %i, world = %i WHERE id = %i", VehicleInfo[vehicleid][vPosX], VehicleInfo[vehicleid][vPosY], VehicleInfo[vehicleid][vPosZ], VehicleInfo[vehicleid][vPosA], VehicleInfo[vehicleid][vInterior], VehicleInfo[vehicleid][vWorld], VehicleInfo[vehicleid][vID]);
  63602. mysql_tquery(connectionID, queryBuffer);
  63603. DespawnVehicle(vehicleid);
  63604. // Finally, we reload the vehicle from the database.
  63605. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM vehicles WHERE id = %i", id);
  63606. mysql_tquery(connectionID, queryBuffer, "OnPlayerSpawnVehicle", "ii", playerid, true);
  63607. return 1;
  63608. }
  63609. CMD:givekeys(playerid, params[])
  63610. {
  63611. new targetid, vehicleid = GetPlayerVehicleID(playerid);
  63612. if(!vehicleid || !IsVehicleOwner(playerid, vehicleid))
  63613. {
  63614. return SendClientMessage(playerid, COLOR_GREY, "You are not inside any vehicle of yours.");
  63615. }
  63616. if(sscanf(params, "u", targetid))
  63617. {
  63618. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /givekeys [playerid]");
  63619. }
  63620. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  63621. {
  63622. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  63623. }
  63624. if(targetid == playerid)
  63625. {
  63626. return SendClientMessage(playerid, COLOR_GREY, "You can't give keys to yourself.");
  63627. }
  63628. if(PlayerData[targetid][pVehicleKeys] == vehicleid)
  63629. {
  63630. return SendClientMessage(playerid, COLOR_GREY, "That player already has keys to your vehicle.");
  63631. }
  63632. PlayerData[targetid][pVehicleKeys] = vehicleid;
  63633. ShowActionBubble(playerid, "* %s gives %s the keys to their %s.", GetRPName(playerid), GetRPName(targetid), GetVehicleName(vehicleid));
  63634. SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you the keys to their {00AA00}%s{33CCFF}.", GetRPName(playerid), GetVehicleName(vehicleid));
  63635. SendClientMessageEx(playerid, COLOR_AQUA, "You have given %s the keys to your {00AA00}%s{33CCFF}.", GetRPName(targetid), GetVehicleName(vehicleid));
  63636. return 1;
  63637. }
  63638. CMD:takekeys(playerid, params[])
  63639. {
  63640. new targetid, vehicleid = GetPlayerVehicleID(playerid);
  63641. if(!vehicleid || !IsVehicleOwner(playerid, vehicleid))
  63642. {
  63643. return SendClientMessage(playerid, COLOR_GREY, "You are not inside any vehicle of yours.");
  63644. }
  63645. if(sscanf(params, "u", targetid))
  63646. {
  63647. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /takekeys [playerid]");
  63648. }
  63649. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  63650. {
  63651. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  63652. }
  63653. if(targetid == playerid)
  63654. {
  63655. return SendClientMessage(playerid, COLOR_GREY, "You can't take keys from yourself.");
  63656. }
  63657. if(PlayerData[targetid][pVehicleKeys] != vehicleid)
  63658. {
  63659. return SendClientMessage(playerid, COLOR_GREY, "That player doesn't have the keys to your vehicle.");
  63660. }
  63661. PlayerData[targetid][pVehicleKeys] = INVALID_VEHICLE_ID;
  63662. ShowActionBubble(playerid, "* %s takes back the keys to their %s from %s.", GetRPName(playerid), GetRPName(targetid), GetVehicleName(vehicleid));
  63663. SendClientMessageEx(targetid, COLOR_AQUA, "%s has taken back the keys to their {00AA00}%s{33CCFF}.", GetRPName(playerid), GetVehicleName(vehicleid));
  63664. SendClientMessageEx(playerid, COLOR_AQUA, "You have taken back the keys to your {00AA00}%s{33CCFF} from %s.", GetRPName(targetid), GetVehicleName(vehicleid));
  63665. return 1;
  63666. }
  63667. CMD:despawncar(playerid, params[])
  63668. {
  63669. /*new string[MAX_SPAWNED_VEHICLES * 64], count;
  63670. string = "#\tModel\tLocation";
  63671. foreach(new i: Vehicle)
  63672. {
  63673. if(IsValidVehicle(i) && VehicleInfo[i][vID] > 0 && IsVehicleOwner(playerid, i))
  63674. {
  63675. format(string, sizeof(string), "%s\n%i\t%s\t%s", string, count + 1, GetVehicleName(i), GetVehicleZoneName(i));
  63676. count++;
  63677. }
  63678. }
  63679. if(!count)
  63680. {
  63681. SendClientMessage(playerid, COLOR_GREY, "You have no vehicles spawned at the moment.");
  63682. }
  63683. else
  63684. {
  63685. Dialog_Show(playerid, DIALOG_DESPAWNCAR, DIALOG_STYLE_TABLIST_HEADERS, "Choose a vehicle to despawn.", string, "Select", "Cancel");
  63686. }*/
  63687. SendClientMessage(playerid, COLOR_WHITE, "This command was removed. /carstorage if you wish to despawn your car now.");
  63688. return 1;
  63689. }
  63690. CMD:findcar(playerid, params[])
  63691. {
  63692. new string[MAX_SPAWNED_VEHICLES * 64], count;
  63693. string = "#\tModel\tLocation";
  63694. foreach(new i: Vehicle)
  63695. {
  63696. if(VehicleInfo[i][vID] > 0 && IsVehicleOwner(playerid, i))
  63697. {
  63698. format(string, sizeof(string), "%s\n%i\t%s\t%s", string, count + 1, GetVehicleName(i), GetVehicleZoneName(i));
  63699. count++;
  63700. }
  63701. }
  63702. if(!count)
  63703. {
  63704. SendClientMessage(playerid, COLOR_GREY, "You have no vehicles spawned at the moment.");
  63705. }
  63706. else
  63707. {
  63708. Dialog_Show(playerid, DIALOG_FINDCAR, DIALOG_STYLE_TABLIST_HEADERS, "Choose a vehicle to track.", string, "Select", "Cancel");
  63709. }
  63710. return 1;
  63711. }
  63712. CMD:upgradevehicle(playerid, params[])
  63713. {
  63714. new vehicleid = GetPlayerVehicleID(playerid), option[8], param[32];
  63715. if(!vehicleid || !IsVehicleOwner(playerid, vehicleid))
  63716. {
  63717. return SendClientMessage(playerid, COLOR_GREY, "You are not inside any vehicle of yours.");
  63718. }
  63719. if(!IsAtDealership(playerid))
  63720. {
  63721. return SendClientMessage(playerid, COLOR_GREY, "You're not in range of any dealership");
  63722. }
  63723. if(sscanf(params, "s[8]S()[32]", option, param))
  63724. {
  63725. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /upgradevehicle [trunk | neon | alarm | plate]");
  63726. }
  63727. if(!strcmp(option, "trunk", true))
  63728. {
  63729. if(isnull(param) || strcmp(param, "confirm", true) != 0)
  63730. {
  63731. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /upgradevehicle [trunk] [confirm]");
  63732. SendClientMessageEx(playerid, COLOR_SYNTAX, "Your vehicle's trunk level is at %i/3. Upgrading your trunk will cost you $10,000.", VehicleInfo[vehicleid][vTrunk]);
  63733. return 1;
  63734. }
  63735. if(VehicleInfo[vehicleid][vTrunk] >= 3)
  63736. {
  63737. return SendClientMessage(playerid, COLOR_GREY, "This vehicle's trunk is already at its maximum level.");
  63738. }
  63739. if(PlayerData[playerid][pCash] < 10000)
  63740. {
  63741. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to upgrade your trunk.");
  63742. }
  63743. VehicleInfo[vehicleid][vTrunk]++;
  63744. GivePlayerCash(playerid, -10000);
  63745. GameTextForPlayer(playerid, "~r~-$10000", 5000, 1);
  63746. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET trunk = %i WHERE id = %i", VehicleInfo[vehicleid][vTrunk], VehicleInfo[vehicleid][vID]);
  63747. mysql_tquery(connectionID, queryBuffer);
  63748. SendClientMessageEx(playerid, COLOR_GREEN, "You have paid $10,000 for trunk level %i/3. '/vstash balance' to see your new capacities.", VehicleInfo[vehicleid][vTrunk]);
  63749. Log_Write("log_property", "%s (uid: %i) upgraded the trunk of their %s (id: %i) to level %i/3.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID], VehicleInfo[vehicleid][vTrunk]);
  63750. }
  63751. else if(!strcmp(option, "neon", true))
  63752. {
  63753. if(isnull(param))
  63754. {
  63755. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /upgradevehicle [neon] [color] (costs $30,000)");
  63756. SendClientMessage(playerid, COLOR_SYNTAX, "List of colors: Red, Blue, Green, Yellow, Pink, White");
  63757. return 1;
  63758. }
  63759. if(PlayerData[playerid][pCash] < 30000)
  63760. {
  63761. return SendClientMessage(playerid, COLOR_GREY, "You need at least $30,000 to upgrade your neon.");
  63762. }
  63763. if(!VehicleHasWindows(vehicleid))
  63764. {
  63765. return SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't support neon.");
  63766. }
  63767. if(!strcmp(param, "red", true))
  63768. {
  63769. SetVehicleNeon(vehicleid, 18647);
  63770. GivePlayerCash(playerid, -30000);
  63771. GameTextForPlayer(playerid, "~r~-$30000", 5000, 1);
  63772. SendClientMessage(playerid, COLOR_GREEN, "You have paid $30,000 for red neon. You can use /neon to toggle your neon.");
  63773. Log_Write("log_property", "%s (uid: %i) purchased red neon for their %s (id: %i)", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID]);
  63774. }
  63775. else if(!strcmp(param, "blue", true))
  63776. {
  63777. SetVehicleNeon(vehicleid, 18648);
  63778. GivePlayerCash(playerid, -30000);
  63779. GameTextForPlayer(playerid, "~r~-$30000", 5000, 1);
  63780. SendClientMessage(playerid, COLOR_GREEN, "You have paid $30,000 for blue neon. You can use /neon to toggle your neon.");
  63781. Log_Write("log_property", "%s (uid: %i) purchased blue neon for their %s (id: %i)", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID]);
  63782. }
  63783. else if(!strcmp(param, "green", true))
  63784. {
  63785. SetVehicleNeon(vehicleid, 18649);
  63786. GivePlayerCash(playerid, -30000);
  63787. GameTextForPlayer(playerid, "~r~-$30000", 5000, 1);
  63788. SendClientMessage(playerid, COLOR_GREEN, "You have paid $30,000 for green neon. You can use /neon to toggle your neon.");
  63789. Log_Write("log_property", "%s (uid: %i) purchased green neon for their %s (id: %i)", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID]);
  63790. }
  63791. else if(!strcmp(param, "yellow", true))
  63792. {
  63793. SetVehicleNeon(vehicleid, 18650);
  63794. GivePlayerCash(playerid, -30000);
  63795. GameTextForPlayer(playerid, "~r~-$30000", 5000, 1);
  63796. SendClientMessage(playerid, COLOR_GREEN, "You have paid $30,000 for yellow neon. You can use /neon to toggle your neon.");
  63797. Log_Write("log_property", "%s (uid: %i) purchased yellow neon for their %s (id: %i)", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID]);
  63798. }
  63799. else if(!strcmp(param, "pink", true))
  63800. {
  63801. SetVehicleNeon(vehicleid, 18651);
  63802. GivePlayerCash(playerid, -30000);
  63803. GameTextForPlayer(playerid, "~r~-$30000", 5000, 1);
  63804. SendClientMessage(playerid, COLOR_GREEN, "You have paid $30,000 for pink neon. You can use /neon to toggle your neon.");
  63805. Log_Write("log_property", "%s (uid: %i) purchased pink neon for their %s (id: %i)", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID]);
  63806. }
  63807. else if(!strcmp(param, "white", true))
  63808. {
  63809. SetVehicleNeon(vehicleid, 18652);
  63810. GivePlayerCash(playerid, -30000);
  63811. GameTextForPlayer(playerid, "~r~-$30000", 5000, 1);
  63812. SendClientMessage(playerid, COLOR_GREEN, "You have paid $30,000 for white neon. You can use /neon to toggle your neon.");
  63813. Log_Write("log_property", "%s (uid: %i) purchased white neon for their %s (id: %i)", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID]);
  63814. }
  63815. }
  63816. else if(!strcmp(option, "alarm", true))
  63817. {
  63818. new level;
  63819. if(sscanf(param, "i", level))
  63820. {
  63821. SendClientMessage(playerid, COLOR_WHITE, "* Level 1: Alarm sound effects and notification to owner. {FFD700}($15,000)");
  63822. SendClientMessage(playerid, COLOR_WHITE, "* Level 2: Alarm sound effects and notification to owner and online LEO. {FFD700}($30,000)");
  63823. SendClientMessage(playerid, COLOR_WHITE, "* Level 3: Alarm alarm effects and notification to owner and blip for online LEO. {FFD700}($60,000)");
  63824. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /upgradevehicle [alarm] [level]");
  63825. return 1;
  63826. }
  63827. if(!(1 <= level <= 3))
  63828. {
  63829. return SendClientMessage(playerid, COLOR_GREY, "Invalid level.");
  63830. }
  63831. switch(level)
  63832. {
  63833. case 1:
  63834. {
  63835. if(VehicleInfo[vehicleid][vAlarm] == 1)
  63836. {
  63837. return SendClientMessage(playerid, COLOR_GREY, "Your vehicle's alarm is already at this level.");
  63838. }
  63839. if(PlayerData[playerid][pCash] < 15000)
  63840. {
  63841. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this alarm level.");
  63842. }
  63843. VehicleInfo[vehicleid][vAlarm] = 1;
  63844. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET alarm = 1 WHERE id = %i", VehicleInfo[vehicleid][vID]);
  63845. mysql_tquery(connectionID, queryBuffer);
  63846. GivePlayerCash(playerid, -15000);
  63847. GameTextForPlayer(playerid, "~r~-$15000", 5000, 1);
  63848. SendClientMessage(playerid, COLOR_GREEN, "You have paid $15,000 to install a level 1 alarm on your vehicle.");
  63849. Log_Write("log_property", "%s (uid: %i) purchased a level 1 alarm for their %s (id: %i).", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID]);
  63850. }
  63851. case 2:
  63852. {
  63853. if(VehicleInfo[vehicleid][vAlarm] == 2)
  63854. {
  63855. return SendClientMessage(playerid, COLOR_GREY, "Your vehicle's alarm is already at this level.");
  63856. }
  63857. if(PlayerData[playerid][pCash] < 30000)
  63858. {
  63859. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this alarm level.");
  63860. }
  63861. VehicleInfo[vehicleid][vAlarm] = 2;
  63862. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET alarm = 2 WHERE id = %i", VehicleInfo[vehicleid][vID]);
  63863. mysql_tquery(connectionID, queryBuffer);
  63864. GivePlayerCash(playerid, -30000);
  63865. GameTextForPlayer(playerid, "~r~-$30000", 5000, 1);
  63866. SendClientMessage(playerid, COLOR_GREEN, "You have paid $30,000 to install a level 2 alarm on your vehicle.");
  63867. Log_Write("log_property", "%s (uid: %i) purchased a level 1 alarm for their %s (id: %i).", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID]);
  63868. }
  63869. case 3:
  63870. {
  63871. if(VehicleInfo[vehicleid][vAlarm] == 3)
  63872. {
  63873. return SendClientMessage(playerid, COLOR_GREY, "Your vehicle's alarm is already at this level.");
  63874. }
  63875. if(PlayerData[playerid][pCash] < 60000)
  63876. {
  63877. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this alarm level.");
  63878. }
  63879. VehicleInfo[vehicleid][vAlarm] = 3;
  63880. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET alarm = 3 WHERE id = %i", VehicleInfo[vehicleid][vID]);
  63881. mysql_tquery(connectionID, queryBuffer);
  63882. GivePlayerCash(playerid, -60000);
  63883. GameTextForPlayer(playerid, "~r~-$60000", 5000, 1);
  63884. SendClientMessage(playerid, COLOR_GREEN, "You have paid $60,000 to install a level 3 alarm on your vehicle.");
  63885. Log_Write("log_property", "%s (uid: %i) purchased a level 3 alarm for their %s (id: %i).", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID]);
  63886. }
  63887. }
  63888. }
  63889. return 1;
  63890. }
  63891. CMD:neon(playerid, params[])
  63892. {
  63893. new vehicleid = GetPlayerVehicleID(playerid);
  63894. if(!vehicleid || GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
  63895. {
  63896. return SendClientMessage(playerid, COLOR_GREY, "You are not driving any vehicle of yours.");
  63897. }
  63898. if(!IsVehicleOwner(playerid, vehicleid) && PlayerData[playerid][pVehicleKeys] != vehicleid)
  63899. {
  63900. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as this vehicle doesn't belong to you.");
  63901. }
  63902. if(!VehicleInfo[vehicleid][vNeon])
  63903. {
  63904. return SendClientMessage(playerid, COLOR_GREY, "This vehicle has no neon installed.");
  63905. }
  63906. if(!VehicleInfo[vehicleid][vNeonEnabled])
  63907. {
  63908. VehicleInfo[vehicleid][vNeonEnabled] = 1;
  63909. GameTextForPlayer(playerid, "~g~Neon activated", 3000, 3);
  63910. ShowActionBubble(playerid, "* %s presses a button to activate their neon tubes.", GetRPName(playerid));
  63911. //SendClientMessage(playerid, COLOR_AQUA, "* Neon enabled. The tubes appear under your vehicle.");
  63912. }
  63913. else
  63914. {
  63915. VehicleInfo[vehicleid][vNeonEnabled] = 0;
  63916. GameTextForPlayer(playerid, "~r~Neon deactivated", 3000, 3);
  63917. ShowActionBubble(playerid, "* %s presses a button to deactivate their neon tubes.", GetRPName(playerid));
  63918. //SendClientMessage(playerid, COLOR_AQUA, "* Neon disabled.");
  63919. }
  63920. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET neonenabled = %i WHERE id = %i", VehicleInfo[vehicleid][vNeonEnabled], VehicleInfo[vehicleid][vID]);
  63921. mysql_tquery(connectionID, queryBuffer);
  63922. ReloadVehicleNeon(vehicleid);
  63923. return 1;
  63924. }
  63925. CMD:vstash(playerid, params[])
  63926. {
  63927. new vehicleid = GetNearbyVehicle(playerid);
  63928. if(vehicleid != INVALID_VEHICLE_ID && IsVehicleOwner(playerid, vehicleid))
  63929. {
  63930. new option[14], param[32];
  63931. if(!VehicleInfo[vehicleid][vTrunk])
  63932. {
  63933. return SendClientMessage(playerid, COLOR_GREY, "This vehicle has no trunk installed. /upgradevehicle to purchase one.");
  63934. }
  63935. if(sscanf(params, "s[14]S()[32]", option, param))
  63936. {
  63937. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /vstash [balance | deposit | withdraw]");
  63938. }
  63939. if(!strcmp(option, "balance", true))
  63940. {
  63941. new count;
  63942. for(new i = 0; i < 5; i ++)
  63943. {
  63944. if(VehicleInfo[vehicleid][vWeapons][i])
  63945. {
  63946. count++;
  63947. }
  63948. }
  63949. SendClientMessage(playerid, COLOR_NAVYBLUE, "______ Stash Balance ______");
  63950. SendClientMessageEx(playerid, COLOR_GREY2, "Cash: $%i/$%i", VehicleInfo[vehicleid][vCash], GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_CASH));
  63951. SendClientMessageEx(playerid, COLOR_GREY2, "Materials: %i/%i | Weapons: %i/%i", VehicleInfo[vehicleid][vMaterials], GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_MATERIALS), count, GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_WEAPONS));
  63952. SendClientMessageEx(playerid, COLOR_GREY2, "Weed: %i/%i grams | Cocaine: %i/%i grams", VehicleInfo[vehicleid][vWeed], GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_WEED), VehicleInfo[vehicleid][vCocaine], GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_COCAINE));
  63953. SendClientMessageEx(playerid, COLOR_GREY2, "Meth: %i/%i grams | Painkillers: %i/%i pills", VehicleInfo[vehicleid][vMeth], GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_METH), VehicleInfo[vehicleid][vPainkillers], GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_PAINKILLERS));
  63954. if(count > 0)
  63955. {
  63956. SendClientMessage(playerid, COLOR_NAVYBLUE, "______ Stash Weapons ______");
  63957. for(new i = 0; i < 5; i ++)
  63958. {
  63959. if(VehicleInfo[vehicleid][vWeapons][i])
  63960. {
  63961. SendClientMessageEx(playerid, COLOR_GREY2, "[%i] Weapon: %s", i + 1, GetWeaponNameEx(VehicleInfo[vehicleid][vWeapons][i]));
  63962. }
  63963. }
  63964. }
  63965. }
  63966. else if(!strcmp(option, "deposit", true))
  63967. {
  63968. new value;
  63969. if(IsPlayerInAnyVehicle(playerid))
  63970. {
  63971. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command from within the vehicle.");
  63972. }
  63973. if(sscanf(param, "s[14]S()[32]", option, param))
  63974. {
  63975. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /vstash [deposit] [option]");
  63976. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Cash, Materials, Weed, Cocaine, Meth, Painkillers, Weapon");
  63977. return 1;
  63978. }
  63979. if(!strcmp(option, "cash", true))
  63980. {
  63981. if(sscanf(param, "i", value))
  63982. {
  63983. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /vstash [deposit] [cash] [amount]");
  63984. }
  63985. if(value < 1 || value > PlayerData[playerid][pCash])
  63986. {
  63987. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  63988. }
  63989. if(VehicleInfo[vehicleid][vCash] + value > GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_CASH))
  63990. {
  63991. return SendClientMessageEx(playerid, COLOR_GREY, "Your vehicle's stash can only hold up to %s at its level.", FormatNumber(GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_CASH)));
  63992. }
  63993. GivePlayerCash(playerid, -value);
  63994. VehicleInfo[vehicleid][vCash] += value;
  63995. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET cash = %i WHERE id = %i", VehicleInfo[vehicleid][vCash], VehicleInfo[vehicleid][vID]);
  63996. mysql_tquery(connectionID, queryBuffer);
  63997. SendClientMessageEx(playerid, COLOR_AQUA, "* You have stored %s in your vehicle stash.", FormatNumber(value));
  63998. }
  63999. else if(!strcmp(option, "materials", true))
  64000. {
  64001. if(sscanf(param, "i", value))
  64002. {
  64003. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /vstash [deposit] [materials] [amount]");
  64004. }
  64005. if(value < 1 || value > PlayerData[playerid][pMaterials])
  64006. {
  64007. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  64008. }
  64009. if(VehicleInfo[vehicleid][vMaterials] + value > GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_MATERIALS))
  64010. {
  64011. return SendClientMessageEx(playerid, COLOR_GREY, "Your vehicle's stash can only hold up to %i materials at its level.", GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_MATERIALS));
  64012. }
  64013. PlayerData[playerid][pMaterials] -= value;
  64014. VehicleInfo[vehicleid][vMaterials] += value;
  64015. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET materials = %i WHERE id = %i", VehicleInfo[vehicleid][vMaterials], VehicleInfo[vehicleid][vID]);
  64016. mysql_tquery(connectionID, queryBuffer);
  64017. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET materials = %i WHERE uid = %i", PlayerData[playerid][pMaterials], PlayerData[playerid][pID]);
  64018. mysql_tquery(connectionID, queryBuffer);
  64019. SendClientMessageEx(playerid, COLOR_AQUA, "* You have stored %i materials in your vehicle stash.", value);
  64020. }
  64021. else if(!strcmp(option, "weed", true))
  64022. {
  64023. if(sscanf(param, "i", value))
  64024. {
  64025. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /vstash [deposit] [weed] [amount]");
  64026. }
  64027. if(value < 1 || value > PlayerData[playerid][pWeed])
  64028. {
  64029. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  64030. }
  64031. if(VehicleInfo[vehicleid][vWeed] + value > GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_WEED))
  64032. {
  64033. return SendClientMessageEx(playerid, COLOR_GREY, "Your vehicle's stash can only hold up to %i grams of weed at its level.", GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_WEED));
  64034. }
  64035. PlayerData[playerid][pWeed] -= value;
  64036. VehicleInfo[vehicleid][vWeed] += value;
  64037. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET weed = %i WHERE id = %i", VehicleInfo[vehicleid][vWeed], VehicleInfo[vehicleid][vID]);
  64038. mysql_tquery(connectionID, queryBuffer);
  64039. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET weed = %i WHERE uid = %i", PlayerData[playerid][pWeed], PlayerData[playerid][pID]);
  64040. mysql_tquery(connectionID, queryBuffer);
  64041. SendClientMessageEx(playerid, COLOR_AQUA, "* You have stored %ig of weed in your vehicle stash.", value);
  64042. }
  64043. else if(!strcmp(option, "cocaine", true))
  64044. {
  64045. if(sscanf(param, "i", value))
  64046. {
  64047. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /vstash [deposit] [cocaine] [amount]");
  64048. }
  64049. if(value < 1 || value > PlayerData[playerid][pCocaine])
  64050. {
  64051. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  64052. }
  64053. if(VehicleInfo[vehicleid][vCocaine] + value > GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_COCAINE))
  64054. {
  64055. return SendClientMessageEx(playerid, COLOR_GREY, "Your vehicle's stash can only hold up to %i grams of cocaine at its level.", GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_COCAINE));
  64056. }
  64057. PlayerData[playerid][pCocaine] -= value;
  64058. VehicleInfo[vehicleid][vCocaine] += value;
  64059. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET cocaine = %i WHERE id = %i", VehicleInfo[vehicleid][vCocaine], VehicleInfo[vehicleid][vID]);
  64060. mysql_tquery(connectionID, queryBuffer);
  64061. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET cocaine = %i WHERE uid = %i", PlayerData[playerid][pCocaine], PlayerData[playerid][pID]);
  64062. mysql_tquery(connectionID, queryBuffer);
  64063. SendClientMessageEx(playerid, COLOR_AQUA, "* You have stored %ig of cocaine in your vehicle stash.", value);
  64064. }
  64065. else if(!strcmp(option, "meth", true))
  64066. {
  64067. if(sscanf(param, "i", value))
  64068. {
  64069. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /vstash [deposit] [meth] [amount]");
  64070. }
  64071. if(value < 1 || value > PlayerData[playerid][pMeth])
  64072. {
  64073. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  64074. }
  64075. if(VehicleInfo[vehicleid][vMeth] + value > GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_METH))
  64076. {
  64077. return SendClientMessageEx(playerid, COLOR_GREY, "Your vehicle's stash can only hold up to %i grams of meth at its level.", GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_METH));
  64078. }
  64079. PlayerData[playerid][pMeth] -= value;
  64080. VehicleInfo[vehicleid][vMeth] += value;
  64081. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET meth = %i WHERE id = %i", VehicleInfo[vehicleid][vMeth], VehicleInfo[vehicleid][vID]);
  64082. mysql_tquery(connectionID, queryBuffer);
  64083. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET meth = %i WHERE uid = %i", PlayerData[playerid][pMeth], PlayerData[playerid][pID]);
  64084. mysql_tquery(connectionID, queryBuffer);
  64085. SendClientMessageEx(playerid, COLOR_AQUA, "* You have stored %ig of meth in your vehicle stash.", value);
  64086. }
  64087. else if(!strcmp(option, "painkillers", true))
  64088. {
  64089. if(sscanf(param, "i", value))
  64090. {
  64091. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /vstash [deposit] [painkillers] [amount]");
  64092. }
  64093. if(value < 1 || value > PlayerData[playerid][pPainkillers])
  64094. {
  64095. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  64096. }
  64097. if(VehicleInfo[vehicleid][vPainkillers] + value > GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_PAINKILLERS))
  64098. {
  64099. return SendClientMessageEx(playerid, COLOR_GREY, "Your vehicle's stash can only hold up to %i painkillers at its level.", GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_PAINKILLERS));
  64100. }
  64101. PlayerData[playerid][pPainkillers] -= value;
  64102. VehicleInfo[vehicleid][vPainkillers] += value;
  64103. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET painkillers = %i WHERE id = %i", VehicleInfo[vehicleid][vPainkillers], VehicleInfo[vehicleid][vID]);
  64104. mysql_tquery(connectionID, queryBuffer);
  64105. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET painkillers = %i WHERE uid = %i", PlayerData[playerid][pPainkillers], PlayerData[playerid][pID]);
  64106. mysql_tquery(connectionID, queryBuffer);
  64107. SendClientMessageEx(playerid, COLOR_AQUA, "* You have stored %i painkillers in your vehicle stash.", value);
  64108. }
  64109. else if(!strcmp(option, "weapon", true))
  64110. {
  64111. new weaponid;
  64112. if(sscanf(param, "i", weaponid))
  64113. {
  64114. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /vstash [deposit] [weapon] [weaponid] (/guninv for weapon IDs)");
  64115. }
  64116. if(!(1 <= weaponid <= 46) || PlayerData[playerid][pWeapons][weaponSlotIDs[weaponid]] != weaponid)
  64117. {
  64118. return SendClientMessage(playerid, COLOR_GREY, "You don't have that weapon. /guninv for a list of your weapons.");
  64119. }
  64120. if(IsLawEnforcement(playerid))
  64121. {
  64122. return SendClientMessage(playerid, COLOR_GREY, "Law enforcement is prohibited from storing weapons.");
  64123. }
  64124. if(GetPlayerHealthEx(playerid) < 60)
  64125. {
  64126. return SendClientMessage(playerid, COLOR_GREY, "You can't store weapons as your health is below 60.");
  64127. }
  64128. for(new i = 0; i < GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_WEAPONS); i ++)
  64129. {
  64130. if(!VehicleInfo[vehicleid][vWeapons][i])
  64131. {
  64132. VehicleInfo[vehicleid][vWeapons][i] = weaponid;
  64133. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET weapon_%i = %i WHERE id = %i", i + 1, VehicleInfo[vehicleid][vWeapons][i], VehicleInfo[vehicleid][vID]);
  64134. mysql_tquery(connectionID, queryBuffer);
  64135. RemovePlayerWeapon(playerid, weaponid);
  64136. SendClientMessageEx(playerid, COLOR_AQUA, "* You have stored a %s in slot %i of your vehicle stash.", GetWeaponNameEx(VehicleInfo[vehicleid][vWeapons][i]), i + 1);
  64137. return 1;
  64138. }
  64139. }
  64140. SendClientMessage(playerid, COLOR_GREY, "This vehicle has no more slots available for weapons.");
  64141. }
  64142. }
  64143. else if(!strcmp(option, "withdraw", true))
  64144. {
  64145. new value;
  64146. if(IsPlayerInAnyVehicle(playerid))
  64147. {
  64148. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command from within the vehicle.");
  64149. }
  64150. if(sscanf(param, "s[14]S()[32]", option, param))
  64151. {
  64152. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /vstash [withdraw] [option]");
  64153. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Cash, Weed, Cocaine, Meth, Painkillers, Weapon");
  64154. return 1;
  64155. }
  64156. if(!strcmp(option, "cash", true))
  64157. {
  64158. if(sscanf(param, "i", value))
  64159. {
  64160. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /vstash [withdraw] [cash] [amount]");
  64161. }
  64162. if(value < 1 || value > VehicleInfo[vehicleid][vCash])
  64163. {
  64164. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  64165. }
  64166. GivePlayerCash(playerid, value);
  64167. VehicleInfo[vehicleid][vCash] -= value;
  64168. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET cash = %i WHERE id = %i", VehicleInfo[vehicleid][vCash], VehicleInfo[vehicleid][vID]);
  64169. mysql_tquery(connectionID, queryBuffer);
  64170. SendClientMessageEx(playerid, COLOR_AQUA, "* You have taken %s from your vehicle stash.", FormatNumber(value));
  64171. }
  64172. else if(!strcmp(option, "materials", true))
  64173. {
  64174. if(sscanf(param, "i", value))
  64175. {
  64176. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /vstash [withdraw] [materials] [amount]");
  64177. }
  64178. if(value < 1 || value > VehicleInfo[vehicleid][vMaterials])
  64179. {
  64180. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  64181. }
  64182. if(PlayerData[playerid][pMaterials] + value > GetPlayerCapacity(playerid, CAPACITY_MATERIALS))
  64183. {
  64184. return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i materials. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pMaterials], GetPlayerCapacity(playerid, CAPACITY_MATERIALS));
  64185. }
  64186. PlayerData[playerid][pMaterials] += value;
  64187. VehicleInfo[vehicleid][vMaterials] -= value;
  64188. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET materials = %i WHERE id = %i", VehicleInfo[vehicleid][vMaterials], VehicleInfo[vehicleid][vID]);
  64189. mysql_tquery(connectionID, queryBuffer);
  64190. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET materials = %i WHERE uid = %i", PlayerData[playerid][pMaterials], PlayerData[playerid][pID]);
  64191. mysql_tquery(connectionID, queryBuffer);
  64192. SendClientMessageEx(playerid, COLOR_AQUA, "* You have taken %i materials from your vehicle stash.", value);
  64193. }
  64194. else if(!strcmp(option, "weed", true))
  64195. {
  64196. if(sscanf(param, "i", value))
  64197. {
  64198. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /vstash [withdraw] [weed] [amount]");
  64199. }
  64200. if(value < 1 || value > VehicleInfo[vehicleid][vWeed])
  64201. {
  64202. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  64203. }
  64204. if(PlayerData[playerid][pWeed] + value > GetPlayerCapacity(playerid, CAPACITY_WEED))
  64205. {
  64206. return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i weed. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pWeed], GetPlayerCapacity(playerid, CAPACITY_WEED));
  64207. }
  64208. PlayerData[playerid][pWeed] += value;
  64209. VehicleInfo[vehicleid][vWeed] -= value;
  64210. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET weed = %i WHERE id = %i", VehicleInfo[vehicleid][vWeed], VehicleInfo[vehicleid][vID]);
  64211. mysql_tquery(connectionID, queryBuffer);
  64212. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET weed = %i WHERE uid = %i", PlayerData[playerid][pWeed], PlayerData[playerid][pID]);
  64213. mysql_tquery(connectionID, queryBuffer);
  64214. SendClientMessageEx(playerid, COLOR_AQUA, "* You have taken %ig of weed from your vehicle stash.", value);
  64215. }
  64216. else if(!strcmp(option, "cocaine", true))
  64217. {
  64218. if(sscanf(param, "i", value))
  64219. {
  64220. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /vstash [withdraw] [cocaine] [amount]");
  64221. }
  64222. if(value < 1 || value > VehicleInfo[vehicleid][vCocaine])
  64223. {
  64224. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  64225. }
  64226. if(PlayerData[playerid][pCocaine] + value > GetPlayerCapacity(playerid, CAPACITY_COCAINE))
  64227. {
  64228. return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i cocaine. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pCocaine], GetPlayerCapacity(playerid, CAPACITY_COCAINE));
  64229. }
  64230. PlayerData[playerid][pCocaine] += value;
  64231. VehicleInfo[vehicleid][vCocaine] -= value;
  64232. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET cocaine = %i WHERE id = %i", VehicleInfo[vehicleid][vCocaine], VehicleInfo[vehicleid][vID]);
  64233. mysql_tquery(connectionID, queryBuffer);
  64234. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET cocaine = %i WHERE uid = %i", PlayerData[playerid][pCocaine], PlayerData[playerid][pID]);
  64235. mysql_tquery(connectionID, queryBuffer);
  64236. SendClientMessageEx(playerid, COLOR_AQUA, "* You have taken %ig of cocaine from your vehicle stash.", value);
  64237. }
  64238. else if(!strcmp(option, "meth", true))
  64239. {
  64240. if(sscanf(param, "i", value))
  64241. {
  64242. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /vstash [withdraw] [meth] [amount]");
  64243. }
  64244. if(value < 1 || value > VehicleInfo[vehicleid][vMeth])
  64245. {
  64246. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  64247. }
  64248. if(PlayerData[playerid][pMeth] + value > GetPlayerCapacity(playerid, CAPACITY_METH))
  64249. {
  64250. return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i meth. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pMeth], GetPlayerCapacity(playerid, CAPACITY_METH));
  64251. }
  64252. PlayerData[playerid][pMeth] += value;
  64253. VehicleInfo[vehicleid][vMeth] -= value;
  64254. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET meth = %i WHERE id = %i", VehicleInfo[vehicleid][vMeth], VehicleInfo[vehicleid][vID]);
  64255. mysql_tquery(connectionID, queryBuffer);
  64256. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET meth = %i WHERE uid = %i", PlayerData[playerid][pMeth], PlayerData[playerid][pID]);
  64257. mysql_tquery(connectionID, queryBuffer);
  64258. SendClientMessageEx(playerid, COLOR_AQUA, "* You have taken %ig of meth from your vehicle stash.", value);
  64259. }
  64260. else if(!strcmp(option, "painkillers", true))
  64261. {
  64262. if(sscanf(param, "i", value))
  64263. {
  64264. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /vstash [withdraw] [painkillers] [amount]");
  64265. }
  64266. if(value < 1 || value > VehicleInfo[vehicleid][vPainkillers])
  64267. {
  64268. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  64269. }
  64270. if(PlayerData[playerid][pPainkillers] + value > GetPlayerCapacity(playerid, CAPACITY_PAINKILLERS))
  64271. {
  64272. return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i painkillers. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pPainkillers], GetPlayerCapacity(playerid, CAPACITY_PAINKILLERS));
  64273. }
  64274. PlayerData[playerid][pPainkillers] += value;
  64275. VehicleInfo[vehicleid][vPainkillers] -= value;
  64276. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET painkillers = %i WHERE id = %i", VehicleInfo[vehicleid][vPainkillers], VehicleInfo[vehicleid][vID]);
  64277. mysql_tquery(connectionID, queryBuffer);
  64278. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET painkillers = %i WHERE uid = %i", PlayerData[playerid][pPainkillers], PlayerData[playerid][pID]);
  64279. mysql_tquery(connectionID, queryBuffer);
  64280. SendClientMessageEx(playerid, COLOR_AQUA, "* You have taken %i painkillers from your vehicle stash.", value);
  64281. }
  64282. else if(!strcmp(option, "weapon", true))
  64283. {
  64284. new slots = GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_WEAPONS);
  64285. if(sscanf(param, "i", value))
  64286. {
  64287. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /vstash [withdraw] [weapon] [slot (1-%i)]", slots);
  64288. }
  64289. if(!(1 <= value <= slots))
  64290. {
  64291. return SendClientMessage(playerid, COLOR_GREY, "Invalid slot, or the slot specified is locked.");
  64292. }
  64293. if(!VehicleInfo[vehicleid][vWeapons][value-1])
  64294. {
  64295. return SendClientMessage(playerid, COLOR_GREY, "The slot specified contains no weapon which you can take.");
  64296. }
  64297. if(PlayerData[playerid][pHours] < 2 || PlayerData[playerid][pWeaponRestricted] > 0)
  64298. {
  64299. return SendClientMessage(playerid, COLOR_GREY, "You are either weapon restricted or you played less than two playing hours.");
  64300. }
  64301. GivePlayerWeaponEx(playerid, VehicleInfo[vehicleid][vWeapons][value-1]);
  64302. SendClientMessageEx(playerid, COLOR_AQUA, "* You have taken a %s from slot %i of your vehicle stash.", GetWeaponNameEx(VehicleInfo[vehicleid][vWeapons][value-1]), value);
  64303. VehicleInfo[vehicleid][vWeapons][value-1] = 0;
  64304. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET weapon_%i = 0 WHERE id = %i", value, VehicleInfo[vehicleid][vID]);
  64305. mysql_tquery(connectionID, queryBuffer);
  64306. }
  64307. }
  64308. }
  64309. else
  64310. {
  64311. SendClientMessage(playerid, COLOR_GREY, "You are not in range of any vehicle of yours.");
  64312. }
  64313. return 1;
  64314. }
  64315. CMD:unmod(playerid, params[])
  64316. {
  64317. new vehicleid = GetPlayerVehicleID(playerid);
  64318. if(!vehicleid || GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
  64319. {
  64320. return SendClientMessage(playerid, COLOR_GREY, "You are not driving any vehicle of yours.");
  64321. }
  64322. if(!IsVehicleOwner(playerid, vehicleid) && PlayerData[playerid][pVehicleKeys] != vehicleid)
  64323. {
  64324. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as this vehicle doesn't belong to you.");
  64325. }
  64326. if(isnull(params))
  64327. {
  64328. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /unmod [color | paintjob | mods | neon]");
  64329. }
  64330. if(!strcmp(params, "color", true))
  64331. {
  64332. VehicleInfo[vehicleid][vColor1] = 0;
  64333. VehicleInfo[vehicleid][vColor2] = 0;
  64334. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET color1 = 0, color2 = 0 WHERE id = %i", VehicleInfo[vehicleid][vID]);
  64335. mysql_tquery(connectionID, queryBuffer);
  64336. ChangeVehicleColor(vehicleid, 0, 0);
  64337. SendClientMessage(playerid, COLOR_WHITE, "* Vehicle color has been set back to default.");
  64338. }
  64339. else if(!strcmp(params, "paintjob", true))
  64340. {
  64341. VehicleInfo[vehicleid][vPaintjob] = -1;
  64342. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET paintjob = -1 WHERE id = %i", VehicleInfo[vehicleid][vID]);
  64343. mysql_tquery(connectionID, queryBuffer);
  64344. ChangeVehiclePaintjob(vehicleid, 3);
  64345. SendClientMessage(playerid, COLOR_WHITE, "* Vehicle paintjob has been set back to default.");
  64346. }
  64347. else if(!strcmp(params, "mods", true))
  64348. {
  64349. for(new i = 0; i < 14; i ++)
  64350. {
  64351. if(VehicleInfo[vehicleid][vMods][i] >= 1000)
  64352. {
  64353. RemoveVehicleComponent(vehicleid, VehicleInfo[vehicleid][vMods][i]);
  64354. }
  64355. }
  64356. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET mod_1 = 0, mod_2 = 0, mod_3 = 0, mod_4 = 0, mod_5 = 0, mod_6 = 0, mod_7 = 0, mod_8 = 0, mod_9 = 0, mod_10 = 0, mod_11 = 0, mod_12 = 0, mod_13 = 0, mod_14 = 0 WHERE id = %i", VehicleInfo[vehicleid][vID]);
  64357. mysql_tquery(connectionID, queryBuffer);
  64358. SendClientMessage(playerid, COLOR_WHITE, "* All vehicle modifications have been removed.");
  64359. }
  64360. else if(!strcmp(params, "neon", true))
  64361. {
  64362. if(!VehicleInfo[vehicleid][vNeon])
  64363. {
  64364. return SendClientMessage(playerid, COLOR_GREY, "This vehicle has no neon which you can remove.");
  64365. }
  64366. if(VehicleInfo[vehicleid][vNeonEnabled])
  64367. {
  64368. DestroyDynamicObject(VehicleInfo[vehicleid][vObjects][0]);
  64369. DestroyDynamicObject(VehicleInfo[vehicleid][vObjects][1]);
  64370. }
  64371. VehicleInfo[vehicleid][vNeon] = 0;
  64372. VehicleInfo[vehicleid][vNeonEnabled] = 0;
  64373. VehicleInfo[vehicleid][vObjects][0] = INVALID_OBJECT_ID;
  64374. VehicleInfo[vehicleid][vObjects][1] = INVALID_OBJECT_ID;
  64375. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET neon = 0, neonenabled = 0 WHERE id = %i", VehicleInfo[vehicleid][vID]);
  64376. mysql_tquery(connectionID, queryBuffer);
  64377. SendClientMessage(playerid, COLOR_WHITE, "* Neon has been removed from vehicle.");
  64378. }
  64379. return 1;
  64380. }
  64381. CMD:gunmod(playerid, params[])
  64382. {
  64383. new vehicleid = GetPlayerVehicleID(playerid);
  64384. if(!vehicleid || GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
  64385. {
  64386. return SendClientMessage(playerid, COLOR_GREY, "You are not driving any vehicle of yours.");
  64387. }
  64388. if(VehicleInfo[vehicleid][vGang] >= 0 && VehicleInfo[vehicleid][vGang] != PlayerData[playerid][pGang])
  64389. {
  64390. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as this vehicle doesn't belong to your gang.");
  64391. }
  64392. if(isnull(params))
  64393. {
  64394. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /gunmod [color | paintjob | mods]");
  64395. }
  64396. if(!strcmp(params, "color", true))
  64397. {
  64398. VehicleInfo[vehicleid][vColor1] = 0;
  64399. VehicleInfo[vehicleid][vColor2] = 0;
  64400. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET color1 = 0, color2 = 0 WHERE id = %i", VehicleInfo[vehicleid][vID]);
  64401. mysql_tquery(connectionID, queryBuffer);
  64402. ChangeVehicleColor(vehicleid, 0, 0);
  64403. SendClientMessage(playerid, COLOR_WHITE, "* Vehicle color has been set back to default.");
  64404. }
  64405. else if(!strcmp(params, "paintjob", true))
  64406. {
  64407. VehicleInfo[vehicleid][vPaintjob] = -1;
  64408. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET paintjob = -1 WHERE id = %i", VehicleInfo[vehicleid][vID]);
  64409. mysql_tquery(connectionID, queryBuffer);
  64410. ChangeVehiclePaintjob(vehicleid, 3);
  64411. SendClientMessage(playerid, COLOR_WHITE, "* Vehicle paintjob has been set back to default.");
  64412. }
  64413. else if(!strcmp(params, "mods", true))
  64414. {
  64415. for(new i = 0; i < 14; i ++)
  64416. {
  64417. if(VehicleInfo[vehicleid][vMods][i] >= 1000)
  64418. {
  64419. RemoveVehicleComponent(vehicleid, VehicleInfo[vehicleid][vMods][i]);
  64420. }
  64421. }
  64422. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET mod_1 = 0, mod_2 = 0, mod_3 = 0, mod_4 = 0, mod_5 = 0, mod_6 = 0, mod_7 = 0, mod_8 = 0, mod_9 = 0, mod_10 = 0, mod_11 = 0, mod_12 = 0, mod_13 = 0, mod_14 = 0 WHERE id = %i", VehicleInfo[vehicleid][vID]);
  64423. mysql_tquery(connectionID, queryBuffer);
  64424. SendClientMessage(playerid, COLOR_WHITE, "* All vehicle modifications have been removed.");
  64425. }
  64426. return 1;
  64427. }
  64428. CMD:colorcar(playerid, params[])
  64429. {
  64430. new vehicleid = GetPlayerVehicleID(playerid), color1, color2;
  64431. if(sscanf(params, "ii", color1, color2))
  64432. {
  64433. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /colorcar [color1] [color2]");
  64434. }
  64435. if(!vehicleid)
  64436. {
  64437. return SendClientMessage(playerid, COLOR_GREY, "You are not sitting inside any vehicle.");
  64438. }
  64439. if(VehicleInfo[vehicleid][vOwnerID] > 0 && !IsVehicleOwner(playerid, vehicleid) && !PlayerHasJob(playerid, JOB_MECHANIC))
  64440. {
  64441. return SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't belong to you, therefore you can't respray it.");
  64442. }
  64443. if(VehicleInfo[vehicleid][vOwnerID] > 0 && !IsVehicleOwner(playerid, vehicleid) && PlayerData[playerid][pMechanicSkill] < 5)
  64444. {
  64445. return SendClientMessage(playerid, COLOR_GREY, "You must be a skill level 5 mechanic to paint cars you dont own.");
  64446. }
  64447. if(!(0 <= color1 <= 255) || !(0 <= color2 <= 255))
  64448. {
  64449. return SendClientMessage(playerid, COLOR_GREY, "The color specified must range between 0 and 255.");
  64450. }
  64451. if(!PlayerHasJob(playerid, JOB_MECHANIC))
  64452. {
  64453. if(!IsVehicleOwner(playerid, vehicleid))
  64454. {
  64455. return SendClientMessage(playerid, COLOR_GREY, "You are not vehicle owner.");
  64456. }
  64457. if(PlayerData[playerid][pSpraycans] <= 0)
  64458. {
  64459. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough spraycans for this.");
  64460. }
  64461. if(VehicleInfo[vehicleid][vOwnerID] > 0 || VehicleInfo[vehicleid][vGang] >= 0)
  64462. {
  64463. VehicleInfo[vehicleid][vColor1] = color1;
  64464. VehicleInfo[vehicleid][vColor2] = color2;
  64465. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET color1 = %i, color2 = %i WHERE id = %i", color1, color2, VehicleInfo[vehicleid][vID]);
  64466. mysql_tquery(connectionID, queryBuffer);
  64467. }
  64468. PlayerData[playerid][pSpraycans]--;
  64469. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET spraycans = %i WHERE uid = %i", PlayerData[playerid][pSpraycans], PlayerData[playerid][pID]);
  64470. mysql_tquery(connectionID, queryBuffer);
  64471. ShowActionBubble(playerid, "* %s uses their spraycan to spray their vehicle a different color.", GetRPName(playerid));
  64472. SendClientMessageEx(playerid, COLOR_WHITE, "* Vehicle resprayed. You have %i spraycans left.", PlayerData[playerid][pSpraycans]);
  64473. ChangeVehicleColor(vehicleid, color1, color2);
  64474. PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0);
  64475. return 1;
  64476. }
  64477. if(PlayerHasJob(playerid, JOB_MECHANIC))
  64478. {
  64479. if(PlayerData[playerid][pMechanicSkill] < 5)
  64480. {
  64481. if(PlayerData[playerid][pSpraycans] <= 0)
  64482. {
  64483. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough spraycans for this.");
  64484. }
  64485. if(VehicleInfo[vehicleid][vOwnerID] > 0 || VehicleInfo[vehicleid][vGang] >= 0)
  64486. {
  64487. VehicleInfo[vehicleid][vColor1] = color1;
  64488. VehicleInfo[vehicleid][vColor2] = color2;
  64489. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET color1 = %i, color2 = %i WHERE id = %i", color1, color2, VehicleInfo[vehicleid][vID]);
  64490. mysql_tquery(connectionID, queryBuffer);
  64491. }
  64492. PlayerData[playerid][pSpraycans]--;
  64493. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET spraycans = %i WHERE uid = %i", PlayerData[playerid][pSpraycans], PlayerData[playerid][pID]);
  64494. mysql_tquery(connectionID, queryBuffer);
  64495. ShowActionBubble(playerid, "* %s uses their spraycan to spray their vehicle a different color.", GetRPName(playerid));
  64496. SendClientMessageEx(playerid, COLOR_WHITE, "* Vehicle resprayed. You have %i spraycans left.", PlayerData[playerid][pSpraycans]);
  64497. ChangeVehicleColor(vehicleid, color1, color2);
  64498. PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0);
  64499. return 1;
  64500. }
  64501. if(PlayerData[playerid][pComponents] <= 0)
  64502. {
  64503. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough components for this.");
  64504. }
  64505. if(VehicleInfo[vehicleid][vOwnerID] > 0 || VehicleInfo[vehicleid][vGang] >= 0)
  64506. {
  64507. VehicleInfo[vehicleid][vColor1] = color1;
  64508. VehicleInfo[vehicleid][vColor2] = color2;
  64509. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET color1 = %i, color2 = %i WHERE id = %i", color1, color2, VehicleInfo[vehicleid][vID]);
  64510. mysql_tquery(connectionID, queryBuffer);
  64511. }
  64512. PlayerData[playerid][pComponents]--;
  64513. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET components = %i WHERE uid = %i", PlayerData[playerid][pComponents], PlayerData[playerid][pID]);
  64514. mysql_tquery(connectionID, queryBuffer);
  64515. ShowActionBubble(playerid, "* %s sprays the vehicle to a different color.", GetRPName(playerid));
  64516. SendClientMessageEx(playerid, COLOR_WHITE, "* Vehicle resprayed. You have %i components left.", PlayerData[playerid][pComponents]);
  64517. ChangeVehicleColor(vehicleid, color1, color2);
  64518. PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0);
  64519. return 1;
  64520. }
  64521. return 1;
  64522. }
  64523. CMD:paintcar(playerid, params[])
  64524. {
  64525. new vehicleid = GetPlayerVehicleID(playerid), paintjobid;
  64526. if(sscanf(params, "i", paintjobid))
  64527. {
  64528. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /paintcar [paintjobid (-1 = none)]");
  64529. }
  64530. if(!vehicleid)
  64531. {
  64532. return SendClientMessage(playerid, COLOR_GREY, "You are not sitting inside any vehicle.");
  64533. }
  64534. if(VehicleInfo[vehicleid][vOwnerID] > 0 && !IsVehicleOwner(playerid, vehicleid) && !PlayerHasJob(playerid, JOB_MECHANIC))
  64535. {
  64536. return SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't belong to you, therefore you can't respray it.");
  64537. }
  64538. if(VehicleInfo[vehicleid][vOwnerID] > 0 && !IsVehicleOwner(playerid, vehicleid) && PlayerData[playerid][pMechanicSkill] < 5)
  64539. {
  64540. return SendClientMessage(playerid, COLOR_GREY, "You must be a skill level 5 mechanic to paint cars you dont own.");
  64541. }
  64542. if(!(-1 <= paintjobid <= 5))
  64543. {
  64544. return SendClientMessage(playerid, COLOR_GREY, "The paintjob specified must range between -1 and 5.");
  64545. }
  64546. if(paintjobid == -1) paintjobid = 3;
  64547. if(!PlayerHasJob(playerid, JOB_MECHANIC))
  64548. {
  64549. if(PlayerData[playerid][pSpraycans] <= 0)
  64550. {
  64551. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough spraycans for this.");
  64552. }
  64553. if(VehicleInfo[vehicleid][vOwnerID] > 0 || VehicleInfo[vehicleid][vGang] >= 0)
  64554. {
  64555. VehicleInfo[vehicleid][vPaintjob] = paintjobid;
  64556. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET paintjob = %i WHERE id = %i", paintjobid, VehicleInfo[vehicleid][vID]);
  64557. mysql_tquery(connectionID, queryBuffer);
  64558. }
  64559. PlayerData[playerid][pSpraycans]--;
  64560. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET spraycans = %i WHERE uid = %i", PlayerData[playerid][pSpraycans], PlayerData[playerid][pID]);
  64561. mysql_tquery(connectionID, queryBuffer);
  64562. ShowActionBubble(playerid, "* %s uses their spraycan to spray their vehicle a different color.", GetRPName(playerid));
  64563. SendClientMessageEx(playerid, COLOR_WHITE, "* Vehicle resprayed. You have %i spraycans left.", PlayerData[playerid][pSpraycans]);
  64564. ChangeVehiclePaintjob(vehicleid, paintjobid);
  64565. PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0);
  64566. return 1;
  64567. }
  64568. if(PlayerHasJob(playerid, JOB_MECHANIC))
  64569. {
  64570. if(PlayerData[playerid][pMechanicSkill] < 5)
  64571. {
  64572. if(PlayerData[playerid][pSpraycans] <= 0)
  64573. {
  64574. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough spraycans for this.");
  64575. }
  64576. if(VehicleInfo[vehicleid][vOwnerID] > 0 || VehicleInfo[vehicleid][vGang] >= 0)
  64577. {
  64578. VehicleInfo[vehicleid][vPaintjob] = paintjobid;
  64579. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET paintjob = %i WHERE id = %i", paintjobid, VehicleInfo[vehicleid][vID]);
  64580. mysql_tquery(connectionID, queryBuffer);
  64581. }
  64582. PlayerData[playerid][pSpraycans]--;
  64583. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET spraycans = %i WHERE uid = %i", PlayerData[playerid][pSpraycans], PlayerData[playerid][pID]);
  64584. mysql_tquery(connectionID, queryBuffer);
  64585. ShowActionBubble(playerid, "* %s uses their spraycan to spray their vehicle a different color.", GetRPName(playerid));
  64586. SendClientMessageEx(playerid, COLOR_WHITE, "* Vehicle resprayed. You have %i spraycans left.", PlayerData[playerid][pSpraycans]);
  64587. ChangeVehiclePaintjob(vehicleid, paintjobid);
  64588. PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0);
  64589. return 1;
  64590. }
  64591. if(PlayerData[playerid][pComponents] <= 0)
  64592. {
  64593. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough components for this.");
  64594. }
  64595. if(VehicleInfo[vehicleid][vOwnerID] > 0 || VehicleInfo[vehicleid][vGang] >= 0)
  64596. {
  64597. VehicleInfo[vehicleid][vPaintjob] = paintjobid;
  64598. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET paintjob = %i WHERE id = %i", paintjobid, VehicleInfo[vehicleid][vID]);
  64599. mysql_tquery(connectionID, queryBuffer);
  64600. }
  64601. PlayerData[playerid][pComponents]--;
  64602. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET components = %i WHERE uid = %i", PlayerData[playerid][pComponents], PlayerData[playerid][pID]);
  64603. mysql_tquery(connectionID, queryBuffer);
  64604. ShowActionBubble(playerid, "* %s sprays the vehicle to a different color.", GetRPName(playerid));
  64605. SendClientMessageEx(playerid, COLOR_WHITE, "* Vehicle resprayed. You have %i components left.", PlayerData[playerid][pComponents]);
  64606. ChangeVehiclePaintjob(vehicleid, paintjobid);
  64607. PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0);
  64608. return 1;
  64609. }
  64610. return 1;
  64611. }
  64612. CMD:sellcar(playerid, params[])
  64613. {
  64614. new vehicleid = GetPlayerVehicleID(playerid), targetid, amount;
  64615. if(!vehicleid || !IsVehicleOwner(playerid, vehicleid))
  64616. {
  64617. return SendClientMessage(playerid, COLOR_GREY, "You are not inside any vehicle of yours.");
  64618. }
  64619. if(sscanf(params, "ui", targetid, amount))
  64620. {
  64621. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sellcar [playerid] [amount]");
  64622. }
  64623. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  64624. {
  64625. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  64626. }
  64627. if(targetid == playerid)
  64628. {
  64629. return SendClientMessage(playerid, COLOR_GREY, "You can't sell to yourself.");
  64630. }
  64631. if(amount < 1)
  64632. {
  64633. return SendClientMessage(playerid, COLOR_GREY, "You must specify an amount above zero.");
  64634. }
  64635. if(PlayerData[playerid][pCP] == CHECKPOINT_DROPCAR)
  64636. {
  64637. return SendClientMessage(playerid, COLOR_GREY, "You can't sell your vehicle unless you cancel your car delivery. (/killcp)");
  64638. }
  64639. PlayerData[targetid][pCarOffer] = playerid;
  64640. PlayerData[targetid][pCarOffered] = vehicleid;
  64641. PlayerData[targetid][pCarPrice] = amount;
  64642. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered you their %s for %s (/accept vehicle).", GetRPName(playerid), GetVehicleName(vehicleid), FormatNumber(amount));
  64643. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered %s to buy your %s for %s.", GetRPName(targetid), GetVehicleName(vehicleid), FormatNumber(amount));
  64644. return 1;
  64645. }
  64646. CMD:sellmycar(playerid, params[])
  64647. {
  64648. new vehicleid = GetPlayerVehicleID(playerid);
  64649. if(!vehicleid || !IsVehicleOwner(playerid, vehicleid))
  64650. {
  64651. return SendClientMessage(playerid, COLOR_GREY, "You are not inside any vehicle of yours.");
  64652. }
  64653. if(!IsPlayerInRangeOfPoint(playerid, 8.0, 542.0433, -1293.5909, 17.2422))
  64654. {
  64655. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the Grotti car dealership.");
  64656. }
  64657. new price = percent(GetVehicleValue(vehicleid), 35);
  64658. if(strcmp(params, "confirm", true) != 0)
  64659. {
  64660. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sellmycar [confirm]");
  64661. SendClientMessageEx(playerid, COLOR_SYNTAX, "This command permanently deletes your vehicle. You will receive %s back.", FormatNumber(price));
  64662. return 1;
  64663. }
  64664. GivePlayerCash(playerid, price);
  64665. SendClientMessageEx(playerid, COLOR_GREEN, "You have sold your %s to the dealership and received %s back.", GetVehicleName(vehicleid), FormatNumber(price));
  64666. Log_Write("log_property", "%s (uid: %i) sold their %s (id: %i) to the dealership for $%i", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID], price);
  64667. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM vehicles WHERE id = %i", VehicleInfo[vehicleid][vID]);
  64668. mysql_tquery(connectionID, queryBuffer);
  64669. DespawnVehicle(vehicleid, false);
  64670. return 1;
  64671. }
  64672. CMD:harvest(playerid, params[])
  64673. {
  64674. if(PlayerData[playerid][pJob] != JOB_FARMER && PlayerData[playerid][pSecondJob] != JOB_FARMER)
  64675. {
  64676. return SendClientMessage(playerid, COLOR_GREY, "You are not a Farmer!");
  64677. }
  64678. if(PlayerData[playerid][pCP] != CHECKPOINT_NONE)
  64679. {
  64680. return SendClientMessage(playerid, COLOR_GREY, "You must cancel your active checkpoint first. /cancelcp to cancel it.");
  64681. }
  64682. new vehicleid = GetPlayerVehicleID(playerid);
  64683. if(IsAFarmerCar(vehicleid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  64684. {
  64685. isharvesting[playerid] = 1;
  64686. GameTextForPlayer(playerid, "Proceed to the~n~Checkpoint", 5000, 3);
  64687. SendClientMessage(playerid, COLOR_AQUA, "Follow the checkpoints to harvest the crops.");
  64688. SetPlayerCheckpoint(playerid, -309.0990,-1381.1797,10.7049, 10);
  64689. PlayerData[playerid][pCP] = CHECKPOINT_FARMER;
  64690. Harvesting[playerid] = 1;
  64691. }
  64692. else return SendClientMessage(playerid, COLOR_GREY, "FARMER: You must be driving a farming vehicle!");
  64693. return 1;
  64694. }
  64695. CMD:mine(playerid, params[])
  64696. {
  64697. if(!PlayerHasJob(playerid, JOB_MINER))
  64698. {
  64699. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a Miner.");
  64700. }
  64701. if(PlayerData[playerid][pMiningTime] > 0)
  64702. {
  64703. return SendClientMessage(playerid, COLOR_GREY, "You are mining already. Wait until you are done.");
  64704. }
  64705. if(PlayerData[playerid][pMiningRock] > 0 && GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CARRY)
  64706. {
  64707. return SendClientMessage(playerid, COLOR_GREY, "You need to drop off your current rock first.");
  64708. }
  64709. if(!IsPlayerInMiningArea(playerid))
  64710. {
  64711. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the mining area.");
  64712. }
  64713. if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT)
  64714. {
  64715. return SendClientMessage(playerid, COLOR_GREY, "You must be onfoot in order to use this command.");
  64716. }
  64717. GameTextForPlayer(playerid, "~w~Mining...", 6000, 3);
  64718. ApplyAnimation(playerid, "BASEBALL", "BAT_4", 4.1, 1, 0, 0, 0, 0, 1);
  64719. DisablePlayerCheckpoint(playerid);
  64720. SetPlayerAttachedObject(playerid, 9, 337, 6);
  64721. PlayerData[playerid][pMiningTime] = 6;
  64722. return 1;
  64723. }
  64724. CMD:startsweeping(playerid, params[])
  64725. {
  64726. if(!PlayerHasJob(playerid, JOB_SWEEPER))
  64727. {
  64728. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a Street Sweeper.");
  64729. }
  64730. if(PlayerData[playerid][pSweeping])
  64731. {
  64732. return SendClientMessage(playerid, COLOR_GREY, "You are sweeping already. /stopsweeping to stop.");
  64733. }
  64734. if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 574)
  64735. {
  64736. return SendClientMessage(playerid, COLOR_GREY, "You are not sitting inside a Sweeper.");
  64737. }
  64738. PlayerData[playerid][pSweeping] = 1;
  64739. PlayerData[playerid][pSweepTime] = 30;
  64740. PlayerData[playerid][pSweepEarnings] = 0;
  64741. SendClientMessage(playerid, COLOR_WHITE, "* You are now sweeping. Drive around with your sweeper to earn money towards your paycheck.");
  64742. SendClientMessage(playerid, COLOR_WHITE, "* When you are finished your sweeping shift, use /stopsweeping in order to end your shift.");
  64743. return 1;
  64744. }
  64745. CMD:stopsweeping(playerid, params[])
  64746. {
  64747. if(!PlayerHasJob(playerid, JOB_SWEEPER))
  64748. {
  64749. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a Street Sweeper.");
  64750. }
  64751. if(!PlayerData[playerid][pSweeping])
  64752. {
  64753. return SendClientMessage(playerid, COLOR_GREY, "You are not sweeping right now.");
  64754. }
  64755. SendClientMessageEx(playerid, COLOR_AQUA, "* You are no longer sweeping. You earned a total of {00AA00}$%i{33CCFF} towards your paycheck during your shift.", PlayerData[playerid][pSweepEarnings]);
  64756. PlayerData[playerid][pSweeping] = 0;
  64757. PlayerData[playerid][pSweepTime] = 0;
  64758. PlayerData[playerid][pSweepEarnings] = 0;
  64759. return 1;
  64760. }
  64761. CMD:v(playerid, params[])
  64762. {
  64763. return callcmd::vip(playerid, params);
  64764. }
  64765. CMD:viplocker(playerid, params[])
  64766. {
  64767. if(PlayerData[playerid][pDonator] < 2)
  64768. {
  64769. return SendClientMessage(playerid, COLOR_GREY, "You need a donator package (Gold VIP+) to access this locker.");
  64770. }
  64771. if(!IsPlayerInRangeOfPoint(playerid, 4.0, 3088.6802,221.4168,1053.4829))
  64772. {
  64773. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the VIP Lounge.");
  64774. }
  64775. if(PlayerData[playerid][pDonator] == 2)
  64776. {
  64777. Dialog_Show(playerid, DIALOG_BLACKMARKET1, DIALOG_STYLE_LIST, "Gold VIP Locker", "Katana\nDeagle\nMp5", "Select", "Cancel");
  64778. }
  64779. else if(PlayerData[playerid][pDonator] == 3)
  64780. {
  64781. Dialog_Show(playerid, DIALOG_BLACKMARKET2, DIALOG_STYLE_LIST, "Legendary VIP Locker", "Katana\nDeagle\nMp5\nRifle\nAk47\nM4", "Select", "Cancel");
  64782. }
  64783. return 1;
  64784. }
  64785. CMD:vip(playerid, params[])
  64786. {
  64787. if(!PlayerData[playerid][pDonator] && PlayerData[playerid][pAdmin] > 2)
  64788. {
  64789. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you don't have a VIP subscription.");
  64790. }
  64791. if(isnull(params))
  64792. {
  64793. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /(v)ip [vip chat]");
  64794. }
  64795. if(PlayerData[playerid][pToggleVIP])
  64796. {
  64797. return SendClientMessage(playerid, COLOR_GREY, "You can't speak in the VIP chat as you have it toggled.");
  64798. }
  64799. foreach(new i : Player)
  64800. {
  64801. if(PlayerData[i][pDonator] > 0 && !PlayerData[i][pToggleVIP] && PlayerData[i][pAdmin] > JUNIOR_ADMIN)
  64802. {
  64803. SendClientMessageEx(i, COLOR_VIP, "* %s VIP %s: %s *", GetVIPRank(PlayerData[playerid][pDonator]), GetRPName(playerid), params);
  64804. }
  64805. }
  64806. return 1;
  64807. }
  64808. CMD:vipcolor(playerid, params[])
  64809. {
  64810. if(!PlayerData[playerid][pDonator])
  64811. {
  64812. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you don't have a VIP subscription.");
  64813. }
  64814. if(!PlayerData[playerid][pVIPColor])
  64815. {
  64816. PlayerData[playerid][pVIPColor] = 1;
  64817. SendClientMessage(playerid, COLOR_AQUA, "* You have enabled the VIP nametag color.");
  64818. }
  64819. else
  64820. {
  64821. PlayerData[playerid][pVIPColor] = 0;
  64822. SendClientMessage(playerid, COLOR_AQUA, "* You have disabled the VIP nametag color.");
  64823. }
  64824. return 1;
  64825. }
  64826. CMD:vipinvite(playerid, params[])
  64827. {
  64828. new targetid;
  64829. if(!PlayerData[playerid][pDonator])
  64830. {
  64831. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you don't have a VIP subscription.");
  64832. }
  64833. if((PlayerData[playerid][pVIPTime] - gettime()) < 259200)
  64834. {
  64835. return SendClientMessage(playerid, COLOR_GREY, "Your VIP subscription expires in less than 3 days. You can't do this now.");
  64836. }
  64837. if(sscanf(params, "u", targetid))
  64838. {
  64839. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /vipinvite [playerid]");
  64840. SendClientMessage(playerid, COLOR_SYNTAX, "This command grants a temporary VIP subscription which lasts one hour to a player of your choice.");
  64841. if(PlayerData[playerid][pVIPCooldown] > gettime()) {
  64842. SendClientMessageEx(playerid, COLOR_SYNTAX, "You can only use this command once every 24 hours. You have %i hours left until you can use it again.", (PlayerData[playerid][pVIPCooldown] - gettime()) / 3600);
  64843. } else {
  64844. SendClientMessage(playerid, COLOR_SYNTAX, "You can only use this command once every 24 hours. You currently have no cooldown for this command.");
  64845. }
  64846. return 1;
  64847. }
  64848. if(PlayerData[playerid][pVIPCooldown] > gettime())
  64849. {
  64850. return SendClientMessageEx(playerid, COLOR_GREY, "You have already used this command today. Please wait another %i hours.", (PlayerData[playerid][pVIPCooldown] - gettime()) / 3600);
  64851. }
  64852. if(!IsPlayerConnected(targetid))
  64853. {
  64854. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  64855. }
  64856. if(!PlayerData[targetid][pLogged])
  64857. {
  64858. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet.");
  64859. }
  64860. if(PlayerData[targetid][pDonator])
  64861. {
  64862. return SendClientMessage(playerid, COLOR_GREY, "That player already has a VIP subscription.");
  64863. }
  64864. PlayerData[targetid][pDonator] = PlayerData[playerid][pDonator];
  64865. PlayerData[targetid][pVIPTime] = gettime() + 10800;
  64866. PlayerData[playerid][pVIPCooldown] = gettime() + 86400;
  64867. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET vippackage = %i, viptime = %i WHERE uid = %i", PlayerData[targetid][pDonator], PlayerData[targetid][pVIPTime], PlayerData[targetid][pID]);
  64868. mysql_tquery(connectionID, queryBuffer);
  64869. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET vipcooldown = %i WHERE uid = %i", PlayerData[playerid][pVIPCooldown], PlayerData[playerid][pID]);
  64870. mysql_tquery(connectionID, queryBuffer);
  64871. SendClientMessageEx(targetid, COLOR_AQUA, "* %s has given you a temporary three hour {D909D9}%s{33CCFF} VIP package.", GetRPName(playerid), GetVIPRank(PlayerData[targetid][pDonator]));
  64872. SendClientMessageEx(playerid, COLOR_AQUA, "* You have given %s a temporary three hour {D909D9}%s{33CCFF} VIP package.", GetRPName(targetid), GetVIPRank(PlayerData[targetid][pDonator]));
  64873. Log_Write("log_vip", "%s VIP %s (uid: %i) has given %s (uid: %i) a temporary three hour package.", GetVIPRank(PlayerData[playerid][pDonator]), GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  64874. return 1;
  64875. }
  64876. CMD:vipinfo(playerid, params[])
  64877. {
  64878. if(!PlayerData[playerid][pDonator])
  64879. {
  64880. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you don't have a VIP subscription.");
  64881. }
  64882. SendClientMessageEx(playerid, COLOR_NAVYBLUE, "______ VIP Package ______");
  64883. SendClientMessageEx(playerid, COLOR_GREY2, "Your {D909D9}%s{C8C8C8} VIP subscription expires on %s.", GetVIPRank(PlayerData[playerid][pDonator]), GetDateFromTimestamp(PlayerData[playerid][pVIPTime], 4));
  64884. if(PlayerData[playerid][pVIPCooldown] > gettime())
  64885. {
  64886. new time = PlayerData[playerid][pVIPCooldown] - gettime();
  64887. if(time > 3600) {
  64888. SendClientMessageEx(playerid, COLOR_GREY2, "You will be able to use the /vipinvite command again in %i hours.", time / 3600);
  64889. } else {
  64890. SendClientMessageEx(playerid, COLOR_GREY2, "You will be able to use the /vipinvite command again in %i minutes.", time / 60);
  64891. }
  64892. }
  64893. else
  64894. {
  64895. SendClientMessageEx(playerid, COLOR_GREY2, "Your cooldown period for /vipinvite is over and you may use it again.");
  64896. }
  64897. return 1;
  64898. }
  64899. CMD:vipnumber(playerid, params[])
  64900. {
  64901. new number;
  64902. if(!PlayerData[playerid][pDonator])
  64903. {
  64904. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you don't have a VIP subscription.");
  64905. }
  64906. if(sscanf(params, "i", number))
  64907. {
  64908. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /vipnumber [phone number]");
  64909. SendClientMessage(playerid, COLOR_SYNTAX, "This command costs $10,000 and changes your phone number to your chosen one.");
  64910. return 1;
  64911. }
  64912. if(PlayerData[playerid][pCash] < 10000)
  64913. {
  64914. return SendClientMessage(playerid, COLOR_GREY, "You need at least $10,000 for pay for this.");
  64915. }
  64916. if(number == 0 || number == 911)
  64917. {
  64918. return SendClientMessage(playerid, COLOR_GREY, "Invalid number.");
  64919. }
  64920. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid FROM "#TABLE_USERS" WHERE phone = %i", number);
  64921. mysql_tquery(connectionID, queryBuffer, "OnPlayerBuyPhoneNumber", "ii", playerid, number);
  64922. return 1;
  64923. }
  64924. CMD:setfare(playerid, params[])
  64925. {
  64926. new amount;
  64927. if(!PlayerHasJob(playerid, JOB_TAXIDRIVER))
  64928. {
  64929. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a Taxi Driver.");
  64930. }
  64931. if(sscanf(params, "i", amount))
  64932. {
  64933. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setfare [amount]");
  64934. }
  64935. if(!(0 <= amount <= 500))
  64936. {
  64937. return SendClientMessage(playerid, COLOR_GREY, "The fare must range between $0 and $500.");
  64938. }
  64939. if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 420 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 438)
  64940. {
  64941. return SendClientMessage(playerid, COLOR_GREY, "You are not in a taxi type vehicle.");
  64942. }
  64943. if(gettime() - PlayerData[playerid][pLastFare] < 50)
  64944. {
  64945. return SendClientMessageEx(playerid, COLOR_GREY, "You can only speak in this channel every 50 seconds. Please wait %i more seconds.", 50 - (gettime() - PlayerData[playerid][pLastFare]));
  64946. }
  64947. if(amount == 0)
  64948. {
  64949. if(PlayerData[playerid][pTaxiFare] == 0)
  64950. {
  64951. return SendClientMessage(playerid, COLOR_GREY, "The fare is already set to zero.");
  64952. }
  64953. PlayerData[playerid][pTaxiFare] = 0;
  64954. SendClientMessage(playerid, COLOR_YELLOW, "* You have set the fare to $0 and went off duty.");
  64955. }
  64956. else
  64957. {
  64958. if(PlayerData[playerid][pTaxiFare] == amount)
  64959. {
  64960. return SendClientMessage(playerid, COLOR_GREY, "The fare is already set to this amount.");
  64961. }
  64962. PlayerData[playerid][pLastFare] = gettime();
  64963. PlayerData[playerid][pTaxiFare] = amount;
  64964. SendClientMessageToAllEx(COLOR_YELLOW, "* Taxi driver %s is now on duty, fare: $%i. /call taxi for a ride.", GetRPName(playerid), amount);
  64965. }
  64966. return 1;
  64967. }
  64968. CMD:createfaction(playerid, params[])
  64969. {
  64970. new type[12], name[48], type_id = -1;
  64971. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pFactionMod])
  64972. {
  64973. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  64974. }
  64975. if(sscanf(params, "s[12]s[48]", type, name))
  64976. {
  64977. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /createfaction [type] [name]");
  64978. SendClientMessage(playerid, COLOR_SYNTAX, "List of types: Police, Medic, News, Government, Hitman, Federal, Army");
  64979. return 1;
  64980. }
  64981. if(!strcmp(type, "police", true)) {
  64982. type_id = FACTION_POLICE;
  64983. } else if(!strcmp(type, "medic", true)) {
  64984. type_id = FACTION_MEDIC;
  64985. } else if(!strcmp(type, "news", true)) {
  64986. type_id = FACTION_NEWS;
  64987. } else if(!strcmp(type, "government", true)) {
  64988. type_id = FACTION_GOVERNMENT;
  64989. } else if(!strcmp(type, "hitman", true)) {
  64990. type_id = FACTION_HITMAN;
  64991. } else if(!strcmp(type, "federal", true)) {
  64992. type_id = FACTION_FEDERAL;
  64993. } else if(!strcmp(type, "army", true)) {
  64994. type_id = FACTION_ARMY;
  64995. }
  64996. if(type_id == -1)
  64997. {
  64998. return SendClientMessage(playerid, COLOR_GREY, "Invalid type.");
  64999. }
  65000. for(new i = 0; i < MAX_FACTIONS; i ++)
  65001. {
  65002. if(!FactionInfo[i][fType])
  65003. {
  65004. SetupFaction(i, name, type_id);
  65005. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has created a {F7A763}%s{FF6347} faction named '%s'.", GetRPName(playerid), factionTypes[type_id], name);
  65006. SendClientMessageEx(playerid, COLOR_WHITE, "* This faction's ID is %i. /editfaction to edit.", i);
  65007. return 1;
  65008. }
  65009. }
  65010. SendClientMessage(playerid, COLOR_GREY, "Faction slots are currently full. Ask developers to increase the internal limit.");
  65011. return 1;
  65012. }
  65013. CMD:editfaction(playerid, params[])
  65014. {
  65015. new factionid, option[12], param[48];
  65016. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pFactionMod])
  65017. {
  65018. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  65019. }
  65020. if(sscanf(params, "is[12]S()[48]", factionid, option, param))
  65021. {
  65022. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editfaction [factionid] [option]");
  65023. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Name, Shortname, Type, Color, RankCount, RankName, Skin, Paycheck, Leader, TurfTokens, Budget");
  65024. return 1;
  65025. }
  65026. if(!(0 <= factionid < MAX_FACTIONS) || FactionInfo[factionid][fType] == FACTION_NONE)
  65027. {
  65028. return SendClientMessage(playerid, COLOR_GREY, "Invalid faction.");
  65029. }
  65030. if(!strcmp(option, "name", true))
  65031. {
  65032. if(isnull(param))
  65033. {
  65034. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editfaction [factionid] [name] [text]");
  65035. }
  65036. strcpy(FactionInfo[factionid][fName], param, 48);
  65037. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_FACTIONS" SET name = '%e' WHERE id = %i", param, factionid);
  65038. mysql_tquery(connectionID, queryBuffer);
  65039. ReloadLockers(factionid);
  65040. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the name of faction ID %i to '%s'.", GetRPName(playerid), factionid, param);
  65041. }
  65042. else if(!strcmp(option, "shortname", true))
  65043. {
  65044. if(isnull(param) || strlen(param) > 24)
  65045. {
  65046. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editfaction [factionid] [shortname] [text]");
  65047. }
  65048. strcpy(FactionInfo[factionid][fShortName], param, 24);
  65049. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_FACTIONS" SET shortname = '%e' WHERE id = %i", param, factionid);
  65050. mysql_tquery(connectionID, queryBuffer);
  65051. ReloadLockers(factionid);
  65052. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the short name of faction ID %i to '%s'.", GetRPName(playerid), factionid, param);
  65053. }
  65054. else if(!strcmp(option, "type", true))
  65055. {
  65056. new type_id;
  65057. if(isnull(param))
  65058. {
  65059. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editfaction [factionid] [type] [option]");
  65060. SendClientMessage(playerid, COLOR_SYNTAX, "List of types: Police, Medic, News, Government, Hitman, Federal, Army");
  65061. return 1;
  65062. }
  65063. if(!strcmp(param, "police", true)) {
  65064. type_id = FACTION_POLICE;
  65065. } else if(!strcmp(param, "medic", true)) {
  65066. type_id = FACTION_MEDIC;
  65067. } else if(!strcmp(param, "news", true)) {
  65068. type_id = FACTION_NEWS;
  65069. } else if(!strcmp(param, "government", true)) {
  65070. type_id = FACTION_GOVERNMENT;
  65071. } else if(!strcmp(param, "hitman", true)) {
  65072. type_id = FACTION_HITMAN;
  65073. } else if(!strcmp(param, "federal", true)) {
  65074. type_id = FACTION_FEDERAL;
  65075. } else if(!strcmp(param, "army", true)) {
  65076. type_id = FACTION_ARMY;
  65077. }
  65078. if(type_id == -1)
  65079. {
  65080. return SendClientMessage(playerid, COLOR_GREY, "Invalid type.");
  65081. }
  65082. FactionInfo[factionid][fType] = type_id;
  65083. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_FACTIONS" SET type = %i WHERE id = %i", type_id, factionid);
  65084. mysql_tquery(connectionID, queryBuffer);
  65085. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the type of faction ID %i to %s.", GetRPName(playerid), factionid, factionTypes[type_id]);
  65086. }
  65087. else if(!strcmp(option, "color", true))
  65088. {
  65089. new color;
  65090. if(sscanf(param, "h", color))
  65091. {
  65092. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editfaction [factionid] [color] [0xRRGGBBAA]");
  65093. }
  65094. FactionInfo[factionid][fColor] = color & ~0xff;
  65095. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_FACTIONS" SET color = %i WHERE id = %i", FactionInfo[factionid][fColor], factionid);
  65096. mysql_tquery(connectionID, queryBuffer);
  65097. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the {%06x}color{FF6347} of faction ID %i.", GetRPName(playerid), color >>> 8, factionid);
  65098. }
  65099. else if(!strcmp(option, "rankcount", true))
  65100. {
  65101. new ranks;
  65102. if(sscanf(param, "i", ranks))
  65103. {
  65104. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editfaction [factionid] [rankcount] [amount]");
  65105. }
  65106. if(!(1 <= ranks <= MAX_FACTION_RANKS))
  65107. {
  65108. return SendClientMessageEx(playerid, COLOR_GREY, "The amount of ranks must range from 1 to %i.", MAX_FACTION_RANKS);
  65109. }
  65110. FactionInfo[factionid][fRankCount] = ranks;
  65111. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_FACTIONS" SET rankcount = %i WHERE id = %i", ranks, factionid);
  65112. mysql_tquery(connectionID, queryBuffer);
  65113. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the rank count of faction ID %i to %i.", GetRPName(playerid), factionid, ranks);
  65114. }
  65115. else if(!strcmp(option, "rankname", true))
  65116. {
  65117. new rankid, rank[32];
  65118. if(sscanf(param, "is[32]", rankid, rank))
  65119. {
  65120. SendClientMessage(playerid, COLOR_NAVYBLUE, "______ Rank Names ______");
  65121. for(new i = 0; i < FactionInfo[factionid][fRankCount]; i ++)
  65122. {
  65123. if(isnull(FactionRanks[factionid][i]))
  65124. SendClientMessageEx(playerid, COLOR_GREY2, "Rank %i: (empty)", i);
  65125. else
  65126. SendClientMessageEx(playerid, COLOR_GREY2, "Rank %i: %s", i, FactionRanks[factionid][i]);
  65127. }
  65128. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /editfaction [factionid] [rankname] [slot (0-%i)] [name]", FactionInfo[factionid][fRankCount] - 1);
  65129. }
  65130. if(!(0 <= rankid < FactionInfo[factionid][fRankCount]))
  65131. {
  65132. return SendClientMessage(playerid, COLOR_GREY, "Invalid rank.");
  65133. }
  65134. strcpy(FactionRanks[factionid][rankid], rank, 32);
  65135. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO factionranks VALUES(%i, %i, '%e') ON DUPLICATE KEY UPDATE name = '%e'", factionid, rankid, rank, rank);
  65136. mysql_tquery(connectionID, queryBuffer);
  65137. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set rank %i's name of faction ID %i to '%s'.", GetRPName(playerid), rankid, factionid, rank);
  65138. }
  65139. else if(!strcmp(option, "skin", true))
  65140. {
  65141. new slot, skinid;
  65142. if(sscanf(param, "ii", slot, skinid))
  65143. {
  65144. SendClientMessage(playerid, COLOR_NAVYBLUE, "______ Faction Skins ______");
  65145. for(new i = 0; i < MAX_FACTION_SKINS; i ++)
  65146. {
  65147. if(FactionInfo[factionid][fSkins][i] == 0)
  65148. SendClientMessageEx(playerid, COLOR_GREY2, "Skin %i: (none)", i + 1);
  65149. else
  65150. SendClientMessageEx(playerid, COLOR_GREY2, "Skin %i: %i", i + 1, FactionInfo[factionid][fSkins][i]);
  65151. }
  65152. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /editfaction [factionid] [skin] [slot (1-%i)] [skinid]", MAX_FACTION_SKINS);
  65153. }
  65154. if(!(1 <= slot <= MAX_FACTION_SKINS))
  65155. {
  65156. return SendClientMessage(playerid, COLOR_GREY, "Invalid slot.");
  65157. }
  65158. if(!(1 <= skinid <= 311))
  65159. {
  65160. return SendClientMessage(playerid, COLOR_GREY, "Invalid skin.");
  65161. }
  65162. slot--;
  65163. FactionInfo[factionid][fSkins][slot] = skinid;
  65164. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO factionskins VALUES(%i, %i, %i) ON DUPLICATE KEY UPDATE skinid = %i", factionid, slot, skinid, skinid);
  65165. mysql_tquery(connectionID, queryBuffer);
  65166. SendClientMessageEx(playerid, COLOR_WHITE, "* You have set the skin in slot %i to ID %i.", slot + 1, skinid);
  65167. }
  65168. else if(!strcmp(option, "paycheck", true))
  65169. {
  65170. new rankid, amount;
  65171. if(FactionInfo[factionid][fType] == FACTION_HITMAN)
  65172. {
  65173. return SendClientMessage(playerid, COLOR_GREY, "You can't set the paychecks for hitman factions.");
  65174. }
  65175. if(sscanf(param, "ii", rankid, amount))
  65176. {
  65177. SendClientMessage(playerid, COLOR_NAVYBLUE, "______ Rank Paychecks ______");
  65178. for(new i = 0; i < FactionInfo[factionid][fRankCount]; i ++)
  65179. {
  65180. if(isnull(FactionRanks[factionid][i]))
  65181. SendClientMessageEx(playerid, COLOR_GREY2, "Rank %i: (empty)", i);
  65182. else
  65183. SendClientMessageEx(playerid, COLOR_GREY2, "Rank %i: %s ($%i)", i, FactionRanks[factionid][i], FactionInfo[factionid][fPaycheck][i]);
  65184. }
  65185. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /editfaction [factionid] [paycheck] [slot (0-%i)] [amount]", FactionInfo[factionid][fRankCount] - 1);
  65186. }
  65187. if(!(0 <= rankid < FactionInfo[factionid][fRankCount]))
  65188. {
  65189. return SendClientMessage(playerid, COLOR_GREY, "Invalid rank.");
  65190. }
  65191. if(!(0 <= amount <= 100000))
  65192. {
  65193. return SendClientMessage(playerid, COLOR_GREY, "The amount must range from $0 to $100000.");
  65194. }
  65195. FactionInfo[factionid][fPaycheck][rankid] = amount;
  65196. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO factionpay VALUES(%i, %i, %i) ON DUPLICATE KEY UPDATE amount = %i", factionid, rankid, amount, amount);
  65197. mysql_tquery(connectionID, queryBuffer);
  65198. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set rank %i's paycheck of faction ID %i to $%i.", GetRPName(playerid), rankid, factionid, amount);
  65199. }
  65200. else if(!strcmp(option, "leader", true))
  65201. {
  65202. new leader[MAX_PLAYER_NAME];
  65203. if(sscanf(param, "s[24]", leader))
  65204. {
  65205. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editfaction [factionid] [leader] [name]");
  65206. SendClientMessage(playerid, COLOR_SYNTAX, "This only updates the text for the leader's name in /factions. Use /switchfaction to appoint someone as faction leader.");
  65207. return 1;
  65208. }
  65209. strcpy(FactionInfo[factionid][fLeader], leader, MAX_PLAYER_NAME);
  65210. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_FACTIONS" SET leader = '%e' WHERE id = %i", leader, factionid);
  65211. mysql_tquery(connectionID, queryBuffer);
  65212. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the leader of faction ID %i to %s.", GetRPName(playerid), factionid, leader);
  65213. }
  65214. else if(!strcmp(option, "locker", true))
  65215. {
  65216. SendClientMessage(playerid, COLOR_WHITE, "This option has been removed in favor of the dynamic locker system.");
  65217. SendClientMessage(playerid, COLOR_WHITE, "Use /dynamichelp for a list of commands related to dynamic lockers.");
  65218. }
  65219. else if(!strcmp(option, "turftokens", true))
  65220. {
  65221. new amount;
  65222. if(sscanf(param, "i", amount))
  65223. {
  65224. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editfaction [factionid] [turftokens] [amount]");
  65225. }
  65226. if(FactionInfo[factionid][fType] != FACTION_POLICE || FactionInfo[factionid][fType] != FACTION_FEDERAL || FactionInfo[factionid][fType] != FACTION_ARMY)
  65227. {
  65228. return SendClientMessage(playerid, COLOR_GREY, "You can only set the turf tokens for police factions.");
  65229. }
  65230. FactionInfo[factionid][fTurfTokens] = amount;
  65231. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_FACTIONS" SET turftokens = %i WHERE id = %i", amount, factionid);
  65232. mysql_tquery(connectionID, queryBuffer);
  65233. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the turf tokens of faction ID %i to %i.", GetRPName(playerid), factionid, amount);
  65234. }
  65235. else if(!strcmp(option, "budget", true))
  65236. {
  65237. new amount;
  65238. if(sscanf(param, "i", amount))
  65239. {
  65240. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editfaction [factionid] [budget] [amount (max 100k)]");
  65241. }
  65242. if(amount > 100000)
  65243. {
  65244. return SendClientMessage(playerid, COLOR_GREY, "Faction budget cannot be over $100,000!");
  65245. }
  65246. FactionInfo[factionid][fBudget] = amount;
  65247. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_FACTIONS" SET budget = %i WHERE id = %i", FactionInfo[factionid][fBudget], factionid);
  65248. mysql_tquery(connectionID, queryBuffer);
  65249. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set %s's faction budget to %i.", GetRPName(playerid), FactionInfo[factionid][fName], amount);
  65250. }
  65251. return 1;
  65252. }
  65253. CMD:purgefaction(playerid, params[])
  65254. {
  65255. new factionid;
  65256. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pFactionMod])
  65257. {
  65258. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  65259. }
  65260. if(sscanf(params, "i", factionid))
  65261. {
  65262. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /purgefaction [factionid]");
  65263. }
  65264. if(!(0 <= factionid < MAX_FACTIONS) || FactionInfo[factionid][fType] == FACTION_NONE)
  65265. {
  65266. return SendClientMessage(playerid, COLOR_GREY, "Invalid faction.");
  65267. }
  65268. foreach(new i : Player)
  65269. {
  65270. if(PlayerData[i][pFaction] == factionid)
  65271. {
  65272. SetPlayerFaction(i, -1);
  65273. SendClientMessageEx(i, COLOR_LIGHTRED, "The faction you were apart of has been purged by an administrator.");
  65274. }
  65275. }
  65276. strcpy(FactionInfo[factionid][fLeader], "No-one", MAX_PLAYER_NAME);
  65277. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET faction = -1, factionrank = 0, division = -1 WHERE faction = %i", factionid);
  65278. mysql_tquery(connectionID, queryBuffer);
  65279. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_FACTIONS" SET leader = 'No-one' WHERE id = %i", factionid);
  65280. mysql_tquery(connectionID, queryBuffer);
  65281. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has purged faction %s.", GetRPName(playerid), FactionInfo[factionid][fName]);
  65282. Log_Write("log_faction", "%s (uid: %i) has purged faction %s (id: %i).", GetRPName(playerid), PlayerData[playerid][pID], FactionInfo[factionid][fName], factionid);
  65283. return 1;
  65284. }
  65285. CMD:removefaction(playerid, params[])
  65286. {
  65287. new factionid;
  65288. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT)
  65289. {
  65290. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  65291. }
  65292. if(sscanf(params, "i", factionid))
  65293. {
  65294. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /removefaction [factionid]");
  65295. }
  65296. if(!(0 <= factionid < MAX_FACTIONS) || FactionInfo[factionid][fType] == FACTION_NONE)
  65297. {
  65298. return SendClientMessage(playerid, COLOR_GREY, "Invalid faction.");
  65299. }
  65300. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has deleted faction %s.", GetRPName(playerid), FactionInfo[factionid][fName]);
  65301. RemoveFaction(factionid);
  65302. Log_Write("log_faction", "%s (uid: %i) has deleted faction %s (id: %i).", GetRPName(playerid), PlayerData[playerid][pID], FactionInfo[factionid][fName], factionid);
  65303. return 1;
  65304. }
  65305. CMD:switchfaction(playerid, params[])
  65306. {
  65307. new targetid, factionid, rankid, leader;
  65308. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pFactionMod])
  65309. {
  65310. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  65311. }
  65312. if(sscanf(params, "uiI(-1)I(0)", targetid, factionid, rankid, leader))
  65313. {
  65314. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /switchfaction [playerid] [factionid (-1 = none)] [rank (optional)] [leader (0/1)]");
  65315. }
  65316. if(!IsPlayerConnected(targetid))
  65317. {
  65318. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  65319. }
  65320. if(!PlayerData[targetid][pLogged])
  65321. {
  65322. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet.");
  65323. }
  65324. if(!(-1 <= factionid < MAX_FACTIONS) || (factionid >= 0 && FactionInfo[factionid][fType] == FACTION_NONE))
  65325. {
  65326. return SendClientMessage(playerid, COLOR_GREY, "Invalid faction.");
  65327. }
  65328. if((factionid != -1 && !(-1 <= rankid < FactionInfo[factionid][fRankCount])))
  65329. {
  65330. return SendClientMessage(playerid, COLOR_GREY, "Invalid rank.");
  65331. }
  65332. if(factionid == -1)
  65333. {
  65334. SetPlayerFaction(targetid, -1);
  65335. SendClientMessageEx(targetid, COLOR_AQUA, "%s has removed you from your faction.", GetRPName(playerid));
  65336. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has removed %s from their faction.", GetRPName(playerid), GetRPName(targetid));
  65337. }
  65338. else
  65339. {
  65340. if(rankid == -1)
  65341. {
  65342. rankid = FactionInfo[factionid][fRankCount] - 1;
  65343. }
  65344. SetPlayerFaction(targetid, factionid, rankid, leader);
  65345. SendClientMessageEx(targetid, COLOR_AQUA, "%s has made you a {00AA00}%s{33CCFF} in %s.", GetRPName(playerid), FactionRanks[factionid][rankid], FactionInfo[factionid][fName]);
  65346. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has made %s a %s in %s.", GetRPName(playerid), GetRPName(targetid), FactionRanks[factionid][rankid], FactionInfo[factionid][fName]);
  65347. }
  65348. return 1;
  65349. }
  65350. CMD:factions(playerid, params[])
  65351. {
  65352. SendClientMessage(playerid, COLOR_GREEN, "*Old School Roleplay | Factions*");
  65353. for(new i = 0; i < MAX_FACTIONS; i ++)
  65354. {
  65355. if(FactionInfo[i][fType] != FACTION_NONE)
  65356. {
  65357. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT COUNT(*) FROM "#TABLE_USERS" WHERE faction = %i", i);
  65358. mysql_tquery(connectionID, queryBuffer, "OnPlayerListFactions", "ii", playerid, i);
  65359. }
  65360. }
  65361. return 1;
  65362. }
  65363. CMD:setfreq(playerid, params[])
  65364. {
  65365. new channel;
  65366. if(!PlayerData[playerid][pWalkieTalkie])
  65367. {
  65368. return SendClientMessage(playerid, COLOR_GREY, "You don't have a walkie talkie.");
  65369. }
  65370. if(sscanf(params, "i", channel))
  65371. {
  65372. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setfreq [freq]");
  65373. }
  65374. if(!(0 <= channel <= 9999999))
  65375. {
  65376. return SendClientMessage(playerid, COLOR_GREY, "The channel must range from 0 to 9999999.");
  65377. }
  65378. PlayerData[playerid][pChannel] = channel;
  65379. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET channel = %i WHERE uid = %i", channel, PlayerData[playerid][pID]);
  65380. mysql_tquery(connectionID, queryBuffer);
  65381. if(channel == 0)
  65382. {
  65383. SendClientMessage(playerid, COLOR_WHITE, "* You have set the channel to 0 and disabled your walkie talkie.");
  65384. }
  65385. else
  65386. {
  65387. SendClientMessageEx(playerid, COLOR_WHITE, "* Channel set to %i, use /wt to broadcast over this channel.", channel);
  65388. }
  65389. return 1;
  65390. }
  65391. CMD:wt(playerid, params[])
  65392. {
  65393. if(!PlayerData[playerid][pWalkieTalkie])
  65394. {
  65395. return SendClientMessage(playerid, COLOR_GREY, "You don't have a walkie talkie.");
  65396. }
  65397. if(isnull(params))
  65398. {
  65399. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /wt [walkie talkie]");
  65400. }
  65401. if(!PlayerData[playerid][pChannel])
  65402. {
  65403. return SendClientMessage(playerid, COLOR_GREY, "Your walkie talkie is not tuned into any channel. /channel to set one.");
  65404. }
  65405. if(PlayerData[playerid][pToggleWT])
  65406. {
  65407. return SendClientMessage(playerid, COLOR_GREY, "You can't speak in your walkie talkie as you have it toggled.");
  65408. }
  65409. if(PlayerData[playerid][pInjured])
  65410. {
  65411. return SendClientMessage(playerid, COLOR_GREY, "You cannot use /wt while dead.");
  65412. }
  65413. if(PlayerData[playerid][pCuffed])
  65414. {
  65415. return SendClientMessage(playerid, COLOR_GREY, "You cannot use this command while cuffed");
  65416. }
  65417. if(PlayerData[playerid][pTied])
  65418. {
  65419. return SendClientMessage(playerid, COLOR_GREY, "You cannot use this command while tied.");
  65420. }
  65421. foreach(new i : Player)
  65422. {
  65423. if(PlayerData[i][pWalkieTalkie] && PlayerData[i][pChannel] == PlayerData[playerid][pChannel] && !PlayerData[i][pToggleWT])
  65424. {
  65425. if(strlen(params) > MAX_SPLIT_LENGTH)
  65426. {
  65427. SendClientMessageEx(i, COLOR_WALKIETALKIE, "* [CH: %i] %s: %.*s... *", PlayerData[playerid][pChannel], GetRPName(playerid), MAX_SPLIT_LENGTH, params);
  65428. SendClientMessageEx(i, COLOR_WALKIETALKIE, "* [CH: %i] %s: ...%s *", PlayerData[playerid][pChannel], GetRPName(playerid), params[MAX_SPLIT_LENGTH]);
  65429. }
  65430. else
  65431. {
  65432. SendClientMessageEx(i, COLOR_WALKIETALKIE, "* [CH: %i] %s: %s *", PlayerData[playerid][pChannel], GetRPName(playerid), params);
  65433. }
  65434. }
  65435. }
  65436. SetPlayerBubbleText(playerid, 20.0, COLOR_WHITE, "[WT]: %s", params);
  65437. if(PlayerData[playerid][pBugged])
  65438. {
  65439. foreach(new i : Player)
  65440. {
  65441. if(GetFactionType(i) == FACTION_FEDERAL)
  65442. {
  65443. SendClientMessageEx(i, 0x9ACD3200, "(bug) %s says [WT]: %s", GetRPName(playerid), params);
  65444. }
  65445. }
  65446. }
  65447. ShowActionBubble(playerid, "* %s speaks into their walkie talkie.", GetRPName(playerid));
  65448. return 1;
  65449. }
  65450. CMD:g(playerid, params[])
  65451. {
  65452. new string[64];
  65453. if(isnull(params))
  65454. {
  65455. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /g [global chat]");
  65456. }
  65457. if(!enabledGlobal && PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  65458. {
  65459. return SendClientMessage(playerid, COLOR_GREY, "The global channel is disabled at the moment.");
  65460. }
  65461. if(PlayerData[playerid][pGlobalMuted])
  65462. {
  65463. return SendClientMessage(playerid, COLOR_GREY, "You are muted from speaking in this channel. /unmute to unmute yourself.");
  65464. }
  65465. if(PlayerData[playerid][pToggleGlobal])
  65466. {
  65467. return SendClientMessage(playerid, COLOR_GREY, "You can't speak in the global chat as you have it toggled.");
  65468. }
  65469. if(gettime() - PlayerData[playerid][pLastGlobal] < 3)
  65470. {
  65471. return SendClientMessageEx(playerid, COLOR_GREY, "You can only speak in this channel every 3 seconds. Please wait %i more seconds.", 3 - (gettime() - PlayerData[playerid][pLastGlobal]));
  65472. }
  65473. params[0] = toupper(params[0]);
  65474. if((!isnull(PlayerData[playerid][pCustomTitle]) && strcmp(PlayerData[playerid][pCustomTitle], "None", true) != 0) && PlayerData[playerid][pAdminHide] == 0) {
  65475. new color;
  65476. if(PlayerData[playerid][pCustomTColor] == -1 || PlayerData[playerid][pCustomTColor] == -256)
  65477. {
  65478. color = 0xC8C8C8FF;
  65479. }
  65480. else
  65481. {
  65482. color = PlayerData[playerid][pCustomTColor];
  65483. }
  65484. format(string, sizeof(string), "{%06x}%s{FFA500}", color >>> 8, PlayerData[playerid][pCustomTitle]);
  65485. }
  65486. else if(PlayerData[playerid][pAdmin] > 1 && PlayerData[playerid][pAdminHide] == 0) {
  65487. format(string, sizeof(string), "%s", GetAdminRank(playerid));
  65488. }
  65489. else if(PlayerData[playerid][pHelper] > 0) {
  65490. format(string, sizeof(string), "{33CCFF}%s{FFA500}", GetHelperRank(playerid));
  65491. }
  65492. else if(PlayerData[playerid][pFormerAdmin]) {
  65493. string = "{FF69B5}Former Admin{FFA500}";
  65494. }
  65495. else if(PlayerData[playerid][pDonator] > 0) {
  65496. format(string, sizeof(string), "{D909D9}%s VIP{FFA500}", GetVIPRank(PlayerData[playerid][pDonator]));
  65497. }
  65498. else if(PlayerData[playerid][pLevel] >= 3) {
  65499. format(string, sizeof(string), "Level %i Player", PlayerData[playerid][pLevel]);
  65500. }
  65501. else {
  65502. string = "Newbie";
  65503. }
  65504. foreach(new i : Player)
  65505. {
  65506. if(!PlayerData[i][pToggleGlobal])
  65507. {
  65508. if(strlen(params) > MAX_SPLIT_LENGTH)
  65509. {
  65510. SendClientMessageEx(i, COLOR_GLOBAL, "(( %s %s: %.*s...))", string, GetRPName(playerid), MAX_SPLIT_LENGTH, params);
  65511. SendClientMessageEx(i, COLOR_GLOBAL, "(( %s %s: ...%s ))", string, GetRPName(playerid), params[MAX_SPLIT_LENGTH]);
  65512. }
  65513. else
  65514. {
  65515. SendClientMessageEx(i, COLOR_GLOBAL, "(( %s %s: %s ))", string, GetRPName(playerid), params);
  65516. }
  65517. }
  65518. }
  65519. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  65520. {
  65521. PlayerData[playerid][pLastGlobal] = gettime();
  65522. }
  65523. return 1;
  65524. }
  65525. CMD:fc(playerid, params[])
  65526. {
  65527. if(isnull(params))
  65528. {
  65529. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /fc [faction chat]");
  65530. }
  65531. if(PlayerData[playerid][pFaction] == -1)
  65532. {
  65533. return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any faction at the moment.");
  65534. }
  65535. if(PlayerData[playerid][pToggleFaction])
  65536. {
  65537. return SendClientMessage(playerid, COLOR_GREY, "You can't speak in the faction chat as you have it toggled.");
  65538. }
  65539. if(PlayerData[playerid][pInjured])
  65540. {
  65541. return SendClientMessage(playerid, COLOR_GREY, "You can't speak in /fc if you're dead!");
  65542. }
  65543. if(PlayerData[playerid][pTied])
  65544. {
  65545. return SendClientMessage(playerid, COLOR_GREY, "You cant speak in /fc while tied.");
  65546. }
  65547. foreach(new i : Player)
  65548. {
  65549. if(PlayerData[i][pFaction] == PlayerData[playerid][pFaction] && !PlayerData[i][pToggleFaction])
  65550. {
  65551. if(strlen(params) > MAX_SPLIT_LENGTH)
  65552. {
  65553. SendClientMessageEx(i, COLOR_FACTIONCHAT, "(( %s %s: %.*s... ))", FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid), MAX_SPLIT_LENGTH, params);
  65554. SendClientMessageEx(i, COLOR_FACTIONCHAT, "(( %s %s: ...%s ))", FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid), params[MAX_SPLIT_LENGTH]);
  65555. }
  65556. else
  65557. {
  65558. SendClientMessageEx(i, COLOR_FACTIONCHAT, "(( %s %s: %s ))", FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid), params);
  65559. }
  65560. }
  65561. }
  65562. return 1;
  65563. }
  65564. CMD:crew(playerid, params[])
  65565. {
  65566. if(isnull(params))
  65567. {
  65568. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /crew [crew chat]");
  65569. }
  65570. if(PlayerData[playerid][pGang] == -1)
  65571. {
  65572. return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any gang at the moment.");
  65573. }
  65574. if(PlayerData[playerid][pCrew] == -1)
  65575. {
  65576. return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any crew in your gang.");
  65577. }
  65578. foreach(new i : Player)
  65579. {
  65580. if(PlayerData[i][pGang] == PlayerData[playerid][pGang] && PlayerData[i][pCrew] == PlayerData[playerid][pCrew])
  65581. {
  65582. if(strlen(params) > MAX_SPLIT_LENGTH)
  65583. {
  65584. SendClientMessageEx(i, COLOR_LIGHTORANGE, "* [%s] %s %s: %.*s... *", GangCrews[PlayerData[playerid][pGang]][PlayerData[playerid][pCrew]], GangRanks[PlayerData[playerid][pGang]][PlayerData[playerid][pGangRank]], GetRPName(playerid), MAX_SPLIT_LENGTH, params);
  65585. SendClientMessageEx(i, COLOR_LIGHTORANGE, "* [%s] %s %s: ...%s *", GangCrews[PlayerData[playerid][pGang]][PlayerData[playerid][pCrew]], GangRanks[PlayerData[playerid][pGang]][PlayerData[playerid][pGangRank]], GetRPName(playerid), params[MAX_SPLIT_LENGTH]);
  65586. }
  65587. else
  65588. {
  65589. SendClientMessageEx(i, COLOR_LIGHTORANGE, "* [%s] %s %s: %s *", GangCrews[PlayerData[playerid][pGang]][PlayerData[playerid][pCrew]], GangRanks[PlayerData[playerid][pGang]][PlayerData[playerid][pGangRank]], GetRPName(playerid), params);
  65590. }
  65591. }
  65592. }
  65593. return 1;
  65594. }
  65595. CMD:div(playerid, params[])
  65596. {
  65597. if(isnull(params))
  65598. {
  65599. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /div [division chat]");
  65600. }
  65601. if(PlayerData[playerid][pFaction] == -1)
  65602. {
  65603. return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any faction at the moment.");
  65604. }
  65605. if(PlayerData[playerid][pDivision] == -1)
  65606. {
  65607. return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any divisions in your faction.");
  65608. }
  65609. foreach(new i : Player)
  65610. {
  65611. if(PlayerData[i][pFaction] == PlayerData[playerid][pFaction] && PlayerData[i][pDivision] == PlayerData[playerid][pDivision])
  65612. {
  65613. if(strlen(params) > MAX_SPLIT_LENGTH)
  65614. {
  65615. SendClientMessageEx(i, COLOR_LIGHTORANGE, "* [%s] %s %s: %.*s... *", FactionDivisions[PlayerData[playerid][pFaction]][PlayerData[playerid][pDivision]], FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid), MAX_SPLIT_LENGTH, params);
  65616. SendClientMessageEx(i, COLOR_LIGHTORANGE, "* [%s] %s %s: ...%s *", FactionDivisions[PlayerData[playerid][pFaction]][PlayerData[playerid][pDivision]], FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid), params[MAX_SPLIT_LENGTH]);
  65617. }
  65618. else
  65619. {
  65620. SendClientMessageEx(i, COLOR_LIGHTORANGE, "* [%s] %s %s: %s *", FactionDivisions[PlayerData[playerid][pFaction]][PlayerData[playerid][pDivision]], FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid), params);
  65621. }
  65622. }
  65623. }
  65624. return 1;
  65625. }
  65626. CMD:r(playerid, params[])
  65627. {
  65628. return callcmd::radio(playerid, params);
  65629. }
  65630. CMD:radio(playerid, params[])
  65631. {
  65632. if(isnull(params))
  65633. {
  65634. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /(r)adio [faction radio]");
  65635. }
  65636. if(PlayerData[playerid][pFaction] == -1)
  65637. {
  65638. return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any faction at the moment.");
  65639. }
  65640. if(PlayerData[playerid][pToggleRadio])
  65641. {
  65642. return SendClientMessage(playerid, COLOR_GREY, "You can't speak in your radio as you have it toggled.");
  65643. }
  65644. if(PlayerData[playerid][pInjured])
  65645. {
  65646. return SendClientMessage(playerid, COLOR_GREY, "You can't speak in /r if you're dead!");
  65647. }
  65648. if(PlayerData[playerid][pTied])
  65649. {
  65650. return SendClientMessage(playerid, COLOR_GREY, "You can't speak in /r while tied.");
  65651. }
  65652. foreach(new i : Player)
  65653. {
  65654. if((PlayerData[i][pFaction] == PlayerData[playerid][pFaction] && !PlayerData[i][pToggleRadio]) || (PlayerData[i][pPoliceScanner] && PlayerData[i][pScannerOn] && IsEmergencyFaction(playerid)))
  65655. {
  65656. new color = (FactionInfo[PlayerData[playerid][pFaction]][fType] == FACTION_MEDIC) ? (COLOR_DOCTOR) : (COLOR_OLDSCHOOL);
  65657. if(strlen(params) > MAX_SPLIT_LENGTH)
  65658. {
  65659. if(PlayerData[playerid][pDivision] == -1)
  65660. {
  65661. SendClientMessageEx(i, color, "* %s %s: %.*s... *", FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid), MAX_SPLIT_LENGTH, params);
  65662. SendClientMessageEx(i, color, "* %s %s: ...%s *", FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid), params[MAX_SPLIT_LENGTH]);
  65663. }
  65664. else
  65665. {
  65666. SendClientMessageEx(i, color, "* [%s] %s %s: %.*s... *", FactionDivisions[PlayerData[playerid][pFaction]][PlayerData[playerid][pDivision]], FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid), MAX_SPLIT_LENGTH, params);
  65667. SendClientMessageEx(i, color, "* [%s] %s %s: ...%s *", FactionDivisions[PlayerData[playerid][pFaction]][PlayerData[playerid][pDivision]], FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid), params[MAX_SPLIT_LENGTH]);
  65668. }
  65669. }
  65670. else
  65671. {
  65672. if(PlayerData[playerid][pDivision] == -1)
  65673. {
  65674. SendClientMessageEx(i, color, "* %s %s: %s *", FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid), params);
  65675. }
  65676. else
  65677. {
  65678. SendClientMessageEx(i, color, "* [%s] %s %s: %s *", FactionDivisions[PlayerData[playerid][pFaction]][PlayerData[playerid][pDivision]], FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid), params);
  65679. }
  65680. }
  65681. if((PlayerData[i][pPoliceScanner] && PlayerData[i][pScannerOn]) && random(100) <= 3)
  65682. {
  65683. SendProximityMessage(i, 20.0, COLOR_PURPLE, "* %s's police scanner would shoot a spark and short out.", GetRPName(i));
  65684. SendClientMessage(i, COLOR_GREY2, "Your police scanner shorted out and is now broken.");
  65685. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET policescanner = 0, scanneron = 0 WHERE uid = %i", PlayerData[i][pID]);
  65686. mysql_tquery(connectionID, queryBuffer);
  65687. PlayerData[i][pPoliceScanner] = 0;
  65688. PlayerData[i][pScannerOn] = 0;
  65689. }
  65690. }
  65691. }
  65692. SetPlayerBubbleText(playerid, 20.0, COLOR_WHITE, "[Radio]: %s", params);
  65693. return 1;
  65694. }
  65695. CMD:d(playerid, params[])
  65696. {
  65697. new header[128];
  65698. if(isnull(params))
  65699. {
  65700. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /d [department radio]");
  65701. }
  65702. if(PlayerData[playerid][pFaction] == -1)
  65703. {
  65704. return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any faction at the moment.");
  65705. }
  65706. if(PlayerData[playerid][pToggleRadio])
  65707. {
  65708. return SendClientMessage(playerid, COLOR_GREY, "You can't speak in your radio as you have it toggled.");
  65709. }
  65710. if(PlayerData[playerid][pInjured])
  65711. {
  65712. return SendClientMessage(playerid, COLOR_GREY, "You can't speak in /d if you're dead!");
  65713. }
  65714. if(PlayerData[playerid][pTied])
  65715. {
  65716. return SendClientMessage(playerid, COLOR_GREY, "You cannot use this command while tied.");
  65717. }
  65718. if(PlayerData[playerid][pCuffed])
  65719. {
  65720. return SendClientMessage(playerid, COLOR_GREY, "You cannot use this command while cuffed.");
  65721. }
  65722. if(!strcmp(FactionInfo[PlayerData[playerid][pFaction]][fShortName], "None", true))
  65723. {
  65724. if(PlayerData[playerid][pDivision] == -1)
  65725. {
  65726. format(header, sizeof(header), "(%s) %s %s", FactionInfo[PlayerData[playerid][pFaction]][fName], FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid));
  65727. }
  65728. else
  65729. {
  65730. format(header, sizeof(header), "(%s) [%s] %s %s", FactionInfo[PlayerData[playerid][pFaction]][fName], FactionDivisions[PlayerData[playerid][pFaction]][PlayerData[playerid][pDivision]], FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid));
  65731. }
  65732. }
  65733. else
  65734. {
  65735. if(PlayerData[playerid][pDivision] == -1)
  65736. {
  65737. format(header, sizeof(header), "(%s) %s %s", FactionInfo[PlayerData[playerid][pFaction]][fShortName], FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid));
  65738. }
  65739. else
  65740. {
  65741. format(header, sizeof(header), "(%s) [%s] %s %s", FactionInfo[PlayerData[playerid][pFaction]][fShortName], FactionDivisions[PlayerData[playerid][pFaction]][PlayerData[playerid][pDivision]], FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid));
  65742. }
  65743. }
  65744. switch(FactionInfo[PlayerData[playerid][pFaction]][fType])
  65745. {
  65746. case FACTION_POLICE, FACTION_MEDIC, FACTION_GOVERNMENT, FACTION_FEDERAL, FACTION_ARMY:
  65747. {
  65748. foreach(new i : Player)
  65749. {
  65750. if((PlayerData[i][pPoliceScanner] && PlayerData[i][pScannerOn]) || ((!PlayerData[i][pToggleRadio]) && (GetFactionType(i) == FACTION_POLICE || GetFactionType(i) == FACTION_MEDIC || GetFactionType(i) == FACTION_GOVERNMENT || GetFactionType(i) == FACTION_FEDERAL || GetFactionType(i) == FACTION_ARMY)))
  65751. {
  65752. if(strlen(params) > MAX_SPLIT_LENGTH)
  65753. {
  65754. SendClientMessageEx(i, COLOR_YELLOW, "* %s: %.*s... *", header, MAX_SPLIT_LENGTH, params);
  65755. SendClientMessageEx(i, COLOR_YELLOW, "* %s: ...%s *", header, params[MAX_SPLIT_LENGTH]);
  65756. }
  65757. else
  65758. {
  65759. SendClientMessageEx(i, COLOR_YELLOW, "* %s: %s *", header, params);
  65760. }
  65761. if((PlayerData[i][pPoliceScanner] && PlayerData[i][pScannerOn]) && random(100) <= 3)
  65762. {
  65763. SendProximityMessage(i, 20.0, COLOR_PURPLE, "* %s's police scanner would shoot a spark and short out.", GetRPName(i));
  65764. SendClientMessage(i, COLOR_GREY2, "Your police scanner shorted out and is now broken.");
  65765. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET policescanner = 0, scanneron = 0 WHERE uid = %i", PlayerData[i][pID]);
  65766. mysql_tquery(connectionID, queryBuffer);
  65767. PlayerData[i][pPoliceScanner] = 0;
  65768. PlayerData[i][pScannerOn] = 0;
  65769. }
  65770. }
  65771. }
  65772. }
  65773. default:
  65774. {
  65775. SendClientMessage(playerid, COLOR_GREY, "Your faction is not authorized to speak in department radio.");
  65776. }
  65777. }
  65778. SetPlayerBubbleText(playerid, 20.0, COLOR_WHITE, "[Radio]: %s", params);
  65779. return 1;
  65780. }
  65781. CMD:faction(playerid, params[])
  65782. {
  65783. new targetid, option[14], param[128];
  65784. if(PlayerData[playerid][pFaction] == -1)
  65785. {
  65786. return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any faction at the moment.");
  65787. }
  65788. if(sscanf(params, "s[14]S()[128]", option, param))
  65789. {
  65790. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /faction [option]");
  65791. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: MOTD, Invite, Kick, Rank, Roster, Online, Quit, Offlinekick");
  65792. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Leadership, Respawncars, Edit");
  65793. return 1;
  65794. }
  65795. if(!strcmp(option, "motd", true))
  65796. {
  65797. if(!PlayerData[playerid][pFactionLeader])
  65798. {
  65799. return SendClientMessageEx(playerid, COLOR_YELLOW, "* Faction MOTD: %s", FactionInfo[PlayerData[playerid][pFaction]][fMOTD]);
  65800. }
  65801. if(isnull(param))
  65802. {
  65803. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /faction [motd] [text ('none' to reset)]");
  65804. SendClientMessageEx(playerid, COLOR_SYNTAX, "Current MOTD: %s", FactionInfo[PlayerData[playerid][pFaction]][fMOTD]);
  65805. return 1;
  65806. }
  65807. strcpy(FactionInfo[PlayerData[playerid][pFaction]][fMOTD], param, 128);
  65808. SendClientMessageEx(playerid, COLOR_AQUA, "You have changed the MOTD for your faction.");
  65809. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_FACTIONS" SET motd = '%e' WHERE id = %i", param, PlayerData[playerid][pFaction]);
  65810. mysql_tquery(connectionID, queryBuffer);
  65811. }
  65812. if(!strcmp(option, "edit", true))
  65813. {
  65814. callcmd::factionpay(playerid, "edit");
  65815. }
  65816. else if(!strcmp(option, "invite", true))
  65817. {
  65818. if(!PlayerData[playerid][pFactionLeader])
  65819. {
  65820. return SendClientMessage(playerid, COLOR_GREY, "You don't have permission to invite members to your faction.");
  65821. }
  65822. if(sscanf(param, "u", targetid))
  65823. {
  65824. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /faction [invite] [playerid]");
  65825. }
  65826. if(!IsPlayerConnected(targetid))
  65827. {
  65828. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  65829. }
  65830. if(PlayerData[targetid][pFaction] != -1)
  65831. {
  65832. return SendClientMessage(playerid, COLOR_GREY, "That player is already apart of a faction.");
  65833. }
  65834. if(PlayerData[targetid][pGang] >= 0 && GetFactionType(playerid) != FACTION_HITMAN)
  65835. {
  65836. return SendClientMessage(playerid, COLOR_GREY, "That player is apart of a gang and therefore can't join a faction.");
  65837. }
  65838. if(PlayerData[targetid][pGang] >= 0 && GetFactionType(playerid) != FACTION_FEDERAL)
  65839. {
  65840. return SendClientMessage(playerid, COLOR_GREY, "That player is apart of a gang and therefore can't join a faction.");
  65841. }
  65842. if(PlayerData[targetid][pGang] >= 0 && GetFactionType(playerid) != FACTION_NEWS)
  65843. {
  65844. return SendClientMessage(playerid, COLOR_GREY, "That player is apart of a gang and therefore can't join a faction.");
  65845. }
  65846. PlayerData[targetid][pFactionOffer] = playerid;
  65847. PlayerData[targetid][pFactionOffered] = PlayerData[playerid][pFaction];
  65848. SendClientMessageEx(targetid, COLOR_AQUA, "* %s has invited you to join {00AA00}%s{33CCFF} (/accept faction).", GetRPName(playerid), FactionInfo[PlayerData[playerid][pFaction]][fName]);
  65849. SendClientMessageEx(playerid, COLOR_AQUA, "* You have invited %s to join your faction.", GetRPName(targetid));
  65850. }
  65851. else if(!strcmp(option, "kick", true))
  65852. {
  65853. if(!PlayerData[playerid][pFactionLeader])
  65854. {
  65855. return SendClientMessage(playerid, COLOR_GREY, "You don't have permission to kick members from your faction.");
  65856. }
  65857. if(sscanf(param, "u", targetid))
  65858. {
  65859. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /faction [kick] [playerid]");
  65860. }
  65861. if(!IsPlayerConnected(targetid))
  65862. {
  65863. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  65864. }
  65865. if(PlayerData[targetid][pFaction] != PlayerData[playerid][pFaction])
  65866. {
  65867. return SendClientMessage(playerid, COLOR_GREY, "That player is not apart of your faction.");
  65868. }
  65869. /*if(PlayerData[targetid][pFactionRank] > PlayerData[playerid][pFactionRank])
  65870. {
  65871. return SendClientMessage(playerid, COLOR_GREY, "That player has a higher rank than you.");
  65872. }*/
  65873. Log_Write("log_faction", "%s (uid: %i) kicked %s (uid: %i) from %s (id: %i) as rank %s (%i).", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], FactionInfo[PlayerData[playerid][pFaction]][fName], PlayerData[playerid][pFaction], FactionRanks[PlayerData[targetid][pFaction]][PlayerData[targetid][pFactionRank]], PlayerData[targetid][pFactionRank]);
  65874. SetPlayerFaction(targetid, -1);
  65875. RemovePlayerFromVehicle(playerid);
  65876. SendClientMessageEx(targetid, COLOR_AQUA, "%s has kicked you from the faction.", GetRPName(playerid));
  65877. SendClientMessageEx(playerid, COLOR_AQUA, "You have kicked %s from your faction.", GetRPName(targetid));
  65878. if(PlayerData[targetid][pSpawnSelect] == 2)
  65879. {
  65880. PlayerData[targetid][pSpawnSelect] = 0;
  65881. }
  65882. }
  65883. else if(!strcmp(option, "rank", true))
  65884. {
  65885. new rankid;
  65886. if(!PlayerData[playerid][pFactionLeader])
  65887. {
  65888. return SendClientMessage(playerid, COLOR_GREY, "You don't have permission to use this command.");
  65889. }
  65890. if(sscanf(param, "ui", targetid, rankid))
  65891. {
  65892. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /faction [rank] [playerid] [rankid (0-%i)]", FactionInfo[PlayerData[playerid][pFaction]][fRankCount] - 1);
  65893. }
  65894. if(!IsPlayerConnected(targetid))
  65895. {
  65896. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  65897. }
  65898. if(rankid < 0 || rankid >= FactionInfo[PlayerData[playerid][pFaction]][fRankCount])
  65899. {
  65900. return SendClientMessage(playerid, COLOR_GREY, "Invalid rank.");
  65901. }
  65902. if(PlayerData[targetid][pFaction] != PlayerData[playerid][pFaction])
  65903. {
  65904. return SendClientMessage(playerid, COLOR_GREY, "That player is not apart of your faction.");
  65905. }
  65906. /*if(PlayerData[targetid][pFactionRank] > PlayerData[playerid][pFactionRank])
  65907. {
  65908. return SendClientMessage(playerid, COLOR_GREY, "That player has a higher rank than you.");
  65909. }*/
  65910. PlayerData[targetid][pFactionRank] = rankid;
  65911. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET factionrank = %i WHERE uid = %i", rankid, PlayerData[targetid][pID]);
  65912. mysql_tquery(connectionID, queryBuffer);
  65913. SendClientMessageEx(targetid, COLOR_AQUA, "%s has set your rank to {00AA00}%s{33CCFF} (%i).", GetRPName(playerid), FactionRanks[PlayerData[playerid][pFaction]][rankid], rankid);
  65914. SendClientMessageEx(playerid, COLOR_AQUA, "You have set %s's rank to {00AA00}%s{33CCFF} (%i).", GetRPName(targetid), FactionRanks[PlayerData[playerid][pFaction]][rankid], rankid);
  65915. Log_Write("log_faction", "%s (uid: %i) has set %s's (uid: %i) rank in %s (id: %i) to %s (%i).", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], FactionInfo[PlayerData[playerid][pFaction]][fName], PlayerData[playerid][pFaction], FactionRanks[PlayerData[playerid][pFaction]][rankid], rankid);
  65916. }
  65917. else if(!strcmp(option, "leadership", true))
  65918. {
  65919. if(!PlayerData[playerid][pFactionLeader])
  65920. {
  65921. return SendClientMessage(playerid, COLOR_GREY, "You don't have permission to use this command.");
  65922. }
  65923. if(sscanf(param, "u", targetid))
  65924. {
  65925. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /faction [leadership] [playerid]");
  65926. SendClientMessage(playerid, COLOR_SYNTAX, "This command grants or revokes a fellow faction member's leadership flags.");
  65927. return 1;
  65928. }
  65929. if(!IsPlayerConnected(targetid))
  65930. {
  65931. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  65932. }
  65933. if(PlayerData[targetid][pFaction] != PlayerData[playerid][pFaction])
  65934. {
  65935. return SendClientMessage(playerid, COLOR_GREY, "That player is not apart of your faction.");
  65936. }
  65937. if(!PlayerData[targetid][pFactionLeader])
  65938. {
  65939. PlayerData[targetid][pFactionLeader] = 1;
  65940. SendClientMessageEx(targetid, COLOR_AQUA, "%s has {00AA00}granted{33CCFF} you the leadership flags to the faction.", GetRPName(playerid));
  65941. SendClientMessageEx(playerid, COLOR_AQUA, "You have {00AA00}granted{33CCFF} %s the leadership flags to your faction.", GetRPName(targetid));
  65942. Log_Write("log_faction", "%s (uid: %i) granted leadership flags to %s (uid: %i).", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  65943. }
  65944. else
  65945. {
  65946. PlayerData[targetid][pFactionLeader] = 0;
  65947. SendClientMessageEx(targetid, COLOR_AQUA, "%s has {FF6347}revoked{33CCFF} your leadership flags to the faction.", GetRPName(playerid));
  65948. SendClientMessageEx(playerid, COLOR_AQUA, "You have {FF6347}revoked{33CCFF} %s's leadership flags to your faction.", GetRPName(targetid));
  65949. Log_Write("log_faction", "%s (uid: %i) revoked leadership flags from %s (uid: %i).", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  65950. }
  65951. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET factionleader = %i WHERE uid = %i", PlayerData[targetid][pFactionLeader], PlayerData[targetid][pID]);
  65952. mysql_tquery(connectionID, queryBuffer);
  65953. }
  65954. else if(!strcmp(option, "roster", true))
  65955. {
  65956. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT username, lastlogin, factionrank FROM "#TABLE_USERS" WHERE faction = %i ORDER BY factionrank DESC", PlayerData[playerid][pFaction]);
  65957. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_FACTION_ROSTER, playerid);
  65958. }
  65959. else if(!strcmp(option, "online", true))
  65960. {
  65961. callcmd::fmembers(playerid, "\1");
  65962. }
  65963. else if(!strcmp(option, "quit", true))
  65964. {
  65965. if(isnull(param) || strcmp(param, "confirm", true) != 0)
  65966. {
  65967. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /faction [quit] [confirm]");
  65968. }
  65969. SendClientMessageEx(playerid, COLOR_AQUA, "You have quit %s as a {00AA00}%s{33CCFF} (%i).", FactionInfo[PlayerData[playerid][pFaction]][fName], FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], PlayerData[playerid][pFactionRank]);
  65970. Log_Write("log_faction", "%s (uid: %i) has quit %s (id: %i) has rank %s (%i).", GetPlayerNameEx(playerid), PlayerData[playerid][pID], FactionInfo[PlayerData[playerid][pFaction]][fName], PlayerData[playerid][pFaction], FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], PlayerData[playerid][pFactionRank]);
  65971. SetPlayerFaction(playerid, -1);
  65972. RemovePlayerFromVehicle(playerid);
  65973. }
  65974. else if(!strcmp(option, "offlinekick", true))
  65975. {
  65976. new username[MAX_PLAYER_NAME];
  65977. if(!PlayerData[playerid][pFactionLeader])
  65978. {
  65979. return SendClientMessage(playerid, COLOR_GREY, "You don't have permission to use this command.");
  65980. }
  65981. if(sscanf(param, "s[24]", username))
  65982. {
  65983. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /faction [offlinekick] [username]");
  65984. }
  65985. if(IsPlayerOnline(username))
  65986. {
  65987. return SendClientMessage(playerid, COLOR_GREY, "That player is already online and logged in. Use '/faction kick' instead.");
  65988. }
  65989. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid, faction, factionrank FROM "#TABLE_USERS" WHERE username = '%e'", username);
  65990. mysql_tquery(connectionID, queryBuffer, "OnPlayerOfflineKickFaction", "is", playerid, username);
  65991. }
  65992. else if(!strcmp(option, "respawncars", true))
  65993. {
  65994. if(PlayerData[playerid][pFactionRank] < FactionInfo[PlayerData[playerid][pFaction]][fRankCount] - 2)
  65995. {
  65996. return SendClientMessageEx(playerid, COLOR_GREY, "You need to be at least rank %i+ to use this command.", FactionInfo[PlayerData[playerid][pFaction]][fRankCount] - 2);
  65997. }
  65998. foreach(new i: Vehicle)
  65999. {
  66000. if(!IsVehicleOccupied(i) && VehicleInfo[i][vFactionType] == FactionInfo[PlayerData[playerid][pFaction]][fType])
  66001. {
  66002. SetVehicleToRespawn(i);
  66003. }
  66004. }
  66005. SendFactionMessage(PlayerData[playerid][pFaction], COLOR_FACTIONCHAT, "(( %s %s has respawned all unoccupied faction vehicles. ))", FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid));
  66006. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] has respawned their faction vehicles.", GetRPName(playerid), playerid);
  66007. }
  66008. return 1;
  66009. }
  66010. CMD:division(playerid, params[])
  66011. {
  66012. new targetid, divisionid, option[10], param[32];
  66013. if(PlayerData[playerid][pFaction] == -1)
  66014. {
  66015. return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any faction at the moment.");
  66016. }
  66017. if(FactionInfo[PlayerData[playerid][pFaction]][fType] == FACTION_HITMAN)
  66018. {
  66019. return SendClientMessage(playerid, COLOR_GREY, "Hitman factions do not have access to the division system.");
  66020. }
  66021. if(sscanf(params, "s[10]S()[32]", option, param))
  66022. {
  66023. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /division [option]");
  66024. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Create, Remove, List, Assign, Kick");
  66025. return 1;
  66026. }
  66027. if(!strcmp(option, "create", true))
  66028. {
  66029. if(!PlayerData[playerid][pFactionLeader])
  66030. {
  66031. return SendClientMessage(playerid, COLOR_GREY, "You don't have permission to use this command.");
  66032. }
  66033. if(isnull(param))
  66034. {
  66035. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /division [create] [name]");
  66036. }
  66037. for(new i = 0; i < MAX_FACTION_DIVISIONS; i ++)
  66038. {
  66039. if(isnull(FactionDivisions[PlayerData[playerid][pFaction]][i]))
  66040. {
  66041. strcpy(FactionDivisions[PlayerData[playerid][pFaction]][i], param, 32);
  66042. SendClientMessageEx(playerid, COLOR_AQUA, "You have created division {FFA763}%s{33CCFF}. The ID of this division is %i.", param, i);
  66043. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO divisions VALUES(%i, %i, '%e')", PlayerData[playerid][pFaction], i, param);
  66044. mysql_tquery(connectionID, queryBuffer);
  66045. return 1;
  66046. }
  66047. }
  66048. SendClientMessageEx(playerid, COLOR_GREY, "Your faction can only have up to %i divisions.", MAX_FACTION_DIVISIONS);
  66049. }
  66050. else if(!strcmp(option, "remove", true))
  66051. {
  66052. if(!PlayerData[playerid][pFactionLeader])
  66053. {
  66054. return SendClientMessage(playerid, COLOR_GREY, "You don't have permission to use this command.");
  66055. }
  66056. if(sscanf(param, "i", divisionid))
  66057. {
  66058. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /division [remove] [divisionid]");
  66059. }
  66060. if(!(0 <= divisionid < MAX_FACTION_DIVISIONS) || isnull(FactionDivisions[PlayerData[playerid][pFaction]][divisionid]))
  66061. {
  66062. return SendClientMessage(playerid, COLOR_GREY, "Invalid division ID.");
  66063. }
  66064. foreach(new i : Player)
  66065. {
  66066. if(PlayerData[i][pFaction] == PlayerData[playerid][pFaction] && PlayerData[i][pDivision] == divisionid)
  66067. {
  66068. PlayerData[i][pDivision] = -1;
  66069. SendClientMessage(i, COLOR_LIGHTRED, "The division you were apart of has been deleted by the faction owner.");
  66070. }
  66071. }
  66072. SendClientMessageEx(playerid, COLOR_AQUA, "You have deleted division {F7A763}%s{33CCFF} (%i).", FactionDivisions[PlayerData[playerid][pFaction]][divisionid], divisionid);
  66073. FactionDivisions[PlayerData[playerid][pFaction]][divisionid][0] = 0;
  66074. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM divisions WHERE id = %i AND divisionid = %i", PlayerData[playerid][pFaction], divisionid);
  66075. mysql_tquery(connectionID, queryBuffer);
  66076. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET division = -1 WHERE faction = %i", PlayerData[playerid][pFaction]);
  66077. mysql_tquery(connectionID, queryBuffer);
  66078. }
  66079. else if(!strcmp(option, "list", true))
  66080. {
  66081. SendClientMessage(playerid, COLOR_NAVYBLUE, "_____ Divisions List _____");
  66082. for(new i = 0; i < MAX_FACTION_DIVISIONS; i ++)
  66083. {
  66084. if(isnull(FactionDivisions[PlayerData[playerid][pFaction]][i]))
  66085. {
  66086. SendClientMessageEx(playerid, COLOR_GREY1, "ID: %i | Name: Empty Slot", i);
  66087. }
  66088. else
  66089. {
  66090. SendClientMessageEx(playerid, COLOR_GREY1, "ID: %i | Name: %s", i, FactionDivisions[PlayerData[playerid][pFaction]][i]);
  66091. }
  66092. }
  66093. }
  66094. else if(!strcmp(option, "assign", true))
  66095. {
  66096. if(!PlayerData[playerid][pFactionLeader])
  66097. {
  66098. return SendClientMessage(playerid, COLOR_GREY, "You don't have permission to use this command.");
  66099. }
  66100. if(sscanf(param, "ui", targetid, divisionid))
  66101. {
  66102. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /division [assign] [playerid] [divisionid]");
  66103. }
  66104. if(!IsPlayerConnected(targetid))
  66105. {
  66106. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  66107. }
  66108. if(PlayerData[targetid][pFaction] != PlayerData[playerid][pFaction])
  66109. {
  66110. return SendClientMessage(playerid, COLOR_GREY, "That player is not apart of your faction.");
  66111. }
  66112. if(!(0 <= divisionid < MAX_FACTION_DIVISIONS) || isnull(FactionDivisions[PlayerData[playerid][pFaction]][divisionid]))
  66113. {
  66114. return SendClientMessage(playerid, COLOR_GREY, "Invalid division ID.");
  66115. }
  66116. if(PlayerData[targetid][pDivision] == divisionid)
  66117. {
  66118. return SendClientMessage(playerid, COLOR_GREY, "That player is already apart of that division.");
  66119. }
  66120. if(PlayerData[targetid][pDivision] >= 0)
  66121. {
  66122. return SendClientMessage(playerid, COLOR_GREY, "That player is already apart of another division.");
  66123. }
  66124. PlayerData[targetid][pDivision] = divisionid;
  66125. SendClientMessageEx(targetid, COLOR_AQUA, "%s has assigned you to the {F7A763}%s{33CCFF} division.", GetRPName(playerid), FactionDivisions[PlayerData[playerid][pFaction]][divisionid]);
  66126. SendClientMessageEx(playerid, COLOR_AQUA, "You have assigned %s to the {F7A763}%s{33CCFF} division.", GetRPName(targetid), FactionDivisions[PlayerData[playerid][pFaction]][divisionid]);
  66127. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET division = %i WHERE uid = %i", divisionid, PlayerData[targetid][pID]);
  66128. mysql_tquery(connectionID, queryBuffer);
  66129. }
  66130. else if(!strcmp(option, "kick", true))
  66131. {
  66132. if(!PlayerData[playerid][pFactionLeader])
  66133. {
  66134. return SendClientMessage(playerid, COLOR_GREY, "You don't have permission to use this command.");
  66135. }
  66136. if(sscanf(param, "u", targetid))
  66137. {
  66138. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /division [kick] [playerid]");
  66139. }
  66140. if(!IsPlayerConnected(targetid))
  66141. {
  66142. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  66143. }
  66144. if(PlayerData[targetid][pFaction] != PlayerData[playerid][pFaction])
  66145. {
  66146. return SendClientMessage(playerid, COLOR_GREY, "That player is not apart of your faction.");
  66147. }
  66148. if(PlayerData[targetid][pDivision] == -1)
  66149. {
  66150. return SendClientMessage(playerid, COLOR_GREY, "That player is not apart of any division.");
  66151. }
  66152. SendClientMessageEx(targetid, COLOR_AQUA, "%s has removed you from the {F7A763}%s{33CCFF} division.", GetRPName(playerid), FactionDivisions[PlayerData[playerid][pFaction]][PlayerData[targetid][pDivision]]);
  66153. SendClientMessageEx(playerid, COLOR_AQUA, "You have removed %s from the {F7A763}%s{33CCFF} division.", GetRPName(targetid), FactionDivisions[PlayerData[playerid][pFaction]][PlayerData[targetid][pDivision]]);
  66154. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET division = -1 WHERE uid = %i", PlayerData[targetid][pID]);
  66155. mysql_tquery(connectionID, queryBuffer);
  66156. PlayerData[targetid][pDivision] = -1;
  66157. }
  66158. return 1;
  66159. }
  66160. CMD:managecrew(playerid, params[])
  66161. {
  66162. new targetid, crewid, option[10], param[32];
  66163. if(PlayerData[playerid][pGang] == -1)
  66164. {
  66165. return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any gang at the moment.");
  66166. }
  66167. if(sscanf(params, "s[10]S()[32]", option, param))
  66168. {
  66169. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /managecrew [option]");
  66170. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Create, Remove, List, Assign, Kick");
  66171. return 1;
  66172. }
  66173. if(!strcmp(option, "create", true))
  66174. {
  66175. if(PlayerData[playerid][pGangRank] < 5)
  66176. {
  66177. return SendClientMessage(playerid, COLOR_GREY, "You don't have permission to use this command.");
  66178. }
  66179. if(isnull(param))
  66180. {
  66181. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /crew [create] [name]");
  66182. }
  66183. for(new i = 0; i < MAX_GANG_CREWS; i ++)
  66184. {
  66185. if(isnull(GangCrews[PlayerData[playerid][pGang]][i]))
  66186. {
  66187. strcpy(GangCrews[PlayerData[playerid][pGang]][i], param, 32);
  66188. SendClientMessageEx(playerid, COLOR_AQUA, "You have created crew {FFA763}%s{33CCFF}. The ID of this crew is %i.", param, i);
  66189. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO crews VALUES(%i, %i, '%e')", PlayerData[playerid][pGang], i, param);
  66190. mysql_tquery(connectionID, queryBuffer);
  66191. return 1;
  66192. }
  66193. }
  66194. SendClientMessageEx(playerid, COLOR_GREY, "Your gang can only have up to %i crews.", MAX_GANG_CREWS);
  66195. }
  66196. else if(!strcmp(option, "remove", true))
  66197. {
  66198. if(PlayerData[playerid][pGangRank] < 5)
  66199. {
  66200. return SendClientMessage(playerid, COLOR_GREY, "You don't have permission to use this command.");
  66201. }
  66202. if(sscanf(param, "i", crewid))
  66203. {
  66204. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /crew [remove] [crewid]");
  66205. }
  66206. if(!(0 <= crewid < MAX_GANG_CREWS) || isnull(GangCrews[PlayerData[playerid][pGang]][crewid]))
  66207. {
  66208. return SendClientMessage(playerid, COLOR_GREY, "Invalid crew ID.");
  66209. }
  66210. foreach(new i : Player)
  66211. {
  66212. if(PlayerData[i][pGang] == PlayerData[playerid][pGang] && PlayerData[i][pCrew] == crewid)
  66213. {
  66214. PlayerData[i][pCrew] = -1;
  66215. SendClientMessage(i, COLOR_LIGHTRED, "The crew you were apart of has been deleted by the gang owner.");
  66216. }
  66217. }
  66218. SendClientMessageEx(playerid, COLOR_AQUA, "You have deleted crew {F7A763}%s{33CCFF} (%i).", GangCrews[PlayerData[playerid][pGang]][crewid], crewid);
  66219. GangCrews[PlayerData[playerid][pGang]][crewid][0] = 0;
  66220. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM crews WHERE id = %i AND crewid = %i", PlayerData[playerid][pGang], crewid);
  66221. mysql_tquery(connectionID, queryBuffer);
  66222. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET crew = -1 WHERE gang = %i", PlayerData[playerid][pGang]);
  66223. mysql_tquery(connectionID, queryBuffer);
  66224. }
  66225. else if(!strcmp(option, "list", true))
  66226. {
  66227. SendClientMessage(playerid, COLOR_NAVYBLUE, "_____ Crews List _____");
  66228. for(new i = 0; i < MAX_GANG_CREWS; i ++)
  66229. {
  66230. if(isnull(GangCrews[PlayerData[playerid][pGang]][i]))
  66231. {
  66232. SendClientMessageEx(playerid, COLOR_GREY1, "ID: %i | Name: Empty Slot", i);
  66233. }
  66234. else
  66235. {
  66236. SendClientMessageEx(playerid, COLOR_GREY1, "ID: %i | Name: %s", i, GangCrews[PlayerData[playerid][pGang]][i]);
  66237. }
  66238. }
  66239. }
  66240. else if(!strcmp(option, "assign", true))
  66241. {
  66242. if(PlayerData[playerid][pGangRank] < 5)
  66243. {
  66244. return SendClientMessage(playerid, COLOR_GREY, "You don't have permission to use this command.");
  66245. }
  66246. if(sscanf(param, "ui", targetid, crewid))
  66247. {
  66248. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /crew [assign] [playerid] [crewid]");
  66249. }
  66250. if(!IsPlayerConnected(targetid))
  66251. {
  66252. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  66253. }
  66254. if(PlayerData[targetid][pGang] != PlayerData[playerid][pGang])
  66255. {
  66256. return SendClientMessage(playerid, COLOR_GREY, "That player is not apart of your gang.");
  66257. }
  66258. if(!(0 <= crewid < MAX_GANG_CREWS) || isnull(GangCrews[PlayerData[playerid][pGang]][crewid]))
  66259. {
  66260. return SendClientMessage(playerid, COLOR_GREY, "Invalid crew ID.");
  66261. }
  66262. if(PlayerData[targetid][pCrew] == crewid)
  66263. {
  66264. return SendClientMessage(playerid, COLOR_GREY, "That player is already apart of that crew.");
  66265. }
  66266. if(PlayerData[targetid][pCrew] >= 0)
  66267. {
  66268. return SendClientMessage(playerid, COLOR_GREY, "That player is already apart of another crew.");
  66269. }
  66270. PlayerData[targetid][pCrew] = crewid;
  66271. SendClientMessageEx(targetid, COLOR_AQUA, "%s has assigned you to the {F7A763}%s{33CCFF} crew.", GetRPName(playerid), GangCrews[PlayerData[playerid][pGang]][crewid]);
  66272. SendClientMessageEx(playerid, COLOR_AQUA, "You have assigned %s to the {F7A763}%s{33CCFF} crew.", GetRPName(targetid), GangCrews[PlayerData[playerid][pGang]][crewid]);
  66273. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET crew = %i WHERE uid = %i", crewid, PlayerData[targetid][pID]);
  66274. mysql_tquery(connectionID, queryBuffer);
  66275. }
  66276. else if(!strcmp(option, "kick", true))
  66277. {
  66278. if(PlayerData[playerid][pGangRank] < 5)
  66279. {
  66280. return SendClientMessage(playerid, COLOR_GREY, "You don't have permission to use this command.");
  66281. }
  66282. if(sscanf(param, "u", targetid))
  66283. {
  66284. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /crew [kick] [playerid]");
  66285. }
  66286. if(!IsPlayerConnected(targetid))
  66287. {
  66288. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  66289. }
  66290. if(PlayerData[targetid][pGang] != PlayerData[playerid][pGang])
  66291. {
  66292. return SendClientMessage(playerid, COLOR_GREY, "That player is not apart of your gang.");
  66293. }
  66294. if(PlayerData[targetid][pCrew] == -1)
  66295. {
  66296. return SendClientMessage(playerid, COLOR_GREY, "That player is not apart of any crew.");
  66297. }
  66298. SendClientMessageEx(targetid, COLOR_AQUA, "%s has removed you from the {F7A763}%s{33CCFF} crew.", GetRPName(playerid), GangCrews[PlayerData[playerid][pGang]][PlayerData[targetid][pCrew]]);
  66299. SendClientMessageEx(playerid, COLOR_AQUA, "You have removed %s from the {F7A763}%s{33CCFF} crew.", GetRPName(targetid), GangCrews[PlayerData[playerid][pGang]][PlayerData[targetid][pCrew]]);
  66300. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET crew = -1 WHERE uid = %i", PlayerData[targetid][pID]);
  66301. mysql_tquery(connectionID, queryBuffer);
  66302. PlayerData[targetid][pCrew] = -1;
  66303. }
  66304. return 1;
  66305. }
  66306. CMD:cells(playerid, params[])
  66307. {
  66308. new status;
  66309. if(!IsLawEnforcement(playerid))
  66310. {
  66311. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of law enforcement.");
  66312. }
  66313. for(new i = 0; i < sizeof(gPrisonCells); i ++)
  66314. {
  66315. if(!Streamer_GetExtraInt(gPrisonCells[i], E_OBJECT_OPENED))
  66316. {
  66317. MoveDynamicObject(gPrisonCells[i], cellPositions[i][3], cellPositions[i][4], cellPositions[i][5], 2.0);
  66318. Streamer_SetExtraInt(gPrisonCells[i], E_OBJECT_OPENED, 1);
  66319. status = true;
  66320. }
  66321. else
  66322. {
  66323. MoveDynamicObject(gPrisonCells[i], cellPositions[i][0], cellPositions[i][1], cellPositions[i][2], 2.0);
  66324. Streamer_SetExtraInt(gPrisonCells[i], E_OBJECT_OPENED, 0);
  66325. status = false;
  66326. }
  66327. }
  66328. if(status)
  66329. SendFactionMessage(PlayerData[playerid][pFaction], COLOR_OLDSCHOOL, "* HQ: %s %s has opened all cells in the prison.", FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid));
  66330. else
  66331. SendFactionMessage(PlayerData[playerid][pFaction], COLOR_OLDSCHOOL, "* HQ: %s %s has closed all cells in the prison.", FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid));
  66332. return 1;
  66333. }
  66334. CMD:cell(playerid, params[])
  66335. {
  66336. for(new i = 0; i < sizeof(gPrisonCells); i ++)
  66337. {
  66338. if(IsPlayerInRangeOfPoint(playerid, 2.0, cellPositions[i][0], cellPositions[i][1], cellPositions[i][2]))
  66339. {
  66340. if(!IsLawEnforcement(playerid))
  66341. {
  66342. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to open this cell.");
  66343. }
  66344. if(!Streamer_GetExtraInt(gPrisonCells[i], E_OBJECT_OPENED))
  66345. {
  66346. ShowActionBubble(playerid, "* %s uses their key to open the cell door.", GetRPName(playerid));
  66347. MoveDynamicObject(gPrisonCells[i], cellPositions[i][3], cellPositions[i][4], cellPositions[i][5], 2.0);
  66348. Streamer_SetExtraInt(gPrisonCells[i], E_OBJECT_OPENED, 1);
  66349. }
  66350. else
  66351. {
  66352. ShowActionBubble(playerid, "* %s uses their key to close the cell door.", GetRPName(playerid));
  66353. MoveDynamicObject(gPrisonCells[i], cellPositions[i][0], cellPositions[i][1], cellPositions[i][2], 2.0);
  66354. Streamer_SetExtraInt(gPrisonCells[i], E_OBJECT_OPENED, 0);
  66355. }
  66356. return 1;
  66357. }
  66358. }
  66359. SendClientMessage(playerid, COLOR_GREY, "You are not in range of any prison cells.");
  66360. return 1;
  66361. }
  66362. CMD:door(playerid, params[])
  66363. {
  66364. if(!DoorCheck(playerid))
  66365. {
  66366. SendClientMessage(playerid, COLOR_GREY, "You are not in range of any door which you can open.");
  66367. }
  66368. return 1;
  66369. }
  66370. CMD:gate(playerid, params[])
  66371. {
  66372. if(!GateCheck(playerid))
  66373. {
  66374. //SendClientMessage(playerid, COLOR_GREY, "You are not in range of any gates which you can open.");
  66375. }
  66376. return 1;
  66377. }
  66378. CMD:locker(playerid, params[])
  66379. {
  66380. if(PlayerData[playerid][pFaction] == -1)
  66381. {
  66382. return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any faction at the moment.");
  66383. }
  66384. if(!IsPlayerInRangeOfLocker(playerid, PlayerData[playerid][pFaction]))
  66385. {
  66386. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any of your faction lockers.");
  66387. }
  66388. if(PlayerData[playerid][pHurt])
  66389. {
  66390. return SendClientMessageEx(playerid, COLOR_GREY, "You're too hurt to use the lockers. Please wait %i seconds before trying again.", PlayerData[playerid][pHurt]);
  66391. }
  66392. switch(FactionInfo[PlayerData[playerid][pFaction]][fType])
  66393. {
  66394. case FACTION_POLICE, FACTION_FEDERAL, FACTION_ARMY:
  66395. {
  66396. Dialog_Show(playerid, DIALOG_FACTIONLOCKER, DIALOG_STYLE_LIST, "Locker", "Toggle duty\nEquipment\nUniforms\nClothing", "Select", "Cancel");
  66397. }
  66398. case FACTION_MEDIC:
  66399. {
  66400. Dialog_Show(playerid, DIALOG_FACTIONLOCKER, DIALOG_STYLE_LIST, "Locker", "Toggle duty\nEquipment\nUniforms", "Select", "Cancel");
  66401. }
  66402. case FACTION_GOVERNMENT, FACTION_NEWS:
  66403. {
  66404. Dialog_Show(playerid, DIALOG_FACTIONLOCKER, DIALOG_STYLE_LIST, "Locker", "Equipment\nUniforms", "Select", "Cancel");
  66405. }
  66406. case FACTION_HITMAN:
  66407. {
  66408. Dialog_Show(playerid, DIALOG_FACTIONLOCKER, DIALOG_STYLE_LIST, "Locker", "Order weapons\nChange clothes", "Select", "Cancel");
  66409. }
  66410. }
  66411. return 1;
  66412. }
  66413. CMD:showbadge(playerid, params[])
  66414. {
  66415. new targetid, factionid, rankid;
  66416. if(PlayerData[playerid][pFaction] == -1)
  66417. {
  66418. return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any faction at the moment.");
  66419. }
  66420. if(GetFactionType(playerid) == FACTION_HITMAN)
  66421. {
  66422. if(sscanf(params, "uii", targetid, factionid, rankid))
  66423. {
  66424. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /showbadge [playerid] [factionid] [rankid]");
  66425. SendClientMessage(playerid, COLOR_SYNTAX, "Use /factions for a list of factions to use with factionid parameter.");
  66426. return 1;
  66427. }
  66428. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  66429. {
  66430. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  66431. }
  66432. if(!(0 <= factionid < MAX_FACTIONS) || FactionInfo[factionid][fType] == FACTION_NONE)
  66433. {
  66434. return SendClientMessage(playerid, COLOR_GREY, "Invalid faction.");
  66435. }
  66436. if(!(0 <= rankid < FactionInfo[factionid][fRankCount]))
  66437. {
  66438. return SendClientMessageEx(playerid, COLOR_GREY, "Invalid rank. Valid ranks for this faction range from 0 to %i.", FactionInfo[factionid][fRankCount] - 1);
  66439. }
  66440. if(FactionInfo[factionid][fType] == FACTION_HITMAN)
  66441. {
  66442. return SendClientMessage(playerid, COLOR_GREY, "You can't use this faction for your fake badge.");
  66443. }
  66444. SendClientMessageEx(targetid, COLOR_WHITE, "* %s is rank %s (%i) in %s. *", GetRPName(playerid), FactionRanks[factionid][rankid], rankid, FactionInfo[factionid][fName]);
  66445. ShowActionBubble(playerid, "* %s shows their badge to %s.", GetRPName(playerid), GetRPName(targetid));
  66446. }
  66447. else
  66448. {
  66449. if(sscanf(params, "u", targetid))
  66450. {
  66451. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /showbadge [playerid]");
  66452. }
  66453. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  66454. {
  66455. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  66456. }
  66457. SendClientMessageEx(targetid, COLOR_WHITE, "* %s is rank %s (%i) in %s. *", GetRPName(playerid), FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], PlayerData[playerid][pFactionRank], FactionInfo[PlayerData[playerid][pFaction]][fName]);
  66458. ShowActionBubble(playerid, "* %s shows their badge to %s.", GetRPName(playerid), GetRPName(targetid));
  66459. }
  66460. return 1;
  66461. }
  66462. CMD:m(playerid, params[])
  66463. {
  66464. return callcmd::megaphone(playerid, params);
  66465. }
  66466. CMD:megaphone(playerid, params[])
  66467. {
  66468. if(PlayerData[playerid][pFaction] == -1)
  66469. {
  66470. return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any faction at the moment.");
  66471. }
  66472. if(FactionInfo[PlayerData[playerid][pFaction]][fType] == FACTION_HITMAN)
  66473. {
  66474. return SendClientMessage(playerid, COLOR_GREY, "Your faction is not authorized to use the megaphone.");
  66475. }
  66476. if(isnull(params))
  66477. {
  66478. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /(m)egaphone [text]");
  66479. }
  66480. SendProximityMessage(playerid, 50.0, COLOR_YELLOW, "[%s %s:o< %s]", FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid), params);
  66481. return 1;
  66482. }
  66483. CMD:hm(playerid, params[])
  66484. {
  66485. if(PlayerData[playerid][pFaction] == -1)
  66486. {
  66487. return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any faction at the moment.");
  66488. }
  66489. if(isnull(params))
  66490. {
  66491. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /(m)egaphone [text]");
  66492. }
  66493. SendProximityMessage(playerid, 50.0, COLOR_YELLOW, "[%s:o< %s]", GetRPName(playerid), params);
  66494. return 1;
  66495. }
  66496. CMD:taser(playerid, params[]) return callcmd::tazer(playerid, params);
  66497. CMD:tazer(playerid, params[])
  66498. {
  66499. if(!IsLawEnforcement(playerid) && GetFactionType(playerid) != FACTION_GOVERNMENT)
  66500. {
  66501. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of law enforcement.");
  66502. }
  66503. if(PlayerData[playerid][pTazedTime] > 0 || PlayerData[playerid][pInjured] > 0 || PlayerData[playerid][pHospital] > 0 || PlayerData[playerid][pCuffed] > 0 || PlayerData[playerid][pTied] > 0 || PlayerData[playerid][pJailTime] > 0 || PlayerData[playerid][pJoinedEvent] > 0 || PlayerData[playerid][pPaintball] > 0 || IsPlayerInAnyVehicle(playerid))
  66504. {
  66505. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment.");
  66506. }
  66507. if(PlayerData[playerid][pWeaponRestricted] > 0)
  66508. {
  66509. return SendClientMessage(playerid, COLOR_GREY, "You cannot use this command when you are weapon restricted.");
  66510. }
  66511. if(PlayerData[playerid][pHurt] && PlayerData[playerid][pTazer] == 0)
  66512. {
  66513. return SendClientMessageEx(playerid, COLOR_GREY, "You're too hurt to pull out your tazer. Please wait %i seconds before trying again.", PlayerData[playerid][pHurt]);
  66514. }
  66515. if(!PlayerData[playerid][pTazer])
  66516. {
  66517. PlayerData[playerid][pTazer] = 1;
  66518. ShowActionBubble(playerid, "* %s reaches for their tazer.", GetRPName(playerid));
  66519. pTazerReplace{playerid} = PlayerData[playerid][pWeapons][2];
  66520. GivePlayerWeaponEx(playerid, 23);
  66521. SetPlayerArmedWeapon(playerid, 23);
  66522. }
  66523. else
  66524. {
  66525. PlayerData[playerid][pTazer] = 0;
  66526. RemovePlayerWeapon(playerid, 23);
  66527. SetPlayerWeapons(playerid);
  66528. GivePlayerWeaponEx(playerid, pTazerReplace{playerid});
  66529. ShowActionBubble(playerid, "* %s puts their tazer back in their duty belt.", GetRPName(playerid));
  66530. if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
  66531. {
  66532. SetPlayerArmedWeapon(playerid, PlayerData[playerid][pWeapons][2]);
  66533. }
  66534. }
  66535. return 1;
  66536. }
  66537. forward showMirandaRights(playerid, step);
  66538. public showMirandaRights(playerid, step)
  66539. {
  66540. new string[128];
  66541. switch(step)
  66542. {
  66543. case 1:
  66544. {
  66545. format(string, sizeof(string), "%s says: You have the right to remain silent.", GetRPName(playerid));
  66546. SendProximityFadeMessage(playerid, 20.0, string, COLOR_GREY1, COLOR_GREY2, COLOR_GREY3, COLOR_GREY4, COLOR_GREY5);
  66547. SetTimerEx("showMirandaRights", 1000, false, "ii", playerid, 2);
  66548. }
  66549. case 2:
  66550. {
  66551. format(string, sizeof(string), "%s says: Anything you say can and will be used against you in a court of law.", GetRPName(playerid));
  66552. SendProximityFadeMessage(playerid, 20.0, string, COLOR_GREY1, COLOR_GREY2, COLOR_GREY3, COLOR_GREY4, COLOR_GREY5);
  66553. SetTimerEx("showMirandaRights", 1000, false, "ii", playerid, 3);
  66554. }
  66555. case 3:
  66556. {
  66557. format(string, sizeof(string), "%s says: You have the right to to an attorney, If you can not afford one, one will be appointed for you.", GetRPName(playerid));
  66558. SendProximityFadeMessage(playerid, 20.0, string, COLOR_GREY1, COLOR_GREY2, COLOR_GREY3, COLOR_GREY4, COLOR_GREY5);
  66559. }
  66560. }
  66561. }
  66562. CMD:mir(playerid, params[])
  66563. {
  66564. if(IsLawEnforcement(playerid))
  66565. {
  66566. SetTimerEx("showMirandaRights", 1000, false, "ii", playerid, 1);
  66567. }
  66568. return 1;
  66569. }
  66570. CMD:swat(playerid, params[])
  66571. {
  66572. if(!PlayerData[playerid][pLogged])return true;
  66573. new factionid = PlayerData[playerid][pFaction];
  66574. if(!IsLawEnforcement(playerid))
  66575. {
  66576. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of law enforcement.");
  66577. }
  66578. if(!IsPlayerInRangeOfLocker(playerid, factionid))
  66579. {
  66580. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any of your faction lockers.");
  66581. }
  66582. if(!PlayerData[playerid][pDuty])return SendClientMessage(playerid, COLOR_ADM, "ACCESS DENIED:{FFFFFF} You must be on duty before SWATing up.");
  66583. if(PlayerData[playerid][pSWATduty] == true)
  66584. {
  66585. PlayerData[playerid][pSWATduty] = false;
  66586. SendFactionMessage(factionid, COLOR_FACTIONCHAT, "* HQ: %s %s is now off tactical duty! *", FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid));
  66587. PlayerData[playerid][pSWATduty] = true;
  66588. SetPlayerSkin(playerid, PlayerData[playerid][pSkin]);
  66589. GivePlayerHealth(playerid, 100);
  66590. SetScriptArmour(playerid, 40);
  66591. }
  66592. else
  66593. {
  66594. SetPlayerSkin(playerid, 285);
  66595. SetScriptArmour(playerid, 200);
  66596. GivePlayerHealth(playerid, 100);
  66597. SendFactionMessage(factionid, COLOR_FACTIONCHAT, "* HQ: %s %s is now ready for tactical duty! *", FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid));
  66598. PlayerData[playerid][pSWATduty] = true;
  66599. }
  66600. return true;
  66601. }
  66602. CMD:cuff(playerid, params[])
  66603. {
  66604. new targetid;
  66605. if(!IsLawEnforcement(playerid) && GetFactionType(playerid) != FACTION_GOVERNMENT)
  66606. {
  66607. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of law enforcement.");
  66608. }
  66609. if(sscanf(params, "u", targetid))
  66610. {
  66611. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /cuff [playerid]");
  66612. }
  66613. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  66614. {
  66615. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  66616. }
  66617. if(targetid == playerid)
  66618. {
  66619. return SendClientMessage(playerid, COLOR_GREY, "You can't cuff yourself.");
  66620. }
  66621. if(PlayerData[targetid][pCuffed])
  66622. {
  66623. return SendClientMessage(playerid, COLOR_GREY, "That player is already handcuffed.");
  66624. }
  66625. if(PlayerData[targetid][pInjured])
  66626. {
  66627. return SendClientMessage(playerid, COLOR_GREY, "You can't handcuff an injured player.");
  66628. }
  66629. if(PlayerData[playerid][pHurt])
  66630. {
  66631. return SendClientMessageEx(playerid, COLOR_GREY, "You're too hurt to cuff anyone. Please wait %i seconds before trying again.", PlayerData[playerid][pHurt]);
  66632. }
  66633. new
  66634. bool:canHandcuff;
  66635. if(PlayerData[targetid][pTazedTime] > 0)
  66636. canHandcuff = true;
  66637. if(GetPlayerSpecialAction(targetid) == SPECIAL_ACTION_HANDSUP)
  66638. canHandcuff = true;
  66639. if(GetPlayerSpecialAction(targetid) == SPECIAL_ACTION_DUCK)
  66640. canHandcuff = true;
  66641. if(GetPlayerAnimationIndex(targetid) == 1151)
  66642. canHandcuff = true;
  66643. if(GetPlayerAnimationIndex(targetid) == 1150)
  66644. canHandcuff = true;
  66645. if(GetPlayerAnimationIndex(targetid) == 960)
  66646. canHandcuff = true;
  66647. if(GetPlayerAnimationIndex(targetid) == 1701)
  66648. canHandcuff = true;
  66649. if(!canHandcuff)
  66650. return SendClientMessage(playerid, COLOR_ADM, "That player needs to be crouched, have their hands up or be on the floor.");
  66651. PlayerData[targetid][pCuffed] = 1;
  66652. SetPlayerSpecialAction(targetid, SPECIAL_ACTION_CUFFED);
  66653. SetPlayerAttachedObject(targetid, 9, 19418,6,-0.031999,0.024000,-0.024000,-7.900000,-32.000011,-72.299987,1.115998,1.322000,1.406000);
  66654. TogglePlayerControllable(targetid, 0);
  66655. ShowActionBubble(playerid, "* %s tightens a pair of handcuffs around %s's wrists.", GetRPName(playerid), GetRPName(targetid));
  66656. GameTextForPlayer(targetid, "~r~Cuffed", 3000, 3);
  66657. return 1;
  66658. }
  66659. CMD:uncuff(playerid, params[])
  66660. {
  66661. new targetid;
  66662. if(!IsLawEnforcement(playerid) && GetFactionType(playerid) != FACTION_GOVERNMENT && GetFactionType(playerid) != FACTION_TERRORIST && PlayerData[playerid][pAdminDuty] == 0)
  66663. {
  66664. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of law enforcement.");
  66665. }
  66666. if(sscanf(params, "u", targetid))
  66667. {
  66668. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /uncuff [playerid]");
  66669. }
  66670. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  66671. {
  66672. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  66673. }
  66674. if(targetid == playerid && PlayerData[playerid][pAdminDuty] == 0)
  66675. {
  66676. return SendClientMessage(playerid, COLOR_GREY, "You can't uncuff yourself.");
  66677. }
  66678. if(!PlayerData[targetid][pCuffed])
  66679. {
  66680. return SendClientMessage(playerid, COLOR_GREY, "That player is not handcuffed.");
  66681. }
  66682. if(PlayerData[playerid][pHurt])
  66683. {
  66684. return SendClientMessageEx(playerid, COLOR_GREY, "You're too hurt to uncuff anyone. Please wait %i seconds before trying again.", PlayerData[playerid][pHurt]);
  66685. }
  66686. PlayerData[targetid][pCuffed] = 0;
  66687. PlayerData[targetid][pDraggedBy] = INVALID_PLAYER_ID;
  66688. SetPlayerSpecialAction(targetid, SPECIAL_ACTION_NONE);
  66689. TogglePlayerControllable(targetid, 1);
  66690. RemovePlayerAttachedObject(targetid, 9);
  66691. ShowActionBubble(playerid, "* %s loosens the pair of handcuffs from around %s's wrists.", GetRPName(playerid), GetRPName(targetid));
  66692. GameTextForPlayer(targetid, "~g~Uncuffed", 3000, 3);
  66693. return 1;
  66694. }
  66695. CMD:drag(playerid, params[])
  66696. {
  66697. new targetid;
  66698. if(sscanf(params, "u", targetid))
  66699. {
  66700. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /drag [playerid]");
  66701. }
  66702. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  66703. {
  66704. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  66705. }
  66706. if(targetid == playerid)
  66707. {
  66708. return SendClientMessage(playerid, COLOR_GREY, "You can't drag yourself.");
  66709. }
  66710. if(!PlayerData[targetid][pInjured] && !PlayerData[targetid][pCuffed] && !PlayerData[targetid][pTied])
  66711. {
  66712. return SendClientMessage(playerid, COLOR_GREY, "That player is not injured, handcuffed or tied.");
  66713. }
  66714. if(PlayerData[targetid][pInjured] && GetFactionType(playerid) != FACTION_MEDIC)
  66715. {
  66716. return SendClientMessage(playerid, COLOR_GREY, "You can't drag an injured player unless you're a medic.");
  66717. }
  66718. if(PlayerData[playerid][pHurt])
  66719. {
  66720. return SendClientMessageEx(playerid, COLOR_GREY, "You're too hurt to drag anyone. Please wait %i seconds before trying again.", PlayerData[playerid][pHurt]);
  66721. }
  66722. if(PlayerData[targetid][pDraggedBy] == INVALID_PLAYER_ID)
  66723. {
  66724. PlayerData[targetid][pDraggedBy] = playerid;
  66725. //TogglePlayerControllable(targetid, 0);
  66726. ShowActionBubble(playerid, "* %s grabs onto %s and begins to drag them.", GetRPName(playerid), GetRPName(targetid));
  66727. }
  66728. else
  66729. {
  66730. PlayerData[targetid][pDraggedBy] = INVALID_PLAYER_ID;
  66731. //TogglePlayerControllable(targetid, 1);
  66732. ShowActionBubble(playerid, "* %s stops dragging %s.", GetRPName(playerid), GetRPName(targetid));
  66733. }
  66734. return 1;
  66735. }
  66736. CMD:detain(playerid, params[])
  66737. {
  66738. new targetid, vehicleid = GetPlayerVehicleID(playerid);
  66739. if(!IsLawEnforcement(playerid) && PlayerData[targetid][pCuffed])
  66740. {
  66741. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of law enforcement.");
  66742. }
  66743. if(sscanf(params, "u", targetid))
  66744. {
  66745. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /detain [playerid]");
  66746. }
  66747. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 15.0))
  66748. {
  66749. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  66750. }
  66751. if(targetid == playerid)
  66752. {
  66753. return SendClientMessage(playerid, COLOR_GREY, "You can't detain yourself.");
  66754. }
  66755. if(!PlayerData[targetid][pCuffed] && !PlayerData[targetid][pTied])
  66756. {
  66757. return SendClientMessage(playerid, COLOR_GREY, "That player is not handcuffed or tied.");
  66758. }
  66759. if(IsPlayerInAnyVehicle(targetid))
  66760. {
  66761. return SendClientMessage(playerid, COLOR_GREY, "That player is already in a vehicle.");
  66762. }
  66763. if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
  66764. {
  66765. return SendClientMessage(playerid, COLOR_GREY, "You are not driving any vehicle.");
  66766. }
  66767. for(new i = (GetVehicleSeatCount(vehicleid) == 4) ? 2 : 1; i < GetVehicleSeatCount(vehicleid); i ++)
  66768. {
  66769. if(!IsSeatOccupied(vehicleid, i))
  66770. {
  66771. PlayerData[targetid][pDraggedBy] = INVALID_PLAYER_ID;
  66772. PlayerData[targetid][pVehicleCount] = 0;
  66773. TogglePlayerControllable(targetid, 0);
  66774. PutPlayerInVehicle(targetid, vehicleid, i);
  66775. SetPlayerSpecialAction(targetid, SPECIAL_ACTION_NONE);
  66776. ShowActionBubble(playerid, "* %s throws %s into their vehicle.", GetRPName(playerid), GetRPName(targetid));
  66777. return 1;
  66778. }
  66779. }
  66780. SendClientMessage(playerid, COLOR_GREY, "There are no unoccupied back seats left. Find another vehicle.");
  66781. return 1;
  66782. }
  66783. CMD:charge(playerid, params[])
  66784. {
  66785. new targetid, reason[128];
  66786. if(!IsLawEnforcement(playerid))
  66787. {
  66788. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of law enforcement.");
  66789. }
  66790. if(sscanf(params, "us[128]", targetid, reason))
  66791. {
  66792. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /charge [playerid] [reason]");
  66793. }
  66794. if(!IsPlayerConnected(targetid))
  66795. {
  66796. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  66797. }
  66798. if(targetid == playerid)
  66799. {
  66800. return SendClientMessage(playerid, COLOR_GREY, "You can't charge yourself.");
  66801. }
  66802. if(PlayerData[targetid][pWantedLevel] >= 6)
  66803. {
  66804. return SendClientMessage(playerid, COLOR_GREY, "This player is already at the maximum wanted level (6).");
  66805. }
  66806. if(GetFactionType(targetid) == FACTION_FEDERAL && GetFactionType(playerid) == FACTION_POLICE && GetFactionType(playerid) == FACTION_ARMY)
  66807. {
  66808. return SendClientMessage(playerid, COLOR_GREY, "That player is in a faction of higher authority and therefore can't be charged.");
  66809. }
  66810. PlayerData[targetid][pWantedLevel]++;
  66811. PlayerData[targetid][pCrimes]++;
  66812. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET wantedlevel = %i, crimes = %i WHERE uid = %i", PlayerData[targetid][pWantedLevel], PlayerData[targetid][pCrimes], PlayerData[targetid][pID]);
  66813. mysql_tquery(connectionID, queryBuffer);
  66814. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO charges VALUES(null, %i, '%s', NOW(), '%e')", PlayerData[targetid][pID], GetPlayerNameEx(playerid), reason);
  66815. mysql_tquery(connectionID, queryBuffer);
  66816. new year, month, day, hour, minute, second;
  66817. getdate(year, month, day);
  66818. gettime(hour,minute,second);
  66819. new datum[64], time[64];
  66820. format(time, sizeof(time), "%d:%d:%d", hour, minute, second);
  66821. format(datum, sizeof(datum), "%d-%d-%d", year, month, day);
  66822. mysql_real_escape_string(reason, reason);
  66823. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO `criminals`(`player`, `officer`, `date`, `time`, `crime`, `served`) VALUES ('%s','%s','%e','%s','%s', 0)",
  66824. GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), datum, time, reason);
  66825. mysql_tquery(connectionID, queryBuffer);
  66826. foreach(new i : Player)
  66827. {
  66828. if(IsLawEnforcement(i))
  66829. {
  66830. SendClientMessageEx(i, COLOR_OLDSCHOOL, "* HQ: %s %s has charged %s with {FF6347}%s{9999FF}. *", FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid), GetRPName(targetid), reason);
  66831. }
  66832. }
  66833. SendClientMessageEx(targetid, COLOR_LIGHTRED, "* Officer %s has charged you with %s.", GetRPName(playerid), reason);
  66834. Log_Write("log_faction", "%s (uid: %i) has charged %s (uid: %i) with %s", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], reason);
  66835. return 1;
  66836. }
  66837. CMD:su(playerid, params[])
  66838. {
  66839. return callcmd::charge(playerid, params);
  66840. }
  66841. CMD:bug(playerid, params[])
  66842. {
  66843. if(GetFactionType(playerid) != FACTION_FEDERAL)
  66844. {
  66845. return SendClientMessage(playerid, COLOR_GREY, "You are not a federal agent.");
  66846. }
  66847. if(!PlayerData[playerid][pToggleBug])
  66848. {
  66849. return SendClientMessage(playerid, COLOR_GREY, "Enable the bug channel first! (/tog bugged)");
  66850. }
  66851. new
  66852. targetid;
  66853. if(sscanf(params, "u", targetid))
  66854. {
  66855. SendClientMessage(playerid, COLOR_WHITE, "USAGE: /bug [playerid]");
  66856. }
  66857. if(PlayerData[targetid][pAdminDuty])
  66858. {
  66859. return SendClientMessage(playerid, COLOR_GREY, "You can't place bugs on admins.");
  66860. }
  66861. if(PlayerData[targetid][pBugged] == 1)
  66862. {
  66863. PlayerData[targetid][pBugged] = 0;
  66864. SendClientMessageEx(playerid, COLOR_GREY, "The bug on %s has been disabled.", GetRPName(targetid));
  66865. }
  66866. else if(IsPlayerInRangeOfPlayer(playerid, targetid, 4.0))
  66867. {
  66868. PlayerData[targetid][pBugged] = 1;
  66869. SendClientMessageEx(playerid, COLOR_GREY ,"You have placed a bug on %s.",GetRPName(targetid));
  66870. }
  66871. else
  66872. {
  66873. SendClientMessage(playerid, COLOR_GREY, "You need to be closer to that person.");
  66874. }
  66875. return 1;
  66876. }
  66877. CMD:wanted(playerid, params[])
  66878. {
  66879. if(!IsLawEnforcement(playerid) && !PlayerHasJob(playerid, JOB_LAWYER))
  66880. {
  66881. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of law enforcement or a lawyer.");
  66882. }
  66883. SendClientMessage(playerid, COLOR_NAVYBLUE, "_____ Wanted Players _____");
  66884. foreach(new i : Player)
  66885. {
  66886. if(PlayerData[i][pWantedLevel] > 0)
  66887. {
  66888. SendClientMessageEx(playerid, COLOR_GREY2, "(ID: %i) %s - Wanted Level: %i", i, GetRPName(i), PlayerData[i][pWantedLevel]);
  66889. }
  66890. }
  66891. return 1;
  66892. }
  66893. CMD:find(playerid, params[])
  66894. {
  66895. new targetid;
  66896. if(!PlayerHasJob(playerid, JOB_DETECTIVE) && GetFactionType(playerid) != FACTION_POLICE && GetFactionType(playerid) != FACTION_FEDERAL && GetFactionType(playerid) != FACTION_ARMY)
  66897. {
  66898. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command unless you're a Detective.");
  66899. }
  66900. if(sscanf(params, "u", targetid))
  66901. {
  66902. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /find [playerid]");
  66903. }
  66904. if(PlayerData[playerid][pDetectiveCooldown] > 0)
  66905. {
  66906. return SendClientMessageEx(playerid, COLOR_GREY, "You need to wait %i more seconds to use this command again.", PlayerData[playerid][pDetectiveCooldown]);
  66907. }
  66908. if(!IsPlayerConnected(targetid))
  66909. {
  66910. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  66911. }
  66912. if(targetid == playerid)
  66913. {
  66914. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command on yourself.");
  66915. }
  66916. if(GetPlayerInterior(targetid))
  66917. {
  66918. return SendClientMessage(playerid, COLOR_GREY, "This player is in an interior. You can't find them at the moment.");
  66919. }
  66920. if(PlayerData[targetid][pAdminDuty])
  66921. {
  66922. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command on an on duty administrator.");
  66923. }
  66924. if(PlayerData[targetid][pTogglePhone])
  66925. {
  66926. return SendClientMessage(playerid, COLOR_GREY, "That player's phone is turned off. Therefore you can't find them.");
  66927. }
  66928. switch(GetJobLevel(playerid, JOB_DETECTIVE))
  66929. {
  66930. case 1:
  66931. {
  66932. PlayerData[playerid][pFindTime] = 6;
  66933. PlayerData[playerid][pDetectiveCooldown] = 120;
  66934. }
  66935. case 2:
  66936. {
  66937. PlayerData[playerid][pFindTime] = 8;
  66938. PlayerData[playerid][pDetectiveCooldown] = 90;
  66939. }
  66940. case 3:
  66941. {
  66942. PlayerData[playerid][pFindTime] = 10;
  66943. PlayerData[playerid][pDetectiveCooldown] = 60;
  66944. }
  66945. case 4:
  66946. {
  66947. PlayerData[playerid][pFindTime] = 12;
  66948. PlayerData[playerid][pDetectiveCooldown] = 30;
  66949. }
  66950. case 5:
  66951. {
  66952. PlayerData[playerid][pFindTime] = 14;
  66953. PlayerData[playerid][pDetectiveCooldown] = 15;
  66954. }
  66955. }
  66956. SetPlayerMarkerForPlayer(playerid, targetid, 0xFF0000FF);
  66957. ShowActionBubble(playerid, "* %s takes out a cellphone and begins to track someone.", GetRPName(playerid));
  66958. SendClientMessageEx(playerid, COLOR_WHITE, "* %s's location marked on your radar. %i seconds remain until the marker disappears.", GetRPName(targetid), PlayerData[playerid][pFindTime]);
  66959. IncreaseJobSkill(playerid, JOB_DETECTIVE);
  66960. PlayerData[playerid][pFindPlayer] = targetid;
  66961. return 1;
  66962. }
  66963. CMD:frisk(playerid, params[])
  66964. {
  66965. new targetid;
  66966. if(sscanf(params, "u", targetid))
  66967. {
  66968. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /frisk [playerid]");
  66969. }
  66970. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  66971. {
  66972. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  66973. }
  66974. if(targetid == playerid)
  66975. {
  66976. return SendClientMessage(playerid, COLOR_GREY, "You cannot frisk yourself.");
  66977. }
  66978. if(PlayerHasJob(playerid, JOB_BODYGUARD) || IsLawEnforcement(playerid))
  66979. {
  66980. FriskPlayer(playerid, targetid);
  66981. }
  66982. else
  66983. {
  66984. PlayerData[targetid][pFriskOffer] = playerid;
  66985. SendClientMessageEx(targetid, COLOR_AQUA, "* %s is attempting to frisk you for illegal items. (/accept frisk)", GetRPName(playerid));
  66986. SendClientMessageEx(playerid, COLOR_AQUA, "* You have sent a frisk offer to %s.", GetRPName(targetid));
  66987. }
  66988. return 1;
  66989. }
  66990. CMD:take(playerid, params[])
  66991. {
  66992. new targetid, option[14];
  66993. if(!IsLawEnforcement(playerid))
  66994. {
  66995. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of law enforcement.");
  66996. }
  66997. if(sscanf(params, "us[14]", targetid, option))
  66998. {
  66999. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /take [playerid] [option]");
  67000. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Weapons, Weed, Cocaine, Meth, Painkillers, CarLicense");
  67001. return 1;
  67002. }
  67003. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  67004. {
  67005. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  67006. }
  67007. if(!strcmp(option, "weapons", true))
  67008. {
  67009. ResetPlayerWeaponsEx(targetid);
  67010. ShowActionBubble(playerid, "* %s takes away %s's weapons.", GetRPName(playerid), GetRPName(targetid));
  67011. SendClientMessageEx(targetid, COLOR_AQUA, "%s has taken your weapons.", GetRPName(playerid));
  67012. Log_Write("log_faction", "%s (uid: %i) has taken %s's (uid: %i) weapons.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  67013. }
  67014. else if(!strcmp(option, "weed", true))
  67015. {
  67016. if(!PlayerData[targetid][pWeed])
  67017. {
  67018. return SendClientMessage(playerid, COLOR_GREY, "That player has no weed on them.");
  67019. }
  67020. ShowActionBubble(playerid, "* %s takes away %s's weed.", GetRPName(playerid), GetRPName(targetid));
  67021. SendClientMessageEx(targetid, COLOR_AQUA, "%s has taken your %i grams of weed.", GetRPName(playerid), PlayerData[targetid][pWeed]);
  67022. Log_Write("log_faction", "%s (uid: %i) has taken %s's (uid: %i) %i grams of weed.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], PlayerData[targetid][pWeed]);
  67023. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET weed = 0 WHERE uid = %i", PlayerData[targetid][pID]);
  67024. mysql_tquery(connectionID, queryBuffer);
  67025. PlayerData[targetid][pWeed] = 0;
  67026. }
  67027. else if(!strcmp(option, "cocaine", true))
  67028. {
  67029. if(!PlayerData[targetid][pCocaine])
  67030. {
  67031. return SendClientMessage(playerid, COLOR_GREY, "That player has no cocaine on them.");
  67032. }
  67033. ShowActionBubble(playerid, "* %s takes away %s's cocaine.", GetRPName(playerid), GetRPName(targetid));
  67034. SendClientMessageEx(targetid, COLOR_AQUA, "%s has taken your %i grams of cocaine.", GetRPName(playerid), PlayerData[targetid][pWeed]);
  67035. Log_Write("log_faction", "%s (uid: %i) has taken %s's (uid: %i) %i grams of cocaine.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], PlayerData[targetid][pCocaine]);
  67036. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET cocaine = 0 WHERE uid = %i", PlayerData[targetid][pID]);
  67037. mysql_tquery(connectionID, queryBuffer);
  67038. PlayerData[targetid][pCocaine] = 0;
  67039. }
  67040. else if(!strcmp(option, "meth", true))
  67041. {
  67042. if(!PlayerData[targetid][pMeth])
  67043. {
  67044. return SendClientMessage(playerid, COLOR_GREY, "That player has no meth on them.");
  67045. }
  67046. ShowActionBubble(playerid, "* %s takes away %s's meth.", GetRPName(playerid), GetRPName(targetid));
  67047. SendClientMessageEx(targetid, COLOR_AQUA, "%s has taken your %i grams of meth.", GetRPName(playerid), PlayerData[targetid][pWeed]);
  67048. Log_Write("log_faction", "%s (uid: %i) has taken %s's (uid: %i) %i grams of meth.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], PlayerData[targetid][pMeth]);
  67049. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET meth = 0 WHERE uid = %i", PlayerData[targetid][pID]);
  67050. mysql_tquery(connectionID, queryBuffer);
  67051. PlayerData[targetid][pMeth] = 0;
  67052. }
  67053. else if(!strcmp(option, "painkillers", true))
  67054. {
  67055. if(!PlayerData[targetid][pPainkillers])
  67056. {
  67057. return SendClientMessage(playerid, COLOR_GREY, "That player has no painkillers on them.");
  67058. }
  67059. ShowActionBubble(playerid, "* %s takes away %s's painkillers.", GetRPName(playerid), GetRPName(targetid));
  67060. SendClientMessageEx(targetid, COLOR_AQUA, "%s has taken your %i painkillers.", GetRPName(playerid), PlayerData[targetid][pWeed]);
  67061. Log_Write("log_faction", "%s (uid: %i) has taken %s's (uid: %i) %i painkillers.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], PlayerData[targetid][pPainkillers]);
  67062. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET painkillers = 0 WHERE uid = %i", PlayerData[targetid][pID]);
  67063. mysql_tquery(connectionID, queryBuffer);
  67064. PlayerData[targetid][pPainkillers] = 0;
  67065. }
  67066. else if(!strcmp(option, "carlicense", true))
  67067. {
  67068. if(!PlayerData[targetid][pCarLicense])
  67069. {
  67070. return SendClientMessage(playerid, COLOR_GREY, "That player has no driving license on them.");
  67071. }
  67072. ShowActionBubble(playerid, "* %s takes away %s's drivers license.", GetRPName(playerid), GetRPName(targetid));
  67073. SendClientMessageEx(targetid, COLOR_AQUA, "%s has taken your drivers license.", GetRPName(playerid));
  67074. Log_Write("log_faction", "%s (uid: %i) has taken %s's (uid: %i) drivers license.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID]);
  67075. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET carlicense = 0 WHERE uid = %i", PlayerData[targetid][pID]);
  67076. mysql_tquery(connectionID, queryBuffer);
  67077. PlayerData[targetid][pCarLicense] = 0;
  67078. }
  67079. return 1;
  67080. }
  67081. CMD:ticket(playerid, params[])
  67082. {
  67083. new targetid, amount, reason[128];
  67084. if(!IsLawEnforcement(playerid))
  67085. {
  67086. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of law enforcement.");
  67087. }
  67088. if(sscanf(params, "uis[128]", targetid, amount, reason))
  67089. {
  67090. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /ticket [playerid] [amount] [reason]");
  67091. }
  67092. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  67093. {
  67094. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  67095. }
  67096. if(targetid == playerid)
  67097. {
  67098. return SendClientMessage(playerid, COLOR_GREY, "You can't ticket yourself.");
  67099. }
  67100. if(!(1000 <= amount <= 10000))
  67101. {
  67102. return SendClientMessage(playerid, COLOR_GREY, "The ticket amount must range between $1000 and $10000.");
  67103. }
  67104. PlayerData[targetid][pTicketOffer] = playerid;
  67105. PlayerData[targetid][pTicketPrice] = amount;
  67106. SendClientMessageEx(targetid, COLOR_AQUA, "* %s writes you a %s ticket for %s. (/accept ticket)", GetRPName(playerid), FormatNumber(amount), reason);
  67107. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered a %s ticket to %s for %s.", FormatNumber(amount), GetRPName(targetid), reason);
  67108. return 1;
  67109. }
  67110. CMD:gov(playerid, params[])
  67111. {
  67112. if(PlayerData[playerid][pFaction] == -1)
  67113. {
  67114. return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any faction at the moment.");
  67115. }
  67116. if(!PlayerData[playerid][pFactionLeader])
  67117. {
  67118. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  67119. }
  67120. if(isnull(params))
  67121. {
  67122. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /gov [text]");
  67123. }
  67124. switch(FactionInfo[PlayerData[playerid][pFaction]][fType])
  67125. {
  67126. case FACTION_MEDIC:
  67127. {
  67128. if(!PlayerData[playerid][pGovTimer])
  67129. SendClientMessageToAll(COLOR_GREY1, "____________ Public Service Announcement ____________");
  67130. SendClientMessageToAllEx(COLOR_DOCTOR, "* %s %s: %s", FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid), params);
  67131. PlayerData[playerid][pGovTimer] = 30;
  67132. }
  67133. case FACTION_POLICE:
  67134. {
  67135. if(!PlayerData[playerid][pGovTimer])
  67136. SendClientMessageToAll(COLOR_GREY1, "____________ Public Service Announcement ____________");
  67137. SendClientMessageToAllEx(COLOR_BLUE, "* %s %s: %s", FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid), params);
  67138. PlayerData[playerid][pGovTimer] = 30;
  67139. }
  67140. case FACTION_GOVERNMENT:
  67141. {
  67142. if(!PlayerData[playerid][pGovTimer])
  67143. SendClientMessageToAll(COLOR_GREY1, "____________ Government News Announcement ____________");
  67144. SendClientMessageToAllEx(COLOR_YELLOW2, "* %s %s: %s", FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid), params);
  67145. PlayerData[playerid][pGovTimer] = 30;
  67146. }
  67147. case FACTION_FEDERAL:
  67148. {
  67149. if(!PlayerData[playerid][pGovTimer])
  67150. SendClientMessageToAll(COLOR_GREY1, "____________ Public Service Announcement ____________");
  67151. SendClientMessageToAllEx(COLOR_OLDSCHOOL, "* %s %s: %s", FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid), params);
  67152. PlayerData[playerid][pGovTimer] = 30;
  67153. }
  67154. case FACTION_ARMY:
  67155. {
  67156. if(!PlayerData[playerid][pGovTimer])
  67157. SendClientMessageToAll(COLOR_GREY1, "____________ Public Service Announcement ____________");
  67158. SendClientMessageToAllEx(COLOR_OLDSCHOOL, "* %s %s: %s", FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid), params);
  67159. PlayerData[playerid][pGovTimer] = 30;
  67160. }
  67161. default:
  67162. {
  67163. SendClientMessage(playerid, COLOR_GREY, "Your faction is not authorized to use this command.");
  67164. }
  67165. }
  67166. return 1;
  67167. }
  67168. CMD:ram(playerid, params[])
  67169. {
  67170. new id;
  67171. if(!IsLawEnforcement(playerid))
  67172. {
  67173. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of law enforcement.");
  67174. }
  67175. for(new i = 0, j = Streamer_GetUpperBound(STREAMER_TYPE_OBJECT); i <= j; i ++)
  67176. {
  67177. if(IsValidDynamicObject(i) && IsPlayerInRangeOfDynamicObject(playerid, i, 2.5) && IsDoorObject(i))
  67178. {
  67179. if((id = GetInsideHouse(playerid)) >= 0 && Streamer_GetExtraInt(i, E_OBJECT_TYPE) == E_OBJECT_FURNITURE && Streamer_GetExtraInt(i, E_OBJECT_EXTRA_ID) == HouseInfo[id][hID])
  67180. {
  67181. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT door_opened FROM furniture WHERE id = %i", Streamer_GetExtraInt(i, E_OBJECT_INDEX_ID));
  67182. mysql_tquery(connectionID, queryBuffer, "OnPlayerRamFurnitureDoor", "iii", playerid, i, Streamer_GetExtraInt(i, E_OBJECT_INDEX_ID));
  67183. return 1;
  67184. }
  67185. /*else if((id = GetNearbyLand(playerid)) >= 0 && Streamer_GetExtraInt(i, E_OBJECT_TYPE) == E_OBJECT_LAND && Streamer_GetExtraInt(i, E_OBJECT_EXTRA_ID) == LandInfo[id][lID])
  67186. {
  67187. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT door_opened FROM landobjects WHERE id = %i", Streamer_GetExtraInt(i, E_OBJECT_INDEX_ID));
  67188. mysql_tquery(connectionID, queryBuffer, "OnPlayerRamLandDoor", "iii", playerid, i, Streamer_GetExtraInt(i, E_OBJECT_INDEX_ID));
  67189. return 1;
  67190. }*/
  67191. }
  67192. }
  67193. if((id = GetNearbyHouse(playerid)) >= 0)
  67194. {
  67195. if(!HouseInfo[id][hLocked])
  67196. {
  67197. return SendClientMessage(playerid, COLOR_GREY, "This house is unlocked. You don't need to ram the door.");
  67198. }
  67199. HouseInfo[id][hLocked] = 0;
  67200. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET locked = 0 WHERE id = %i", HouseInfo[id][hID]);
  67201. mysql_tquery(connectionID, queryBuffer);
  67202. ShowActionBubble(playerid, "* %s rams down %s's house door.", GetRPName(playerid), HouseInfo[id][hOwner]);
  67203. }
  67204. else if((id = GetNearbyBusiness(playerid)) >= 0)
  67205. {
  67206. if(!BusinessInfo[id][bLocked])
  67207. {
  67208. return SendClientMessage(playerid, COLOR_GREY, "This business is unlocked. You don't need to ram the door.");
  67209. }
  67210. BusinessInfo[id][bLocked] = 0;
  67211. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET locked = 0 WHERE id = %i", BusinessInfo[id][bID]);
  67212. mysql_tquery(connectionID, queryBuffer);
  67213. ShowActionBubble(playerid, "* %s rams down %s's business door.", GetRPName(playerid), BusinessInfo[id][bOwner]);
  67214. }
  67215. else if((id = GetNearbyGarage(playerid)) >= 0)
  67216. {
  67217. if(!GarageInfo[id][gLocked])
  67218. {
  67219. return SendClientMessage(playerid, COLOR_GREY, "This garage is unlocked. You don't need to ram the door.");
  67220. }
  67221. GarageInfo[id][gLocked] = 0;
  67222. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE garages SET locked = 0 WHERE id = %i", GarageInfo[id][gID]);
  67223. mysql_tquery(connectionID, queryBuffer);
  67224. ShowActionBubble(playerid, "* %s rams down %s's garage door.", GetRPName(playerid), GarageInfo[id][gOwner]);
  67225. }
  67226. else
  67227. {
  67228. SendClientMessage(playerid, COLOR_GREY, "You are not in range of any door which can be rammed.");
  67229. }
  67230. return 1;
  67231. }
  67232. CMD:deploy(playerid, params[])
  67233. {
  67234. new type[12], type_id = -1, Float:x, Float:y, Float:z, Float:a;
  67235. if(!IsLawEnforcement(playerid) && GetFactionType(playerid) != FACTION_MEDIC && GetFactionType(playerid) != FACTION_TERRORIST)
  67236. {
  67237. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a medic or law enforcer.");
  67238. }
  67239. if(sscanf(params, "s[12]", type))
  67240. {
  67241. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /deploy [option]");
  67242. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Spikestrip, Cone, Roadblock, Barrel, Flare");
  67243. return 1;
  67244. }
  67245. if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER && GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
  67246. {
  67247. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command while being in a vehicle");
  67248. }
  67249. if(GetPlayerInterior(playerid) > 0 || GetPlayerVirtualWorld(playerid) > 0)
  67250. {
  67251. return SendClientMessage(playerid, COLOR_GREY, "You can't deploy objects inside.");
  67252. }
  67253. GetPlayerPos(playerid, x, y, z);
  67254. GetPlayerFacingAngle(playerid, a);
  67255. if(!strcmp(type, "spikestrip", true)) {
  67256. type_id = DEPLOY_SPIKESTRIP;
  67257. } else if(!strcmp(type, "cone", true)) {
  67258. type_id = DEPLOY_CONE;
  67259. } else if(!strcmp(type, "roadblock", true)) {
  67260. type_id = DEPLOY_ROADBLOCK;
  67261. } else if(!strcmp(type, "barrel", true)) {
  67262. type_id = DEPLOY_BARREL;
  67263. } else if(!strcmp(type, "flare", true)) {
  67264. type_id = DEPLOY_FLARE;
  67265. }
  67266. if(type_id == -1)
  67267. {
  67268. return SendClientMessage(playerid, COLOR_GREY, "Invalid type.");
  67269. }
  67270. if(DeployObject(type_id, x, y, z, a) == -1)
  67271. {
  67272. return SendClientMessage(playerid, COLOR_GREY, "The deployable objects pool is full. Try deleting some first.");
  67273. }
  67274. if(IsLawEnforcement(playerid))
  67275. SendFactionMessage(PlayerData[playerid][pFaction], COLOR_OLDSCHOOL, "* HQ: %s %s has deployed a %s in %s.", FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid), deployableItems[type_id], GetZoneName(x, y, z));
  67276. else
  67277. SendFactionMessage(PlayerData[playerid][pFaction], COLOR_DOCTOR, "* HQ: %s %s has deployed a %s in %s.", FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid), deployableItems[type_id], GetZoneName(x, y, z));
  67278. return 1;
  67279. }
  67280. CMD:undeployall(playerid, params[])
  67281. {
  67282. if(!IsLawEnforcement(playerid) && GetFactionType(playerid) != FACTION_MEDIC && GetFactionType(playerid) != FACTION_TERRORIST)
  67283. {
  67284. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a medic or law enforcer.");
  67285. }
  67286. for(new i = 0; i < MAX_DEPLOYABLES; i ++)
  67287. {
  67288. if(DeployInfo[i][dExists])
  67289. {
  67290. DestroyDynamicObject(DeployInfo[i][dObject]);
  67291. DeployInfo[i][dExists] = 0;
  67292. DeployInfo[i][dType] = -1;
  67293. }
  67294. }
  67295. SendFactionMessage(PlayerData[playerid][pFaction], (IsLawEnforcement(playerid)) ? (COLOR_OLDSCHOOL) : (COLOR_DOCTOR), "* HQ: %s %s has removed all deployed objects.", FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid));
  67296. return 1;
  67297. }
  67298. CMD:undeploy(playerid, params[])
  67299. {
  67300. if(!IsLawEnforcement(playerid) && GetFactionType(playerid) != FACTION_MEDIC && GetFactionType(playerid) != FACTION_TERRORIST)
  67301. {
  67302. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a medic or law enforcer.");
  67303. }
  67304. for(new i = 0; i < MAX_DEPLOYABLES; i ++)
  67305. {
  67306. if(DeployInfo[i][dExists])
  67307. {
  67308. new Float:range;
  67309. if(DeployInfo[i][dType] == DEPLOY_SPIKESTRIP || DeployInfo[i][dType] == DEPLOY_BARREL || DeployInfo[i][dType] == DEPLOY_FLARE || DeployInfo[i][dType] == DEPLOY_CONE) {
  67310. range = 2.0;
  67311. } else if(DeployInfo[i][dType] == DEPLOY_ROADBLOCK) {
  67312. range = 5.0;
  67313. }
  67314. if(IsPlayerInRangeOfPoint(playerid, range, DeployInfo[i][dPosX], DeployInfo[i][dPosY], DeployInfo[i][dPosZ]))
  67315. {
  67316. SendFactionMessage(PlayerData[playerid][pFaction], (IsLawEnforcement(playerid)) ? (COLOR_OLDSCHOOL) : (COLOR_DOCTOR), "* HQ: %s %s has removed a %s in %s.", FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid), deployableItems[DeployInfo[i][dType]], GetZoneName(DeployInfo[i][dPosX], DeployInfo[i][dPosY], DeployInfo[i][dPosZ]));
  67317. DestroyDynamicObject(DeployInfo[i][dObject]);
  67318. DeployInfo[i][dExists] = 0;
  67319. DeployInfo[i][dType] = -1;
  67320. return 1;
  67321. }
  67322. }
  67323. }
  67324. SendClientMessage(playerid, COLOR_GREY, "You are not in range of any deployed objects.");
  67325. return 1;
  67326. }
  67327. CMD:bk(playerid, params[])
  67328. {
  67329. return callcmd::backup(playerid, params);
  67330. }
  67331. CMD:backup(playerid, params[])
  67332. {
  67333. if(!IsLawEnforcement(playerid) && GetFactionType(playerid) != FACTION_MEDIC && GetFactionType(playerid) != FACTION_GOVERNMENT)
  67334. {
  67335. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a medic or law enforcer.");
  67336. }
  67337. if(PlayerData[playerid][pInjured])
  67338. {
  67339. return SendClientMessage(playerid, COLOR_GREY, "You cannot call for backup when you are dead.");
  67340. }
  67341. if(PlayerData[playerid][pCuffed])
  67342. {
  67343. return SendClientMessage(playerid, COLOR_GREY, "You cannot use this command while cuffed.");
  67344. }
  67345. if(PlayerData[playerid][pTied])
  67346. {
  67347. return SendClientMessage(playerid, COLOR_GREY, "You cannot use this command while tied.");
  67348. }
  67349. if(!PlayerData[playerid][pBackup])
  67350. {
  67351. PlayerData[playerid][pBackup] = 1;
  67352. }
  67353. else
  67354. {
  67355. PlayerData[playerid][pBackup] = 0;
  67356. }
  67357. foreach(new i : Player)
  67358. {
  67359. switch(GetFactionType(i))
  67360. {
  67361. case FACTION_POLICE, FACTION_MEDIC, FACTION_FEDERAL, FACTION_ARMY, FACTION_GOVERNMENT:
  67362. {
  67363. if(PlayerData[playerid][pBackup])
  67364. {
  67365. SendClientMessageEx(i, COLOR_OLDSCHOOL, "* HQ: %s %s is requesting backup in %s (marked on map).", FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid), GetPlayerZoneName(playerid));
  67366. SetPlayerMarkerForPlayer(i, playerid, (FactionInfo[PlayerData[playerid][pFaction]][fColor] & ~0xff) + 0xFF);
  67367. }
  67368. else
  67369. {
  67370. SendClientMessageEx(i, COLOR_OLDSCHOOL, "* HQ: %s %s has cancelled their backup request.", FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid), GetPlayerZoneName(playerid));
  67371. SetPlayerMarkerForPlayer(i, playerid, GetPlayerColor(playerid));
  67372. }
  67373. }
  67374. }
  67375. }
  67376. return 1;
  67377. }
  67378. CMD:clearwanted(playerid, params[])
  67379. {
  67380. new targetid;
  67381. if(!IsLawEnforcement(playerid))
  67382. {
  67383. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of law enforcement.");
  67384. }
  67385. if(sscanf(params, "u", targetid))
  67386. {
  67387. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /clearwanted [playerid]");
  67388. }
  67389. if(!IsPlayerConnected(targetid))
  67390. {
  67391. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  67392. }
  67393. if(targetid == playerid)
  67394. {
  67395. return SendClientMessage(playerid, COLOR_GREY, "You can't clear yourself.");
  67396. }
  67397. if(!PlayerData[targetid][pWantedLevel])
  67398. {
  67399. return SendClientMessage(playerid, COLOR_GREY, "That player has no active charges to clear.");
  67400. }
  67401. PlayerData[targetid][pWantedLevel] = 0;
  67402. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM charges WHERE uid = %i", PlayerData[targetid][pID]);
  67403. mysql_tquery(connectionID, queryBuffer);
  67404. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET wantedlevel = 0 WHERE uid = %i", PlayerData[targetid][pID]);
  67405. mysql_tquery(connectionID, queryBuffer);
  67406. ShowActionBubble(playerid, "* %s calls in dispatch and asks for a warrant removal of %s.", GetRPName(playerid), GetRPName(targetid));
  67407. SendClientMessageEx(targetid, COLOR_WHITE, "* Your crimes were cleared by %s.", GetRPName(playerid));
  67408. SendFactionMessage(PlayerData[playerid][pFaction], COLOR_OLDSCHOOL, "* HQ: %s %s has cleared %s's charges and wanted level.", FactionRanks[PlayerData[playerid][pFaction]][PlayerData[playerid][pFactionRank]], GetRPName(playerid), GetRPName(targetid));
  67409. return 1;
  67410. }
  67411. CMD:vticket(playerid, params[])
  67412. {
  67413. new amount, vehicleid;
  67414. if(!IsLawEnforcement(playerid))
  67415. {
  67416. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of law enforcement.");
  67417. }
  67418. if(sscanf(params, "i", amount))
  67419. {
  67420. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /vticket [amount]");
  67421. }
  67422. if((vehicleid = GetNearbyVehicle(playerid)) == INVALID_VEHICLE_ID)
  67423. {
  67424. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any vehicle.");
  67425. }
  67426. if(!VehicleInfo[vehicleid][vOwnerID])
  67427. {
  67428. return SendClientMessage(playerid, COLOR_GREY, "This vehicle isn't owned by any particular person.");
  67429. }
  67430. if(!(1000 <= amount <= 5000))
  67431. {
  67432. return SendClientMessage(playerid, COLOR_GREY, "The amount must range from $1000 to $5000.");
  67433. }
  67434. if(VehicleInfo[vehicleid][vTickets] >= 50000)
  67435. {
  67436. return SendClientMessage(playerid, COLOR_GREY, "This vehicle has over $50000 in tickets. You can't add anymore.");
  67437. }
  67438. VehicleInfo[vehicleid][vTickets] += amount;
  67439. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET tickets = %i WHERE id = %i", VehicleInfo[vehicleid][vTickets], VehicleInfo[vehicleid][vID]);
  67440. mysql_tquery(connectionID, queryBuffer);
  67441. ShowActionBubble(playerid, "* %s writes up a %s ticket and attaches it to the %s.", GetRPName(playerid), FormatNumber(amount), GetVehicleName(vehicleid));
  67442. Log_Write("log_faction", "%s (uid: %i) placed a ticket for $%i on %s's (uid: %i) %s (id: %i).", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount, VehicleInfo[vehicleid][vOwner], VehicleInfo[vehicleid][vOwnerID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID]);
  67443. return 1;
  67444. }
  67445. CMD:siren(playerid, params[])
  67446. {
  67447. new vehicleid = GetPlayerVehicleID(playerid), Float:x, Float:y, Float:z, Float:tmp;
  67448. if(!IsLawEnforcement(playerid) && GetFactionType(playerid) != FACTION_MEDIC && GetFactionType(playerid) != FACTION_GOVERNMENT)
  67449. {
  67450. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a medic or law enforcer.");
  67451. }
  67452. if(!vehicleid)
  67453. {
  67454. return SendClientMessage(playerid, COLOR_GREY, "You are not inside of any vehicle.");
  67455. }
  67456. if(!VehicleHasWindows(vehicleid))
  67457. {
  67458. return SendClientMessage(playerid, COLOR_GREY, "This vehicle cannot have a siren attached to it.");
  67459. }
  67460. if(!IsValidDynamicObject(vehicleSiren[vehicleid]))
  67461. {
  67462. GetVehicleModelInfo(GetVehicleModel(vehicleid), VEHICLE_MODEL_INFO_SIZE, z, z, z);
  67463. GetVehicleModelInfo(GetVehicleModel(vehicleid), VEHICLE_MODEL_INFO_FRONTSEAT, x, y, tmp);
  67464. vehicleSiren[vehicleid] = CreateDynamicObject(18646, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  67465. AttachDynamicObjectToVehicle(vehicleSiren[vehicleid], vehicleid, -x, y, z / 1.9, 0.0, 0.0, 0.0);
  67466. ShowActionBubble(playerid, "* %s places a detachable siren on the roof of the %s.", GetRPName(playerid), GetVehicleName(vehicleid));
  67467. }
  67468. else
  67469. {
  67470. DestroyDynamicObject(vehicleSiren[vehicleid]);
  67471. vehicleSiren[vehicleid] = INVALID_OBJECT_ID;
  67472. ShowActionBubble(playerid, "* %s detaches the siren from the roof of the %s.", GetRPName(playerid), GetVehicleName(vehicleid));
  67473. }
  67474. return 1;
  67475. }
  67476. CMD:callsign(playerid, params[])
  67477. {
  67478. new vehicleid = GetPlayerVehicleID(playerid);
  67479. if(!IsLawEnforcement(playerid) && GetFactionType(playerid) != FACTION_MEDIC)
  67480. {
  67481. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a medic or law enforcer.");
  67482. }
  67483. if(!vehicleid)
  67484. {
  67485. return SendClientMessage(playerid, COLOR_GREY, "You are not inside of any vehicle.");
  67486. }
  67487. if(isnull(params) || strlen(params) > 12)
  67488. {
  67489. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /callsign [text ('none' to reset)]");
  67490. }
  67491. if(IsValidDynamic3DTextLabel(vehicleCallsign[vehicleid]))
  67492. {
  67493. DestroyDynamic3DTextLabel(vehicleCallsign[vehicleid]);
  67494. vehicleCallsign[vehicleid] = Text3D:INVALID_3DTEXT_ID;
  67495. if(!strcmp(params, "none", true))
  67496. {
  67497. SendClientMessage(playerid, COLOR_WHITE, "* Callsign removed from the vehicle.");
  67498. }
  67499. }
  67500. if(strcmp(params, "none", true) != 0)
  67501. {
  67502. vehicleCallsign[vehicleid] = CreateDynamic3DTextLabel(params, COLOR_GREY2, 0.0, -3.0, 0.0, 10.0, .attachedvehicle = vehicleid);
  67503. SendClientMessage(playerid, COLOR_WHITE, "* Callsign attached. '/callsign none' to detach the callsign.");
  67504. }
  67505. return 1;
  67506. }
  67507. CMD:vfrisk(playerid, params[])
  67508. {
  67509. new vehicleid;
  67510. if(!IsLawEnforcement(playerid))
  67511. {
  67512. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of law enforcement.");
  67513. }
  67514. if((vehicleid = GetNearbyVehicle(playerid)) == INVALID_VEHICLE_ID)
  67515. {
  67516. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any vehicle.");
  67517. }
  67518. if(!VehicleInfo[vehicleid][vOwnerID])
  67519. {
  67520. return SendClientMessage(playerid, COLOR_GREY, "This vehicle isn't owned by any particular person.");
  67521. }
  67522. new count;
  67523. for(new i = 0; i < 5; i ++)
  67524. {
  67525. if(VehicleInfo[vehicleid][vWeapons][i])
  67526. {
  67527. count++;
  67528. }
  67529. }
  67530. SendClientMessage(playerid, COLOR_NAVYBLUE, "______ Trunk Balance ______");
  67531. SendClientMessageEx(playerid, COLOR_GREY2, "Cash: $%i/$%i", VehicleInfo[vehicleid][vCash], GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_CASH));
  67532. SendClientMessageEx(playerid, COLOR_GREY2, "Materials: %i/%i | Weapons: %i/%i", VehicleInfo[vehicleid][vMaterials], GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_MATERIALS), count, GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_WEAPONS));
  67533. SendClientMessageEx(playerid, COLOR_GREY2, "Weed: %i/%i grams | Cocaine: %i/%i grams", VehicleInfo[vehicleid][vWeed], GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_WEED), VehicleInfo[vehicleid][vCocaine], GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_COCAINE));
  67534. SendClientMessageEx(playerid, COLOR_GREY2, "Meth: %i/%i grams | Painkillers: %i/%i pills", VehicleInfo[vehicleid][vMeth], GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_METH), VehicleInfo[vehicleid][vPainkillers], GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_PAINKILLERS));
  67535. if(count > 0)
  67536. {
  67537. SendClientMessage(playerid, COLOR_NAVYBLUE, "______ Trunk Weapons ______");
  67538. for(new i = 0; i < 5; i ++)
  67539. {
  67540. if(VehicleInfo[vehicleid][vWeapons][i])
  67541. {
  67542. SendClientMessageEx(playerid, COLOR_GREY2, "[%i] Weapon: %s", i + 1, GetWeaponNameEx(VehicleInfo[vehicleid][vWeapons][i]));
  67543. }
  67544. }
  67545. }
  67546. ShowActionBubble(playerid, "* %s prys open the trunk of the %s and takes a look inside.", GetRPName(playerid), GetVehicleName(vehicleid));
  67547. return 1;
  67548. }
  67549. CMD:vtake(playerid, params[])
  67550. {
  67551. new vehicleid, option[14];
  67552. if(!IsLawEnforcement(playerid))
  67553. {
  67554. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of law enforcement.");
  67555. }
  67556. if(sscanf(params, "s[14]", option))
  67557. {
  67558. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /vtake [option]");
  67559. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Weapons, Weed, Cocaine, Meth, Painkillers");
  67560. return 1;
  67561. }
  67562. if((vehicleid = GetNearbyVehicle(playerid)) == INVALID_VEHICLE_ID)
  67563. {
  67564. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any vehicle.");
  67565. }
  67566. if(!VehicleInfo[vehicleid][vOwnerID])
  67567. {
  67568. return SendClientMessage(playerid, COLOR_GREY, "This vehicle isn't owned by any particular person.");
  67569. }
  67570. if(!strcmp(option, "weapons", true))
  67571. {
  67572. VehicleInfo[vehicleid][vWeapons][0] = 0;
  67573. VehicleInfo[vehicleid][vWeapons][1] = 0;
  67574. VehicleInfo[vehicleid][vWeapons][2] = 0;
  67575. VehicleInfo[vehicleid][vWeapons][3] = 0;
  67576. VehicleInfo[vehicleid][vWeapons][4] = 0;
  67577. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET weapon_1 = 0, weapon_2 = 0, weapon_3 = 0, weapon_4 = 0, weapon_5 = 0 WHERE id = %i", VehicleInfo[vehicleid][vID]);
  67578. mysql_tquery(connectionID, queryBuffer);
  67579. ShowActionBubble(playerid, "* %s takes the weapons from the trunk of the %s.", GetRPName(playerid), GetVehicleName(vehicleid));
  67580. SendClientMessage(playerid, COLOR_AQUA, "You have taken the weapons from the trunk.");
  67581. Log_Write("log_faction", "%s (uid: %i) has taken the weapons from %s's (uid: %i) %s trunk (id: %i).", GetRPName(playerid), PlayerData[playerid][pID], VehicleInfo[vehicleid][vOwner], VehicleInfo[vehicleid][vOwnerID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID]);
  67582. }
  67583. else if(!strcmp(option, "weed", true))
  67584. {
  67585. ShowActionBubble(playerid, "* %s takes the weed from the trunk of the %s.", GetRPName(playerid), GetVehicleName(vehicleid));
  67586. SendClientMessageEx(playerid, COLOR_AQUA, "You have taken the %i grams of weed from the trunk.", VehicleInfo[vehicleid][vWeed]);
  67587. Log_Write("log_faction", "%s (uid: %i) has taken the %i grams of weed from %s's (uid: %i) %s trunk (id: %i).", GetRPName(playerid), PlayerData[playerid][pID], VehicleInfo[vehicleid][vWeed], VehicleInfo[vehicleid][vOwner], VehicleInfo[vehicleid][vOwnerID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID]);
  67588. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET weed = 0 WHERE id = %i", VehicleInfo[vehicleid][vID]);
  67589. mysql_tquery(connectionID, queryBuffer);
  67590. VehicleInfo[vehicleid][vWeed] = 0;
  67591. }
  67592. else if(!strcmp(option, "cocaine", true))
  67593. {
  67594. ShowActionBubble(playerid, "* %s takes the cocaine from the trunk of the %s.", GetRPName(playerid), GetVehicleName(vehicleid));
  67595. SendClientMessageEx(playerid, COLOR_AQUA, "You have taken the %i grams of cocaine from the trunk.", VehicleInfo[vehicleid][vCocaine]);
  67596. Log_Write("log_faction", "%s (uid: %i) has taken the %i grams of cocaine from %s's (uid: %i) %s trunk (id: %i).", GetRPName(playerid), PlayerData[playerid][pID], VehicleInfo[vehicleid][vCocaine], VehicleInfo[vehicleid][vOwner], VehicleInfo[vehicleid][vOwnerID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID]);
  67597. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET cocaine = 0 WHERE id = %i", VehicleInfo[vehicleid][vID]);
  67598. mysql_tquery(connectionID, queryBuffer);
  67599. VehicleInfo[vehicleid][vCocaine] = 0;
  67600. }
  67601. else if(!strcmp(option, "meth", true))
  67602. {
  67603. ShowActionBubble(playerid, "* %s takes the meth from the trunk of the %s.", GetRPName(playerid), GetVehicleName(vehicleid));
  67604. SendClientMessageEx(playerid, COLOR_AQUA, "You have taken the %i grams of meth from the trunk.", VehicleInfo[vehicleid][vMeth]);
  67605. Log_Write("log_faction", "%s (uid: %i) has taken the %i grams of meth from %s's (uid: %i) %s trunk (id: %i).", GetRPName(playerid), PlayerData[playerid][pID], VehicleInfo[vehicleid][vMeth], VehicleInfo[vehicleid][vOwner], VehicleInfo[vehicleid][vOwnerID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID]);
  67606. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET meth = 0 WHERE id = %i", VehicleInfo[vehicleid][vID]);
  67607. mysql_tquery(connectionID, queryBuffer);
  67608. VehicleInfo[vehicleid][vMeth] = 0;
  67609. }
  67610. else if(!strcmp(option, "painkillers", true))
  67611. {
  67612. ShowActionBubble(playerid, "* %s takes the painkillers from the trunk of the %s.", GetRPName(playerid), GetVehicleName(vehicleid));
  67613. SendClientMessageEx(playerid, COLOR_AQUA, "You have taken the %i painkillers from the trunk.", VehicleInfo[vehicleid][vPainkillers]);
  67614. Log_Write("log_faction", "%s (uid: %i) has taken the %i painkillers from %s's (uid: %i) %s trunk (id: %i).", GetRPName(playerid), PlayerData[playerid][pID], VehicleInfo[vehicleid][vPainkillers], VehicleInfo[vehicleid][vOwner], VehicleInfo[vehicleid][vOwnerID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID]);
  67615. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET painkillers = 0 WHERE id = %i", VehicleInfo[vehicleid][vID]);
  67616. mysql_tquery(connectionID, queryBuffer);
  67617. VehicleInfo[vehicleid][vPainkillers] = 0;
  67618. }
  67619. return 1;
  67620. }
  67621. CMD:heal(playerid, params[])
  67622. {
  67623. new targetid;
  67624. if(GetFactionType(playerid) != FACTION_MEDIC)
  67625. {
  67626. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a medic.");
  67627. }
  67628. if(sscanf(params, "u", targetid))
  67629. {
  67630. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /heal [playerid]");
  67631. }
  67632. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  67633. {
  67634. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  67635. }
  67636. if(targetid == playerid)
  67637. {
  67638. return SendClientMessage(playerid, COLOR_GREY, "You can't heal yourself.");
  67639. }
  67640. if(PlayerData[targetid][pReceivingAid])
  67641. {
  67642. return SendClientMessage(playerid, COLOR_GREY, "This player already has first aid effects.");
  67643. }
  67644. PlayerData[targetid][pReceivingAid] = 1;
  67645. ShowActionBubble(playerid, "* %s administers first aid to %s.", GetRPName(playerid), GetRPName(targetid));
  67646. SendClientMessageEx(targetid, COLOR_AQUA, "You have received first aid from %s. Your health will now regenerate until full.", GetRPName(playerid));
  67647. SendClientMessageEx(playerid, COLOR_AQUA, "You have administered first aid to %s.", GetRPName(targetid));
  67648. return 1;
  67649. }
  67650. CMD:stretcher(playerid, params[])
  67651. {
  67652. new targetid, vehicleid = GetPlayerVehicleID(playerid);
  67653. if(GetFactionType(playerid) != FACTION_MEDIC)
  67654. {
  67655. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a medic.");
  67656. }
  67657. if(sscanf(params, "u", targetid))
  67658. {
  67659. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /stretcher [playerid]");
  67660. }
  67661. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 15.0))
  67662. {
  67663. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  67664. }
  67665. if(targetid == playerid)
  67666. {
  67667. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command on yourself.");
  67668. }
  67669. if(!PlayerData[targetid][pInjured])
  67670. {
  67671. return SendClientMessage(playerid, COLOR_GREY, "That player is not injured.");
  67672. }
  67673. if(IsPlayerInAnyVehicle(targetid))
  67674. {
  67675. return SendClientMessage(playerid, COLOR_GREY, "That player is already in a vehicle.");
  67676. }
  67677. if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER && GetVehicleModel(GetPlayerVehicleID(playerid)) != 416 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 490)
  67678. {
  67679. return SendClientMessage(playerid, COLOR_GREY, "You need to be driving an ambulance.");
  67680. }
  67681. for(new i = 2; i < GetVehicleSeatCount(vehicleid); i ++)
  67682. {
  67683. if(!IsSeatOccupied(vehicleid, i))
  67684. {
  67685. PlayerData[targetid][pVehicleCount] = 0;
  67686. ClearAnimations(targetid, 1);
  67687. ApplyAnimation(targetid, "CARRY", "crry_prtial", 4.1, 0, 0, 0, 0, 0, 1);
  67688. TogglePlayerControllable(targetid, 0);
  67689. PutPlayerInVehicle(targetid, vehicleid, i);
  67690. ShowActionBubble(playerid, "* %s places %s on a stretcher in the Ambulance.", GetRPName(playerid), GetRPName(targetid));
  67691. return 1;
  67692. }
  67693. }
  67694. SendClientMessage(playerid, COLOR_GREY, "There are no unoccupied seats left. Find another vehicle.");
  67695. return 1;
  67696. }
  67697. CMD:deliverpatient(playerid, params[])
  67698. {
  67699. new targetid, amount = 2000;
  67700. if(GetFactionType(playerid) != FACTION_MEDIC)
  67701. {
  67702. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a medic.");
  67703. }
  67704. if(sscanf(params, "u", targetid))
  67705. {
  67706. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /deliverpatient [playerid]");
  67707. }
  67708. if(!IsPlayerInRangeOfPoint(playerid, 5.0, 2007.6256, -1410.2455, 16.9922) && !IsPlayerInRangeOfPoint(playerid, 5.0, 1147.3577, -1345.3729, 13.6328) && !IsPlayerInRangeOfPoint(playerid, 5.0, 2070.4307, -1422.8580, 48.331) && !IsPlayerInRangeOfPoint(playerid, 5.0, 1161.1458,-1364.4767,26.6485)
  67709. && !IsPlayerInRangeOfPoint(playerid, 5.0, 1510.7773, -2151.7322, 13.7483) && !IsPlayerInRangeOfPoint(playerid, 5.0, 1480.4819, -2166.9712, 35.2578) && !IsPlayerInRangeOfPoint(playerid, 5.0, 1539.1060, -2167.2058, 35.2578))
  67710. {
  67711. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any delivery points at the hospital.");
  67712. }
  67713. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 7.0))
  67714. {
  67715. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  67716. }
  67717. if(targetid == playerid)
  67718. {
  67719. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command on yourself.");
  67720. }
  67721. if(!PlayerData[targetid][pInjured])
  67722. {
  67723. return SendClientMessage(playerid, COLOR_GREY, "That player is not injured.");
  67724. }
  67725. if(PlayerData[playerid][pLaborUpgrade] > 0)
  67726. {
  67727. amount += percent(amount, PlayerData[playerid][pLaborUpgrade]);
  67728. }
  67729. PlayerData[targetid][pInjured] = 0;
  67730. PlayerData[targetid][pDelivered] = 0;
  67731. PlayerData[playerid][pTotalPatients]++;
  67732. if(IsPlayerInRangeOfPoint(playerid, 5.0, 2007.6256, -1410.2455, 16.9922) || IsPlayerInRangeOfPoint(playerid, 5.0, 2070.4307,-1422.8580,48.331))
  67733. {
  67734. SetPlayerVirtualWorld(targetid, HOSPITAL_COUNTY);
  67735. }
  67736. else if(IsPlayerInRangeOfPoint(playerid, 5.0, 1147.3577, -1345.3729, 13.6328) || IsPlayerInRangeOfPoint(playerid, 5.0, 1161.1458,-1364.4767,26.6485))
  67737. {
  67738. SetPlayerVirtualWorld(targetid, HOSPITAL_ALLSAINTS);
  67739. }
  67740. else if(IsPlayerInRangeOfPoint(playerid, 5.0, 1510.7773,-2151.7322,13.7483) || IsPlayerInRangeOfPoint(playerid, 5.0, 1480.4819,-2166.9712,35.2578) || IsPlayerInRangeOfPoint(playerid, 5.0, 1539.1060,-2167.2058,35.2578))
  67741. {
  67742. SetPlayerVirtualWorld(targetid, HOSPITAL_FMDHQ);
  67743. }
  67744. if(GetFactionType(targetid) == FACTION_POLICE || GetFactionType(targetid) == FACTION_MEDIC)
  67745. {
  67746. SendClientMessage(targetid, COLOR_DOCTOR, "You have not been billed for your stay. You also keep all of your weapons!");
  67747. }
  67748. else
  67749. {
  67750. SendClientMessage(targetid, COLOR_DOCTOR, "You have been billed $500 for your stay. You also keep all of your weapons!");
  67751. }
  67752. SetPlayerPos(targetid, -2297.6084,111.1512,-5.3336);//hospitalspawn
  67753. SetPlayerFacingAngle(targetid, 89.7591);
  67754. SetPlayerInterior(targetid, 1);
  67755. SetPlayerVirtualWorld(targetid, PlayerData[targetid][pHospitalType]);
  67756. SetCameraBehindPlayer(targetid);
  67757. ClearAnimations(targetid, 1);
  67758. if(!(GetFactionType(targetid) == FACTION_POLICE || GetFactionType(targetid) == FACTION_MEDIC) || PlayerData[playerid][pHours] > 8)
  67759. {
  67760. GivePlayerCash(targetid, -500);
  67761. GameTextForPlayer(targetid, "~w~Discharged~n~~r~-$500", 5000, 1);
  67762. }
  67763. TogglePlayerControllable(targetid, 1);
  67764. SetPlayerDrunkLevel(targetid, 0);
  67765. SetPlayerHealth(targetid, PlayerData[targetid][pSpawnHealth]);
  67766. SetScriptArmour(targetid, PlayerData[targetid][pSpawnArmor]);
  67767. PlayerData[targetid][pAcceptedEMS] = INVALID_PLAYER_ID;
  67768. GivePlayerCash(playerid, amount);
  67769. SendClientMessageEx(playerid, COLOR_AQUA, "You have delivered %s to the hospital and earned {00AA00}$%i{33CCFF}.", GetRPName(targetid), amount);
  67770. return 1;
  67771. }
  67772. CMD:listbugs(playerid, params[])
  67773. {
  67774. if(GetFactionType(playerid) != FACTION_FEDERAL)
  67775. {
  67776. SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a federal agent.");
  67777. return 1;
  67778. }
  67779. SendClientMessage(playerid, COLOR_GREEN, "Bugged players:");
  67780. foreach(new i : Player)
  67781. {
  67782. if(PlayerData[i][pBugged])
  67783. {
  67784. SendClientMessageEx(playerid, COLOR_GREY, "Name: %s - Location: %s", GetRPName(i), GetPlayerZoneName(i));
  67785. }
  67786. }
  67787. return 1;
  67788. }
  67789. CMD:listpt(playerid, params[])
  67790. {
  67791. if(GetFactionType(playerid) != FACTION_MEDIC)
  67792. {
  67793. SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a medic.");
  67794. return 1;
  67795. }
  67796. SendClientMessage(playerid, COLOR_GREEN, "Injured - (/injuries):");
  67797. foreach(new i : Player)
  67798. {
  67799. if(PlayerData[i][pInjured])
  67800. {
  67801. new accepted[24];
  67802. if(IsPlayerConnected(PlayerData[i][pAcceptedEMS]))
  67803. {
  67804. accepted = GetRPName(PlayerData[i][pAcceptedEMS]);
  67805. }
  67806. else
  67807. {
  67808. accepted = "None";
  67809. }
  67810. SendClientMessageEx(playerid, COLOR_GREY, "Name: %s - Location: %s - Medic: %s", GetRPName(i), GetPlayerZoneName(i), accepted);
  67811. }
  67812. }
  67813. SendClientMessage(playerid, COLOR_AQUA, "Use /getpt [playerid] to track them!");
  67814. return 1;
  67815. }
  67816. CMD:getpt(playerid, params[])
  67817. {
  67818. if(GetFactionType(playerid) == FACTION_MEDIC)
  67819. {
  67820. new targetid;
  67821. if(sscanf(params, "u", targetid))
  67822. {
  67823. return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /getpt [playerid]");
  67824. }
  67825. if(IsPlayerConnected(targetid))
  67826. {
  67827. if(targetid == playerid)
  67828. {
  67829. SendClientMessage(playerid, COLOR_AQUA, "You can't accept your own Emergency Dispatch call!");
  67830. return 1;
  67831. }
  67832. if(!PlayerData[targetid][pInjured])
  67833. {
  67834. SendClientMessage(playerid, COLOR_GREY, "That person is not injured!");
  67835. return 1;
  67836. }
  67837. if(!IsPlayerConnected(PlayerData[targetid][pAcceptedEMS]))
  67838. {
  67839. if(PlayerData[targetid][pJailTime] > 0) return SendClientMessage(playerid, COLOR_GREY, "You can't use this command on jailed players.");
  67840. SendFactionMessage(PlayerData[playerid][pFaction], COLOR_DOCTOR, "EMS Driver %s has accepted the Emergency Dispatch call for %s.", GetRPName(playerid), GetRPName(targetid));
  67841. SendClientMessageEx(playerid, COLOR_AQUA, "* You have accepted EMS Call from %s, you will see the marker until you have reached it.", GetRPName(targetid));
  67842. SendClientMessageEx(targetid, COLOR_AQUA, "* EMS Driver %s has accepted your EMS Call; please be patient as they are on the way!", GetPlayerNameEx(playerid));
  67843. PlayerData[targetid][pAcceptedEMS] = playerid;
  67844. GameTextForPlayer(playerid, "~w~EMS Caller~n~~r~Go to the red marker.", 5000, 1);
  67845. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  67846. new Float:ppos[3];
  67847. GetPlayerPosEx(targetid, ppos[0], ppos[1], ppos[2]);
  67848. SetPlayerCheckpoint(playerid, ppos[0],ppos[1],ppos[2], 3.0);
  67849. }
  67850. else
  67851. {
  67852. SendClientMessage(playerid, COLOR_WHITE, "Someone has already accepted that call!");
  67853. }
  67854. }
  67855. }
  67856. return 1;
  67857. }
  67858. CMD:loadpt(playerid, params[])
  67859. {
  67860. return callcmd::stretcher(playerid, params);
  67861. }
  67862. CMD:deliverpt(playerid, params[])
  67863. {
  67864. return callcmd::deliverpatient(playerid, params);
  67865. }
  67866. CMD:movept(playerid, params[])
  67867. {
  67868. return callcmd::drag(playerid, params);
  67869. }
  67870. CMD:injuries(playerid, params[])
  67871. {
  67872. new targetid;
  67873. if(GetFactionType(playerid) != FACTION_MEDIC)
  67874. {
  67875. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a medic.");
  67876. }
  67877. if(sscanf(params, "u", targetid))
  67878. {
  67879. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /injuries [playerid]");
  67880. }
  67881. if(!IsPlayerConnected(targetid))
  67882. {
  67883. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  67884. }
  67885. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  67886. {
  67887. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  67888. }
  67889. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT weaponid, timestamp FROM shots WHERE hitid = %i AND hittype = 1 ORDER BY id DESC LIMIT 20", targetid);
  67890. mysql_tquery(connectionID, queryBuffer, "OnPlayerListInjuries", "ii", playerid, targetid);
  67891. return 1;
  67892. }
  67893. CMD:news(playerid, params[])
  67894. {
  67895. if(GetFactionType(playerid) != FACTION_NEWS)
  67896. {
  67897. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a news reporter.");
  67898. }
  67899. if(isnull(params))
  67900. {
  67901. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /news [text]");
  67902. }
  67903. if(PlayerData[playerid][pToggleNews])
  67904. {
  67905. return SendClientMessage(playerid, COLOR_GREY, "You can't make news broadcasts as you have it toggled.");
  67906. }
  67907. if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 488 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 582)
  67908. {
  67909. return SendClientMessage(playerid, COLOR_GREY, "You can only use this command from within a news van or news chopper.");
  67910. }
  67911. foreach(new i : Player)
  67912. {
  67913. if(!PlayerData[i][pToggleNews])
  67914. {
  67915. SendClientMessageEx(i, COLOR_LIGHTGREEN, "News Reporter %s: %s", GetRPName(playerid), params);
  67916. }
  67917. }
  67918. return 1;
  67919. }
  67920. CMD:live(playerid, params[])
  67921. {
  67922. new targetid;
  67923. if(GetFactionType(playerid) != FACTION_NEWS)
  67924. {
  67925. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a news reporter.");
  67926. }
  67927. if(sscanf(params, "u", targetid))
  67928. {
  67929. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /live [playerid]");
  67930. }
  67931. if(PlayerData[playerid][pLiveMuted])
  67932. {
  67933. return SendClientMessage(playerid, COLOR_GREY, "You are banned from live interviews. Ask a higher rank to lift your ban.");
  67934. }
  67935. if(PlayerData[playerid][pLiveBroadcast] != INVALID_PLAYER_ID)
  67936. {
  67937. return SendClientMessage(playerid, COLOR_GREY, "You are already doing a live interview. /endlive to finish it.");
  67938. }
  67939. if(!IsPlayerConnected(targetid))
  67940. {
  67941. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  67942. }
  67943. if(targetid == playerid)
  67944. {
  67945. return SendClientMessage(playerid, COLOR_GREY, "You can't interview yourself.");
  67946. }
  67947. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  67948. {
  67949. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  67950. }
  67951. if(PlayerData[targetid][pLiveMuted])
  67952. {
  67953. return SendClientMessage(playerid, COLOR_GREY, "That player is banned from live interviews.");
  67954. }
  67955. if(PlayerData[targetid][pCallLine] != INVALID_PLAYER_ID)
  67956. {
  67957. return SendClientMessage(playerid, COLOR_GREY, "That player is on a phone call at the moment.");
  67958. }
  67959. PlayerData[targetid][pLiveOffer] = playerid;
  67960. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered you a live interview. (/accept live)", GetRPName(playerid));
  67961. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered %s a live interview.", GetRPName(targetid));
  67962. return 1;
  67963. }
  67964. CMD:endlive(playerid, params[])
  67965. {
  67966. if(GetFactionType(playerid) != FACTION_NEWS)
  67967. {
  67968. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a news reporter.");
  67969. }
  67970. if(PlayerData[playerid][pLiveBroadcast] == INVALID_PLAYER_ID)
  67971. {
  67972. return SendClientMessage(playerid, COLOR_GREY, "You are currently not doing a live interview.");
  67973. }
  67974. SendClientMessage(playerid, COLOR_AQUA, "You have ended the live interview.");
  67975. SendClientMessageEx(PlayerData[playerid][pLiveBroadcast], COLOR_AQUA, "%s has ended the live interview.", GetRPName(playerid));
  67976. PlayerData[PlayerData[playerid][pLiveBroadcast]][pLiveBroadcast] = INVALID_PLAYER_ID;
  67977. PlayerData[playerid][pLiveBroadcast] = INVALID_PLAYER_ID;
  67978. return 1;
  67979. }
  67980. CMD:liveban(playerid, params[])
  67981. {
  67982. new targetid;
  67983. if(GetFactionType(playerid) != FACTION_NEWS)
  67984. {
  67985. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a news reporter.");
  67986. }
  67987. if(PlayerData[playerid][pFactionRank] < FactionInfo[PlayerData[playerid][pFaction]][fRankCount] - 2)
  67988. {
  67989. return SendClientMessageEx(playerid, COLOR_GREY, "You need to be at least rank %i+ to use this command.", FactionInfo[PlayerData[playerid][pFaction]][fRankCount] - 2);
  67990. }
  67991. if(sscanf(params, "u", targetid))
  67992. {
  67993. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /liveban [playerid]");
  67994. }
  67995. if(!IsPlayerConnected(targetid))
  67996. {
  67997. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  67998. }
  67999. if(targetid == playerid)
  68000. {
  68001. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command on yourself.");
  68002. }
  68003. if(!PlayerData[targetid][pLiveMuted])
  68004. {
  68005. if(PlayerData[targetid][pLiveBroadcast] != INVALID_PLAYER_ID)
  68006. {
  68007. PlayerData[PlayerData[targetid][pLiveBroadcast]][pLiveBroadcast] = INVALID_PLAYER_ID;
  68008. PlayerData[targetid][pLiveBroadcast] = INVALID_PLAYER_ID;
  68009. }
  68010. PlayerData[targetid][pLiveMuted] = 1;
  68011. SendClientMessageEx(targetid, COLOR_LIGHTRED, "%s has banned you from live interviews.", GetPlayerNameEx(playerid));
  68012. SendClientMessageEx(playerid, COLOR_AQUA, "You have banned %s from live interviews.", GetPlayerNameEx(targetid));
  68013. }
  68014. else
  68015. {
  68016. PlayerData[targetid][pLiveMuted] = 0;
  68017. SendClientMessageEx(targetid, COLOR_YELLOW, "%s has unbanned you from live interviews.", GetPlayerNameEx(playerid));
  68018. SendClientMessageEx(playerid, COLOR_AQUA, "You have unbanned %s from live interviews.", GetPlayerNameEx(targetid));
  68019. }
  68020. return 1;
  68021. }
  68022. CMD:settax(playerid, params[])
  68023. {
  68024. new amount;
  68025. if(GetFactionType(playerid) != FACTION_GOVERNMENT)
  68026. {
  68027. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of government.");
  68028. }
  68029. if(PlayerData[playerid][pFactionRank] < FactionInfo[PlayerData[playerid][pFaction]][fRankCount] - 1)
  68030. {
  68031. return SendClientMessageEx(playerid, COLOR_GREY, "You need to be at least rank %i+ to use this command.", FactionInfo[PlayerData[playerid][pFaction]][fRankCount] - 1);
  68032. }
  68033. if(sscanf(params, "i", amount))
  68034. {
  68035. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /settax [rate]");
  68036. }
  68037. if(!(10 <= amount <= 50))
  68038. {
  68039. return SendClientMessage(playerid, COLOR_GREY, "The tax percentage must range from 10 to 50.");
  68040. }
  68041. gTax = amount;
  68042. SaveServerInfo();
  68043. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s has adjusted the income tax rate to %i percent.", GetRPName(playerid), amount);
  68044. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the income tax rate to %i percent.", amount);
  68045. Log_Write("log_faction", "%s (uid: %i) set the income tax rate to %i percent.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount);
  68046. return 1;
  68047. }
  68048. CMD:factionpay(playerid, params[])
  68049. {
  68050. new factionid = PlayerData[playerid][pFaction];
  68051. if(!PlayerData[playerid][pFactionLeader] && GetFactionType(playerid) != FACTION_NONE)
  68052. {
  68053. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a faction leader or part of a faction altogether.");
  68054. }
  68055. if(sscanf(params, "s[5]", "edit"))
  68056. {
  68057. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /factionpay [edit]");
  68058. }
  68059. if(FactionInfo[factionid][fType] == FACTION_HITMAN)
  68060. {
  68061. return SendClientMessage(playerid, COLOR_GREY, "Hitman factions have no federal budget.");
  68062. }
  68063. PlayerData[playerid][pFactionEdit] = factionid;
  68064. ShowDialogToPlayer(playerid, DIALOG_FACTIONPAY1);
  68065. return 1;
  68066. }
  68067. CMD:adwithdraw(playerid, params[])
  68068. {
  68069. new amount, reason[64];
  68070. if(GetFactionType(playerid) != FACTION_NEWS)
  68071. {
  68072. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of the news faction.");
  68073. }
  68074. if(PlayerData[playerid][pFactionRank] < FactionInfo[PlayerData[playerid][pFaction]][fRankCount] - 1)
  68075. {
  68076. return SendClientMessageEx(playerid, COLOR_GREY, "You need to be at least rank %i+ to use this command.", FactionInfo[PlayerData[playerid][pFaction]][fRankCount] - 1);
  68077. }
  68078. if(!IsPlayerInRangeOfPoint(playerid, 10.0, 1667.4260, -972.6691, 683.6873))
  68079. {
  68080. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the bank.");
  68081. }
  68082. if(sscanf(params, "is[64]", amount, reason))
  68083. {
  68084. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /adwithdraw [amount] [reason] ($%i available)", gNewsVault);
  68085. }
  68086. if(amount < 1 || amount > gNewsVault)
  68087. {
  68088. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  68089. }
  68090. gNewsVault -= amount;
  68091. SaveServerInfo();
  68092. GivePlayerCash(playerid, amount);
  68093. SendClientMessageEx(playerid, COLOR_AQUA, "* You have withdrawn %s from the advertisement vault. The new balance is %s.", FormatNumber(amount), FormatNumber(gVault));
  68094. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s has withdrawn %s from the advertisement vault, reason: %s", GetRPName(playerid), FormatNumber(amount), reason);
  68095. Log_Write("log_faction", "%s (uid: %i) has withdrawn $%i from the advertisement vault, reason: %s", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount, reason);
  68096. return 1;
  68097. }
  68098. CMD:addeposit(playerid, params[])
  68099. {
  68100. new amount;
  68101. if(GetFactionType(playerid) != FACTION_NEWS)
  68102. {
  68103. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of the news faction.");
  68104. }
  68105. if(PlayerData[playerid][pFactionRank] < FactionInfo[PlayerData[playerid][pFaction]][fRankCount] - 1)
  68106. {
  68107. return SendClientMessageEx(playerid, COLOR_GREY, "You need to be at least rank %i+ to use this command.", FactionInfo[PlayerData[playerid][pFaction]][fRankCount] - 1);
  68108. }
  68109. if(!IsPlayerInRangeOfPoint(playerid, 10.0, 1667.4260, -972.6691, 683.6873))
  68110. {
  68111. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the bank.");
  68112. }
  68113. if(sscanf(params, "i", amount))
  68114. {
  68115. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /addeposit [amount] ($%i available)", gNewsVault);
  68116. }
  68117. if(amount < 1 || amount > PlayerData[playerid][pCash])
  68118. {
  68119. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  68120. }
  68121. gNewsVault += amount;
  68122. SaveServerInfo();
  68123. GivePlayerCash(playerid, -amount);
  68124. SendClientMessageEx(playerid, COLOR_AQUA, "* You have deposited $%i in the advertisement vault. The new balance is $%i.", amount, gNewsVault);
  68125. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s has deposited $%i in the advertisement vault.", GetRPName(playerid), amount);
  68126. Log_Write("log_faction", "%s (uid: %i) has deposited $%i in the advertisement vault.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount);
  68127. return 1;
  68128. }
  68129. CMD:taxwithdraw(playerid, params[])
  68130. {
  68131. new amount, reason[64];
  68132. if(GetFactionType(playerid) != FACTION_GOVERNMENT)
  68133. {
  68134. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of government.");
  68135. }
  68136. if(PlayerData[playerid][pFactionRank] < FactionInfo[PlayerData[playerid][pFaction]][fRankCount] - 1)
  68137. {
  68138. return SendClientMessageEx(playerid, COLOR_GREY, "You need to be at least rank %i+ to use this command.", FactionInfo[PlayerData[playerid][pFaction]][fRankCount] - 1);
  68139. }
  68140. if(!IsPlayerInRangeOfPoint(playerid, 10.0, 1667.4260, -972.6691, 683.6873))
  68141. {
  68142. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the bank.");
  68143. }
  68144. if(sscanf(params, "is[64]", amount, reason))
  68145. {
  68146. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /taxwithdraw [amount] [reason] ($%i available)", gVault);
  68147. }
  68148. if(amount < 1 || amount > gVault)
  68149. {
  68150. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  68151. }
  68152. AddToTaxVault(-amount);
  68153. GivePlayerCash(playerid, amount);
  68154. SendClientMessageEx(playerid, COLOR_AQUA, "* You have withdrawn %s from the tax vault. The new balance is %s.", FormatNumber(amount), FormatNumber(gVault));
  68155. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s has withdrawn %s from the tax vault, reason: %s", GetRPName(playerid), FormatNumber(amount), reason);
  68156. Log_Write("log_faction", "%s (uid: %i) has withdrawn $%i from the tax vault, reason: %s", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount, reason);
  68157. return 1;
  68158. }
  68159. CMD:taxdeposit(playerid, params[])
  68160. {
  68161. new amount;
  68162. if(GetFactionType(playerid) != FACTION_GOVERNMENT)
  68163. {
  68164. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of government.");
  68165. }
  68166. if(PlayerData[playerid][pFactionRank] < FactionInfo[PlayerData[playerid][pFaction]][fRankCount] - 1)
  68167. {
  68168. return SendClientMessageEx(playerid, COLOR_GREY, "You need to be at least rank %i+ to use this command.", FactionInfo[PlayerData[playerid][pFaction]][fRankCount] - 1);
  68169. }
  68170. if(!IsPlayerInRangeOfPoint(playerid, 10.0, 1667.4260, -972.6691, 683.6873))
  68171. {
  68172. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the bank.");
  68173. }
  68174. if(sscanf(params, "i", amount))
  68175. {
  68176. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /taxdeposit [amount] ($%i available)", gVault);
  68177. }
  68178. if(amount < 1 || amount > PlayerData[playerid][pCash])
  68179. {
  68180. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  68181. }
  68182. AddToTaxVault(amount);
  68183. GivePlayerCash(playerid, -amount);
  68184. SendClientMessageEx(playerid, COLOR_AQUA, "* You have deposited $%i in the tax vault. The new balance is $%i.", amount, gVault);
  68185. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s has deposited $%i in the tax vault.", GetRPName(playerid), amount);
  68186. Log_Write("log_faction", "%s (uid: %i) has deposited $%i in the tax vault.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], amount);
  68187. return 1;
  68188. }
  68189. CMD:execute(playerid, params[])
  68190. {
  68191. if(PlayerData[playerid][pContractTaken])
  68192. {
  68193. if(PlayerData[playerid][pExecute] == 0)
  68194. {
  68195. PlayerData[playerid][pExecute] = 1;
  68196. }
  68197. else
  68198. {
  68199. PlayerData[playerid][pExecute] = 0;
  68200. }
  68201. } else SendClientMessage(playerid, COLOR_GREY, "Hey nerd, it wont work, get that fucking hit first!");
  68202. return 1;
  68203. }
  68204. CMD:contract(playerid, params[])
  68205. {
  68206. new targetid, amount, reason[64];
  68207. if(sscanf(params, "iis[64]", targetid, amount, reason))
  68208. {
  68209. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /contract [playerid] [amount] [reason]");
  68210. }
  68211. if(PlayerData[playerid][pLevel] < 5)
  68212. {
  68213. return SendClientMessage(playerid, COLOR_GREY, "You must be at least level 5+ to contract players.");
  68214. }
  68215. if(GetFactionType(playerid) == FACTION_HITMAN)
  68216. {
  68217. return SendClientMessage(playerid, COLOR_GREY, "You are a hitman and therefore can't contract other players.");
  68218. }
  68219. if(!IsPlayerConnected(targetid))
  68220. {
  68221. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  68222. }
  68223. if(targetid == playerid)
  68224. {
  68225. return SendClientMessage(playerid, COLOR_GREY, "You can't contract yourself.");
  68226. }
  68227. if(PlayerData[targetid][pLevel] < 5)
  68228. {
  68229. return SendClientMessage(playerid, COLOR_GREY, "You can only contract level 5+ players.");
  68230. }
  68231. if(!(2500 <= amount <= 500000))
  68232. {
  68233. return SendClientMessage(playerid, COLOR_GREY, "The amount must range from $2500 to $500000.");
  68234. }
  68235. if(PlayerData[playerid][pCash] < amount)
  68236. {
  68237. return SendClientMessage(playerid, COLOR_GREY, "You don't have that much money.");
  68238. }
  68239. if(PlayerData[playerid][pTazedTime] > 0 || PlayerData[playerid][pInjured] > 0 || PlayerData[playerid][pHospital] > 0 || PlayerData[playerid][pCuffed] > 0 || PlayerData[playerid][pTied] > 0 || PlayerData[playerid][pJailTime] > 0)
  68240. {
  68241. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment.");
  68242. }
  68243. if(PlayerData[targetid][pContracted] + amount > 500000)
  68244. {
  68245. return SendClientMessage(playerid, COLOR_GREY, "That player can't have more than $500000 on their head.");
  68246. }
  68247. foreach(new i : Player)
  68248. {
  68249. if(GetFactionType(i) == FACTION_HITMAN)
  68250. {
  68251. SendClientMessageEx(i, COLOR_YELLOW, "* %s has contracted %s for $%i, reason: %s [/contracts]", GetRPName(playerid), GetRPName(targetid), amount, reason);
  68252. }
  68253. }
  68254. GivePlayerCash(playerid, -amount);
  68255. PlayerData[targetid][pContracted] += amount;
  68256. GetPlayerName(playerid, PlayerData[targetid][pContractBy], MAX_PLAYER_NAME);
  68257. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET contracted = %i, contractby = '%e' WHERE uid = %i", PlayerData[targetid][pContracted], PlayerData[targetid][pContractBy], PlayerData[targetid][pID]);
  68258. mysql_tquery(connectionID, queryBuffer);
  68259. SendClientMessageEx(playerid, COLOR_AQUA, "You have placed a contract on %s for $%i, reason: %s", GetRPName(targetid), amount, reason);
  68260. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s placed a contract on %s for $%i, reason: %s", GetRPName(playerid), GetRPName(targetid), amount, reason);
  68261. Log_Write("log_contracts", "%s (uid: %i) placed a contract on %s (uid: %i) for $%i, reason: %s", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], amount, reason);
  68262. return 1;
  68263. }
  68264. CMD:noknife(playerid, params[])
  68265. {
  68266. if(GetFactionType(playerid) != FACTION_HITMAN)
  68267. {
  68268. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a hitman.");
  68269. }
  68270. if(PlayerData[playerid][pNoKnife])
  68271. {
  68272. PlayerData[playerid][pNoKnife] = 0;
  68273. SendClientMessage(playerid, COLOR_AQUA, "You've enabled no knife mode, your armed weapon will never be a knife.");
  68274. }
  68275. else
  68276. {
  68277. PlayerData[playerid][pNoKnife] = 1;
  68278. SendClientMessage(playerid, COLOR_AQUA, "You've disabled no knife mode, your armed weapon can be anything");
  68279. }
  68280. return 1;
  68281. }
  68282. CMD:hfind(playerid, params[])
  68283. {
  68284. new targetid;
  68285. if(GetFactionType(playerid) != FACTION_HITMAN && GetFactionType(playerid) != FACTION_FEDERAL)
  68286. {
  68287. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a hitman or federal agent.");
  68288. }
  68289. if(sscanf(params, "u", targetid))
  68290. {
  68291. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /hfind [playerid]");
  68292. }
  68293. if(!IsPlayerConnected(targetid))
  68294. {
  68295. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  68296. }
  68297. if(targetid == playerid)
  68298. {
  68299. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command on yourself.");
  68300. }
  68301. if(GetPlayerInterior(targetid))
  68302. {
  68303. return SendClientMessage(playerid, COLOR_GREY, "This player is an interior. You can't find them at the moment.");
  68304. }
  68305. if(PlayerData[targetid][pAdminDuty])
  68306. {
  68307. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command on an on duty administrator.");
  68308. }
  68309. PlayerData[playerid][pFindTime] = 15;
  68310. PlayerData[playerid][pFindPlayer] = targetid;
  68311. SetPlayerMarkerForPlayer(playerid, targetid, 0xFF0000FF);
  68312. SendClientMessageEx(playerid, COLOR_WHITE, "* %s's location marked on your radar. 15 seconds remain until the marker disappears.", GetRPName(targetid));
  68313. return 1;
  68314. }
  68315. CMD:contracts(playerid, params[])
  68316. {
  68317. if(GetFactionType(playerid) != FACTION_HITMAN && PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  68318. {
  68319. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  68320. }
  68321. SendClientMessage(playerid, COLOR_NAVYBLUE, "_______ Pending Contracts _______");
  68322. foreach(new i : Player)
  68323. {
  68324. if(PlayerData[i][pContracted] > 0)
  68325. {
  68326. SendClientMessageEx(playerid, COLOR_GREY2, "ID: %i | Target: %s | Bounty price: %s | Last contracter: %s", i, GetRPName(i), FormatNumber(PlayerData[i][pContracted]), PlayerData[i][pContractBy]);
  68327. }
  68328. }
  68329. SendClientMessage(playerid, COLOR_YELLOW, "* Use /takehit [id] or /denyhit [id] to handle contracts.");
  68330. return 1;
  68331. }
  68332. CMD:denyhit(playerid, params[])
  68333. {
  68334. new targetid;
  68335. if(GetFactionType(playerid) != FACTION_HITMAN && PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  68336. {
  68337. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a hitman.");
  68338. }
  68339. if(sscanf(params, "u", targetid))
  68340. {
  68341. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /denyhit [playerid]");
  68342. }
  68343. if(!IsPlayerConnected(targetid))
  68344. {
  68345. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  68346. }
  68347. if(!PlayerData[targetid][pContracted])
  68348. {
  68349. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't been contracted.");
  68350. }
  68351. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has cancelled the contract on %s for $%i.", GetRPName(playerid), GetRPName(targetid), PlayerData[targetid][pContracted]);
  68352. if(GetFactionType(playerid) == FACTION_HITMAN)
  68353. {
  68354. SendFactionMessage(PlayerData[playerid][pFaction], COLOR_YELLOW, "* Hitman %s has cancelled the contract on %s for %s. *", GetRPName(playerid), GetRPName(targetid), FormatNumber(PlayerData[targetid][pContracted]));
  68355. }
  68356. PlayerData[targetid][pContracted] = 0;
  68357. strcpy(PlayerData[targetid][pContractBy], "No-one", MAX_PLAYER_NAME);
  68358. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET contracted = 0, contractby = 'No-one' WHERE uid = %i", PlayerData[targetid][pID]);
  68359. mysql_tquery(connectionID, queryBuffer);
  68360. return 1;
  68361. }
  68362. CMD:takehit(playerid, params[])
  68363. {
  68364. new targetid;
  68365. if(GetFactionType(playerid) != FACTION_HITMAN)
  68366. {
  68367. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a hitman.");
  68368. }
  68369. if(sscanf(params, "u", targetid))
  68370. {
  68371. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /takehit [playerid]");
  68372. }
  68373. if(!IsPlayerConnected(targetid))
  68374. {
  68375. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  68376. }
  68377. if(targetid == playerid)
  68378. {
  68379. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command on yourself.");
  68380. }
  68381. if(!PlayerData[targetid][pContracted])
  68382. {
  68383. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't been contracted.");
  68384. }
  68385. if(PlayerData[targetid][pCash] + PlayerData[targetid][pBank] < PlayerData[targetid][pContracted] / 2)
  68386. {
  68387. return SendClientMessage(playerid, COLOR_GREY, "That player's total wealth is lower than the contract price. You can't put them in debt.");
  68388. }
  68389. PlayerData[playerid][pContractTaken] = targetid;
  68390. SendFactionMessage(PlayerData[playerid][pFaction], COLOR_YELLOW, "* Hitman %s has accepted the contract to kill %s for %s. *", GetRPName(playerid), GetRPName(targetid), FormatNumber(PlayerData[targetid][pContracted]));
  68391. SendClientMessageEx(playerid, COLOR_AQUA, "You have taken the hit. You will receive %s once you have assassinated {00AA00}%s{33CCFF}.", FormatNumber(PlayerData[targetid][pContracted]), GetRPName(targetid));
  68392. return 1;
  68393. }
  68394. CMD:propose(playerid, params[])
  68395. {
  68396. new targetid;
  68397. if(sscanf(params, "u", targetid))
  68398. {
  68399. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /propose [playerid]");
  68400. }
  68401. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 3.0))
  68402. {
  68403. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  68404. }
  68405. if(!IsPlayerInRangeOfPoint(playerid, 10.0, 2241.9761,-1362.9207,1500.9048))
  68406. {
  68407. return SendClientMessage(playerid, COLOR_GREY, "You are not in church.");
  68408. }
  68409. if(PlayerData[playerid][pCash] < 25000 || PlayerData[targetid][pCash] < 25000)
  68410. {
  68411. return SendClientMessage(playerid, COLOR_GREY, "You both need to have atleast $25,000 to have a wedding.");
  68412. }
  68413. if(PlayerData[playerid][pMarriedTo] != -1)
  68414. {
  68415. return SendClientMessageEx(playerid, COLOR_GREY, "You're already married to %s.", PlayerData[playerid][pMarriedName]);
  68416. }
  68417. if(targetid == playerid)
  68418. {
  68419. return SendClientMessage(playerid, COLOR_GREY, "You can't marry yourself faggot.");
  68420. }
  68421. PlayerData[targetid][pMarriageOffer] = playerid;
  68422. SendClientMessageEx(targetid, COLOR_AQUA, "* %s has asked you to marry them, Please be careful when chosing a partner, It will cost both parties $25,000. (/accept marriage)", GetRPName(playerid));
  68423. SendClientMessageEx(playerid, COLOR_AQUA, "* You have sent %s a proposal for marriage.", GetRPName(targetid));
  68424. return 1;
  68425. }
  68426. CMD:divorce(playerid, params[])
  68427. {
  68428. new targetid;
  68429. if(sscanf(params, "u", targetid))
  68430. {
  68431. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /divorce [playerid]");
  68432. }
  68433. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 3.0))
  68434. {
  68435. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  68436. }
  68437. if(PlayerData[playerid][pMarriedTo] == -1)
  68438. {
  68439. return SendClientMessage(playerid, COLOR_GREY, "You aren't even married.");
  68440. }
  68441. if(PlayerData[playerid][pMarriedTo] != PlayerData[targetid][pID])
  68442. {
  68443. return SendClientMessage(playerid, COLOR_GREY, "You aren't married to that person.");
  68444. }
  68445. PlayerData[targetid][pMarriageOffer] = playerid;
  68446. SendClientMessageEx(targetid, COLOR_AQUA, "* %s has asked you to divorce them (/accept divorce)", GetRPName(playerid));
  68447. SendClientMessageEx(playerid, COLOR_AQUA, "* You have sent %s a request for divorce.", GetRPName(targetid));
  68448. return 1;
  68449. }
  68450. CMD:profile(playerid, params[])
  68451. {
  68452. new targetid;
  68453. if(GetFactionType(playerid) != FACTION_HITMAN)
  68454. {
  68455. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a hitman.");
  68456. }
  68457. if(sscanf(params, "u", targetid))
  68458. {
  68459. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /profile [playerid]");
  68460. }
  68461. if(!IsPlayerConnected(targetid))
  68462. {
  68463. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  68464. }
  68465. SendClientMessageEx(playerid, COLOR_NAVYBLUE, "_____ %s _____", GetRPName(targetid));
  68466. SendClientMessageEx(playerid, COLOR_GREY2, "Gender: %s", (PlayerData[targetid][pGender] == 2) ? ("Female") : ("Male"));
  68467. SendClientMessageEx(playerid, COLOR_GREY2, "Age: %i years old", PlayerData[targetid][pAge]);
  68468. if(PlayerData[targetid][pFaction] != -1)
  68469. {
  68470. SendClientMessageEx(playerid, COLOR_GREY2, "Faction: %s", FactionInfo[PlayerData[targetid][pFaction]][fName]);
  68471. SendClientMessageEx(playerid, COLOR_GREY2, "Rank: %s (%i)", FactionRanks[PlayerData[targetid][pFaction]][PlayerData[targetid][pFactionRank]], PlayerData[targetid][pFactionRank]);
  68472. }
  68473. else
  68474. {
  68475. SendClientMessageEx(playerid, COLOR_GREY2, "Faction: None");
  68476. }
  68477. if(PlayerData[targetid][pContracted] > 0)
  68478. {
  68479. SendClientMessageEx(playerid, COLOR_GREY2, "Contract: %s", FormatNumber(PlayerData[targetid][pContracted]));
  68480. SendClientMessageEx(playerid, COLOR_GREY2, "Last Contracter: %s", PlayerData[targetid][pContractBy]);
  68481. }
  68482. SendClientMessageEx(playerid, COLOR_GREY2, "Completed Hits: %i", PlayerData[targetid][pCompletedHits]);
  68483. SendClientMessageEx(playerid, COLOR_GREY2, "Failed Hits: %i", PlayerData[targetid][pFailedHits]);
  68484. return 1;
  68485. }
  68486. CMD:passport(playerid, params[])
  68487. {
  68488. new name[24], level, skinid;
  68489. if(PlayerData[playerid][pPassport])
  68490. {
  68491. Namechange(playerid, GetPlayerNameEx(playerid), PlayerData[playerid][pPassportName]);
  68492. SetScriptSkin(playerid, PlayerData[playerid][pPassportSkin]);
  68493. SendClientMessage(playerid, COLOR_AQUA, "You have burned your passport and received your old name, clothes, level and number back.");
  68494. PlayerData[playerid][pLevel] = PlayerData[playerid][pPassportLevel];
  68495. PlayerData[playerid][pPhone] = PlayerData[playerid][pPassportPhone];
  68496. PlayerData[playerid][pPassport] = 0;
  68497. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET passport = 0, passportname = 'None', passportlevel = 0, passportskin = 0, passportphone = 0, level = %i, phone = %i WHERE uid = %i", PlayerData[playerid][pLevel], PlayerData[playerid][pPhone], PlayerData[playerid][pID]);
  68498. mysql_tquery(connectionID, queryBuffer);
  68499. return 1;
  68500. }
  68501. if(GetFactionType(playerid) != FACTION_HITMAN && GetFactionType(playerid) != FACTION_FEDERAL)
  68502. {
  68503. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a hitman or federal agent.");
  68504. }
  68505. if(sscanf(params, "s[24]ii", name, level, skinid))
  68506. {
  68507. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /passport [name] [level] [skinid]");
  68508. }
  68509. if(!(3 <= strlen(name) <= 20))
  68510. {
  68511. return SendClientMessage(playerid, COLOR_GREY, "Your name must range from 3 to 20 characters.");
  68512. }
  68513. if(strfind(name, "_") == -1)
  68514. {
  68515. return SendClientMessage(playerid, COLOR_GREY, "Your name needs to contain at least one underscore.");
  68516. }
  68517. if(!IsValidName(name))
  68518. {
  68519. return SendClientMessage(playerid, COLOR_GREY, "Invalid characters. Your name may only contain letters and underscores.");
  68520. }
  68521. if(PlayerData[playerid][pAdminDuty])
  68522. {
  68523. return SendClientMessage(playerid, COLOR_GREY, "You aren't allowed to change your name while on admin duty,");
  68524. }
  68525. if(!(1 <= level <= 10))
  68526. {
  68527. return SendClientMessage(playerid, COLOR_GREY, "Your level must range from 1 to 10.");
  68528. }
  68529. if(!(1 <= skinid <= 311))
  68530. {
  68531. return SendClientMessage(playerid, COLOR_GREY, "The skin ID must range from 0 to 311.");
  68532. }
  68533. if(!isnull(PlayerData[playerid][pNameChange]))
  68534. {
  68535. return SendClientMessage(playerid, COLOR_GREY, "You have already requested a namechange. Please wait for a response.");
  68536. }
  68537. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid FROM "#TABLE_USERS" WHERE username = '%e'", name);
  68538. mysql_tquery(connectionID, queryBuffer, "OnHitmanPassport", "isii", playerid, name, level, skinid);
  68539. return 1;
  68540. }
  68541. CMD:plantbomb(playerid, params[])
  68542. {
  68543. if(GetFactionType(playerid) != FACTION_HITMAN)
  68544. {
  68545. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a hitman.");
  68546. }
  68547. if(!PlayerData[playerid][pBombs])
  68548. {
  68549. return SendClientMessage(playerid, COLOR_GREY, "You don't have any bombs.");
  68550. }
  68551. if(PlayerData[playerid][pPlantedBomb])
  68552. {
  68553. return SendClientMessage(playerid, COLOR_GREY, "You have planted a bomb already.");
  68554. }
  68555. if(GetPlayerInterior(playerid) > 0 || GetPlayerVirtualWorld(playerid) > 0)
  68556. {
  68557. return SendClientMessage(playerid, COLOR_GREY, "You can't plant a bomb inside.");
  68558. }
  68559. if(IsPlayerInAnyVehicle(playerid))
  68560. {
  68561. return SendClientMessage(playerid, COLOR_GREY, "You can't plant a bomb while inside of a vehicle");
  68562. }
  68563. GetPlayerPos(playerid, PlayerData[playerid][pBombX], PlayerData[playerid][pBombY], PlayerData[playerid][pBombZ]);
  68564. ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.1, 0, 0, 0, 0, 0);
  68565. PlayerData[playerid][pPlantedBomb] = 1;
  68566. PlayerData[playerid][pBombObject] = CreateDynamicObject(19602, PlayerData[playerid][pBombX], PlayerData[playerid][pBombY], PlayerData[playerid][pBombZ] - 1.0, 0.0, 0.0, 0.0);
  68567. PlayerData[playerid][pBombs]--;
  68568. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET bombs = %i WHERE uid = %i", PlayerData[playerid][pBombs], PlayerData[playerid][pID]);
  68569. mysql_tquery(connectionID, queryBuffer);
  68570. SendClientMessage(playerid, COLOR_WHITE, "* Bomb has been planted, use /detonate to make it go BOOM!");
  68571. return 1;
  68572. }
  68573. CMD:pickupbomb(playerid, params[])
  68574. {
  68575. if(GetFactionType(playerid) != FACTION_HITMAN)
  68576. {
  68577. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a hitman.");
  68578. }
  68579. if(!PlayerData[playerid][pPlantedBomb])
  68580. {
  68581. return SendClientMessage(playerid, COLOR_GREY, "You haven't planted a bomb which you can pickup.");
  68582. }
  68583. if(!IsPlayerInRangeOfPoint(playerid, 3.0, PlayerData[playerid][pBombX], PlayerData[playerid][pBombY], PlayerData[playerid][pBombZ]))
  68584. {
  68585. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of your planted bomb.");
  68586. }
  68587. ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.1, 0, 0, 0, 0, 0);
  68588. DestroyDynamicObject(PlayerData[playerid][pBombObject]);
  68589. PlayerData[playerid][pBombObject] = INVALID_OBJECT_ID;
  68590. PlayerData[playerid][pPlantedBomb] = 0;
  68591. PlayerData[playerid][pBombs]++;
  68592. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET bombs = %i WHERE uid = %i", PlayerData[playerid][pBombs], PlayerData[playerid][pID]);
  68593. mysql_tquery(connectionID, queryBuffer);
  68594. SendClientMessage(playerid, COLOR_WHITE, "* You have picked up your bomb.");
  68595. return 1;
  68596. }
  68597. CMD:detonate(playerid, params[])
  68598. {
  68599. if(!PlayerData[playerid][pPlantedBomb])
  68600. {
  68601. return SendClientMessage(playerid, COLOR_GREY, "You haven't planted a bomb which you can detonate.");
  68602. }
  68603. if(!IsPlayerInRangeOfPoint(playerid, 50.0, PlayerData[playerid][pBombX], PlayerData[playerid][pBombY], PlayerData[playerid][pBombZ]))
  68604. {
  68605. return SendClientMessage(playerid, COLOR_GREY, "You are too far away from your planted bomb.");
  68606. }
  68607. CreateExplosion(PlayerData[playerid][pBombX], PlayerData[playerid][pBombY], PlayerData[playerid][pBombZ], 11, 10.0);
  68608. DestroyDynamicObject(PlayerData[playerid][pBombObject]);
  68609. if(PlayerData[playerid][pContractTaken] != INVALID_PLAYER_ID && IsPlayerInRangeOfPoint(PlayerData[playerid][pContractTaken], 10.0, PlayerData[playerid][pBombX], PlayerData[playerid][pBombY], PlayerData[playerid][pBombZ]))
  68610. {
  68611. SetPlayerHealth(PlayerData[playerid][pContractTaken], 0.0);
  68612. HandleContract(PlayerData[playerid][pContractTaken], playerid);
  68613. }
  68614. PlayerData[playerid][pBombObject] = INVALID_OBJECT_ID;
  68615. PlayerData[playerid][pPlantedBomb] = 0;
  68616. SendClientMessage(playerid, COLOR_WHITE, "* You have detonated your bomb!");
  68617. return 1;
  68618. }
  68619. CMD:saveaccounts(playerid, params[])
  68620. {
  68621. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  68622. {
  68623. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  68624. }
  68625. foreach(new i : Player)
  68626. {
  68627. SavePlayerVariables(i);
  68628. }
  68629. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has saved all player accounts.", GetRPName(playerid));
  68630. return 1;
  68631. }
  68632. CMD:adestroyboombox(playerid, params[])
  68633. {
  68634. new boomboxid;
  68635. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  68636. {
  68637. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  68638. }
  68639. if((boomboxid = GetNearbyBoombox(playerid)) == INVALID_PLAYER_ID)
  68640. {
  68641. return SendClientMessage(playerid, COLOR_GREY, "There is no boombox in range.");
  68642. }
  68643. SendClientMessageEx(playerid, COLOR_AQUA, "You have destroyed {00AA00}%s{33CCFF}'s boombox.", GetRPName(boomboxid));
  68644. DestroyBoombox(boomboxid);
  68645. return 1;
  68646. }
  68647. CMD:setbanktimer(playerid, params[])
  68648. {
  68649. new hours;
  68650. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  68651. {
  68652. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  68653. }
  68654. if(sscanf(params, "i", hours))
  68655. {
  68656. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /setbanktimer [hours]");
  68657. }
  68658. if(hours < 0)
  68659. {
  68660. return SendClientMessage(playerid, COLOR_GREY, "Hours can't be below 0.");
  68661. }
  68662. RobberyInfo[rTime] = hours;
  68663. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has reset the bank robbery timer to %i hours.", GetRPName(playerid), hours);
  68664. return 1;
  68665. }
  68666. CMD:resetrobbery(playerid, params[])
  68667. {
  68668. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  68669. {
  68670. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  68671. }
  68672. ResetRobbery();
  68673. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has reset the active bank robbery.", GetRPName(playerid));
  68674. return 1;
  68675. }
  68676. CMD:addtorobbery(playerid, params[])
  68677. {
  68678. new targetid;
  68679. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  68680. {
  68681. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  68682. }
  68683. if(sscanf(params, "u", targetid))
  68684. {
  68685. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /addtorobbery [playerid]");
  68686. }
  68687. if(!IsPlayerConnected(targetid))
  68688. {
  68689. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  68690. }
  68691. if(!RobberyInfo[rPlanning] && !RobberyInfo[rStarted])
  68692. {
  68693. return SendClientMessage(playerid, COLOR_GREY, "There is no bank robbery in progress.");
  68694. }
  68695. if(GetBankRobbers() >= MAX_BANK_ROBBERS)
  68696. {
  68697. return SendClientMessageEx(playerid, COLOR_GREY, "There can't be more than %i bank robbers in this robbery.", MAX_BANK_ROBBERS);
  68698. }
  68699. if(IsPlayerInBankRobbery(targetid))
  68700. {
  68701. return SendClientMessage(playerid, COLOR_GREY, "That player is already in the bank robbery.");
  68702. }
  68703. AddToBankRobbery(targetid);
  68704. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has added %s to the bank robbery.", GetRPName(playerid), GetRPName(targetid));
  68705. SendClientMessageEx(targetid, COLOR_AQUA, "%s has added you to the bank robbery.", GetRPName(playerid));
  68706. return 1;
  68707. }
  68708. CMD:givepayday(playerid, params[])
  68709. {
  68710. new targetid;
  68711. if(PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  68712. {
  68713. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  68714. }
  68715. if(sscanf(params, "u", targetid))
  68716. {
  68717. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /givepayday [playerid]");
  68718. }
  68719. if(!IsPlayerConnected(targetid))
  68720. {
  68721. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  68722. }
  68723. SendPaycheck(targetid);
  68724. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has forced a payday for %s.", GetRPName(playerid), GetRPName(targetid));
  68725. return 1;
  68726. }
  68727. CMD:givepveh(playerid, params[])
  68728. {
  68729. new model[20], modelid, targetid, color1, color2, Float:x, Float:y, Float:z, Float:a, plate[32];
  68730. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pDynamicAdmin])
  68731. {
  68732. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  68733. }
  68734. if(sscanf(params, "us[20]ii", targetid, model, color1, color2))
  68735. {
  68736. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /givepveh [playerid] [modelid/name] [color1] [color2]");
  68737. }
  68738. if(!IsPlayerConnected(targetid))
  68739. {
  68740. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  68741. }
  68742. if(!PlayerData[targetid][pLogged])
  68743. {
  68744. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet.");
  68745. }
  68746. if((modelid = GetVehicleModelByName(model)) == 0)
  68747. {
  68748. return SendClientMessage(playerid, COLOR_GREY, "Invalid vehicle model.");
  68749. }
  68750. if(!(0 <= color1 <= 255) || !(0 <= color2 <= 255))
  68751. {
  68752. return SendClientMessage(playerid, COLOR_GREY, "Invalid color. Valid colors range from 0 to 255.");
  68753. }
  68754. GetPlayerPos(targetid, x, y, z);
  68755. GetPlayerFacingAngle(targetid, a);
  68756. format(plate, 32, "%c%c%c %i", Random('A', 'Z'), Random('A', 'Z'), Random('A', 'Z'), Random(100, 999));
  68757. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO vehicles (ownerid, owner, modelid, pos_x, pos_y, pos_z, pos_a, plate, color1, color2, carImpounded) VALUES(%i, '%s', %i, '%f', '%f', '%f', '%f', '%s', %i, %i, '0')", PlayerData[targetid][pID], GetPlayerNameEx(targetid), modelid, x + 2.0 * floatsin(-a, degrees), y + 2.0 * floatcos(-a, degrees), z, a, mysql_escaped(plate), color1, color2);
  68758. mysql_tquery(connectionID, queryBuffer);
  68759. SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you your own {00AA00}%s{33CCFF}. /carstorage to spawn it.", GetRPName(playerid), vehicleNames[modelid - 400]);
  68760. SendClientMessageEx(playerid, COLOR_AQUA, "You have given %s their own {00AA00}%s{33CCFF}.", GetRPName(targetid), vehicleNames[modelid - 400]);
  68761. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has given %s their own %s.", GetRPName(playerid), GetRPName(targetid), vehicleNames[modelid - 400]);
  68762. Log_Write("log_admin", "%s (uid: %i) has given %s (uid: %i) their own %s.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], vehicleNames[modelid - 400]);
  68763. return 1;
  68764. }
  68765. CMD:givedoublexp(playerid, params[])
  68766. {
  68767. new targetid, hours;
  68768. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pDynamicAdmin])
  68769. {
  68770. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  68771. }
  68772. if(sscanf(params, "ui", targetid, hours))
  68773. {
  68774. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /givedoublexp [playerid] [hours]");
  68775. }
  68776. if(!IsPlayerConnected(targetid))
  68777. {
  68778. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  68779. }
  68780. if(!PlayerData[targetid][pLogged])
  68781. {
  68782. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet.");
  68783. }
  68784. if(hours < 1 && PlayerData[targetid][pDoubleXP] - hours < 0)
  68785. {
  68786. return SendClientMessage(playerid, COLOR_GREY, "That player can't have under 0 hours of double XP.");
  68787. }
  68788. PlayerData[targetid][pDoubleXP] += hours;
  68789. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has given %i hours of double XP to %s.", GetRPName(playerid), hours, GetRPName(targetid));
  68790. SendClientMessageEx(targetid, COLOR_YELLOW, "%s has given you %i hours of double XP.", GetRPName(playerid), hours);
  68791. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET doublexp = %i WHERE uid = %i", PlayerData[targetid][pDoubleXP], PlayerData[targetid][pID]);
  68792. mysql_tquery(connectionID, queryBuffer);
  68793. return 1;
  68794. }
  68795. CMD:randomfire(playerid, params[])
  68796. {
  68797. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  68798. {
  68799. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  68800. }
  68801. if(IsFireActive())
  68802. {
  68803. return SendClientMessage(playerid, COLOR_GREY, "There is a fire active already. /killfire to kill it!");
  68804. }
  68805. new
  68806. Float:x,
  68807. Float:y,
  68808. Float:z;
  68809. RandomFire(0);
  68810. GetDynamicObjectPos(gFireObjects[0], x, y, z);
  68811. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has started a random fire in %s.", GetRPName(playerid), GetZoneName(x, y, z));
  68812. return 1;
  68813. }
  68814. CMD:killfire(playerid, params[])
  68815. {
  68816. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  68817. {
  68818. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  68819. }
  68820. if(!IsFireActive())
  68821. {
  68822. return SendClientMessage(playerid, COLOR_GREY, "There is currently no fire active.");
  68823. }
  68824. for(new i = 0; i < MAX_FIRES; i ++)
  68825. {
  68826. DestroyDynamicObject(gFireObjects[i]);
  68827. gFireObjects[i] = INVALID_OBJECT_ID;
  68828. gFireHealth[i] = 0.0;
  68829. }
  68830. gFires = 0;
  68831. SendClientMessage(playerid, COLOR_GREY, "Active fire killed.");
  68832. return 1;
  68833. }
  68834. CMD:spawnfire(playerid, params[])
  68835. {
  68836. new Float:px, Float:py, Float:pz;
  68837. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  68838. {
  68839. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  68840. }
  68841. if(GetPlayerInterior(playerid) > 0 || GetPlayerVirtualWorld(playerid) > 0)
  68842. {
  68843. return SendClientMessage(playerid, COLOR_GREY, "You can't create fires indoors.");
  68844. }
  68845. for(new x = 0; x < MAX_FIRES; x ++)
  68846. {
  68847. if(gFireObjects[x] == INVALID_OBJECT_ID)
  68848. {
  68849. GetPlayerPos(playerid, px, py, pz);
  68850. if(!IsFireActive())
  68851. {
  68852. foreach(new i : Player)
  68853. {
  68854. if(GetFactionType(i) == FACTION_MEDIC)
  68855. {
  68856. PlayerData[i][pCP] = CHECKPOINT_MISC;
  68857. SetPlayerCheckpoint(i, px, py, pz, 3.0);
  68858. SendClientMessageEx(i, COLOR_DOCTOR, "* All units, a fire has been reported in %s. Please head to the beacon on your map. *", GetZoneName(px, py, pz));
  68859. }
  68860. }
  68861. }
  68862. gFireObjects[x] = CreateDynamicObject(18691, px, py, pz - 2.4, 0.0, 0.0, 0.0, .streamdistance = 50.0);
  68863. gFireHealth[x] = 50.0;
  68864. gFires++;
  68865. return SendClientMessage(playerid, COLOR_GREY, "Fire created!");
  68866. }
  68867. }
  68868. SendClientMessageEx(playerid, COLOR_GREY, "You can't create anymore fires. The limit is %i fires.", MAX_FIRES);
  68869. return 1;
  68870. }
  68871. CMD:numberold(playerid, params[])
  68872. {
  68873. new targetid;
  68874. if(sscanf(params, "u", targetid))
  68875. {
  68876. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /number [playerid]");
  68877. }
  68878. if(!PlayerData[playerid][pPhonebook])
  68879. {
  68880. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you don't have a phonebook.");
  68881. }
  68882. if(!IsPlayerConnected(targetid))
  68883. {
  68884. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  68885. }
  68886. ShowActionBubble(playerid, "* %s takes out a cellphone and looks up a number.", GetRPName(playerid));
  68887. SendClientMessageEx(playerid, COLOR_GREY2, "Name: %s, Ph: %i", GetRPName(targetid), PlayerData[targetid][pPhone]);
  68888. return 1;
  68889. }
  68890. /*CMD:phonebook(playerid, params[])
  68891. {
  68892. new option[10], param[32];
  68893. if(!PlayerData[playerid][pPhonebook])
  68894. {
  68895. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you don't have a phonebook.");
  68896. }
  68897. if(sscanf(params, "s[10]S()[32]", option, param))
  68898. {
  68899. if(GetFactionType(playerid) == FACTION_NEWS)
  68900. {
  68901. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /phonebook [view | add | remove]");
  68902. }
  68903. else
  68904. {
  68905. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /phonebook [view]");
  68906. SendClientMessage(playerid, COLOR_GREY3, "Want your number shown in the phonebook? Ask the news team to add it to the directory.");
  68907. }
  68908. return 1;
  68909. }
  68910. if(!strcmp(option, "view", true))
  68911. {
  68912. PlayerData[playerid][pPage] = 1;
  68913. ShowDialogToPlayer(playerid, DIALOG_PHONEBOOK);
  68914. }
  68915. else if(!strcmp(option, "add", true))
  68916. {
  68917. new number, name[24];
  68918. if(GetFactionType(playerid) != FACTION_NEWS)
  68919. {
  68920. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a news reporter.");
  68921. }
  68922. if(sscanf(param, "is[24]", number, name))
  68923. {
  68924. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /phonebook [add] [number] [name]");
  68925. }
  68926. if(number == 0 || number == 911)
  68927. {
  68928. return SendClientMessage(playerid, COLOR_GREY, "Invalid number.");
  68929. }
  68930. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT number FROM phonebook WHERE number = %i", number);
  68931. mysql_tquery(connectionID, queryBuffer, "OnPlayerAddToPhonebook", "iis", playerid, number, name);
  68932. }
  68933. else if(!strcmp(option, "remove", true))
  68934. {
  68935. new number;
  68936. if(GetFactionType(playerid) != FACTION_NEWS)
  68937. {
  68938. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a news reporter.");
  68939. }
  68940. if(sscanf(param, "i", number))
  68941. {
  68942. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /phonebook [remove] [number]");
  68943. }
  68944. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT name FROM phonebook WHERE number = %i", number);
  68945. mysql_tquery(connectionID, queryBuffer, "OnPlayerRemoveFromPhonebook", "ii", playerid, number);
  68946. }
  68947. return 1;
  68948. }*/
  68949. CMD:boombox(playerid, params[])
  68950. {
  68951. new option[10], param[128];
  68952. if(!PlayerData[playerid][pBoombox])
  68953. {
  68954. return SendClientMessage(playerid, COLOR_GREY, "You have no boombox and therefore can't use this command.");
  68955. }
  68956. if(sscanf(params, "s[10]S()[128]", option, param))
  68957. {
  68958. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /boombox [place | pickup | play]");
  68959. }
  68960. if(PlayerData[playerid][pTazedTime] > 0 || PlayerData[playerid][pInjured] > 0 || PlayerData[playerid][pHospital] > 0 || PlayerData[playerid][pCuffed] > 0 || PlayerData[playerid][pTied] > 0 || PlayerData[playerid][pJailTime] > 0)
  68961. {
  68962. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment.");
  68963. }
  68964. if(IsPlayerInAnyVehicle(playerid))
  68965. {
  68966. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command from within the vehicle.");
  68967. }
  68968. if(!strcmp(option, "place", true))
  68969. {
  68970. if(PlayerData[playerid][pBoomboxPlaced])
  68971. {
  68972. return SendClientMessage(playerid, COLOR_GREY, "You have placed down a boombox already.");
  68973. }
  68974. if(GetNearbyBoombox(playerid) != INVALID_PLAYER_ID)
  68975. {
  68976. return SendClientMessage(playerid, COLOR_GREY, "There is already a boombox nearby. Place this one somewhere else.");
  68977. }
  68978. new
  68979. Float:x,
  68980. Float:y,
  68981. Float:z,
  68982. Float:a,
  68983. string[128];
  68984. format(string, sizeof(string), "{FFFF00}Boombox placed by:\n{FF0000}%s{FFFF00}\n/boombox for more options.", GetPlayerNameEx(playerid));
  68985. GetPlayerPos(playerid, x, y, z);
  68986. GetPlayerFacingAngle(playerid, a);
  68987. PlayerData[playerid][pBoomboxPlaced] = 1;
  68988. PlayerData[playerid][pBoomboxObject] = CreateDynamicObject(2102, x, y, z - 1.0, 0.0, 0.0, a, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid));
  68989. PlayerData[playerid][pBoomboxText] = CreateDynamic3DTextLabel(string, COLOR_LIGHTORANGE, x, y, z - 0.8, 10.0, .worldid = GetPlayerVirtualWorld(playerid), .interiorid = GetPlayerInterior(playerid));
  68990. PlayerData[playerid][pBoomboxURL] = 0;
  68991. ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.1, 0, 0, 0, 0, 0);
  68992. ShowActionBubble(playerid, "* %s places a boombox on the ground.", GetRPName(playerid));
  68993. }
  68994. else if(!strcmp(option, "pickup", true))
  68995. {
  68996. if(!PlayerData[playerid][pBoomboxPlaced])
  68997. {
  68998. return SendClientMessage(playerid, COLOR_GREY, "You have not placed down a boombox.");
  68999. }
  69000. if(!IsPlayerInRangeOfDynamicObject(playerid, PlayerData[playerid][pBoomboxObject], 3.0))
  69001. {
  69002. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of your boombox.");
  69003. }
  69004. ShowActionBubble(playerid, "* %s picks up their boombox and switches it off.", GetRPName(playerid));
  69005. DestroyBoombox(playerid);
  69006. }
  69007. else if(!strcmp(option, "play", true))
  69008. {
  69009. if(!PlayerData[playerid][pBoomboxPlaced])
  69010. {
  69011. return SendClientMessage(playerid, COLOR_GREY, "You have not placed down a boombox.");
  69012. }
  69013. if(!IsPlayerInRangeOfDynamicObject(playerid, PlayerData[playerid][pBoomboxObject], 3.0))
  69014. {
  69015. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of your boombox.");
  69016. }
  69017. PlayerData[playerid][pMusicType] = MUSIC_BOOMBOX;
  69018. ShowDialogToPlayer(playerid, DIALOG_MP3PLAYER);
  69019. }
  69020. return 1;
  69021. }
  69022. CMD:switchspeedo(playerid, params[])
  69023. {
  69024. if(isnull(params))
  69025. {
  69026. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /switchspeedo [kmh/mph]");
  69027. }
  69028. if(!strcmp(params, "kmh", true))
  69029. {
  69030. PlayerData[playerid][pSpeedometer] = 1;
  69031. SendClientMessage(playerid, COLOR_AQUA, "Your speedometer will now display speed as {00AA00}Kilometers per hour{33CCFF}.");
  69032. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET speedometer = 1 WHERE uid = %i", PlayerData[playerid][pID]);
  69033. mysql_tquery(connectionID, queryBuffer);
  69034. }
  69035. else if(!strcmp(params, "mph", true))
  69036. {
  69037. PlayerData[playerid][pSpeedometer] = 2;
  69038. SendClientMessage(playerid, COLOR_AQUA, "Your speedometer will now display speed as {00AA00}Miles per hour{33CCFF}.");
  69039. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET speedometer = 2 WHERE uid = %i", PlayerData[playerid][pID]);
  69040. mysql_tquery(connectionID, queryBuffer);
  69041. }
  69042. return 1;
  69043. }
  69044. CMD:shakehand(playerid, params[])
  69045. {
  69046. new targetid, type;
  69047. if(sscanf(params, "ui", targetid, type))
  69048. {
  69049. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /shakehand [playerid] [type (1-6)]");
  69050. }
  69051. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  69052. {
  69053. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  69054. }
  69055. if(targetid == playerid)
  69056. {
  69057. return SendClientMessage(playerid, COLOR_GREY, "You can't shake your own hand.");
  69058. }
  69059. if(!(1 <= type <= 6))
  69060. {
  69061. return SendClientMessage(playerid, COLOR_GREY, "Invalid type. Valid types range from 1 to 6.");
  69062. }
  69063. PlayerData[targetid][pShakeOffer] = playerid;
  69064. PlayerData[targetid][pShakeType] = type;
  69065. SendClientMessageEx(targetid, COLOR_AQUA, "* %s has offered to shake your hand. (/accept handshake)", GetRPName(playerid));
  69066. SendClientMessageEx(playerid, COLOR_AQUA, "* You have sent %s a handshake offer.", GetRPName(targetid));
  69067. return 1;
  69068. }
  69069. CMD:dropgun(playerid, params[])
  69070. {
  69071. new weaponid = GetScriptWeapon(playerid), objectid, Float:x, Float:y, Float:z;
  69072. if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT)
  69073. {
  69074. return SendClientMessage(playerid, COLOR_GREY, "You need to be onfoot in order to drop weapons.");
  69075. }
  69076. if(!weaponid)
  69077. {
  69078. return SendClientMessage(playerid, COLOR_GREY, "You must be holding the weapon you're willing to drop.");
  69079. }
  69080. if(PlayerData[playerid][pWeapons][weaponSlotIDs[weaponid]] != weaponid)
  69081. {
  69082. return SendClientMessage(playerid, COLOR_GREY, "You can't sell this weapon as you don't have it.");
  69083. }
  69084. if(PlayerData[playerid][pTazedTime] > 0 || PlayerData[playerid][pInjured] > 0 || PlayerData[playerid][pHospital] > 0 || PlayerData[playerid][pCuffed] > 0 || PlayerData[playerid][pTied] > 0 || PlayerData[playerid][pJailTime] > 0 || PlayerData[playerid][pJoinedEvent] > 0 || PlayerData[playerid][pPaintball] > 0 || PlayerData[playerid][pDueling] != INVALID_PLAYER_ID)
  69085. {
  69086. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment.");
  69087. }
  69088. if(GetPlayerHealthEx(playerid) < 60)
  69089. {
  69090. return SendClientMessage(playerid, COLOR_GREY, "You can't drop weapons as your health is below 60.");
  69091. }
  69092. GetPlayerPos(playerid, x, y, z);
  69093. objectid = CreateDynamicObject(weaponModelIDs[weaponid], x, y, z - 1.0, 93.7, 93.7, 120.0);
  69094. SetTimerEx("DestroyWeapon", 300000, false, "i", objectid);
  69095. Streamer_SetExtraInt(objectid, E_OBJECT_TYPE, E_OBJECT_WEAPON);
  69096. Streamer_SetExtraInt(objectid, E_OBJECT_WEAPONID, weaponid);
  69097. Streamer_SetExtraInt(objectid, E_OBJECT_FACTION, PlayerData[playerid][pFaction]);
  69098. RemovePlayerWeapon(playerid, weaponid);
  69099. ShowActionBubble(playerid, "* %s drops their %s on the ground.", GetRPName(playerid), GetWeaponNameEx(weaponid));
  69100. SendClientMessageEx(playerid, COLOR_AQUA, "You have dropped your {00AA00}%s{33CCFF}.", GetWeaponNameEx(weaponid));
  69101. return 1;
  69102. }
  69103. CMD:grabgun(playerid, params[])
  69104. {
  69105. if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT)
  69106. {
  69107. return SendClientMessage(playerid, COLOR_GREY, "You need to be onfoot in order to pickup weapons.");
  69108. }
  69109. if(PlayerData[playerid][pTazedTime] > 0 || PlayerData[playerid][pInjured] > 0 || PlayerData[playerid][pHospital] > 0 || PlayerData[playerid][pCuffed] > 0 || PlayerData[playerid][pTied] > 0 || PlayerData[playerid][pJailTime] > 0)
  69110. {
  69111. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment.");
  69112. }
  69113. if(PlayerData[playerid][pHours] < 2 || PlayerData[playerid][pWeaponRestricted] > 0)
  69114. {
  69115. return SendClientMessage(playerid, COLOR_GREY, "You are either weapon restricted or you played less than two playing hours.");
  69116. }
  69117. for(new i = 0, j = Streamer_GetUpperBound(STREAMER_TYPE_OBJECT); i <= j; i ++)
  69118. {
  69119. if(!IsValidDynamicObject(i) || !IsPlayerInRangeOfDynamicObject(playerid, i, 2.0) || Streamer_GetExtraInt(i, E_OBJECT_TYPE) != E_OBJECT_WEAPON)
  69120. continue;
  69121. if(Streamer_GetExtraInt(i, E_OBJECT_FACTION) >= 0 && PlayerData[playerid][pFaction] != Streamer_GetExtraInt(i, E_OBJECT_FACTION))
  69122. {
  69123. return SendClientMessage(playerid, COLOR_GREY, "This weapon belongs to a specific faction. You may not pick it up.");
  69124. }
  69125. new weaponid = Streamer_GetExtraInt(i, E_OBJECT_WEAPONID);
  69126. GivePlayerWeaponEx(playerid, weaponid);
  69127. DestroyDynamicObject(i);
  69128. ShowActionBubble(playerid, "* %s picks up a %s from the ground.", GetRPName(playerid), GetWeaponNameEx(weaponid));
  69129. SendClientMessageEx(playerid, COLOR_AQUA, "You have picked up a {00AA00}%s{33CCFF}.", GetWeaponNameEx(weaponid));
  69130. return 1;
  69131. }
  69132. SendClientMessage(playerid, COLOR_GREY, "You are not in range of any dropped weapons.");
  69133. return 1;
  69134. }
  69135. CMD:createland(playerid, params[])
  69136. {
  69137. new price;
  69138. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pDynamicAdmin])
  69139. {
  69140. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  69141. }
  69142. if(sscanf(params, "i", price))
  69143. {
  69144. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /createland [price]");
  69145. }
  69146. if(price < 1)
  69147. {
  69148. return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1.");
  69149. }
  69150. if(GetNearbyLand(playerid) >= 0)
  69151. {
  69152. return SendClientMessage(playerid, COLOR_GREY, "There is a land in range. Find somewhere else to create this one.");
  69153. }
  69154. if(GetPlayerInterior(playerid) > 0 || GetPlayerVirtualWorld(playerid) > 0)
  69155. {
  69156. return SendClientMessage(playerid, COLOR_GREY, "You cannot create lands indoors.");
  69157. }
  69158. PlayerData[playerid][pLandCost] = price;
  69159. PlayerData[playerid][pZoneType] = ZONETYPE_LAND;
  69160. Dialog_Show(playerid, DIALOG_CREATEZONE, DIALOG_STYLE_MSGBOX, "Land creation system", "You have entered land creation mode. In order to create a land you need\nto mark four points around the area you want your land to be in, forming\na square. You must make a square or your outcome won't be as expected.\n\nPress {00AA00}Confirm{A9C4E4} to begin land creation.", "Confirm", "Cancel");
  69161. return 1;
  69162. }
  69163. CMD:confirm(playerid, params[])
  69164. {
  69165. new Float:x, Float:y, Float:z;
  69166. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  69167. {
  69168. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  69169. }
  69170. if(!PlayerData[playerid][pZoneCreation])
  69171. {
  69172. return SendClientMessage(playerid, COLOR_GREY, "You are not creating any land or turf at the moment.");
  69173. }
  69174. if(PlayerData[playerid][pMinX] == 0.0)
  69175. {
  69176. GetPlayerPos(playerid, PlayerData[playerid][pMinX], y, z);
  69177. PlayerData[playerid][pZonePickups][0] = CreateDynamicPickup(1239, 1, PlayerData[playerid][pMinX], y, z, .playerid = playerid);
  69178. SendClientMessage(playerid, COLOR_WHITE, "* Boundary 1/4 set (min X).");
  69179. }
  69180. else if(PlayerData[playerid][pMinY] == 0.0)
  69181. {
  69182. GetPlayerPos(playerid, x, PlayerData[playerid][pMinY], z);
  69183. PlayerData[playerid][pZonePickups][1] = CreateDynamicPickup(1239, 1, x, PlayerData[playerid][pMinY], z, .playerid = playerid);
  69184. SendClientMessage(playerid, COLOR_WHITE, "* Boundary 2/4 set (min Y).");
  69185. }
  69186. else if(PlayerData[playerid][pMaxX] == 0.0)
  69187. {
  69188. GetPlayerPos(playerid, PlayerData[playerid][pMaxX], y, z);
  69189. PlayerData[playerid][pZonePickups][2] = CreateDynamicPickup(1239, 1, PlayerData[playerid][pMaxX], y, z, .playerid = playerid);
  69190. SendClientMessage(playerid, COLOR_WHITE, "* Boundary 3/4 set (max X).");
  69191. }
  69192. else if(PlayerData[playerid][pMaxY] == 0.0)
  69193. {
  69194. GetPlayerPos(playerid, x, PlayerData[playerid][pMaxY], z);
  69195. SendClientMessage(playerid, COLOR_WHITE, "* Boundary 4/4 set (max Y).");
  69196. PlayerData[playerid][pZonePickups][3] = CreateDynamicPickup(1239, 1, x, PlayerData[playerid][pMaxY], z, .playerid = playerid);
  69197. PlayerData[playerid][pZoneID] = GangZoneCreate(PlayerData[playerid][pMinX], PlayerData[playerid][pMinY], PlayerData[playerid][pMaxX], PlayerData[playerid][pMaxY]);
  69198. GangZoneShowForPlayer(playerid, PlayerData[playerid][pZoneID], 0x33CC33FF);
  69199. if(PlayerData[playerid][pZoneCreation] == ZONETYPE_LAND) {
  69200. Dialog_Show(playerid, DIALOG_CONFIRMZONE, DIALOG_STYLE_MSGBOX, "Land creation system", "You have set the four boundary points. The green zone on your mini-map\nrepresents the area of your land. You can choose to start over or complete\nthe creation of your land.\n\nWhat would you like to do now?", "Create", "Restart");
  69201. } else if(PlayerData[playerid][pZoneCreation] == ZONETYPE_TURF) {
  69202. Dialog_Show(playerid, DIALOG_CONFIRMZONE, DIALOG_STYLE_MSGBOX, "Turf creation system", "You have set the four boundary points. The green zone on your mini-map\nrepresents the area of your turf. You can choose to start over or complete\nthe creation of your turf.\n\nWhat would you like to do now?", "Create", "Restart");
  69203. }
  69204. }
  69205. return 1;
  69206. }
  69207. CMD:landcancel(playerid, params[])
  69208. {
  69209. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  69210. {
  69211. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  69212. }
  69213. if(PlayerData[playerid][pZoneCreation] != ZONETYPE_LAND)
  69214. {
  69215. return SendClientMessage(playerid, COLOR_GREY, "You are not creating a land at the moment.");
  69216. }
  69217. CancelZoneCreation(playerid);
  69218. SendClientMessage(playerid, COLOR_LIGHTRED, "* Land creation cancelled.");
  69219. return 1;
  69220. }
  69221. CMD:gotoland(playerid, params[])
  69222. {
  69223. new landid;
  69224. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  69225. {
  69226. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  69227. }
  69228. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  69229. {
  69230. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  69231. }
  69232. if(sscanf(params, "i", landid))
  69233. {
  69234. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /gotoland [landid]");
  69235. }
  69236. if(!(0 <= landid < MAX_LANDS) || !LandInfo[landid][lExists])
  69237. {
  69238. return SendClientMessage(playerid, COLOR_GREY, "Invalid land.");
  69239. }
  69240. GameTextForPlayer(playerid, "~w~Teleported", 5000, 1);
  69241. SetPlayerPos(playerid, LandInfo[landid][lHeightX], LandInfo[landid][lHeightY], LandInfo[landid][lHeightZ]);
  69242. SetPlayerInterior(playerid, 0);
  69243. SetPlayerVirtualWorld(playerid, 0);
  69244. SetCameraBehindPlayer(playerid);
  69245. return 1;
  69246. }
  69247. CMD:removelandobjects(playerid, params[])
  69248. {
  69249. new landid;
  69250. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  69251. {
  69252. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  69253. }
  69254. if(sscanf(params, "i", landid))
  69255. {
  69256. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /removelandobjects [landid]");
  69257. }
  69258. if(!(0 <= landid < MAX_LANDS) || !LandInfo[landid][lExists])
  69259. {
  69260. return SendClientMessage(playerid, COLOR_GREY, "Invalid land.");
  69261. }
  69262. RemoveAllLandObjects(landid);
  69263. SendClientMessageEx(playerid, COLOR_AQUA, "* You have removed all land objects for land %i.", landid);
  69264. return 1;
  69265. }
  69266. CMD:removeland(playerid, params[])
  69267. {
  69268. new landid;
  69269. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pDynamicAdmin])
  69270. {
  69271. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  69272. }
  69273. if(sscanf(params, "i", landid))
  69274. {
  69275. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /removeland [landid]");
  69276. }
  69277. if(!(0 <= landid < MAX_LANDS) || !LandInfo[landid][lExists])
  69278. {
  69279. return SendClientMessage(playerid, COLOR_GREY, "Invalid land.");
  69280. }
  69281. RemoveAllLandObjects(landid);
  69282. GangZoneDestroy(LandInfo[landid][lGangZone]);
  69283. DestroyDynamicArea(LandInfo[landid][lArea]);
  69284. DestroyDynamic3DTextLabel(LandInfo[landid][lTextdraw]);
  69285. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM lands WHERE id = %i", LandInfo[landid][lID]);
  69286. mysql_tquery(connectionID, queryBuffer);
  69287. LandInfo[landid][lID] = 0;
  69288. LandInfo[landid][lExists] = 0;
  69289. LandInfo[landid][lOwnerID] = 0;
  69290. Iter_Remove(Land, landid);
  69291. SendClientMessageEx(playerid, COLOR_AQUA, "* You have removed land %i.", landid);
  69292. Log_Write("log_land", "%s (uid: %i) has removed land (id: %i) land owner (%i).", GetRPName(playerid), PlayerData[playerid][pID], landid, PlayerData[LandInfo[landid][lOwner]][pID]);
  69293. return 1;
  69294. }
  69295. CMD:buyland(playerid, params[])
  69296. {
  69297. new landid = GetNearbyLand(playerid);
  69298. if(landid == -1)
  69299. {
  69300. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any lands.");
  69301. }
  69302. if(LandInfo[landid][lOwnerID] > 0)
  69303. {
  69304. return SendClientMessage(playerid, COLOR_GREY, "This land is already owned.");
  69305. }
  69306. if(strcmp(params, "confirm", true))
  69307. {
  69308. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /buyland [confirm] (This land costs %s.)", FormatNumber(LandInfo[landid][lPrice]));
  69309. }
  69310. if(PlayerData[playerid][pCash] < LandInfo[landid][lPrice])
  69311. {
  69312. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this land.");
  69313. }
  69314. SetLandOwner(landid, playerid);
  69315. GivePlayerCash(playerid, -LandInfo[landid][lPrice]);
  69316. SendClientMessageEx(playerid, COLOR_GREEN, "You paid %s for this land! /landhelp to see the available commands for your land.", FormatNumber(LandInfo[landid][lPrice]));
  69317. Log_Write("log_property", "%s (uid: %i) purchased a land (id: %i) in %s for $%i.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], LandInfo[landid][lID], GetPlayerZoneName(playerid), LandInfo[landid][lPrice]);
  69318. return 1;
  69319. }
  69320. CMD:sellland(playerid, params[])
  69321. {
  69322. new landid = GetNearbyLand(playerid), targetid, amount;
  69323. if(landid == -1 || !IsLandOwner(playerid, landid))
  69324. {
  69325. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any lands of yours.");
  69326. }
  69327. if(sscanf(params, "ui", targetid, amount))
  69328. {
  69329. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sellland [playerid] [amount]");
  69330. }
  69331. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  69332. {
  69333. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  69334. }
  69335. if(targetid == playerid)
  69336. {
  69337. return SendClientMessage(playerid, COLOR_GREY, "You can't sell to yourself.");
  69338. }
  69339. if(amount < 1)
  69340. {
  69341. return SendClientMessage(playerid, COLOR_GREY, "You must specify an amount above zero.");
  69342. }
  69343. PlayerData[targetid][pLandOffer] = playerid;
  69344. PlayerData[targetid][pLandOffered] = landid;
  69345. PlayerData[targetid][pLandPrice] = amount;
  69346. SendClientMessageEx(targetid, COLOR_AQUA, "* %s offered you to buy their land for %s. (/accept land)", GetRPName(playerid), FormatNumber(amount));
  69347. SendClientMessageEx(playerid, COLOR_AQUA, "* You offered %s to buy your land for %s.", GetRPName(targetid), FormatNumber(amount));
  69348. return 1;
  69349. }
  69350. CMD:sellmyland(playerid, params[])
  69351. {
  69352. new landid = GetNearbyLand(playerid);
  69353. if(landid == -1 || !IsLandOwner(playerid, landid))
  69354. {
  69355. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any lands of yours.");
  69356. }
  69357. if(strcmp(params, "confirm", true) != 0)
  69358. {
  69359. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /sellmyland [confirm]");
  69360. SendClientMessageEx(playerid, COLOR_SYNTAX, "This command sells your land back to the state. You will receive %s back.", FormatNumber(percent(LandInfo[landid][lPrice], 75)));
  69361. return 1;
  69362. }
  69363. SetLandOwner(landid, INVALID_PLAYER_ID);
  69364. GivePlayerCash(playerid, percent(LandInfo[landid][lPrice], 75));
  69365. SendClientMessageEx(playerid, COLOR_GREEN, "You have sold your land to the state and received %s back.", FormatNumber(percent(LandInfo[landid][lPrice], 75)));
  69366. Log_Write("log_property", "%s (uid: %i) sold their land (id: %i) to the state for $%i", GetPlayerNameEx(playerid), PlayerData[playerid][pID], LandInfo[landid][lID], percent(LandInfo[landid][lPrice], 75));
  69367. return 1;
  69368. }
  69369. CMD:landinfo(playerid, params[])
  69370. {
  69371. new landid = GetNearbyLand(playerid);
  69372. if(landid == -1)
  69373. {
  69374. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any lands.");
  69375. }
  69376. if(!LandInfo[landid][lOwnerID])
  69377. {
  69378. SendClientMessageEx(playerid, COLOR_WHITE, "* This land is currently not owned and is for sale, price: {00AA00}$%i{FFFFFF}.", LandInfo[landid][lPrice]);
  69379. }
  69380. else if(!IsLandOwner(playerid, landid))
  69381. {
  69382. SendClientMessageEx(playerid, COLOR_WHITE, "* This land is owned by %s.", LandInfo[landid][lOwner]);
  69383. }
  69384. else
  69385. {
  69386. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT COUNT(*) FROM landobjects WHERE landid = %i", LandInfo[landid][lID]);
  69387. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LAND_INFORMATION, playerid);
  69388. }
  69389. return 1;
  69390. }
  69391. CMD:landperms(playerid, params[])
  69392. {
  69393. new targetid, landid;
  69394. if(PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  69395. {
  69396. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  69397. }
  69398. if(sscanf(params, "ui", targetid, landid))
  69399. {
  69400. return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /landperms [playerid] [landid (-1 to remove)]");
  69401. }
  69402. if(MAX_LANDS > landid > -1)
  69403. {
  69404. SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you temporary access to land #%i's keys.", GetRPName(playerid), landid);
  69405. SendClientMessageEx(playerid, COLOR_AQUA, "You have given temporary %s access to %i.", GetRPName(targetid), landid);
  69406. PlayerData[targetid][pLandPerms] = landid;
  69407. }
  69408. else if(landid == -1)
  69409. {
  69410. SendClientMessageEx(targetid, COLOR_AQUA, "%s has taken away your temporary land keys.", GetRPName(playerid));
  69411. SendClientMessageEx(playerid, COLOR_AQUA, "You have taken %s's temporary land access.", GetRPName(targetid));
  69412. PlayerData[targetid][pLandPerms] = -1;
  69413. }
  69414. return 1;
  69415. }
  69416. CMD:droplandkeys(playerid, params[])
  69417. {
  69418. if(PlayerData[playerid][pLandPerms] > -1)
  69419. {
  69420. SendClientMessageEx(playerid, COLOR_AQUA, "You have dropped land %i's keys.", PlayerData[playerid][pLandPerms]);
  69421. PlayerData[playerid][pLandPerms] = -1;
  69422. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET landkeys = -1 WHERE uid = %i", PlayerData[playerid][pID]);
  69423. mysql_tquery(connectionID, queryBuffer);
  69424. }
  69425. else
  69426. {
  69427. SendClientMessageEx(playerid, COLOR_GREY, "You don't have keys to a land.");
  69428. }
  69429. return 1;
  69430. }
  69431. CMD:land(playerid, params[])
  69432. {
  69433. new landid = GetNearbyLand(playerid);
  69434. if(landid == -1)
  69435. {
  69436. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any lands of yours.");
  69437. }
  69438. if(!HasLandPerms(playerid, landid))
  69439. {
  69440. return SendClientMessage(playerid, COLOR_GREY, "You don't have permission to build in this land.");
  69441. }
  69442. ShowDialogToPlayer(playerid, DIALOG_LANDMENU);
  69443. return 1;
  69444. }
  69445. CMD:mp3(playerid, params[])
  69446. {
  69447. if(!PlayerData[playerid][pMP3Player])
  69448. {
  69449. return SendClientMessage(playerid, COLOR_GREY, "You don't have an MP3 player.");
  69450. }
  69451. PlayerData[playerid][pMusicType] = MUSIC_MP3PLAYER;
  69452. ShowDialogToPlayer(playerid, DIALOG_MP3PLAYER);
  69453. return 1;
  69454. }
  69455. CMD:setradio(playerid, params[])
  69456. {
  69457. if(!IsPlayerInAnyVehicle(playerid))
  69458. {
  69459. return SendClientMessage(playerid, COLOR_GREY, "You are not in any vehicle.");
  69460. }
  69461. PlayerData[playerid][pMusicType] = MUSIC_VEHICLE;
  69462. ShowDialogToPlayer(playerid, DIALOG_MP3PLAYER);
  69463. return 1;
  69464. }
  69465. CMD:changename(playerid, params[])
  69466. {
  69467. if(!IsPlayerInRangeOfPoint(playerid, 3.0, 636.2432,-108.6183,-78.9141))
  69468. {
  69469. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the desk at city hall.");
  69470. }
  69471. if(isnull(params))
  69472. {
  69473. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /changename [new name]");
  69474. }
  69475. if(!(3 <= strlen(params) <= 20))
  69476. {
  69477. return SendClientMessage(playerid, COLOR_GREY, "Your name must range from 3 to 20 characters.");
  69478. }
  69479. if(strfind(params, "_") == -1)
  69480. {
  69481. return SendClientMessage(playerid, COLOR_GREY, "Your name needs to contain at least one underscore.");
  69482. }
  69483. if(!IsValidName(params))
  69484. {
  69485. return SendClientMessage(playerid, COLOR_GREY, "Invalid characters. Your name may only contain letters and underscores.");
  69486. }
  69487. if(PlayerData[playerid][pCash] < PlayerData[playerid][pLevel] * 7500)
  69488. {
  69489. return SendClientMessageEx(playerid, COLOR_GREY, "You need at least %s to change your name at your level.", FormatNumber(PlayerData[playerid][pLevel] * 7500));
  69490. }
  69491. if(PlayerData[playerid][pAdminDuty])
  69492. {
  69493. return SendClientMessage(playerid, COLOR_GREY, "You aren't allowed to change your name while on admin duty,");
  69494. }
  69495. if(!isnull(PlayerData[playerid][pNameChange]))
  69496. {
  69497. return SendClientMessage(playerid, COLOR_GREY, "You have already requested a namechange. Please wait for a response.");
  69498. }
  69499. PlayerData[playerid][pFreeNamechange] = 0;
  69500. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid FROM "#TABLE_USERS" WHERE username = '%e'", params);
  69501. mysql_tquery(connectionID, queryBuffer, "OnPlayerAttemptNameChange", "is", playerid, params);
  69502. return 1;
  69503. }
  69504. CMD:acceptname(playerid, params[])
  69505. {
  69506. new targetid;
  69507. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  69508. {
  69509. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  69510. }
  69511. if(sscanf(params, "u", targetid))
  69512. {
  69513. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /acceptname [playerid]");
  69514. }
  69515. if(!IsPlayerConnected(targetid))
  69516. {
  69517. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  69518. }
  69519. /*if(!PlayerData[targetid][pLogged])
  69520. {
  69521. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet.");
  69522. }*/
  69523. if(isnull(PlayerData[targetid][pNameChange]))
  69524. {
  69525. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't requested a namechange.");
  69526. }
  69527. if(PlayerData[targetid][pFreeNamechange] == 0 && PlayerData[targetid][pCash] < PlayerData[targetid][pLevel] * 7500)
  69528. {
  69529. return SendClientMessage(playerid, COLOR_GREY, "That player can't afford the namechange.");
  69530. }
  69531. new cost = PlayerData[targetid][pLevel] * 7500;
  69532. if(PlayerData[targetid][pFreeNamechange])
  69533. {
  69534. if(PlayerData[targetid][pFreeNamechange] == 2 && (GetFactionType(targetid) == FACTION_HITMAN || GetFactionType(targetid) == FACTION_FEDERAL))
  69535. {
  69536. GetPlayerName(targetid, PlayerData[targetid][pPassportName], MAX_PLAYER_NAME);
  69537. PlayerData[targetid][pPassport] = 1;
  69538. PlayerData[targetid][pPassportLevel] = PlayerData[targetid][pLevel];
  69539. PlayerData[targetid][pPassportSkin] = PlayerData[targetid][pSkin];
  69540. PlayerData[targetid][pPassportPhone] = PlayerData[targetid][pPhone];
  69541. PlayerData[targetid][pLevel] = PlayerData[targetid][pChosenLevel];
  69542. PlayerData[targetid][pSkin] = PlayerData[targetid][pChosenSkin];
  69543. PlayerData[targetid][pPhone] = random(100000) + 899999;
  69544. SetPlayerSkin(targetid, PlayerData[targetid][pSkin]);
  69545. Log_Write("log_faction", "%s (uid: %i) used the /passport command to change their name to %s, level to %i and skin to %i.", GetPlayerNameEx(targetid), PlayerData[targetid][pID], PlayerData[targetid][pNameChange], PlayerData[targetid][pLevel], PlayerData[targetid][pSkin]);
  69546. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET level = %i, skin = %i, phone = %i, passport = 1, passportname = '%s', passportlevel = %i, passportskin = %i, passportphone = %i WHERE uid = %i", PlayerData[targetid][pLevel], PlayerData[targetid][pSkin], PlayerData[targetid][pPhone], PlayerData[targetid][pPassportName], PlayerData[targetid][pPassportLevel], PlayerData[targetid][pPassportSkin], PlayerData[targetid][pPassportPhone], PlayerData[targetid][pID]);
  69547. mysql_tquery(connectionID, queryBuffer);
  69548. }
  69549. Log_Write("log_admin", "%s (uid: %i) accepted %s's (uid: %i) free namechange to %s.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], PlayerData[targetid][pNameChange]);
  69550. Log_Write("log_namechanges", "%s (uid: %i) accepted %s's (uid: %i) free namechange to %s.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], PlayerData[targetid][pNameChange]);
  69551. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has accepted %s's free namechange to %s.", GetRPName(playerid), GetRPName(targetid), PlayerData[targetid][pNameChange]);
  69552. SendClientMessageEx(targetid, COLOR_YELLOW, "Your namechange request to %s was approved for free.", PlayerData[targetid][pNameChange]);
  69553. if(!IsPlayerLoggedIn(targetid))
  69554. {
  69555. #if defined SERVER_INTRO
  69556. ShowServerIntro(targetid);
  69557. #else
  69558. ShowDialogToPlayer(targetid, DIALOG_REGISTER);
  69559. #endif
  69560. }
  69561. if(PlayerData[targetid][pFreeNamechange] == 2)
  69562. {
  69563. SendClientMessage(targetid, COLOR_WHITE, "* You can use /passport again to return to your old name and stats.");
  69564. }
  69565. }
  69566. else
  69567. {
  69568. Log_Write("log_admin", "%s (uid: %i) accepted %s's (uid: %i) namechange to %s for $%i.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], PlayerData[targetid][pNameChange], cost);
  69569. Log_Write("log_namechanges", "%s (uid: %i) accepted %s's (uid: %i) namechange to %s for $%i.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], PlayerData[targetid][pNameChange], cost);
  69570. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has accepted %s's namechange to %s for %s.", GetRPName(playerid), GetRPName(targetid), PlayerData[targetid][pNameChange], FormatNumber(cost));
  69571. SendClientMessageEx(targetid, COLOR_YELLOW, "Your namechange request to %s was approved for %s.", PlayerData[targetid][pNameChange], FormatNumber(cost));
  69572. GivePlayerCash(targetid, -cost);
  69573. AddToTaxVault(cost);
  69574. }
  69575. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO log_namehistory VALUES(null, %i, '%s', '%s', '%s', NOW())", PlayerData[targetid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pNameChange], GetPlayerNameEx(playerid));
  69576. mysql_tquery(connectionID, queryBuffer);
  69577. Namechange(targetid, GetPlayerNameEx(targetid), PlayerData[targetid][pNameChange]);
  69578. PlayerData[targetid][pNameChange] = 0;
  69579. PlayerData[targetid][pFreeNamechange] = 0;
  69580. return 1;
  69581. }
  69582. CMD:denyname(playerid, params[])
  69583. {
  69584. new targetid;
  69585. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  69586. {
  69587. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  69588. }
  69589. if(sscanf(params, "u", targetid))
  69590. {
  69591. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /denyname [playerid]");
  69592. }
  69593. if(!IsPlayerConnected(targetid))
  69594. {
  69595. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  69596. }
  69597. /*if(!PlayerData[targetid][pLogged])
  69598. {
  69599. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet.");
  69600. }*/
  69601. if(isnull(PlayerData[targetid][pNameChange]))
  69602. {
  69603. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't requested a namechange.");
  69604. }
  69605. if(PlayerData[targetid][pFreeNamechange] == 1)
  69606. {
  69607. if(!IsPlayerLoggedIn(targetid))
  69608. {
  69609. SendClientMessage(targetid, COLOR_LIGHTRED, "Please reconnect with a proper roleplay name in the Firstname_Lastname format.");
  69610. KickPlayer(targetid);
  69611. return 1;
  69612. }
  69613. Dialog_Show(targetid, DIALOG_FREENAMECHANGE, DIALOG_STYLE_INPUT, "Non-RP Name", "An administrator has came to the conclusion that your name is non-RP.\nTherefore you have been given this free namechange in order to correct it.\n\nEnter a name in the Firstname_Lastname format in the box below:", "Submit", "Cancel");
  69614. }
  69615. Log_Write("log_admin", "%s (uid: %i) denied %s's (uid: %i) namechange to %s.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], PlayerData[targetid][pNameChange]);
  69616. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has denied %s's namechange to %s.", GetRPName(playerid), GetRPName(targetid), PlayerData[targetid][pNameChange]);
  69617. SendClientMessageEx(targetid, COLOR_LIGHTRED, "Your namechange request to %s was denied.", PlayerData[targetid][pNameChange]);
  69618. PlayerData[targetid][pNameChange] = 0;
  69619. PlayerData[targetid][pFreeNamechange] = 0;
  69620. return 1;
  69621. }
  69622. CMD:namechanges(playerid, params[])
  69623. {
  69624. if(PlayerData[playerid][pAdmin] < JUNIOR_ADMIN)
  69625. {
  69626. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  69627. }
  69628. SendClientMessage(playerid, COLOR_NAVYBLUE, "______ Pending Namechanges ______");
  69629. foreach(new i : Player)
  69630. {
  69631. if(!isnull(PlayerData[i][pNameChange]))
  69632. {
  69633. SendClientMessageEx(playerid, COLOR_GREY2, "(ID: %i) %s requested a namechange to %s", i, GetRPName(i), PlayerData[i][pNameChange]);
  69634. }
  69635. }
  69636. return 1;
  69637. }
  69638. CMD:paytickets(playerid, params[])
  69639. {
  69640. new vehicleid = GetPlayerVehicleID(playerid), amount;
  69641. if(!IsPlayerInRangeOfPoint(playerid, 3.0, 1186.8889,-1795.3860,13.5703))
  69642. {
  69643. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the desk at city hall.");
  69644. }
  69645. if(!vehicleid)
  69646. {
  69647. return SendClientMessage(playerid, COLOR_GREY, "You are not inside of any vehicle of yours.");
  69648. }
  69649. if(!IsVehicleOwner(playerid, vehicleid) && PlayerData[playerid][pVehicleKeys] != vehicleid)
  69650. {
  69651. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as this vehicle doesn't belong to you.");
  69652. }
  69653. if(sscanf(params, "i", amount))
  69654. {
  69655. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /paytickets [amount] (There is $%i in unpaid tickets.)", VehicleInfo[vehicleid][vTickets]);
  69656. }
  69657. if(amount < 1 || amount > PlayerData[playerid][pCash])
  69658. {
  69659. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  69660. }
  69661. if(amount > VehicleInfo[vehicleid][vTickets])
  69662. {
  69663. return SendClientMessage(playerid, COLOR_GREY, "There isn't that much in unpaid tickets to pay.");
  69664. }
  69665. VehicleInfo[vehicleid][vTickets] -= amount;
  69666. GivePlayerCash(playerid, -amount);
  69667. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET tickets = %i WHERE id = %i", VehicleInfo[vehicleid][vTickets], VehicleInfo[vehicleid][vID]);
  69668. mysql_tquery(connectionID, queryBuffer);
  69669. SendClientMessageEx(playerid, COLOR_AQUA, "You have paid %s in unpaid tickets. This vehicle now has %s left in unpaid tickets.", FormatNumber(amount), FormatNumber(VehicleInfo[vehicleid][vTickets]));
  69670. return 1;
  69671. }
  69672. CMD:carinfo(playerid, params[])
  69673. {
  69674. new vehicleid = GetPlayerVehicleID(playerid);
  69675. if(!vehicleid || !IsVehicleOwner(playerid, vehicleid))
  69676. {
  69677. return SendClientMessage(playerid, COLOR_GREY, "You are not inside any vehicle of yours.");
  69678. }
  69679. new neon[12], Float:health;
  69680. GetVehicleHealth(vehicleid, health);
  69681. switch(VehicleInfo[vehicleid][vNeon])
  69682. {
  69683. case 18647: neon = "Red";
  69684. case 18648: neon = "Blue";
  69685. case 18649: neon = "Green";
  69686. case 18650: neon = "Yellow";
  69687. case 18651: neon = "Pink";
  69688. case 18652: neon = "White";
  69689. default: neon = "None";
  69690. }
  69691. SendClientMessageEx(playerid, COLOR_NAVYBLUE, "_______ %s Stats _______", GetVehicleName(vehicleid));
  69692. SendClientMessageEx(playerid, COLOR_GREY2, "Owner: %s - Value: $%i - Tickets: $%i - License Plate: ", VehicleInfo[vehicleid][vOwner], GetVehicleValue(vehicleid), VehicleInfo[vehicleid][vTickets]);
  69693. SendClientMessageEx(playerid, COLOR_GREY2, "Neon: %s - Trunk Level: %i/3 - Alarm Level: %i/3 - Health: %.1f - Fuel: %i/100", neon, VehicleInfo[vehicleid][vTrunk], VehicleInfo[vehicleid][vAlarm], health, vehicleFuel[vehicleid]);
  69694. return 1;
  69695. }
  69696. CMD:smuggle(playerid, params[])
  69697. {
  69698. return callcmd::smuggledrugs(playerid, params);
  69699. }
  69700. CMD:loadpack(playerid, params[])
  69701. {
  69702. if(PlayerData[playerid][pSmuggleDrugs] == 0)
  69703. {
  69704. return SendClientMessage(playerid, COLOR_GREY, "You don't have any drug pack to load.");
  69705. }
  69706. new vehicleid = GetNearbyVehicle(playerid);
  69707. if(vehicleid == INVALID_VEHICLE_ID)
  69708. {
  69709. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any vehicle.");
  69710. }
  69711. if(!VehicleHasDoors(vehicleid))
  69712. {
  69713. return SendClientMessage(playerid, COLOR_GREY, "This vehicle has no boot.");
  69714. }
  69715. if(!GetVehicleParams(vehicleid, VEHICLE_BOOT))
  69716. {
  69717. return SendClientMessage(playerid, COLOR_GREY, "The vehicle trunk is not open");
  69718. }
  69719. switch(PlayerData[playerid][pSmuggleDrugs])
  69720. {
  69721. case 1:
  69722. {
  69723. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
  69724. RemovePlayerAttachedObject(playerid, 9);
  69725. PlayerData[playerid][pSmuggleTime] = gettime();
  69726. PlayerData[playerid][pCP] = CHECKPOINT_DRUGS;
  69727. SetTimerEx("DrugDeliveryDetect", 8000, 0, "i", playerid);
  69728. SetPlayerCheckpoint(playerid, 2349.7727, -1169.6304, 28.0243, 3.0);
  69729. SendClientMessage(playerid, COLOR_GREEN, "Item loaded, deliver it to your marker!");
  69730. }
  69731. case 2:
  69732. {
  69733. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
  69734. RemovePlayerAttachedObject(playerid, 9);
  69735. PlayerData[playerid][pSmuggleTime] = gettime();
  69736. PlayerData[playerid][pCP] = CHECKPOINT_DRUGS;
  69737. SetTimerEx("DrugDeliveryDetect", 8000, 0, "i", playerid);
  69738. SetPlayerCheckpoint(playerid, 2349.7727, -1169.6304, 28.0243, 3.0);
  69739. }
  69740. case 3:
  69741. {
  69742. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
  69743. RemovePlayerAttachedObject(playerid, 9);
  69744. PlayerData[playerid][pSmuggleTime] = gettime();
  69745. PlayerData[playerid][pCP] = CHECKPOINT_DRUGS;
  69746. SetTimerEx("DrugDeliveryDetect", 8000, 0, "i", playerid);
  69747. SetPlayerCheckpoint(playerid, 2167.7371, -1670.6298, 15.0804, 3.0);
  69748. }
  69749. }
  69750. return 1;
  69751. }
  69752. CMD:smuggledrugs(playerid, params[])
  69753. {
  69754. if(!PlayerHasJob(playerid, JOB_DRUGDEALER))
  69755. {
  69756. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a Drug Dealer.");
  69757. }
  69758. if(!IsPlayerInRangeOfPoint(playerid, 5.0, 52.0937, -292.2513, 1.7001))
  69759. {
  69760. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the smuggle point.");
  69761. }
  69762. if(PlayerData[playerid][pCash] < 500)
  69763. {
  69764. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money.");
  69765. }
  69766. if(PlayerData[playerid][pCP] != CHECKPOINT_NONE)
  69767. {
  69768. return SendClientMessage(playerid, COLOR_GREY, "You must cancel your active checkpoint first. /cancelcp to cancel it.");
  69769. }
  69770. if(isnull(params))
  69771. {
  69772. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /smuggledrugs [seeds | cocaine | ephedrine]");
  69773. }
  69774. new amount = 500 / GetJobLevel(playerid, JOB_DRUGDEALER);
  69775. if(!strcmp(params, "seeds", true))
  69776. {
  69777. if(gSeedsStock + 10 > 1000)
  69778. {
  69779. return SendClientMessage(playerid, COLOR_GREY, "The drug house can't hold anymore seeds. Therefore you can't smuggle them.");
  69780. }
  69781. SetPlayerAttachedObject(playerid, 9, 1578, 1, 0.242999, 0.324000, 0.012000, -17.200078, 20.699993, 9.800034, 0.579999, 0.617999, 0.676999);
  69782. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
  69783. ApplyAnimation(playerid, "CARRY", "liftup", 4.1, 0, 0, 0, 0, 0, 1);
  69784. PlayerData[playerid][pSmuggleDrugs] = 1;
  69785. GivePlayerCash(playerid, -amount);
  69786. AddPointMoney(POINT_DRUGFACTORY, amount);
  69787. SendClientMessageEx(playerid, COLOR_AQUA, "You have paid $%i for a package of {00AA00}marijuana seeds{33CCFF}. Load it to your vehicle's trunk (/loadpack).", amount);
  69788. }
  69789. else if(!strcmp(params, "cocaine", true))
  69790. {
  69791. if(gCocaineStock + 10 > 500)
  69792. {
  69793. return SendClientMessage(playerid, COLOR_GREY, "The crack house can't hold anymore cocaine. Therefore you can't smuggle it.");
  69794. }
  69795. SetPlayerAttachedObject(playerid, 9, 1575, 1, 0.242999, 0.324000, 0.012000, -17.200078, 20.699993, 9.800034, 0.579999, 0.617999, 0.676999);
  69796. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
  69797. ApplyAnimation(playerid, "CARRY", "liftup", 4.1, 0, 0, 0, 0, 0, 1);
  69798. PlayerData[playerid][pSmuggleDrugs] = 2;
  69799. GivePlayerCash(playerid, -amount);
  69800. AddPointMoney(POINT_DRUGFACTORY, amount);
  69801. SendClientMessageEx(playerid, COLOR_AQUA, "You have paid $%i for a package of {00AA00}cocaine{33CCFF}. Load it to your vehicle's trunk (/loadpack).", amount);
  69802. }
  69803. else if(!strcmp(params, "ephedrine", true))
  69804. {
  69805. if(gEphedrineStock + 10 > 250)
  69806. {
  69807. return SendClientMessage(playerid, COLOR_GREY, "The drug house can't hold anymore ephedrine. Therefore you can't smuggle ir.");
  69808. }
  69809. SetPlayerAttachedObject(playerid, 9, 1576, 1, 0.242999, 0.324000, 0.012000, -17.200078, 20.699993, 9.800034, 0.579999, 0.617999, 0.676999);
  69810. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
  69811. ApplyAnimation(playerid, "CARRY", "liftup", 4.1, 0, 0, 0, 0, 0, 1);
  69812. PlayerData[playerid][pSmuggleDrugs] = 3;
  69813. GivePlayerCash(playerid, -amount);
  69814. AddPointMoney(POINT_DRUGFACTORY, amount);
  69815. SendClientMessageEx(playerid, COLOR_AQUA, "You have paid $5i for a package of {00AA00}raw ephedrine{33CCFF}. Load it to your vehicle's trunk (/loadpack).", amount);
  69816. }
  69817. return 1;
  69818. }
  69819. func DrugDeliveryDetect(playerid)
  69820. {
  69821. new Float:x, Float:y, Float:z, zone[26];
  69822. GetPlayerPos(playerid, x, y, z);
  69823. strcpy(zone, GetZoneName(x, y, z));
  69824. foreach(new a : Player)
  69825. {
  69826. if(FactionInfo[a][fType] == FACTION_POLICE || FactionInfo[a][fType] == FACTION_FEDERAL || FactionInfo[a][fType] == FACTION_ARMY)
  69827. {
  69828. SendFactionMessage(a, COLOR_YELLOW, "HQ: CamDetect: A drug delivery has been spoted at %s, please send a unit immediately!", zone);
  69829. }
  69830. }
  69831. return 1;
  69832. }
  69833. CMD:buydrug(playerid, params[])
  69834. {
  69835. new option[10], amount, cost;
  69836. if(!PlayerHasJob(playerid, JOB_DRUGDEALER))
  69837. {
  69838. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a Drug Dealer.");
  69839. }
  69840. if(sscanf(params, "s[10]i", option, amount))
  69841. {
  69842. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /buydrug [seeds | cocaine | ephedrine] [amount]");
  69843. }
  69844. if(!strcmp(option, "seeds", true))
  69845. {
  69846. if(!IsPlayerInRangeOfPoint(playerid, 3.0, 321.8347, 1117.1797, 1083.8828))
  69847. {
  69848. return SendClientMessage(playerid, COLOR_GREY, "You are not inside of the drug den.");
  69849. }
  69850. if(amount < 1 || amount > 10)
  69851. {
  69852. return SendClientMessage(playerid, COLOR_GREY, "You can't buy less than 1 or more than 10 seeds at a time.");
  69853. }
  69854. if(amount > gSeedsStock)
  69855. {
  69856. return SendClientMessage(playerid, COLOR_GREY, "There aren't that many seeds left in stock.");
  69857. }
  69858. if(PlayerData[playerid][pCash] < (cost = amount * 500))
  69859. {
  69860. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to buy that many seeds.");
  69861. }
  69862. if(PlayerData[playerid][pSeeds] + amount > GetPlayerCapacity(playerid, CAPACITY_SEEDS))
  69863. {
  69864. return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i seeds. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pSeeds], GetPlayerCapacity(playerid, CAPACITY_SEEDS));
  69865. }
  69866. gSeedsStock -= amount;
  69867. PlayerData[playerid][pSeeds] += amount;
  69868. GivePlayerCash(playerid, -cost);
  69869. AddPointMoney(POINT_DRUGDEN, cost);
  69870. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET seeds = %i WHERE uid = %i", PlayerData[playerid][pSeeds], PlayerData[playerid][pID]);
  69871. mysql_tquery(connectionID, queryBuffer);
  69872. SendClientMessageEx(playerid, COLOR_AQUA, "You have purchased %i marijuana seeds for {00AA00}$%i{33CCFF}. /planthelp for more help.", amount, cost);
  69873. }
  69874. else if(!strcmp(option, "ephedrine", true))
  69875. {
  69876. if(!IsPlayerInRangeOfPoint(playerid, 3.0, 323.7289, 1117.4187, 1083.8828))
  69877. {
  69878. return SendClientMessage(playerid, COLOR_GREY, "You are not inside of the drug den.");
  69879. }
  69880. if(amount < 1 || amount > 5)
  69881. {
  69882. return SendClientMessage(playerid, COLOR_GREY, "You can't buy less than 1 or more than 5 grams at a time.");
  69883. }
  69884. if(amount > gEphedrineStock)
  69885. {
  69886. return SendClientMessage(playerid, COLOR_GREY, "There isn't that much ephedrine left in stock.");
  69887. }
  69888. if(PlayerData[playerid][pCash] < (cost = amount * 1000))
  69889. {
  69890. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to buy that many grams.");
  69891. }
  69892. if(PlayerData[playerid][pEphedrine] + amount > GetPlayerCapacity(playerid, CAPACITY_EPHEDRINE))
  69893. {
  69894. return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i ephedrine. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pEphedrine], GetPlayerCapacity(playerid, CAPACITY_EPHEDRINE));
  69895. }
  69896. gEphedrineStock -= amount;
  69897. PlayerData[playerid][pEphedrine] += amount;
  69898. GivePlayerCash(playerid, -cost);
  69899. AddPointMoney(POINT_DRUGDEN, cost);
  69900. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET ephedrine = %i WHERE uid = %i", PlayerData[playerid][pEphedrine], PlayerData[playerid][pID]);
  69901. mysql_tquery(connectionID, queryBuffer);
  69902. SendClientMessageEx(playerid, COLOR_AQUA, "You have purchased %i grams of raw ephedrine for {00AA00}$%i{33CCFF}.", amount, cost);
  69903. }
  69904. else if(!strcmp(option, "cocaine", true))
  69905. {
  69906. if(!IsPlayerInRangeOfPoint(playerid, 3.0, 2342.7766, -1187.0839, 1027.9766))
  69907. {
  69908. return SendClientMessage(playerid, COLOR_GREY, "You are not inside of the crack house.");
  69909. }
  69910. if(amount < 1 || amount > 10)
  69911. {
  69912. return SendClientMessage(playerid, COLOR_GREY, "You can't buy less than 1 or more than 10 grams at a time.");
  69913. }
  69914. if(amount > gCocaineStock)
  69915. {
  69916. return SendClientMessage(playerid, COLOR_GREY, "There isn't that much cocaine left in stock.");
  69917. }
  69918. if(PlayerData[playerid][pCash] < (cost = amount * 750))
  69919. {
  69920. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to buy that many grams.");
  69921. }
  69922. if(PlayerData[playerid][pCocaine] + amount > GetPlayerCapacity(playerid, CAPACITY_COCAINE))
  69923. {
  69924. return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i cocaine. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pCocaine], GetPlayerCapacity(playerid, CAPACITY_COCAINE));
  69925. }
  69926. gCocaineStock -= amount;
  69927. PlayerData[playerid][pCocaine] += amount;
  69928. GivePlayerCash(playerid, -cost);
  69929. AddPointMoney(POINT_CRACKHOUSE, cost);
  69930. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET cocaine = %i WHERE uid = %i", PlayerData[playerid][pCocaine], PlayerData[playerid][pID]);
  69931. mysql_tquery(connectionID, queryBuffer);
  69932. SendClientMessageEx(playerid, COLOR_AQUA, "You have purchased %i grams of cocaine for {00AA00}$%i{33CCFF}.", amount, cost);
  69933. }
  69934. return 1;
  69935. }
  69936. CMD:plantweed(playerid, params[])
  69937. {
  69938. if(PlayerData[playerid][pWeedPlanted] == 1)
  69939. {
  69940. return SendClientMessage(playerid, COLOR_GREY, "You have 1 active weed plant already.");
  69941. }
  69942. if(PlayerData[playerid][pSeeds] < 10)
  69943. {
  69944. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough seeds. You need at least 10 seeds in order to plant them.");
  69945. }
  69946. if(GetPlayerInterior(playerid) > 0 || GetPlayerVirtualWorld(playerid) > 0)
  69947. {
  69948. return SendClientMessage(playerid, COLOR_GREY, "You can't plant indoors.");
  69949. }
  69950. GetPlayerPos(playerid, PlayerData[playerid][pWeedX], PlayerData[playerid][pWeedY], PlayerData[playerid][pWeedZ]);
  69951. GetPlayerFacingAngle(playerid, PlayerData[playerid][pWeedA]);
  69952. PlayerData[playerid][pSeeds] -= 10;
  69953. PlayerData[playerid][pWeedPlanted] = 1;
  69954. PlayerData[playerid][pWeedTime] = 60;
  69955. PlayerData[playerid][pWeedGrams] = 0;
  69956. PlayerData[playerid][pWeedObject] = CreateDynamicObject(3409, PlayerData[playerid][pWeedX], PlayerData[playerid][pWeedY], PlayerData[playerid][pWeedZ] - 1.8, 0.0, 0.0, PlayerData[playerid][pWeedA]);
  69957. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET seeds = %i, weedplanted = 1, weedtime = %i, weedgrams = %i, weed_x = '%f', weed_y = '%f', weed_z = '%f', weed_a = '%f' WHERE uid = %i", PlayerData[playerid][pSeeds], PlayerData[playerid][pWeedTime], PlayerData[playerid][pWeedGrams], PlayerData[playerid][pWeedX], PlayerData[playerid][pWeedY], PlayerData[playerid][pWeedZ], PlayerData[playerid][pWeedA], PlayerData[playerid][pID]);
  69958. mysql_tquery(connectionID, queryBuffer);
  69959. ShowActionBubble(playerid, "* %s plants some seeds into the ground.", GetRPName(playerid));
  69960. SendClientMessage(playerid, COLOR_GREEN, "You have planted a weed plant. Every two minutes your plant will grow one gram of weed.");
  69961. SendClientMessage(playerid, COLOR_GREEN, "Your plant will be ready in 60 minutes. Be careful, as anyone who sees your plant can pick it!");
  69962. return 1;
  69963. }
  69964. CMD:plantinfo(playerid, params[])
  69965. {
  69966. foreach(new i : Player)
  69967. {
  69968. if(PlayerData[i][pWeedPlanted] && IsPlayerInRangeOfPoint(playerid, 3.0, PlayerData[i][pWeedX], PlayerData[i][pWeedY], PlayerData[i][pWeedZ]))
  69969. {
  69970. ShowActionBubble(playerid, "* %s inspects the plant.", GetRPName(playerid));
  69971. SendClientMessageEx(playerid, COLOR_WHITE, "* This plant has so far grown %i grams of weed. It will be ready in %i/60 minutes.", PlayerData[i][pWeedGrams], PlayerData[i][pWeedTime]);
  69972. return 1;
  69973. }
  69974. }
  69975. SendClientMessage(playerid, COLOR_GREY, "You are not in range of any plants.");
  69976. return 1;
  69977. }
  69978. CMD:destroyplant(playerid, params[])
  69979. {
  69980. new planterid = PlayerData[playerid][pPickPlant];
  69981. if(IsLawEnforcement(playerid))
  69982. {
  69983. if(PlayerData[playerid][pWeedPlanted] && IsPlayerInRangeOfPoint(playerid, 3.0, PlayerData[playerid][pWeedX], PlayerData[playerid][pWeedY], PlayerData[playerid][pWeedZ]))
  69984. {
  69985. PlayerData[playerid][pPickPlant] = playerid;
  69986. DestroyWeedPlant(planterid);
  69987. SendClientMessage(playerid, COLOR_GREY, "You've destroyed the plant, reward $738");
  69988. GivePlayerCash(playerid, 738);
  69989. }
  69990. }
  69991. else return SendClientMessage(playerid, COLOR_GREY, "You are not a cop");
  69992. return 1;
  69993. }
  69994. CMD:pickplant(playerid, params[])
  69995. {
  69996. if(IsLawEnforcement(playerid))
  69997. {
  69998. return SendClientMessage(playerid, COLOR_GREY, "You cant pickup plants as a cop, use /destroyplant instead");
  69999. }
  70000. foreach(new i : Player)
  70001. {
  70002. if(PlayerData[i][pWeedPlanted] && IsPlayerInRangeOfPoint(playerid, 3.0, PlayerData[i][pWeedX], PlayerData[i][pWeedY], PlayerData[i][pWeedZ]))
  70003. {
  70004. if(GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK)
  70005. {
  70006. return SendClientMessage(playerid, COLOR_GREY, "You need to be crouched in order to pick a plant.");
  70007. }
  70008. if(PlayerData[i][pWeedGrams] < 2)
  70009. {
  70010. return SendClientMessage(playerid, COLOR_GREY, "This plant hasn't grown that much yet. Wait a little while first.");
  70011. }
  70012. if(PlayerData[playerid][pWeed] + PlayerData[i][pWeedGrams] > GetPlayerCapacity(playerid, CAPACITY_WEED))
  70013. {
  70014. return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i weed. You can't carry anymore until you upgrade your inventory skill.", PlayerData[playerid][pWeed], GetPlayerCapacity(playerid, CAPACITY_WEED));
  70015. }
  70016. PlayerData[playerid][pPickPlant] = i;
  70017. PlayerData[playerid][pPickTime] = 5;
  70018. ShowActionBubble(playerid, "* %s crouches down and starts picking at the weed plant.", GetRPName(playerid));
  70019. // SendClientMessage(playerid, COLOR_WHITE, "* Allow up to five seconds for you to pick the plant.");
  70020. return 1;
  70021. }
  70022. }
  70023. SendClientMessage(playerid, COLOR_GREY, "You are not in range of any plants.");
  70024. return 1;
  70025. }
  70026. CMD:seizeplant(playerid, params[])
  70027. {
  70028. if(!IsLawEnforcement(playerid))
  70029. {
  70030. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of law enforcement.");
  70031. }
  70032. foreach(new i : Player)
  70033. {
  70034. if(PlayerData[i][pWeedPlanted] && IsPlayerInRangeOfPoint(playerid, 3.0, PlayerData[i][pWeedX], PlayerData[i][pWeedY], PlayerData[i][pWeedZ]))
  70035. {
  70036. ShowActionBubble(playerid, "* %s seizes a weed plant weighing %i grams.", GetRPName(playerid), PlayerData[i][pWeedGrams]);
  70037. DestroyWeedPlant(i);
  70038. return 1;
  70039. }
  70040. }
  70041. SendClientMessage(playerid, COLOR_GREY, "You are not in range of any plants.");
  70042. return 1;
  70043. }
  70044. CMD:cookmeth(playerid, params[])
  70045. {
  70046. if(!PlayerHasJob(playerid, JOB_DRUGDEALER))
  70047. {
  70048. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a Drug Dealer.");
  70049. }
  70050. if(!IsPlayerInRangeOfPoint(playerid, 3.0, 1.2179, 2.8095, 999.4284))
  70051. {
  70052. return SendClientMessage(playerid, COLOR_GREY, "You are not in Heisenberg's trailer. You can't use this command.");
  70053. }
  70054. if(!PlayerData[playerid][pCookMeth])
  70055. {
  70056. if(!PlayerData[playerid][pEphedrine])
  70057. {
  70058. return SendClientMessage(playerid, COLOR_GREY, "You don't have any raw ephedrine which you could turn into meth.");
  70059. }
  70060. if(!PlayerData[playerid][pMuriaticAcid])
  70061. {
  70062. return SendClientMessage(playerid, COLOR_GREY, "You need muriatic acid in order to cook meth. Go buy some at 24/7.");
  70063. }
  70064. PlayerData[playerid][pCookMeth] = 1;
  70065. PlayerData[playerid][pCookTime] = 15;
  70066. PlayerData[playerid][pCookGrams] = 0;
  70067. SendClientMessage(playerid, COLOR_GREEN, "You have started cooking meth. One gram of ephedrine will turn into 2 grams of meth every 15 seconds.");
  70068. SendClientMessage(playerid, COLOR_GREEN, "Type the /cookmeth command again in order to stop cooking.");
  70069. }
  70070. else
  70071. {
  70072. SendClientMessageEx(playerid, COLOR_AQUA, "You have stopped cooking. You converted %i grams of ephedrine into %i grams of meth.", PlayerData[playerid][pCookGrams] / 2, PlayerData[playerid][pCookGrams]);
  70073. ResetCooking(playerid);
  70074. }
  70075. return 1;
  70076. }
  70077. CMD:usecigar(playerid, params[])
  70078. {
  70079. if(!PlayerData[playerid][pCigars])
  70080. {
  70081. return SendClientMessage(playerid, COLOR_GREY, "You don't have any cigars left.");
  70082. }
  70083. PlayerData[playerid][pCigars]--;
  70084. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
  70085. ShowActionBubble(playerid, "* %s lights up a cigar and starts to smoke it.", GetRPName(playerid));
  70086. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET cigars = %i WHERE uid = %i", PlayerData[playerid][pCigars], PlayerData[playerid][pID]);
  70087. mysql_tquery(connectionID, queryBuffer);
  70088. return 1;
  70089. }
  70090. CMD:usedrug(playerid, params[])
  70091. {
  70092. if(gettime() - PlayerData[playerid][pLastDrug] < 10)
  70093. {
  70094. return SendClientMessageEx(playerid, COLOR_GREY, "You can only consume drugs every 10 seconds. Please wait %i more seconds.", 10 - (gettime() - PlayerData[playerid][pLastDrug]));
  70095. }
  70096. if(PlayerData[playerid][pDrugsUsed] >= 4)
  70097. {
  70098. return SendClientMessage(playerid, COLOR_GREY, "You are stoned and therefore can't consume anymore drugs right now.");
  70099. }
  70100. if(PlayerData[playerid][pTazedTime] > 0 || PlayerData[playerid][pInjured] > 0 || PlayerData[playerid][pHospital] > 0 || PlayerData[playerid][pCuffed] > 0 || PlayerData[playerid][pTied] > 0 || PlayerData[playerid][pJailTime] > 0 || PlayerData[playerid][pPaintball] > 0)
  70101. {
  70102. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment.");
  70103. }
  70104. if(isnull(params))
  70105. {
  70106. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /usedrug [weed | cocaine | meth | painkillers]");
  70107. }
  70108. if(PlayerData[playerid][pHurt])
  70109. {
  70110. return SendClientMessageEx(playerid, COLOR_GREY, "You're too hurt to use drugs. Please wait %i seconds before trying again.", PlayerData[playerid][pHurt]);
  70111. }
  70112. if(!strcmp(params, "weed", true))
  70113. {
  70114. if(PlayerData[playerid][pWeed] < 2)
  70115. {
  70116. return SendClientMessage(playerid, COLOR_GREY, "You need at least two grams of weed.");
  70117. }
  70118. if(PlayerData[playerid][pAddictUpgrade] > 0)
  70119. {
  70120. SendClientMessageEx(playerid, COLOR_YELLOW3, "Addict Perk: Your level %i/3 addict perk gave you %.1f extra health.", PlayerData[playerid][pAddictUpgrade], (PlayerData[playerid][pAddictUpgrade] * 5.0));
  70121. }
  70122. GivePlayerHealth(playerid, 20.0 + (PlayerData[playerid][pAddictUpgrade] * 5.0));
  70123. PlayerData[playerid][pWeed] -= 2;
  70124. PlayerData[playerid][pDrugsUsed]++;
  70125. PlayerData[playerid][pLastDrug] = gettime();
  70126. if(PlayerData[playerid][pDrugsUsed] >= 4)
  70127. {
  70128. AwardAchievement(playerid, "High times");
  70129. GameTextForPlayer(playerid, "~p~shit... you stoned as hell duuuude...", 5000, 1);
  70130. PlayerData[playerid][pDrugsTime] = 30;
  70131. }
  70132. ApplyAnimation(playerid, "SMOKING", "M_smk_in", 4.1, 0, 0, 0, 0, 0);
  70133. ShowActionBubble(playerid, "* %s smokes two grams of weed.", GetRPName(playerid));
  70134. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET weed = %i WHERE uid = %i", PlayerData[playerid][pWeed], PlayerData[playerid][pID]);
  70135. mysql_tquery(connectionID, queryBuffer);
  70136. }
  70137. else if(!strcmp(params, "cocaine", true))
  70138. {
  70139. if(PlayerData[playerid][pCocaine] < 2)
  70140. {
  70141. return SendClientMessage(playerid, COLOR_GREY, "You need at least two grams of cocaine.");
  70142. }
  70143. if(PlayerData[playerid][pAddictUpgrade] > 0)
  70144. {
  70145. SendClientMessageEx(playerid, COLOR_YELLOW3, "Addict Perk: Your level %i/3 addict perk gave you %.1f extra armor.", PlayerData[playerid][pAddictUpgrade], (PlayerData[playerid][pAddictUpgrade] * 5.0));
  70146. }
  70147. GivePlayerArmour(playerid, 10.0 + (PlayerData[playerid][pAddictUpgrade] * 5.0));
  70148. PlayerData[playerid][pCocaine] -= 2;
  70149. PlayerData[playerid][pDrugsUsed]++;
  70150. PlayerData[playerid][pLastDrug] = gettime();
  70151. if(PlayerData[playerid][pDrugsUsed] >= 4)
  70152. {
  70153. AwardAchievement(playerid, "High times");
  70154. GameTextForPlayer(playerid, "~p~shit... you stoned as hell duuuude...", 5000, 1);
  70155. PlayerData[playerid][pDrugsTime] = 30;
  70156. }
  70157. ApplyAnimation(playerid, "SMOKING", "M_smk_in", 4.1, 0, 0, 0, 0, 0);
  70158. ShowActionBubble(playerid, "* %s snorts two grams of cocaine.", GetRPName(playerid));
  70159. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET cocaine = %i WHERE uid = %i", PlayerData[playerid][pCocaine], PlayerData[playerid][pID]);
  70160. mysql_tquery(connectionID, queryBuffer);
  70161. }
  70162. else if(!strcmp(params, "meth", true))
  70163. {
  70164. if(PlayerData[playerid][pMeth] < 2)
  70165. {
  70166. return SendClientMessage(playerid, COLOR_GREY, "You need at least two grams of meth.");
  70167. }
  70168. if(PlayerData[playerid][pAddictUpgrade] > 0)
  70169. {
  70170. SendClientMessageEx(playerid, COLOR_YELLOW3, "Addict Perk: Your level %i/3 addict perk gave you %.1f/%.1f extra health & armor.", PlayerData[playerid][pAddictUpgrade], (PlayerData[playerid][pAddictUpgrade] * 5.0), (PlayerData[playerid][pAddictUpgrade] * 5.0));
  70171. }
  70172. GivePlayerHealth(playerid, 10.0 + (PlayerData[playerid][pAddictUpgrade] * 5.0));
  70173. GivePlayerArmour(playerid, 10.0 + (PlayerData[playerid][pAddictUpgrade] * 5.0));
  70174. PlayerData[playerid][pMeth] -= 2;
  70175. PlayerData[playerid][pDrugsUsed] += 2;
  70176. PlayerData[playerid][pLastDrug] = gettime();
  70177. if(PlayerData[playerid][pDrugsUsed] >= 4)
  70178. {
  70179. AwardAchievement(playerid, "High times");
  70180. GameTextForPlayer(playerid, "~p~shit... you stoned as hell duuuude...", 5000, 1);
  70181. PlayerData[playerid][pDrugsTime] = 30;
  70182. }
  70183. ApplyAnimation(playerid, "SMOKING", "M_smk_in", 4.1, 0, 0, 0, 0, 0);
  70184. ShowActionBubble(playerid, "* %s smokes two grams of meth.", GetRPName(playerid));
  70185. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET meth = %i WHERE uid = %i", PlayerData[playerid][pMeth], PlayerData[playerid][pID]);
  70186. mysql_tquery(connectionID, queryBuffer);
  70187. }
  70188. else if(!strcmp(params, "painkillers", true))
  70189. {
  70190. if(PlayerData[playerid][pPainkillers] <= 0)
  70191. {
  70192. return SendClientMessage(playerid, COLOR_GREY, "You don't have any painkillers left.");
  70193. }
  70194. if(PlayerData[playerid][pAddictUpgrade] > 0)
  70195. {
  70196. SendClientMessageEx(playerid, COLOR_YELLOW3, "Addict Perk: Your level %i/3 addict perk gave you %.1f extra health.", PlayerData[playerid][pAddictUpgrade], (PlayerData[playerid][pAddictUpgrade] * 5.0));
  70197. }
  70198. GivePlayerHealth(playerid, 30.0 + (PlayerData[playerid][pAddictUpgrade] * 5.0));
  70199. PlayerData[playerid][pPainkillers] -= 1;
  70200. PlayerData[playerid][pReceivingAid] = 1;
  70201. PlayerData[playerid][pDrugsUsed] += 2;
  70202. PlayerData[playerid][pLastDrug] = gettime();
  70203. if(PlayerData[playerid][pDrugsUsed] >= 4)
  70204. {
  70205. AwardAchievement(playerid, "High times");
  70206. GameTextForPlayer(playerid, "~p~shit... you stoned as hell duuuude...", 5000, 1);
  70207. PlayerData[playerid][pDrugsTime] = 30;
  70208. }
  70209. ApplyAnimation(playerid, "SMOKING", "M_smk_in", 4.1, 0, 0, 0, 0, 0);
  70210. ShowActionBubble(playerid, "* %s pops a painkiller in their mouth.", GetRPName(playerid));
  70211. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET painkillers = %i WHERE uid = %i", PlayerData[playerid][pPainkillers], PlayerData[playerid][pID]);
  70212. mysql_tquery(connectionID, queryBuffer);
  70213. }
  70214. return 1;
  70215. }
  70216. CMD:showid(playerid, params[])
  70217. {
  70218. new targetid;
  70219. if(sscanf(params, "u", targetid))
  70220. {
  70221. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /showid [playerid]");
  70222. }
  70223. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  70224. {
  70225. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  70226. }
  70227. SendClientMessage(targetid, COLOR_NAVYBLUE, "______ ID Card ______");
  70228. SendClientMessageEx(targetid, COLOR_GREY1, "Name: %s", GetRPName(playerid));
  70229. SendClientMessageEx(targetid, COLOR_GREY1, "Gender: %s", (PlayerData[playerid][pGender] == 2) ? ("Female") : ("Male"));
  70230. SendClientMessageEx(targetid, COLOR_GREY1, "Age: %i years old", PlayerData[playerid][pAge]);
  70231. SendClientMessageEx(targetid, COLOR_GREY1, "Drivers License: %s", (PlayerData[playerid][pCarLicense]) ? ("{00AA00}Yes") : ("{FF6347}No"));
  70232. SendClientMessageEx(targetid, COLOR_GREY1, "Weapon License: %s", (PlayerData[playerid][pGunLicense]) ? ("{00AA00}Yes") : ("{FF6347}No"));
  70233. ShowActionBubble(playerid, "* %s shows their ID card to %s.", GetRPName(playerid), GetRPName(targetid));
  70234. return 1;
  70235. }
  70236. CMD:inv(playerid, params[])
  70237. {
  70238. return callcmd::inventory(playerid, params);
  70239. }
  70240. CMD:inventory(playerid, params[])
  70241. {
  70242. DisplayInventory(playerid);
  70243. return 1;
  70244. }
  70245. CMD:drop(playerid, params[])
  70246. {
  70247. new option[12], confirm[10];
  70248. if(sscanf(params, "s[12]S()[10]", option, confirm))
  70249. {
  70250. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /drop [option]");
  70251. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Weapons, Materials, Weed, Cocaine, Meth, Painkillers, Cigars, Spraycans");
  70252. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Seeds, Ephedrine, CarLicense");
  70253. return 1;
  70254. }
  70255. if(PlayerData[playerid][pTazedTime] > 0 || PlayerData[playerid][pInjured] > 0 || PlayerData[playerid][pHospital] > 0 || PlayerData[playerid][pCuffed] > 0 || PlayerData[playerid][pTied] > 0 || PlayerData[playerid][pJailTime] > 0 || PlayerData[playerid][pPaintball] > 0)
  70256. {
  70257. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment.");
  70258. }
  70259. if(!strcmp(option, "weapons", true))
  70260. {
  70261. if(isnull(confirm) || strcmp(confirm, "confirm", true) != 0)
  70262. {
  70263. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /drop [weapons] [confirm]");
  70264. }
  70265. ResetPlayerWeaponsEx(playerid);
  70266. ShowActionBubble(playerid, "* %s throws away their weapons.", GetRPName(playerid));
  70267. }
  70268. else if(!strcmp(option, "materials", true))
  70269. {
  70270. if(!PlayerData[playerid][pMaterials])
  70271. {
  70272. return SendClientMessage(playerid, COLOR_GREY, "You have no materials which you can throw away.");
  70273. }
  70274. if(isnull(confirm) || strcmp(confirm, "confirm", true) != 0)
  70275. {
  70276. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /drop [materials] [confirm] (You have %i materials.)", PlayerData[playerid][pMaterials]);
  70277. }
  70278. PlayerData[playerid][pMaterials] = 0;
  70279. ShowActionBubble(playerid, "* %s throws away their materials.", GetRPName(playerid));
  70280. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET materials = 0 WHERE uid = %i", PlayerData[playerid][pID]);
  70281. mysql_tquery(connectionID, queryBuffer);
  70282. }
  70283. else if(!strcmp(option, "weed", true))
  70284. {
  70285. if(!PlayerData[playerid][pWeed])
  70286. {
  70287. return SendClientMessage(playerid, COLOR_GREY, "You have no weed which you can throw away.");
  70288. }
  70289. if(isnull(confirm) || strcmp(confirm, "confirm", true) != 0)
  70290. {
  70291. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /drop [weed] [confirm] (You have %i grams of weed.)", PlayerData[playerid][pWeed]);
  70292. }
  70293. PlayerData[playerid][pWeed] = 0;
  70294. ShowActionBubble(playerid, "* %s throws away their weed.", GetRPName(playerid));
  70295. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET weed = 0 WHERE uid = %i", PlayerData[playerid][pID]);
  70296. mysql_tquery(connectionID, queryBuffer);
  70297. }
  70298. else if(!strcmp(option, "cocaine", true))
  70299. {
  70300. if(!PlayerData[playerid][pCocaine])
  70301. {
  70302. return SendClientMessage(playerid, COLOR_GREY, "You have no cocaine which you can throw away.");
  70303. }
  70304. if(isnull(confirm) || strcmp(confirm, "confirm", true) != 0)
  70305. {
  70306. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /drop [cocaine] [confirm] (You have %i grams of cocaine.)", PlayerData[playerid][pCocaine]);
  70307. }
  70308. PlayerData[playerid][pCocaine] = 0;
  70309. ShowActionBubble(playerid, "* %s throws away their cocaine.", GetRPName(playerid));
  70310. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET cocaine = 0 WHERE uid = %i", PlayerData[playerid][pID]);
  70311. mysql_tquery(connectionID, queryBuffer);
  70312. }
  70313. else if(!strcmp(option, "meth", true))
  70314. {
  70315. if(!PlayerData[playerid][pMeth])
  70316. {
  70317. return SendClientMessage(playerid, COLOR_GREY, "You have no meth which you can throw away.");
  70318. }
  70319. if(isnull(confirm) || strcmp(confirm, "confirm", true) != 0)
  70320. {
  70321. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /drop [meth] [confirm] (You have %i grams of meth.)", PlayerData[playerid][pMeth]);
  70322. }
  70323. PlayerData[playerid][pMeth] = 0;
  70324. ShowActionBubble(playerid, "* %s throws away their meth.", GetRPName(playerid));
  70325. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET meth = 0 WHERE uid = %i", PlayerData[playerid][pID]);
  70326. mysql_tquery(connectionID, queryBuffer);
  70327. }
  70328. else if(!strcmp(option, "painkillers", true))
  70329. {
  70330. if(!PlayerData[playerid][pPainkillers])
  70331. {
  70332. return SendClientMessage(playerid, COLOR_GREY, "You have no painkillers which you can throw away.");
  70333. }
  70334. if(isnull(confirm) || strcmp(confirm, "confirm", true) != 0)
  70335. {
  70336. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /drop [cocaine] [confirm] (You have %i painkillers.)", PlayerData[playerid][pPainkillers]);
  70337. }
  70338. PlayerData[playerid][pPainkillers] = 0;
  70339. ShowActionBubble(playerid, "* %s throws away their painkillers.", GetRPName(playerid));
  70340. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET painkillers = 0 WHERE uid = %i", PlayerData[playerid][pID]);
  70341. mysql_tquery(connectionID, queryBuffer);
  70342. }
  70343. else if(!strcmp(option, "cigars", true))
  70344. {
  70345. if(!PlayerData[playerid][pCigars])
  70346. {
  70347. return SendClientMessage(playerid, COLOR_GREY, "You have no cigars which you can throw away.");
  70348. }
  70349. if(isnull(confirm) || strcmp(confirm, "confirm", true) != 0)
  70350. {
  70351. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /drop [cigars] [confirm] (You have %i cigars.)", PlayerData[playerid][pCigars]);
  70352. }
  70353. PlayerData[playerid][pCigars] = 0;
  70354. ShowActionBubble(playerid, "* %s throws away their cigars.", GetRPName(playerid));
  70355. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET cigars = 0 WHERE uid = %i", PlayerData[playerid][pID]);
  70356. mysql_tquery(connectionID, queryBuffer);
  70357. }
  70358. else if(!strcmp(option, "spraycans", true))
  70359. {
  70360. if(!PlayerData[playerid][pSpraycans])
  70361. {
  70362. return SendClientMessage(playerid, COLOR_GREY, "You have no spraycans which you can throw away.");
  70363. }
  70364. if(isnull(confirm) || strcmp(confirm, "confirm", true) != 0)
  70365. {
  70366. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /drop [spraycans] [confirm] (You have %i spraycans.)", PlayerData[playerid][pSpraycans]);
  70367. }
  70368. PlayerData[playerid][pSpraycans] = 0;
  70369. ShowActionBubble(playerid, "* %s throws away their spraycanss.", GetRPName(playerid));
  70370. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET spraycans = 0 WHERE uid = %i", PlayerData[playerid][pID]);
  70371. mysql_tquery(connectionID, queryBuffer);
  70372. }
  70373. else if(!strcmp(option, "seeds", true))
  70374. {
  70375. if(!PlayerData[playerid][pSeeds])
  70376. {
  70377. return SendClientMessage(playerid, COLOR_GREY, "You have no seeds which you can throw away.");
  70378. }
  70379. if(isnull(confirm) || strcmp(confirm, "confirm", true) != 0)
  70380. {
  70381. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /drop [seeds] [confirm] (You have %i seeds.)", PlayerData[playerid][pSeeds]);
  70382. }
  70383. PlayerData[playerid][pSeeds] = 0;
  70384. ShowActionBubble(playerid, "* %s throws away their seeds.", GetRPName(playerid));
  70385. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET seeds = 0 WHERE uid = %i", PlayerData[playerid][pID]);
  70386. mysql_tquery(connectionID, queryBuffer);
  70387. }
  70388. else if(!strcmp(option, "ephedrine", true))
  70389. {
  70390. if(!PlayerData[playerid][pEphedrine])
  70391. {
  70392. return SendClientMessage(playerid, COLOR_GREY, "You have no ephedrine which you can throw away.");
  70393. }
  70394. if(isnull(confirm) || strcmp(confirm, "confirm", true) != 0)
  70395. {
  70396. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /drop [ephedrine] [confirm] (You have %i grams of ephedrine.)", PlayerData[playerid][pEphedrine]);
  70397. }
  70398. PlayerData[playerid][pEphedrine] = 0;
  70399. ShowActionBubble(playerid, "* %s throws away their ephedrine.", GetRPName(playerid));
  70400. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET ephedrine = 0 WHERE uid = %i", PlayerData[playerid][pID]);
  70401. mysql_tquery(connectionID, queryBuffer);
  70402. }
  70403. else if(!strcmp(option, "carlicense", true))
  70404. {
  70405. if(!PlayerData[playerid][pCarLicense])
  70406. {
  70407. return SendClientMessage(playerid, COLOR_GREY, "You have no drivers license which you can throw away.");
  70408. }
  70409. if(isnull(confirm) || strcmp(confirm, "confirm", true) != 0)
  70410. {
  70411. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /drop [carlicense] [confirm] (This drops your drivers license.)");
  70412. }
  70413. PlayerData[playerid][pCarLicense] = 0;
  70414. ShowActionBubble(playerid, "* %s rips up their drivers license.", GetRPName(playerid));
  70415. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET carlicense = 0 WHERE uid = %i", PlayerData[playerid][pID]);
  70416. mysql_tquery(connectionID, queryBuffer);
  70417. }
  70418. return 1;
  70419. }
  70420. CMD:creategang(playerid, params[])
  70421. {
  70422. new name[32];
  70423. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pGangMod])
  70424. {
  70425. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  70426. }
  70427. if(sscanf(params, "s[32]", name))
  70428. {
  70429. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /creategang [name]");
  70430. }
  70431. for(new i = 0; i < MAX_GANGS; i ++)
  70432. {
  70433. if(!GangInfo[i][gSetup])
  70434. {
  70435. SetupGang(i, name);
  70436. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has setup gang {F7A763}%s{FF6347} in slot ID %i.", GetRPName(playerid), name, i);
  70437. SendClientMessageEx(playerid, COLOR_WHITE, "* This gang's ID is %i. /editgang to edit.", i);
  70438. return 1;
  70439. }
  70440. }
  70441. SendClientMessage(playerid, COLOR_GREY, "Gang slots are currently full. Ask developers to increase the internal limit.");
  70442. return 1;
  70443. }
  70444. CMD:editgang(playerid, params[])
  70445. {
  70446. new gangid, option[14], param[128];
  70447. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pGangMod])
  70448. {
  70449. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  70450. }
  70451. if(sscanf(params, "is[14]S()[128]", gangid, option, param))
  70452. {
  70453. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editgang [gangid] [option]");
  70454. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Name, MOTD, Leader, Level, Color, Points, TurfTokens, RankName, Skin, Strikes");
  70455. return 1;
  70456. }
  70457. if(!(0 <= gangid < MAX_GANGS) || !GangInfo[gangid][gSetup])
  70458. {
  70459. return SendClientMessage(playerid, COLOR_GREY, "Invalid gang.");
  70460. }
  70461. if(!strcmp(option, "name", true))
  70462. {
  70463. if(isnull(param) || strlen(params) > 32)
  70464. {
  70465. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editgang [gangid] [name] [text]");
  70466. }
  70467. strcpy(GangInfo[gangid][gName], param, 32);
  70468. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET name = '%e' WHERE id = %i", param, gangid);
  70469. mysql_tquery(connectionID, queryBuffer);
  70470. ReloadGang(gangid);
  70471. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the name of gang ID %i to '%s'.", GetRPName(playerid), gangid, param);
  70472. }
  70473. else if(!strcmp(option, "motd", true))
  70474. {
  70475. if(isnull(param))
  70476. {
  70477. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editgang [gangid] [motd] [text]");
  70478. }
  70479. strcpy(GangInfo[gangid][gMOTD], param, 128);
  70480. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET motd = '%e' WHERE id = %i", param, gangid);
  70481. mysql_tquery(connectionID, queryBuffer);
  70482. ReloadGang(gangid);
  70483. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has adjusted the MOTD of gang ID %i.", GetRPName(playerid), gangid);
  70484. }
  70485. else if(!strcmp(option, "leader", true))
  70486. {
  70487. new leader[MAX_PLAYER_NAME];
  70488. if(sscanf(param, "s[24]", leader))
  70489. {
  70490. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editgang [gangid] [leader] [name]");
  70491. SendClientMessage(playerid, COLOR_SYNTAX, "This only updates the text for the leader's name in /gangs. Use /setgang to appoint someone as gang leader.");
  70492. return 1;
  70493. }
  70494. strcpy(GangInfo[gangid][gLeader], leader, MAX_PLAYER_NAME);
  70495. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET leader = '%e' WHERE id = %i", leader, gangid);
  70496. mysql_tquery(connectionID, queryBuffer);
  70497. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the leader of gang ID %i to %s.", GetRPName(playerid), gangid, leader);
  70498. }
  70499. else if(!strcmp(option, "level", true))
  70500. {
  70501. new value;
  70502. if(sscanf(param, "i", value))
  70503. {
  70504. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editgang [gangid] [level] [value (1-3)]");
  70505. }
  70506. if(!(1 <= value <= 3))
  70507. {
  70508. return SendClientMessage(playerid, COLOR_GREY, "Invalid level.");
  70509. }
  70510. GangInfo[gangid][gLevel] = value;
  70511. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET level = %i WHERE id = %i", GangInfo[gangid][gLevel], gangid);
  70512. mysql_tquery(connectionID, queryBuffer);
  70513. ReloadGang(gangid);
  70514. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the level of gang ID %i to %i/3.", GetRPName(playerid), gangid, value);
  70515. }
  70516. else if(!strcmp(option, "color", true))
  70517. {
  70518. new color;
  70519. if(sscanf(param, "h", color))
  70520. {
  70521. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editgang [gangid] [color] [0xRRGGBBAA]");
  70522. }
  70523. GangInfo[gangid][gColor] = color & ~0xff;
  70524. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET color = %i WHERE id = %i", GangInfo[gangid][gColor], gangid);
  70525. mysql_tquery(connectionID, queryBuffer);
  70526. foreach(new i : Turf)
  70527. {
  70528. if(TurfInfo[i][tExists] && TurfInfo[i][tCapturedGang] == gangid)
  70529. {
  70530. ReloadTurf(i);
  70531. }
  70532. }
  70533. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the {%06x}color{FF6347} of gang ID %i.", GetRPName(playerid), color >>> 8, gangid);
  70534. }
  70535. else if(!strcmp(option, "points", true))
  70536. {
  70537. new value;
  70538. if(sscanf(param, "i", value))
  70539. {
  70540. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editgang [gangid] [points] [value]");
  70541. }
  70542. GangInfo[gangid][gPoints] = value;
  70543. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET points = %i WHERE id = %i", GangInfo[gangid][gPoints], gangid);
  70544. mysql_tquery(connectionID, queryBuffer);
  70545. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the gang points of gang ID %i to %i.", GetRPName(playerid), gangid, value);
  70546. }
  70547. else if(!strcmp(option, "turftokens", true))
  70548. {
  70549. new value;
  70550. if(sscanf(param, "i", value))
  70551. {
  70552. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editgang [gangid] [turftokens] [value]");
  70553. }
  70554. GangInfo[gangid][gTurfTokens] = value;
  70555. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET turftokens = %i WHERE id = %i", GangInfo[gangid][gTurfTokens], gangid);
  70556. mysql_tquery(connectionID, queryBuffer);
  70557. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the turf tokens of gang ID %i to %i.", GetRPName(playerid), gangid, value);
  70558. }
  70559. else if(!strcmp(option, "rankname", true))
  70560. {
  70561. new rankid, rank[32];
  70562. if(sscanf(param, "is[32]", rankid, rank))
  70563. {
  70564. SendClientMessage(playerid, COLOR_NAVYBLUE, "______ Rank Names ______");
  70565. for(new i = 0; i < 7; i ++)
  70566. {
  70567. if(isnull(GangRanks[gangid][i]))
  70568. SendClientMessageEx(playerid, COLOR_GREY2, "Rank %i: (empty)", i);
  70569. else
  70570. SendClientMessageEx(playerid, COLOR_GREY2, "Rank %i: %s", i, GangRanks[gangid][i]);
  70571. }
  70572. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editgang [gangid] [rankname] [slot (0-6)] [name]");
  70573. }
  70574. if(!(0 <= rankid <= 6))
  70575. {
  70576. return SendClientMessage(playerid, COLOR_GREY, "Invalid rank.");
  70577. }
  70578. strcpy(GangRanks[gangid][rankid], rank, 32);
  70579. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO gangranks VALUES(%i, %i, '%e') ON DUPLICATE KEY UPDATE name = '%e'", gangid, rankid, rank, rank);
  70580. mysql_tquery(connectionID, queryBuffer);
  70581. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set rank %i's name of gang ID %i to '%s'.", GetRPName(playerid), rankid, gangid, rank);
  70582. }
  70583. else if(!strcmp(option, "skin", true))
  70584. {
  70585. new slot, skinid;
  70586. if(sscanf(param, "ii", slot, skinid))
  70587. {
  70588. SendClientMessage(playerid, COLOR_NAVYBLUE, "______ Gang Skins ______");
  70589. for(new i = 0; i < MAX_GANG_SKINS; i ++)
  70590. {
  70591. if(GangInfo[gangid][gSkins][i] == 0)
  70592. SendClientMessageEx(playerid, COLOR_GREY2, "Skin %i: (none)", i + 1);
  70593. else
  70594. SendClientMessageEx(playerid, COLOR_GREY2, "Skin %i: %i", i + 1, GangInfo[gangid][gSkins][i]);
  70595. }
  70596. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /editgang [gangid] [skin] [slot (1-%i)] [skinid]", MAX_GANG_SKINS);
  70597. }
  70598. if(!(1 <= slot <= MAX_GANG_SKINS))
  70599. {
  70600. return SendClientMessage(playerid, COLOR_GREY, "Invalid slot.");
  70601. }
  70602. if(!(1 <= skinid <= 311))
  70603. {
  70604. return SendClientMessage(playerid, COLOR_GREY, "Invalid skin.");
  70605. }
  70606. slot--;
  70607. GangInfo[gangid][gSkins][slot] = skinid;
  70608. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO gangskins VALUES(%i, %i, %i) ON DUPLICATE KEY UPDATE skinid = %i", gangid, slot, skinid, skinid);
  70609. mysql_tquery(connectionID, queryBuffer);
  70610. SendClientMessageEx(playerid, COLOR_WHITE, "* You have set the skin in slot %i to ID %i.", slot + 1, skinid);
  70611. }
  70612. else if(!strcmp(option, "strikes", true))
  70613. {
  70614. new amount;
  70615. if(sscanf(param, "i", amount))
  70616. {
  70617. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editgang [gangid] [strikes] [amount]");
  70618. }
  70619. if(!(0 <= amount <= 3))
  70620. {
  70621. return SendClientMessage(playerid, COLOR_GREY, "The amount must range from 0 to 3.");
  70622. }
  70623. GangInfo[gangid][gStrikes] = amount;
  70624. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET strikes = %i WHERE id = %i", amount, gangid);
  70625. mysql_tquery(connectionID, queryBuffer);
  70626. ReloadGang(gangid);
  70627. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the strikes of gang ID %i to %i.", GetRPName(playerid), gangid, amount);
  70628. }
  70629. else if(!strcmp(option, "alliance", true))
  70630. {
  70631. new allyid;
  70632. if(sscanf(param, "i", allyid))
  70633. {
  70634. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editgang [gangid] [alliance] [gangid]");
  70635. }
  70636. if(allyid == -1)
  70637. {
  70638. if(GangInfo[gangid][gAlliance] >= 0)
  70639. {
  70640. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET alliance = -1 WHERE id = %i", GangInfo[gangid][gAlliance]);
  70641. mysql_tquery(connectionID, queryBuffer);
  70642. GangInfo[GangInfo[gangid][gAlliance]][gAlliance] = -1;
  70643. }
  70644. GangInfo[gangid][gAlliance] = -1;
  70645. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET alliance = -1 WHERE id = %i", gangid);
  70646. mysql_tquery(connectionID, queryBuffer);
  70647. ReloadGang(gangid);
  70648. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has reset the alliance of gang ID %i.", GetRPName(playerid), gangid);
  70649. }
  70650. else
  70651. {
  70652. if(!(0 <= allyid < MAX_GANGS) || GangInfo[allyid][gSetup] == 0)
  70653. {
  70654. return SendClientMessage(playerid, COLOR_GREY, "Invalid gang.");
  70655. }
  70656. GangInfo[gangid][gAlliance] = allyid;
  70657. GangInfo[allyid][gAlliance] = gangid;
  70658. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET alliance = %i WHERE id = %i", allyid, gangid);
  70659. mysql_tquery(connectionID, queryBuffer);
  70660. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET alliance = %i WHERE id = %i", gangid, allyid);
  70661. mysql_tquery(connectionID, queryBuffer);
  70662. ReloadGang(gangid);
  70663. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the alliance of gang ID %i to gang %i.", GetRPName(playerid), gangid, allyid);
  70664. }
  70665. }
  70666. return 1;
  70667. }
  70668. CMD:settitle(playerid, params[])
  70669. {
  70670. new targetid, option[14], param[128];
  70671. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  70672. {
  70673. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  70674. }
  70675. if(sscanf(params, "us[14]S()[128]", targetid, option, param))
  70676. {
  70677. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /settitle [playerid] [option]");
  70678. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Name, Color");
  70679. return 1;
  70680. }
  70681. if(!strcmp(option, "name", true))
  70682. {
  70683. if(isnull(param) || strlen(params) > 32)
  70684. {
  70685. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /settitle [playerid] [name] [text ('none' to reset)]");
  70686. }
  70687. strcpy(PlayerData[targetid][pCustomTitle], param, 64);
  70688. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET customtitle = '%e' WHERE uid = %i", param, PlayerData[targetid][pID]);
  70689. mysql_tquery(connectionID, queryBuffer);
  70690. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the customtitle of %s to '%s'.", GetRPName(playerid), GetRPName(targetid), param);
  70691. }
  70692. else if(!strcmp(option, "color", true))
  70693. {
  70694. new color;
  70695. if(sscanf(param, "h", color))
  70696. {
  70697. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /settitle [playerid] [color] [0xRRGGBBAA]");
  70698. }
  70699. PlayerData[targetid][pCustomTColor] = color & ~0xff;
  70700. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET customcolor = %i WHERE uid = %i", PlayerData[targetid][pCustomTColor], PlayerData[targetid][pID]);
  70701. mysql_tquery(connectionID, queryBuffer);
  70702. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the {%06x}color{FF6347} of %s's title.", GetRPName(playerid), color >>> 8, GetRPName(targetid));
  70703. }
  70704. return 1;
  70705. }
  70706. CMD:removegang(playerid, params[])
  70707. {
  70708. new gangid;
  70709. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pGangMod])
  70710. {
  70711. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  70712. }
  70713. if(sscanf(params, "i", gangid))
  70714. {
  70715. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /removegang [gangid]");
  70716. }
  70717. if(!(0 <= gangid < MAX_GANGS) || !GangInfo[gangid][gSetup])
  70718. {
  70719. return SendClientMessage(playerid, COLOR_GREY, "Invalid gang.");
  70720. }
  70721. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has deleted gang %s.", GetRPName(playerid), GangInfo[gangid][gName]);
  70722. SendClientMessageEx(playerid, COLOR_LIGHTRED, "You have permanently deleted the {F7A763}%s{FF6347} gang slot.", GangInfo[gangid][gName]);
  70723. RemoveGang(gangid);
  70724. Log_Write("log_gang", "%s (uid: %i) has removed gang %s (id: %i).", GetRPName(playerid), PlayerData[playerid][pID], GangInfo[gangid][gName], gangid);
  70725. return 1;
  70726. }
  70727. CMD:adminstrike(playerid, params[])
  70728. {
  70729. new targetid, reason[128];
  70730. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pAdminPersonnel])
  70731. {
  70732. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  70733. }
  70734. if(sscanf(params, "is[128]", targetid, reason))
  70735. {
  70736. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /adminstrike [playerid] [reason]");
  70737. }
  70738. PlayerData[targetid][pAdminStrike]++;
  70739. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET adminstrikes = %i WHERE uid = %i", PlayerData[targetid][pAdminStrike], targetid);
  70740. mysql_tquery(connectionID, queryBuffer);
  70741. Log_Write("log_strike", "%s (uid: %i) has admin striked player %s (id: %i).", GetRPName(playerid), PlayerData[playerid][pID], GetRPName(targetid), targetid);
  70742. switch(PlayerData[targetid][pAdminStrike])
  70743. {
  70744. case 1: SendAdminMessage(COLOR_WHITE, "(( Admin News: %s{FFFFFF} has received their 1st strike, reason: %s ))", GetRPName(targetid), reason);
  70745. case 2: SendAdminMessage(COLOR_WHITE, "(( Admin News: %s{FFFFFF} has received their 2nd strike, reason: %s ))", GetRPName(targetid), reason);
  70746. case 3:
  70747. {
  70748. PlayerData[targetid][pAdmin] -= 1;
  70749. PlayerData[targetid][pAdminStrike] = 0;
  70750. SendClientMessage(targetid, COLOR_GREY, "The admin strike system works perfectly fine");
  70751. GameTextForPlayer(targetid, "~r~DEMOTED", 5000, 1);
  70752. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET adminlevel = %i, adminstrikes = %i WHERE uid = %i", PlayerData[targetid][pAdmin], PlayerData[targetid][pAdminStrike], PlayerData[targetid][pID]);
  70753. mysql_tquery(connectionID, queryBuffer);
  70754. SendAdminMessage(COLOR_WHITE, "(( Admin News: %s{FFFFFF} has received their 3rd strike, reason: %s ))", GetRPName(targetid), reason);
  70755. }
  70756. }
  70757. return 1;
  70758. }
  70759. CMD:gangstrike(playerid, params[])
  70760. {
  70761. new gangid, reason[128], color;
  70762. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pGangMod])
  70763. {
  70764. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  70765. }
  70766. if(sscanf(params, "is[128]", gangid, reason))
  70767. {
  70768. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /gangstrike [gangid] [reason]");
  70769. }
  70770. if(!(0 <= gangid < MAX_GANGS) || !GangInfo[gangid][gSetup])
  70771. {
  70772. return SendClientMessage(playerid, COLOR_GREY, "Invalid gang.");
  70773. }
  70774. if(GangInfo[gangid][gStrikes] >= 3)
  70775. {
  70776. return SendClientMessage(playerid, COLOR_GREY, "This gang already has 3 strikes.");
  70777. }
  70778. GangInfo[gangid][gStrikes]++;
  70779. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET strikes = %i WHERE id = %i", GangInfo[gangid][gStrikes], gangid);
  70780. mysql_tquery(connectionID, queryBuffer);
  70781. Log_Write("log_gang", "%s (uid: %i) has striked gang %s (id: %i).", GetRPName(playerid), PlayerData[playerid][pID], GangInfo[gangid][gName], gangid);
  70782. if(GangInfo[gangid][gColor] == -1 || GangInfo[gangid][gColor] == -256)
  70783. {
  70784. color = 0xC8C8C8FF;
  70785. }
  70786. else
  70787. {
  70788. color = GangInfo[gangid][gColor];
  70789. }
  70790. switch(GangInfo[gangid][gStrikes])
  70791. {
  70792. case 1: SendClientMessageToAllEx(COLOR_WHITE, "(( Gang News: {%06x}%s{FFFFFF} has received their 1st strike, reason: %s ))", color >>> 8, GangInfo[gangid][gName], reason);
  70793. case 2: SendClientMessageToAllEx(COLOR_WHITE, "(( Gang News: {%06x}%s{FFFFFF} has received their 2nd strike, reason: %s ))", color >>> 8, GangInfo[gangid][gName], reason);
  70794. case 3: SendClientMessageToAllEx(COLOR_WHITE, "(( Gang News: {%06x}%s{FFFFFF} has received their 3rd strike, reason: %s ))", color >>> 8, GangInfo[gangid][gName], reason);
  70795. }
  70796. return 1;
  70797. }
  70798. CMD:switchgang(playerid, params[])
  70799. {
  70800. new targetid, gangid, rankid;
  70801. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pGangMod])
  70802. {
  70803. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  70804. }
  70805. if(sscanf(params, "uiI(-1)", targetid, gangid, rankid))
  70806. {
  70807. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /switchgang[playerid] [gangid (-1 = none)] [rank (optional)]");
  70808. }
  70809. if(!IsPlayerConnected(targetid))
  70810. {
  70811. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  70812. }
  70813. if(!PlayerData[targetid][pLogged])
  70814. {
  70815. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet.");
  70816. }
  70817. if(!(-1 <= gangid < MAX_GANGS) || (gangid >= 0 && !GangInfo[gangid][gSetup]))
  70818. {
  70819. return SendClientMessage(playerid, COLOR_GREY, "Invalid gang.");
  70820. }
  70821. if((gangid != -1 && !(-1 <= rankid <= 6)))
  70822. {
  70823. return SendClientMessage(playerid, COLOR_GREY, "Invalid rank.");
  70824. }
  70825. if(gangid == -1)
  70826. {
  70827. PlayerData[targetid][pGang] = -1;
  70828. PlayerData[targetid][pGangRank] = 0;
  70829. PlayerData[targetid][pCrew] = -1;
  70830. SendClientMessageEx(targetid, COLOR_AQUA, "%s has removed you from your gang.", GetRPName(playerid));
  70831. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has removed %s from their gang.", GetRPName(playerid), GetRPName(targetid));
  70832. }
  70833. else
  70834. {
  70835. if(rankid == -1)
  70836. {
  70837. rankid = 6;
  70838. }
  70839. /*if(rankid == 6)
  70840. {
  70841. GetPlayerName(targetid, GangInfo[gangid][gLeader], MAX_PLAYER_NAME);
  70842. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET leader = '%e' WHERE id = %i", GangInfo[gangid][gLeader], gangid);
  70843. mysql_tquery(connectionID, queryBuffer);
  70844. }*/
  70845. PlayerData[targetid][pGang] = gangid;
  70846. PlayerData[targetid][pGangRank] = rankid;
  70847. PlayerData[targetid][pCrew] = -1;
  70848. SendClientMessageEx(targetid, COLOR_AQUA, "%s has made you a {00AA00}%s{33CCFF} in %s.", GetRPName(playerid), GangRanks[gangid][rankid], GangInfo[gangid][gName]);
  70849. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has made %s a %s in %s.", GetRPName(playerid), GetRPName(targetid), GangRanks[gangid][rankid], GangInfo[gangid][gName]);
  70850. }
  70851. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET gang = %i, gangrank = %i, crew = -1 WHERE uid = %i", gangid, rankid, PlayerData[targetid][pID]);
  70852. mysql_tquery(connectionID, queryBuffer);
  70853. return 1;
  70854. }
  70855. CMD:families(playerid, params[])
  70856. {
  70857. return callcmd::gangs(playerid, params);
  70858. }
  70859. CMD:gangs(playerid, params[])
  70860. {
  70861. new gangid;
  70862. if(sscanf(params, "i", gangid))
  70863. {
  70864. SendClientMessage(playerid, COLOR_NAVYBLUE, "___________________ Gangs ___________________");
  70865. for(new i = 0; i < MAX_GANGS; i ++)
  70866. {
  70867. if(GangInfo[i][gSetup])
  70868. {
  70869. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT COUNT(*) FROM "#TABLE_USERS" WHERE gang = %i", i);
  70870. mysql_tquery(connectionID, queryBuffer, "OnPlayerListGangs", "ii", playerid, i);
  70871. }
  70872. }
  70873. return 1;
  70874. }
  70875. if(!(0 <= gangid < MAX_GANGS) || !GangInfo[gangid][gSetup])
  70876. {
  70877. return SendClientMessage(playerid, COLOR_GREY, "Invalid gang.");
  70878. }
  70879. if(GangInfo[gangid][gAlliance] != -1)
  70880. {
  70881. SendClientMessageEx(playerid, COLOR_GREY, "Name: %s - Leader: %s - Strikes: %i/3 - Alliance: %s", GangInfo[gangid][gName], GangInfo[gangid][gLeader], GangInfo[gangid][gStrikes], GangInfo[GangInfo[gangid][gAlliance]][gName]);
  70882. }
  70883. SendClientMessage(playerid, COLOR_NAVYBLUE, "_____ Members Online _____");
  70884. foreach(new i : Player)
  70885. {
  70886. if(PlayerData[i][pLogged] && PlayerData[i][pGang] == gangid)
  70887. {
  70888. SendClientMessageEx(playerid, COLOR_GREY2, "(%i) %s %s", PlayerData[i][pGangRank], GangRanks[gangid][PlayerData[i][pGangRank]], GetRPName(i));
  70889. }
  70890. }
  70891. return 1;
  70892. }
  70893. CMD:points(playerid, params[])
  70894. {
  70895. new name[32], color = -1, pointid;
  70896. if(sscanf(params, "i", pointid))
  70897. {
  70898. SendClientMessage(playerid, COLOR_GREEN, "_______________________________________");
  70899. for(new i = 0; i < MAX_POINTS; i ++)
  70900. {
  70901. if(PointInfo[i][pExists])
  70902. {
  70903. if(PointInfo[i][pCapturedGang] == -1) {
  70904. name = "None";
  70905. } else {
  70906. strcpy(name, GangInfo[PointInfo[i][pCapturedGang]][gName]);
  70907. }
  70908. SendClientMessageEx(playerid, COLOR_GREY2, "ID: %i | Name: %s | Owner: %s | Captured by: %s | Profits: %s | Time: %ih", i, PointInfo[i][pName], name, PointInfo[i][pCapturedBy], FormatNumber(PointInfo[i][pProfits]), PointInfo[i][pTime]);
  70909. }
  70910. }
  70911. SendClientMessage(playerid, COLOR_GREEN, "_______________________________________");
  70912. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /points [pointid]");
  70913. return 1;
  70914. }
  70915. if(!(0 <= pointid < MAX_POINTS) || !PointInfo[pointid][pExists])
  70916. {
  70917. return SendClientMessage(playerid, COLOR_GREY, "Invalid point.");
  70918. }
  70919. if(PointInfo[pointid][pCapturedGang] >= 0)
  70920. {
  70921. strcpy(name, GangInfo[PointInfo[pointid][pCapturedGang]][gName]);
  70922. color = GangInfo[PointInfo[pointid][pCapturedGang]][gColor];
  70923. }
  70924. else
  70925. {
  70926. name = "None";
  70927. }
  70928. SendClientMessageEx(playerid, COLOR_NAVYBLUE, "_____ %s ($%i) _____", PointInfo[pointid][pName], PointInfo[pointid][pProfits]);
  70929. SendClientMessageEx(playerid, COLOR_WHITE, "* This point captured by %s for {%06x}%s{FFFFFF} will be available in %i hours.", PointInfo[pointid][pCapturedBy], color >>> 8, name, PointInfo[pointid][pTime]);
  70930. if(PointInfo[pointid][pCapturer] != INVALID_PLAYER_ID)
  70931. {
  70932. SendClientMessageEx(playerid, COLOR_WHITE, "* This point is being captured by %s and will be theirs in %i minutes.", GetRPName(PointInfo[pointid][pCapturer]), PointInfo[pointid][pCaptureTime]);
  70933. }
  70934. return 1;
  70935. }
  70936. /*CMD:turfs(playerid, params[])
  70937. {
  70938. if(!PlayerData[playerid][pShowTurfs])
  70939. {
  70940. ShowTurfsOnMap(playerid, true);
  70941. SendClientMessage(playerid, COLOR_AQUA, "You will now see turfs on your mini-map.");
  70942. }
  70943. else
  70944. {
  70945. ShowTurfsOnMap(playerid, false);
  70946. SendClientMessage(playerid, COLOR_AQUA, "You will no longer see any turfs on your mini-map.");
  70947. }
  70948. return 1;
  70949. }
  70950. */
  70951. CMD:lands(playerid, params[])
  70952. {
  70953. if(!PlayerData[playerid][pShowLands])
  70954. {
  70955. ShowLandsOnMap(playerid, true);
  70956. SendClientMessage(playerid, COLOR_AQUA, "You will now see lands on your mini-map.");
  70957. }
  70958. else
  70959. {
  70960. ShowLandsOnMap(playerid, false);
  70961. SendClientMessage(playerid, COLOR_AQUA, "You will no longer see any lands on your mini-map.");
  70962. }
  70963. return 1;
  70964. }
  70965. CMD:f(playerid, params[])
  70966. {
  70967. if(isnull(params))
  70968. {
  70969. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /f [gang chat]");
  70970. }
  70971. if(PlayerData[playerid][pGang] == -1)
  70972. {
  70973. return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any gang at the moment.");
  70974. }
  70975. if(PlayerData[playerid][pToggleGang])
  70976. {
  70977. return SendClientMessage(playerid, COLOR_GREY, "You can't speak in the gang chat as you have it toggled.");
  70978. }
  70979. if(PlayerData[playerid][pInjured])
  70980. {
  70981. return SendClientMessage(playerid, COLOR_GREY, "You cannot speak in /r while dead.");
  70982. }
  70983. if(PlayerData[playerid][pCuffed])
  70984. {
  70985. return SendClientMessage(playerid, COLOR_GREY, "You cannot use this command while cuffed.");
  70986. }
  70987. if(PlayerData[playerid][pTied])
  70988. {
  70989. return SendClientMessage(playerid, COLOR_GREY, "You cannot use this command while tied.");
  70990. }
  70991. foreach(new i : Player)
  70992. {
  70993. new crew[32];
  70994. if(PlayerData[playerid][pCrew] >= 0)
  70995. {
  70996. crew = GangCrews[PlayerData[playerid][pGang]][PlayerData[playerid][pCrew]];
  70997. }
  70998. else
  70999. {
  71000. crew = "None";
  71001. }
  71002. if(PlayerData[i][pGang] == PlayerData[playerid][pGang] && !PlayerData[i][pToggleGang])
  71003. {
  71004. if(strlen(params) > MAX_SPLIT_LENGTH)
  71005. {
  71006. SendClientMessageEx(i, COLOR_AQUA, "* [%i] %s (%s) %s: %.*s... *", PlayerData[playerid][pGangRank], GangRanks[PlayerData[playerid][pGang]][PlayerData[playerid][pGangRank]], crew, GetRPName(playerid), MAX_SPLIT_LENGTH, params);
  71007. SendClientMessageEx(i, COLOR_AQUA, "* [%i] %s (%s) %s: ...%s *", PlayerData[playerid][pGangRank], GangRanks[PlayerData[playerid][pGang]][PlayerData[playerid][pGangRank]], crew, GetRPName(playerid), params[MAX_SPLIT_LENGTH]);
  71008. }
  71009. else
  71010. {
  71011. SendClientMessageEx(i, COLOR_AQUA, "* [%i] %s (%s) %s: %s *", PlayerData[playerid][pGangRank], GangRanks[PlayerData[playerid][pGang]][PlayerData[playerid][pGangRank]], crew, GetRPName(playerid), params);
  71012. }
  71013. }
  71014. }
  71015. return 1;
  71016. }
  71017. CMD:ally(playerid, params[])
  71018. {
  71019. new gangid = PlayerData[playerid][pGang];
  71020. if(isnull(params))
  71021. {
  71022. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /ally [Alliance chat]");
  71023. }
  71024. if(PlayerData[playerid][pGang] == -1)
  71025. {
  71026. return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any gang at the moment.");
  71027. }
  71028. if(GangInfo[gangid][gAlliance] == -1)
  71029. {
  71030. return SendClientMessage(playerid, COLOR_GREY, "Your gang isn't a part of an alliance.");
  71031. }
  71032. if(PlayerData[playerid][pToggleGang])
  71033. {
  71034. return SendClientMessage(playerid, COLOR_GREY, "You can't speak in the alliance chat as you have gang chat toggled.");
  71035. }
  71036. if(PlayerData[playerid][pInjured])
  71037. {
  71038. return SendClientMessage(playerid, COLOR_GREY, "You cannot speak in /ally while dead.");
  71039. }
  71040. if(PlayerData[playerid][pCuffed])
  71041. {
  71042. return SendClientMessage(playerid, COLOR_GREY, "You cannot use this command while cuffed.");
  71043. }
  71044. if(PlayerData[playerid][pTied])
  71045. {
  71046. return SendClientMessage(playerid, COLOR_GREY, "You cannot use this command while tied.");
  71047. }
  71048. foreach(new i : Player)
  71049. {
  71050. if((PlayerData[i][pGang] == PlayerData[playerid][pGang] || PlayerData[i][pGang] == GangInfo[gangid][gAlliance]) && !PlayerData[i][pToggleGang])
  71051. {
  71052. if(strlen(params) > MAX_SPLIT_LENGTH)
  71053. {
  71054. SendClientMessageEx(i, COLOR_GREEN, "* [Alliance] %s %s: %.*s... *", GangRanks[PlayerData[playerid][pGang]][PlayerData[playerid][pGangRank]], GetRPName(playerid), MAX_SPLIT_LENGTH, params);
  71055. SendClientMessageEx(i, COLOR_GREEN, "* [Alliance] %s %s: ...%s *", GangRanks[PlayerData[playerid][pGang]][PlayerData[playerid][pGangRank]], GetRPName(playerid), params[MAX_SPLIT_LENGTH]);
  71056. }
  71057. else
  71058. {
  71059. SendClientMessageEx(i, COLOR_GREEN, "* [Alliance] %s %s: %s *", GangRanks[PlayerData[playerid][pGang]][PlayerData[playerid][pGangRank]], GetRPName(playerid), params);
  71060. }
  71061. }
  71062. }
  71063. return 1;
  71064. }
  71065. /*
  71066. CMD:gmembers(playerid, params[])
  71067. {
  71068. if(PlayerData[playerid][pGang] == -1)
  71069. {
  71070. return SendClientMessage(playerid, COLOR_GREY, "You are not apart of a gang at the moment.");
  71071. }
  71072. SendClientMessage(playerid, COLOR_NAVYBLUE, "_____ Members Online _____");
  71073. foreach(new i : Player)
  71074. {
  71075. if(PlayerData[i][pGang] == PlayerData[playerid][pGang])
  71076. {
  71077. SendClientMessageEx(playerid, COLOR_GREY2, "(%i) %s %s", PlayerData[i][pGangRank], GangRanks[PlayerData[i][pGang]][PlayerData[i][pGangRank]], GetRPName(i));
  71078. }
  71079. }
  71080. return 1;
  71081. }*/
  71082. stock nComma(numbers) //by Gamer931215 http://forum.sa-mp.com/showthread.php?t=259208
  71083. {
  71084. new temp[24],counter = -1;
  71085. valstr(temp,numbers);
  71086. for(new i = strlen(temp);i > 0; i--)
  71087. {
  71088. counter++;
  71089. if(counter == 3)
  71090. {
  71091. strins(temp,",",i);
  71092. counter = 0;
  71093. }
  71094. }
  71095. return temp;
  71096. }
  71097. CMD:ganglocker(playerid, params[])
  71098. {
  71099. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  71100. {
  71101. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  71102. }
  71103. new gangid, option[32];
  71104. if(sscanf(params, "us[32]", gangid, option)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /ganglocker [gangid] [remove/place]");
  71105. if(!strcmp(option, "place", true))
  71106. {
  71107. GetPlayerPos(playerid, GangInfo[gangid][gStashX], GangInfo[gangid][gStashY], GangInfo[gangid][gStashZ]);
  71108. GangInfo[gangid][gStashInterior] = GetPlayerInterior(playerid);
  71109. GangInfo[gangid][gStashWorld] = GetPlayerVirtualWorld(playerid);
  71110. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET stash_x = '%f', stash_y = '%f', stash_z = '%f', stashinterior = %i, stashworld = %i WHERE id = %i", GangInfo[gangid][gStashX], GangInfo[gangid][gStashY], GangInfo[gangid][gStashZ], GangInfo[gangid][gStashInterior], GangInfo[gangid][gStashWorld], gangid);
  71111. mysql_tquery(connectionID, queryBuffer);
  71112. ReloadGang(gangid);
  71113. SendClientMessageEx(playerid, COLOR_AQUA, "You have moved %s's locker to your currently position.", GangInfo[gangid][gName]);
  71114. }
  71115. else if(!strcmp(option, "remove", true))
  71116. {
  71117. DestroyDynamic3DTextLabel(GangInfo[gangid][gText][0]);
  71118. DestroyDynamicPickup(GangInfo[gangid][gPickup]);
  71119. GangInfo[gangid][gText][0] = Text3D:INVALID_3DTEXT_ID;
  71120. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET stash_x = 0, stash_y = 0, stash_z = 0, stashinterior = 1, stashworld = 1 WHERE id = %i", gangid);
  71121. mysql_tquery(connectionID, queryBuffer);
  71122. ReloadGang(gangid);
  71123. SendClientMessageEx(playerid, COLOR_AQUA, "You have removed %s's locker.", GangInfo[gangid][gName]);
  71124. }
  71125. return 1;
  71126. }
  71127. CMD:gang(playerid, params[])
  71128. {
  71129. new targetid, option[16], param[128];
  71130. if(PlayerData[playerid][pGang] == -1)
  71131. {
  71132. return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any gang at the moment.");
  71133. }
  71134. if(sscanf(params, "s[16]S()[128]", option, param))
  71135. {
  71136. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /gang [option]");
  71137. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Invite, Kick, Rank, Roster, Online, Quit, Offlinekick");
  71138. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: MOTD, Stash, Stats, Turfs, Rankname, Upgrade, War, Alliance");
  71139. return 1;
  71140. }
  71141. if(!strcmp(option, "invite", true))
  71142. {
  71143. if(PlayerData[playerid][pGangRank] < 5)
  71144. {
  71145. return SendClientMessage(playerid, COLOR_GREY, "You need to be at least rank 5+ to use this command.");
  71146. }
  71147. if(sscanf(param, "u", targetid))
  71148. {
  71149. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /gang [invite] [playerid]");
  71150. }
  71151. if(GangInfo[PlayerData[playerid][pGang]][gInvCooldown] > 0 && gacooldown)
  71152. {
  71153. return SendClientMessageEx(playerid, COLOR_GREY, "You're gang is currently on a invite cooldown. Please wait %i minutes before the next invite.", GangInfo[PlayerData[playerid][pGang]][gInvCooldown]);
  71154. }
  71155. if(GangClaimingTurfs(PlayerData[playerid][pGang]) || GangCapturingPoints(PlayerData[playerid][pGang]))
  71156. {
  71157. return SendClientMessage(playerid, COLOR_GREY, "You can not use invite if your gang is attending a turf or point.");
  71158. }
  71159. if(!IsPlayerConnected(targetid))
  71160. {
  71161. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  71162. }
  71163. if(PlayerData[targetid][pGang] != -1)
  71164. {
  71165. return SendClientMessage(playerid, COLOR_GREY, "That player is already apart of a gang.");
  71166. }
  71167. if(GetFactionType(targetid) == FACTION_POLICE || GetFactionType(targetid) == FACTION_MEDIC || GetFactionType(targetid) == FACTION_GOVERNMENT || GetFactionType(targetid) == FACTION_ARMY)
  71168. {
  71169. return SendClientMessage(playerid, COLOR_GREY, "You cannot invite members that are in LSFMD, GOV, ARMY, or LSPD.");
  71170. }
  71171. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT COUNT(*) FROM "#TABLE_USERS" WHERE gang = %i", PlayerData[playerid][pGang]);
  71172. mysql_tquery(connectionID, queryBuffer, "OnPlayerAttemptInviteGang", "ii", playerid, targetid);
  71173. }
  71174. else if(!strcmp(option, "skin", true))
  71175. {
  71176. new slot, skinid, gangid = PlayerData[playerid][pGang];
  71177. if(PlayerData[playerid][pGangRank] < 6)
  71178. {
  71179. return SendClientMessage(playerid, COLOR_GREY, "You need to be at least rank 6 to use this command.");
  71180. }
  71181. if(sscanf(param, "ii", slot, skinid))
  71182. {
  71183. SendClientMessage(playerid, COLOR_NAVYBLUE, "______ Gang Skins ______");
  71184. for(new i = 0; i < MAX_GANG_SKINS; i ++)
  71185. {
  71186. if(GangInfo[gangid][gSkins][i] == 0)
  71187. SendClientMessageEx(playerid, COLOR_GREY2, "Skin %i: (none)", i + 1);
  71188. else
  71189. SendClientMessageEx(playerid, COLOR_GREY2, "Skin %i: %i", i + 1, GangInfo[gangid][gSkins][i]);
  71190. }
  71191. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /gang [skin] [slot (1-%i)] [skinid]", MAX_GANG_SKINS);
  71192. }
  71193. new forbidSkin[35] =
  71194. {
  71195. 0, 71, 74, 264, 265, 266, 267, 274, 275, 276,
  71196. 277, 278, 279, 280, 281, 282, 283, 284, 285,
  71197. 286, 287, 288, 300, 301, 302, 306, 307, 308,
  71198. 309, 310, 311
  71199. };
  71200. if(!(1 <= slot <= MAX_GANG_SKINS))
  71201. {
  71202. return SendClientMessage(playerid, COLOR_GREY, "Invalid slot.");
  71203. }
  71204. if(!(1 <= skinid <= 311))
  71205. {
  71206. return SendClientMessage(playerid, COLOR_GREY, "Invalid skin.");
  71207. }
  71208. for(new i = 0; i < sizeof forbidSkin; i++)
  71209. {
  71210. if(skinid == forbidSkin[i])
  71211. {
  71212. return SendClientMessage(playerid, COLOR_GREY, "You can't select this skin.");
  71213. }
  71214. }
  71215. slot--;
  71216. GangInfo[gangid][gSkins][slot] = skinid;
  71217. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO gangskins VALUES(%i, %i, %i) ON DUPLICATE KEY UPDATE skinid = %i", gangid, slot, skinid, skinid);
  71218. mysql_tquery(connectionID, queryBuffer);
  71219. SendClientMessageEx(playerid, COLOR_WHITE, "* You have set the skin in slot %i to ID %i.", slot + 1, skinid);
  71220. }
  71221. else if(!strcmp(option, "kick", true))
  71222. {
  71223. if(PlayerData[playerid][pGangRank] < 5)
  71224. {
  71225. return SendClientMessage(playerid, COLOR_GREY, "You need to be at least rank 5+ to use this command.");
  71226. }
  71227. if(sscanf(param, "u", targetid))
  71228. {
  71229. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /gang [kick] [playerid]");
  71230. }
  71231. if(!IsPlayerConnected(targetid))
  71232. {
  71233. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  71234. }
  71235. if(PlayerData[targetid][pGang] != PlayerData[playerid][pGang])
  71236. {
  71237. return SendClientMessage(playerid, COLOR_GREY, "That player is not apart of your gang.");
  71238. }
  71239. if(PlayerData[targetid][pGangRank] > PlayerData[playerid][pGangRank])
  71240. {
  71241. return SendClientMessage(playerid, COLOR_GREY, "That player has a higher rank than you.");
  71242. }
  71243. Log_Write("log_gang", "%s (uid: %i) kicked %s (uid: %i) from %s (id: %i) as rank %s (%i).", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], GangInfo[PlayerData[playerid][pGang]][gName], PlayerData[playerid][pGang], GangRanks[PlayerData[targetid][pGang]][PlayerData[targetid][pGangRank]], PlayerData[targetid][pGangRank]);
  71244. PlayerData[targetid][pGang] = -1;
  71245. PlayerData[targetid][pGangRank] = 0;
  71246. DestroyDynamic3DTextLabel(fRepfamtext[targetid]);
  71247. fRepfamtext[targetid] = Text3D:INVALID_3DTEXT_ID;
  71248. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET gang = -1, gangrank = 0 WHERE uid = %i", PlayerData[targetid][pID]);
  71249. mysql_tquery(connectionID, queryBuffer);
  71250. SendClientMessageEx(targetid, COLOR_AQUA, "%s has kicked you from the gang.", GetRPName(playerid));
  71251. SendClientMessageEx(playerid, COLOR_AQUA, "You have kicked %s from your gang.", GetRPName(targetid));
  71252. }
  71253. else if(!strcmp(option, "rank", true))
  71254. {
  71255. new rankid;
  71256. if(PlayerData[playerid][pGangRank] < 5)
  71257. {
  71258. return SendClientMessage(playerid, COLOR_GREY, "You need to be at least rank 5+ to use this command.");
  71259. }
  71260. if(sscanf(param, "ui", targetid, rankid))
  71261. {
  71262. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /gang [rank] [playerid] [rankid (0-6)]");
  71263. }
  71264. if(!IsPlayerConnected(targetid))
  71265. {
  71266. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  71267. }
  71268. if(rankid < 0 || rankid > PlayerData[playerid][pGangRank])
  71269. {
  71270. return SendClientMessage(playerid, COLOR_GREY, "The rank specified is either invalid or higher than your rank.");
  71271. }
  71272. if(PlayerData[targetid][pGang] != PlayerData[playerid][pGang])
  71273. {
  71274. return SendClientMessage(playerid, COLOR_GREY, "That player is not apart of your gang.");
  71275. }
  71276. if(PlayerData[targetid][pGangRank] > PlayerData[playerid][pGangRank])
  71277. {
  71278. return SendClientMessage(playerid, COLOR_GREY, "That player has a higher rank than you.");
  71279. }
  71280. PlayerData[targetid][pGangRank] = rankid;
  71281. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET gangrank = %i WHERE uid = %i", rankid, PlayerData[targetid][pID]);
  71282. mysql_tquery(connectionID, queryBuffer);
  71283. SendClientMessageEx(targetid, COLOR_AQUA, "%s has set your rank to {00AA00}%s{33CCFF} (%i).", GetRPName(playerid), GangRanks[PlayerData[playerid][pGang]][rankid], rankid);
  71284. SendClientMessageEx(playerid, COLOR_AQUA, "You have set %s's rank to {00AA00}%s{33CCFF} (%i).", GetRPName(targetid), GangRanks[PlayerData[playerid][pGang]][rankid], rankid);
  71285. Log_Write("log_gang", "%s (uid: %i) has set %s's (uid: %i) rank in %s (id: %i) to %s (%i).", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetPlayerNameEx(targetid), PlayerData[targetid][pID], GangInfo[PlayerData[playerid][pGang]][gName], PlayerData[playerid][pGang], GangRanks[PlayerData[playerid][pGang]][rankid], rankid);
  71286. }
  71287. else if(!strcmp(option, "stash", true))
  71288. {
  71289. SendClientMessage(playerid, COLOR_GREY, "This command was removed, Contact an admin to place your locker.");
  71290. }
  71291. else if(!strcmp(option, "turfs", true))
  71292. {
  71293. new perk[32];
  71294. SendClientMessage(playerid, COLOR_GREEN, "_______________________________________");
  71295. foreach(new i : Turf)
  71296. {
  71297. if(TurfInfo[i][tExists] && TurfInfo[i][tCapturedGang] == PlayerData[playerid][pGang])
  71298. {
  71299. switch(TurfInfo[i][tType])
  71300. {
  71301. case 0: perk = "Normal";
  71302. case 1: perk = "Materials";
  71303. case 2: perk = "Low class weapons";
  71304. case 3: perk = "Medium class weapons";
  71305. case 4: perk = "High class weapons";
  71306. case 5: perk = "Traphouse";
  71307. case 6: perk = "Crackhouse";
  71308. case 7: perk = "Sales tax";
  71309. case 8: perk = "Locked turf";
  71310. }
  71311. SendClientMessageEx(playerid, COLOR_GREY2, "ID: %i | Name: %s | Captured by: %s | Perk: %s | Time left: %ih", i, TurfInfo[i][tName], TurfInfo[i][tCapturedBy], perk, TurfInfo[i][tTime]);
  71312. }
  71313. }
  71314. }
  71315. else if(!strcmp(option, "stats", true))
  71316. {
  71317. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT COUNT(*) FROM "#TABLE_USERS" WHERE gang = %i", PlayerData[playerid][pGang]);
  71318. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_GANG_INFORMATION, playerid);
  71319. }
  71320. else if(!strcmp(option, "roster", true))
  71321. {
  71322. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT username, lastlogin, gangrank FROM "#TABLE_USERS" WHERE gang = %i ORDER BY gangrank DESC", PlayerData[playerid][pGang]);
  71323. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_GANG_ROSTER, playerid);
  71324. }
  71325. else if(!strcmp(option, "online", true))
  71326. {
  71327. callcmd::gmembers(playerid, "\1");
  71328. }
  71329. else if(!strcmp(option, "quit", true))
  71330. {
  71331. if(isnull(param) || strcmp(param, "confirm", true) != 0)
  71332. {
  71333. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /gang [quit] [confirm]");
  71334. }
  71335. SendClientMessageEx(playerid, COLOR_AQUA, "You have quit %s as a {00AA00}%s{33CCFF} (%i).", GangInfo[PlayerData[playerid][pGang]][gName], GangRanks[PlayerData[playerid][pGang]][PlayerData[playerid][pGangRank]], PlayerData[playerid][pGangRank]);
  71336. Log_Write("log_gang", "%s (uid: %i) has quit %s (id: %i) has rank %s (%i).", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GangInfo[PlayerData[playerid][pGang]][gName], PlayerData[playerid][pGang], GangRanks[PlayerData[playerid][pGang]][PlayerData[playerid][pGangRank]], PlayerData[playerid][pGangRank]);
  71337. PlayerData[playerid][pGang] = -1;
  71338. PlayerData[playerid][pGangRank] = 0;
  71339. DestroyDynamic3DTextLabel(fRepfamtext[playerid]);
  71340. fRepfamtext[playerid] = Text3D:INVALID_3DTEXT_ID;
  71341. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET gang = -1, gangrank = 0 WHERE uid = %i", PlayerData[playerid][pID]);
  71342. mysql_tquery(connectionID, queryBuffer);
  71343. }
  71344. else if(!strcmp(option, "offlinekick", true))
  71345. {
  71346. new username[MAX_PLAYER_NAME];
  71347. if(PlayerData[playerid][pGangRank] < 5)
  71348. {
  71349. return SendClientMessage(playerid, COLOR_GREY, "You need to be at least rank 5+ to use this command.");
  71350. }
  71351. if(sscanf(param, "s[24]", username))
  71352. {
  71353. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /gang [offlinekick] [username]");
  71354. }
  71355. if(IsPlayerOnline(username))
  71356. {
  71357. return SendClientMessage(playerid, COLOR_GREY, "That player is already online and logged in. Use '/gang kick' instead.");
  71358. }
  71359. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid, gang, gangrank FROM "#TABLE_USERS" WHERE username = '%e'", username);
  71360. mysql_tquery(connectionID, queryBuffer, "OnPlayerOfflineKickGang", "is", playerid, username);
  71361. }
  71362. else if(!strcmp(option, "motd", true))
  71363. {
  71364. if(PlayerData[playerid][pGangRank] < 6)
  71365. {
  71366. return SendClientMessage(playerid, COLOR_GREY, "You need to be at least rank 6+ to use this command.");
  71367. }
  71368. if(isnull(param))
  71369. {
  71370. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /gang [motd] [text]");
  71371. SendClientMessageEx(playerid, COLOR_SYNTAX, "Current MOTD: %s", GangInfo[PlayerData[playerid][pGang]][gMOTD]);
  71372. return 1;
  71373. }
  71374. strcpy(GangInfo[PlayerData[playerid][pGang]][gMOTD], param, 128);
  71375. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET motd = '%e' WHERE id = %i", param, PlayerData[playerid][pGang]);
  71376. mysql_tquery(connectionID, queryBuffer);
  71377. ReloadGang(PlayerData[playerid][pGang]);
  71378. SendClientMessage(playerid, COLOR_AQUA, "You have changed the MOTD for your gang.");
  71379. }
  71380. else if(!strcmp(option, "rankname", true))
  71381. {
  71382. new rankid, rank[32];
  71383. if(PlayerData[playerid][pGangRank] < 6)
  71384. {
  71385. return SendClientMessage(playerid, COLOR_GREY, "You need to be at least rank 6+ to use this command.");
  71386. }
  71387. if(sscanf(param, "is[32]", rankid, rank))
  71388. {
  71389. SendClientMessage(playerid, COLOR_NAVYBLUE, "______ Rank Names ______");
  71390. for(new i = 0; i < 7; i ++)
  71391. {
  71392. if(isnull(GangRanks[PlayerData[playerid][pGang]][i]))
  71393. SendClientMessageEx(playerid, COLOR_GREY2, "Rank %i: (empty)", i);
  71394. else
  71395. SendClientMessageEx(playerid, COLOR_GREY2, "Rank %i: %s", i, GangRanks[PlayerData[playerid][pGang]][i]);
  71396. }
  71397. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /gang [rankname] [slot (0-6)] [name]");
  71398. }
  71399. if(!(0 <= rankid <= 6))
  71400. {
  71401. return SendClientMessage(playerid, COLOR_GREY, "Invalid rank.");
  71402. }
  71403. strcpy(GangRanks[PlayerData[playerid][pGang]][rankid], rank, 32);
  71404. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO gangranks VALUES(%i, %i, '%e') ON DUPLICATE KEY UPDATE name = '%e'", PlayerData[playerid][pGang], rankid, rank, rank);
  71405. mysql_tquery(connectionID, queryBuffer);
  71406. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the name of rank %i to {00AA00}%s{33CCFF}.", rankid, rank);
  71407. }
  71408. else if(!strcmp(option, "upgrade", true))
  71409. {
  71410. if(PlayerData[playerid][pGangRank] < 6)
  71411. {
  71412. return SendClientMessage(playerid, COLOR_GREY, "You need to be at least rank 6+ to use this command.");
  71413. }
  71414. new
  71415. title[48],
  71416. string[1024] = "Perk\tDescription\tCost";
  71417. strcat(string, "\nDrug dealer\tAn NPC which sells individually stocked drugs\t{F7A763}500 GP {FFFFFF}+{00AA00} $50,000");
  71418. strcat(string, "\nArms dealer\tAn NPC which sells individually stocked weapons\t{F7A763}500 GP {FFFFFF}+{00AA00} $50,000");
  71419. strcat(string, "\nDuel arena\tAn OOC 1v1 duel arena for your gang.\t{F7A763}400 GP {FFFFFF}+{00AA00} $75,000");
  71420. strcat(string, "\nMapping\tUp to 50 mapped objects for your gang.\t{F7A763}4500 GP {FFFFFF}+{00AA00} $100,000");
  71421. strcat(string, "\nInterior\tCustom interior exclusively for your gang.\t{F7A763}5000 GP {FFFFFF}+{00AA00} $100,000");
  71422. // gang and mat s0ns
  71423. format(string, sizeof string, "%s\nMaterials level up\tReceive more materials from successfully captured turfs.\t{F7A763}%s GP {FFFFFF}+{00AA00} $%s", string, nComma(1500 + (500*GangInfo[PlayerData[playerid][pGang]][gMatLevel])), nComma(100000 + (50000*GangInfo[PlayerData[playerid][pGang]][gMatLevel])));
  71424. format(string, sizeof string, "%s\nGun level up\tReceive more guns from successfully captured turfs.\t{F7A763} %s GP {FFFFFF}+{00AA00} $%s", string, nComma(1500 + (250*GangInfo[PlayerData[playerid][pGang]][gGunLevel])), nComma(40000 + (20000 * GangInfo[PlayerData[playerid][pGang]][gGunLevel])));
  71425. if(GangInfo[PlayerData[playerid][pGang]][gLevel] == 1)
  71426. {
  71427. strcat(string, "\nLevel Up\tAdvance your gang's level to 2/3.\t{F7A763}6000 GP {FFFFFF}+{00AA00} $75,000");
  71428. }
  71429. else if(GangInfo[PlayerData[playerid][pGang]][gLevel] == 2)
  71430. {
  71431. strcat(string, "\nLevel Up\tAdvance your gang's level to 3/3.\t{F7A763}12000 GP {FFFFFF}+{00AA00} $100,000");
  71432. }
  71433. format(title, sizeof(title), "Gang upgrades (Your gang has %i GP.)", GangInfo[PlayerData[playerid][pGang]][gPoints]);
  71434. Dialog_Show(playerid, DIALOG_GANGPOINTSHOP, DIALOG_STYLE_TABLIST_HEADERS, title, string, "Select", "Cancel");
  71435. }
  71436. else if(!strcmp(option, "alliance", true))
  71437. {
  71438. new gangid = PlayerData[playerid][pGang];
  71439. if(PlayerData[playerid][pGangRank] < 6)
  71440. {
  71441. return SendClientMessage(playerid, COLOR_GREY, "You need to be at least rank 6+ to use this command.");
  71442. }
  71443. if(sscanf(param, "u", targetid))
  71444. {
  71445. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /gang [alliance] [playerid]");
  71446. }
  71447. if(GangInfo[gangid][gAlliance] >= 0)
  71448. {
  71449. return SendClientMessage(playerid, COLOR_GREY, "You're already in an alliance, end it first! (/endalliance)");
  71450. }
  71451. if(PlayerData[targetid][pGangRank] < 6)
  71452. {
  71453. return SendClientMessage(playerid, COLOR_GREY, "The player you're offering to ally with must be R6 in their gang!");
  71454. }
  71455. if(PlayerData[targetid][pGang] == gangid)
  71456. {
  71457. return SendClientMessage(playerid, COLOR_GREY, "You cannot form an alliance with your own gang!");
  71458. }
  71459. if(GangInfo[gangid][gAlliance] == -1)
  71460. {
  71461. SendClientMessageEx(playerid, COLOR_AQUA, "You've offered to form a gang alliance with %s.", GetRPName(targetid));
  71462. SendClientMessageEx(targetid, COLOR_AQUA, "%s has offered to form an alliance with your gang. (/accept alliance)", GetRPName(playerid));
  71463. PlayerData[targetid][pAllianceOffer] = playerid;
  71464. }
  71465. }
  71466. return 1;
  71467. }
  71468. CMD:gstash(playerid, params[])
  71469. {
  71470. if(PlayerData[playerid][pGang] == -1)
  71471. {
  71472. return SendClientMessage(playerid, COLOR_GREY, "You are not apart of a gang at the moment.");
  71473. }
  71474. if(PlayerData[playerid][pFaction] >= 0)
  71475. {
  71476. return SendClientMessage(playerid, COLOR_GREY, "You cannot use this command while in a faction.");
  71477. }
  71478. if(!(IsPlayerInRangeOfPoint(playerid, 5.0, GangInfo[PlayerData[playerid][pGang]][gStashX], GangInfo[PlayerData[playerid][pGang]][gStashY], GangInfo[PlayerData[playerid][pGang]][gStashZ]) && GetPlayerVirtualWorld(playerid) == GangInfo[PlayerData[playerid][pGang]][gStashWorld]))
  71479. {
  71480. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of your gang stash.");
  71481. }
  71482. if(PlayerData[playerid][pHurt])
  71483. {
  71484. return SendClientMessageEx(playerid, COLOR_GREY, "You're too hurt to open the stash. Please wait %i seconds before trying again.", PlayerData[playerid][pHurt]);
  71485. }
  71486. ShowDialogToPlayer(playerid, DIALOG_GANGSTASH);
  71487. return 1;
  71488. }
  71489. CMD:repfam(playerid, params[])
  71490. {
  71491. callcmd::bandana(playerid, params);
  71492. }
  71493. CMD:bandana(playerid, params[])
  71494. {
  71495. if(PlayerData[playerid][pGang] == -1)
  71496. {
  71497. return SendClientMessage(playerid, COLOR_GREY, "You are not apart of a gang at the moment.");
  71498. }
  71499. if(PlayerData[playerid][pHurt])
  71500. {
  71501. return SendClientMessageEx(playerid, COLOR_GREY, "You're too hurt to takeoff your bandana. Please wait %i seconds before trying again.", PlayerData[playerid][pHurt]);
  71502. }
  71503. if(!PlayerData[playerid][pBandana])
  71504. {
  71505. new color;
  71506. if(GangInfo[PlayerData[playerid][pGang]][gColor] == -1 || GangInfo[PlayerData[playerid][pGang]][gColor] == -256)
  71507. {
  71508. color = 0xC8C8C8FF;
  71509. }
  71510. else
  71511. {
  71512. color = GangInfo[PlayerData[playerid][pGang]][gColor];
  71513. }
  71514. if(PlayerData[playerid][pJoinedEvent] || PlayerData[playerid][pPaintballTeam] >= 0)
  71515. {
  71516. return SendClientMessage(playerid, COLOR_GREY, "You can not put on your bandana on while in a event or paintball match.");
  71517. }
  71518. PlayerData[playerid][pBandana] = 1;
  71519. SendClientMessage(playerid, COLOR_AQUA, "You have enabled your bandana. Your nametag color has been set to your gang color.");
  71520. ShowActionBubble(playerid, "* %s takes out a bandana and wraps it around their head.", GetRPName(playerid));
  71521. //SetPlayerColor(playerid, GangInfo[PlayerData[playerid][pGang]][gColor] & ~0xff);
  71522. new string[120];
  71523. format(string, sizeof(string), "{%06x}%s", color >>> 8, GangInfo[PlayerData[playerid][pGang]][gName]);
  71524. fRepfamtext[playerid] = CreateDynamic3DTextLabel(string, COLOR_WHITE, 0.0, 0.0, -0.3, 20.0, .attachedplayer = playerid, .testlos = 1);
  71525. }
  71526. else
  71527. {
  71528. PlayerData[playerid][pBandana] = 0;
  71529. SendClientMessage(playerid, COLOR_AQUA, "You have disabled your bandana. Your nametag color was reset back to normal.");
  71530. ShowActionBubble(playerid, "* %s takes off their bandana from around their head.", GetRPName(playerid));
  71531. DestroyDynamic3DTextLabel(fRepfamtext[playerid]);
  71532. fRepfamtext[playerid] = Text3D:INVALID_3DTEXT_ID;
  71533. }
  71534. return 1;
  71535. }
  71536. CMD:factionpark(playerid, params[])
  71537. {
  71538. return callcmd::fpark(playerid, params);
  71539. }
  71540. CMD:fpark(playerid, params[])
  71541. {
  71542. new vehicleid = GetPlayerVehicleID(playerid), id = VehicleInfo[vehicleid][vID];
  71543. if(PlayerData[playerid][pFaction] == -1 || PlayerData[playerid][pFactionLeader] == -1)
  71544. {
  71545. return SendClientMessage(playerid, COLOR_GREY, "You are not leader of any faction.");
  71546. }
  71547. if(!vehicleid || GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
  71548. {
  71549. return SendClientMessage(playerid, COLOR_GREY, "You are not driving any of your faction vehicles.");
  71550. }
  71551. if(VehicleInfo[vehicleid][vFactionType] != GetFactionType(playerid))
  71552. {
  71553. return SendClientMessage(playerid, COLOR_GREY, "You can't park this vehicle as it doesn't belong to your faction.");
  71554. }
  71555. // Save the vehicle's information.
  71556. GetVehiclePos(vehicleid, VehicleInfo[vehicleid][vPosX], VehicleInfo[vehicleid][vPosY], VehicleInfo[vehicleid][vPosZ]);
  71557. GetVehicleZAngle(vehicleid, VehicleInfo[vehicleid][vPosA]);
  71558. VehicleInfo[vehicleid][vInterior] = GetPlayerInterior(playerid);
  71559. VehicleInfo[vehicleid][vWorld] = GetPlayerVirtualWorld(playerid);
  71560. SendClientMessage(playerid, COLOR_GREEN, "* Faction vehicle parked. It will now spawn here.");
  71561. // Update the database record with the new information, then despawn the vehicle.
  71562. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET pos_x = '%f', pos_y = '%f', pos_z = '%f', pos_a = '%f', interior = %i, world = %i WHERE id = %i", VehicleInfo[vehicleid][vPosX], VehicleInfo[vehicleid][vPosY], VehicleInfo[vehicleid][vPosZ], VehicleInfo[vehicleid][vPosA], VehicleInfo[vehicleid][vInterior], VehicleInfo[vehicleid][vWorld], VehicleInfo[vehicleid][vID]);
  71563. mysql_tquery(connectionID, queryBuffer);
  71564. SaveVehicleModifications(vehicleid);
  71565. DespawnVehicle(vehicleid, false);
  71566. // Finally, we reload the vehicle from the database.
  71567. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM vehicles WHERE id = %i", id);
  71568. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LOAD_VEHICLES, -1);
  71569. return 1;
  71570. }
  71571. CMD:gpark(playerid, params[])
  71572. {
  71573. new vehicleid = GetPlayerVehicleID(playerid), id = VehicleInfo[vehicleid][vID];
  71574. if(PlayerData[playerid][pGang] == -1 || PlayerData[playerid][pGangRank] < 5)
  71575. {
  71576. return SendClientMessage(playerid, COLOR_GREY, "You are not rank 5+ in any gang at the moment.");
  71577. }
  71578. if(!vehicleid || GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
  71579. {
  71580. return SendClientMessage(playerid, COLOR_GREY, "You are not driving any of your gang vehicles.");
  71581. }
  71582. if(VehicleInfo[vehicleid][vGang] != PlayerData[playerid][pGang])
  71583. {
  71584. return SendClientMessage(playerid, COLOR_GREY, "You can't park this vehicle as it doesn't belong to your gang.");
  71585. }
  71586. // Save the vehicle's information.
  71587. GetVehiclePos(vehicleid, VehicleInfo[vehicleid][vPosX], VehicleInfo[vehicleid][vPosY], VehicleInfo[vehicleid][vPosZ]);
  71588. GetVehicleZAngle(vehicleid, VehicleInfo[vehicleid][vPosA]);
  71589. VehicleInfo[vehicleid][vInterior] = GetPlayerInterior(playerid);
  71590. VehicleInfo[vehicleid][vWorld] = GetPlayerVirtualWorld(playerid);
  71591. SendClientMessage(playerid, COLOR_AQUA, "* Gang vehicle parked. It will now spawn here.");
  71592. // Update the database record with the new information, then despawn the vehicle.
  71593. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET pos_x = '%f', pos_y = '%f', pos_z = '%f', pos_a = '%f', interior = %i, world = %i WHERE id = %i", VehicleInfo[vehicleid][vPosX], VehicleInfo[vehicleid][vPosY], VehicleInfo[vehicleid][vPosZ], VehicleInfo[vehicleid][vPosA], VehicleInfo[vehicleid][vInterior], VehicleInfo[vehicleid][vWorld], VehicleInfo[vehicleid][vID]);
  71594. mysql_tquery(connectionID, queryBuffer);
  71595. SaveVehicleModifications(vehicleid);
  71596. DespawnVehicle(vehicleid, false);
  71597. // Finally, we reload the vehicle from the database.
  71598. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM vehicles WHERE id = %i", id);
  71599. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LOAD_VEHICLES, -1);
  71600. return 1;
  71601. }
  71602. CMD:gfindcar(playerid, params[])
  71603. {
  71604. new string[512], count;
  71605. if(PlayerData[playerid][pGang] == -1)
  71606. {
  71607. return SendClientMessage(playerid, COLOR_GREY, "You are not apart of a gang at the moment.");
  71608. }
  71609. string = "#\tModel\tLocation";
  71610. foreach(new i: Vehicle)
  71611. {
  71612. if(VehicleInfo[i][vID] > 0 && VehicleInfo[i][vGang] == PlayerData[playerid][pGang])
  71613. {
  71614. format(string, sizeof(string), "%s\n%i\t%s\t%s", string, count + 1, GetVehicleName(i), GetVehicleZoneName(i));
  71615. count++;
  71616. }
  71617. }
  71618. if(!count)
  71619. {
  71620. return SendClientMessage(playerid, COLOR_GREY, "Your gang has no vehicles which you can track.");
  71621. }
  71622. Dialog_Show(playerid, DIALOG_GANGFINDCAR, DIALOG_STYLE_TABLIST_HEADERS, "Gang vehicles", string, "Track", "Cancel");
  71623. return 1;
  71624. }
  71625. CMD:grespawncars(playerid, params[])
  71626. {
  71627. if(PlayerData[playerid][pGang] == -1 || PlayerData[playerid][pGangRank] < 5)
  71628. {
  71629. return SendClientMessage(playerid, COLOR_GREY, "You are not rank 5+ in any gang at the moment.");
  71630. }
  71631. foreach(new i: Vehicle)
  71632. {
  71633. if(VehicleInfo[i][vID] > 0 && VehicleInfo[i][vGang] == PlayerData[playerid][pGang] && !IsVehicleOccupied(i))
  71634. {
  71635. SetVehicleToRespawn(i);
  71636. }
  71637. }
  71638. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] has respawned their gang vehicles.", GetRPName(playerid), playerid);
  71639. SendClientMessage(playerid, COLOR_YELLOW, "You have respawned all of your unoccupied gang vehicles.");
  71640. return 1;
  71641. }
  71642. CMD:gsellcar(playerid, params[])
  71643. {
  71644. new vehicleid = GetPlayerVehicleID(playerid);
  71645. if(PlayerData[playerid][pGang] == -1 || PlayerData[playerid][pGangRank] < 5)
  71646. {
  71647. return SendClientMessage(playerid, COLOR_GREY, "You are not rank 5+ in any gang at the moment.");
  71648. }
  71649. if(!vehicleid || GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
  71650. {
  71651. return SendClientMessage(playerid, COLOR_GREY, "You are not driving any of your gang vehicles.");
  71652. }
  71653. if(VehicleInfo[vehicleid][vGang] != PlayerData[playerid][pGang])
  71654. {
  71655. return SendClientMessage(playerid, COLOR_GREY, "You can't sell this vehicle as it doesn't belong to your gang.");
  71656. }
  71657. if(!IsPlayerInRangeOfPoint(playerid, 8.0, 542.0433, -1293.5909, 17.2422))
  71658. {
  71659. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the Grotti car dealership.");
  71660. }
  71661. if(strcmp(params, "confirm", true) != 0)
  71662. {
  71663. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /gsellcar [confirm]");
  71664. SendClientMessageEx(playerid, COLOR_SYNTAX, "This command permanently deletes your gang vehicle. You will receive %s back.", FormatNumber(percent(VehicleInfo[vehicleid][vPrice], 75)));
  71665. return 1;
  71666. }
  71667. GivePlayerCash(playerid, percent(VehicleInfo[vehicleid][vPrice], 75));
  71668. SendClientMessageEx(playerid, COLOR_GREEN, "You have sold your %s to the dealership and received %s back.", GetVehicleName(vehicleid), FormatNumber(percent(VehicleInfo[vehicleid][vPrice], 75)));
  71669. Log_Write("log_gang", "%s (uid: %i) sold their gang owned %s (id: %i) to the dealership for $%i", GetPlayerNameEx(playerid), PlayerData[playerid][pID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID], percent(VehicleInfo[vehicleid][vPrice], 75));
  71670. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM vehicles WHERE id = %i", VehicleInfo[vehicleid][vID]);
  71671. mysql_tquery(connectionID, queryBuffer);
  71672. DespawnVehicle(vehicleid, false);
  71673. return 1;
  71674. }
  71675. CMD:createpoint(playerid, params[])
  71676. {
  71677. new type, name[32];
  71678. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pGangMod])
  71679. {
  71680. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  71681. }
  71682. if(sscanf(params, "is[32]", type, name))
  71683. {
  71684. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /createpoint [type] [name]");
  71685. SendClientMessage(playerid, COLOR_SYNTAX, "List of types: (1) Drug factory (2) Drug den (3) Crack house (4) Auto export (5) Fuel");
  71686. SendClientMessage(playerid, COLOR_SYNTAX, "List of types: (6) Mat pickup 1 (7) Mat pickup 2 (8) Mat factory 1 (9) Mat factory 2");
  71687. return 1;
  71688. }
  71689. if(!(0 <= type <= 9))
  71690. {
  71691. return SendClientMessage(playerid, COLOR_GREY, "Invalid type.");
  71692. }
  71693. for(new i = 0; i < MAX_POINTS; i ++)
  71694. {
  71695. if(!PointInfo[i][pExists])
  71696. {
  71697. GetPlayerPos(playerid, PointInfo[i][pPointX], PointInfo[i][pPointY], PointInfo[i][pPointZ]);
  71698. strcpy(PointInfo[i][pName], name, 32);
  71699. strcpy(PointInfo[i][pCapturedBy], "No-one", MAX_PLAYER_NAME);
  71700. PointInfo[i][pExists] = 1;
  71701. PointInfo[i][pType] = type;
  71702. PointInfo[i][pProfits] = 0;
  71703. PointInfo[i][pCapturedGang] = -1;
  71704. PointInfo[i][pTime] = 20;
  71705. PointInfo[i][pPointInterior] = GetPlayerInterior(playerid);
  71706. PointInfo[i][pPointWorld] = GetPlayerVirtualWorld(playerid);
  71707. PointInfo[i][pCaptureTime] = 0;
  71708. PointInfo[i][pCapturer] = INVALID_PLAYER_ID;
  71709. PointInfo[i][pText] = Text3D:INVALID_3DTEXT_ID;
  71710. PointInfo[i][pPickup] = -1;
  71711. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO points (id, name, type, point_x, point_y, point_z, pointinterior, pointworld) VALUES(%i, '%e', %i, '%f', '%f', '%f', %i, %i)", i, name, type, PointInfo[i][pPointX], PointInfo[i][pPointY], PointInfo[i][pPointZ], PointInfo[i][pPointInterior], PointInfo[i][pPointWorld]);
  71712. mysql_tquery(connectionID, queryBuffer);
  71713. ReloadPoint(i);
  71714. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has created point {F7A763}%s{FF6347}.", GetRPName(playerid), name);
  71715. SendClientMessageEx(playerid, COLOR_AQUA, "You have created point {F7A763}%s{33CCFF}. /editpoint %i to edit this point.", name, i);
  71716. return 1;
  71717. }
  71718. }
  71719. return 1;
  71720. }
  71721. CMD:gotopoint(playerid, params[])
  71722. {
  71723. new pointid;
  71724. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  71725. {
  71726. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  71727. }
  71728. if(sscanf(params, "i", pointid))
  71729. {
  71730. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /gotopoint [pointid]");
  71731. }
  71732. if(!(0 <= pointid < MAX_POINTS) || !PointInfo[pointid][pExists])
  71733. {
  71734. return SendClientMessage(playerid, COLOR_GREY, "Invalid point.");
  71735. }
  71736. GameTextForPlayer(playerid, "~w~Teleported", 5000, 1);
  71737. SetPlayerPos(playerid, PointInfo[pointid][pPointX], PointInfo[pointid][pPointY], PointInfo[pointid][pPointZ]);
  71738. SetPlayerInterior(playerid, 0);
  71739. SetPlayerVirtualWorld(playerid, 0);
  71740. SetCameraBehindPlayer(playerid);
  71741. return 1;
  71742. }
  71743. CMD:editpoint(playerid, params[])
  71744. {
  71745. new pointid, option[14], param[32];
  71746. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pGangMod])
  71747. {
  71748. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  71749. }
  71750. if(sscanf(params, "is[14]S()[32]", pointid, option, param))
  71751. {
  71752. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editpoint [pointid] [option]");
  71753. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Name, Location, CapturedBy, Gang, Type, Profits, Time");
  71754. return 1;
  71755. }
  71756. if(!(0 <= pointid < MAX_POINTS) || !PointInfo[pointid][pExists])
  71757. {
  71758. return SendClientMessage(playerid, COLOR_GREY, "Invalid point.");
  71759. }
  71760. if(!strcmp(option, "name", true))
  71761. {
  71762. if(isnull(param))
  71763. {
  71764. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editpoint [pointid] [name] [text]");
  71765. }
  71766. strcpy(PointInfo[pointid][pName], param, 32);
  71767. ReloadPoint(pointid);
  71768. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE points SET name = '%e' WHERE id = %i", PointInfo[pointid][pName], pointid);
  71769. mysql_tquery(connectionID, queryBuffer);
  71770. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the name of point %i to %s.", GetRPName(playerid), pointid, param);
  71771. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the name of point %i to {F7A763}%s{33CCFF}.", pointid, param);
  71772. }
  71773. else if(!strcmp(option, "location", true))
  71774. {
  71775. GetPlayerPos(playerid, PointInfo[pointid][pPointX], PointInfo[pointid][pPointY], PointInfo[pointid][pPointZ]);
  71776. PointInfo[pointid][pPointInterior] = GetPlayerInterior(playerid);
  71777. PointInfo[pointid][pPointWorld] = GetPlayerVirtualWorld(playerid);
  71778. ReloadPoint(pointid);
  71779. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE points SET point_x = '%f', point_y = '%f', point_z = '%f', pointinterior = %i, pointworld = %i WHERE id = %i", PointInfo[pointid][pPointX], PointInfo[pointid][pPointY], PointInfo[pointid][pPointZ], PointInfo[pointid][pPointInterior], PointInfo[pointid][pPointWorld], pointid);
  71780. mysql_tquery(connectionID, queryBuffer);
  71781. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has moved the location of point %i.", GetRPName(playerid), pointid);
  71782. SendClientMessageEx(playerid, COLOR_AQUA, "You have moved the location of point %i.", pointid);
  71783. }
  71784. else if(!strcmp(option, "capturedby", true))
  71785. {
  71786. if(isnull(param) || strlen(params) > 24)
  71787. {
  71788. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editpoint [pointid] [capturedby] [name]");
  71789. }
  71790. strcpy(PointInfo[pointid][pCapturedBy], param, MAX_PLAYER_NAME);
  71791. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE points SET capturedby = '%e' WHERE id = %i", PointInfo[pointid][pCapturedBy], pointid);
  71792. mysql_tquery(connectionID, queryBuffer);
  71793. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the capturer of point %i to %s.", GetRPName(playerid), pointid, param);
  71794. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the capturer of point %i to {F7A763}%s{33CCFF}.", pointid, param);
  71795. }
  71796. else if(!strcmp(option, "gang", true))
  71797. {
  71798. new gangid;
  71799. if(sscanf(param, "i", gangid))
  71800. {
  71801. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editpoint [pointid] [gang] [gangid (-1 = none)]");
  71802. }
  71803. if(!(-1 <= gangid < MAX_GANGS) || (gangid >= 0 && !GangInfo[gangid][gSetup]))
  71804. {
  71805. return SendClientMessage(playerid, COLOR_GREY, "Invalid gang.");
  71806. }
  71807. PointInfo[pointid][pCapturedGang] = gangid;
  71808. ReloadPoint(pointid);
  71809. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE points SET capturedgang = %i WHERE id = %i", PointInfo[pointid][pCapturedGang], pointid);
  71810. mysql_tquery(connectionID, queryBuffer);
  71811. if(gangid == -1)
  71812. {
  71813. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has reset the capturing gang of point %i.", GetRPName(playerid), pointid);
  71814. SendClientMessageEx(playerid, COLOR_AQUA, "You have reset the capturing gang of point %i.", pointid);
  71815. }
  71816. else
  71817. {
  71818. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the capturing gang of point %i to %s.", GetRPName(playerid), pointid, GangInfo[gangid][gName]);
  71819. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the capturing gang of point %i to {00AA00}%s{33CCFF}.", pointid, GangInfo[gangid][gName]);
  71820. }
  71821. }
  71822. else if(!strcmp(option, "type", true))
  71823. {
  71824. new type;
  71825. if(sscanf(param, "i", type))
  71826. {
  71827. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editpoint [pointid] [type] [value]");
  71828. SendClientMessage(playerid, COLOR_SYNTAX, "List of types: (1) Drug factory (2) Drug den (3) Crack house (4) Auto export (5) Fuel");
  71829. SendClientMessage(playerid, COLOR_SYNTAX, "List of types: (6) Mat pickup 1 (7) Mat pickup 2 (8) Mat factory 1 (9) Mat factory 2");
  71830. return 1;
  71831. }
  71832. if(!(0 <= type <= 9))
  71833. {
  71834. return SendClientMessage(playerid, COLOR_GREY, "Invalid type.");
  71835. }
  71836. PointInfo[pointid][pType] = type;
  71837. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE points SET type = %i WHERE id = %i", PointInfo[pointid][pType], pointid);
  71838. mysql_tquery(connectionID, queryBuffer);
  71839. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the type of point %i to %i.", GetRPName(playerid), pointid, type);
  71840. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the type of point %i to %i.", pointid, type);
  71841. }
  71842. else if(!strcmp(option, "profits", true))
  71843. {
  71844. new value;
  71845. if(sscanf(param, "i", value))
  71846. {
  71847. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editpoint [pointid] [profits] [value]");
  71848. }
  71849. PointInfo[pointid][pProfits] = value;
  71850. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE points SET profits = %i WHERE id = %i", PointInfo[pointid][pProfits], pointid);
  71851. mysql_tquery(connectionID, queryBuffer);
  71852. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the profits of point %i to $%i.", GetRPName(playerid), pointid, value);
  71853. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the profits of point %i to $%i.", pointid, value);
  71854. }
  71855. else if(!strcmp(option, "time", true))
  71856. {
  71857. new value;
  71858. if(sscanf(param, "i", value))
  71859. {
  71860. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editpoint [pointid] [time] [hours (0-24)]");
  71861. }
  71862. if(!(0 <= value <= 24))
  71863. {
  71864. return SendClientMessage(playerid, COLOR_GREY, "The amount of hours must range from 0 to 24.");
  71865. }
  71866. PointInfo[pointid][pTime] = value;
  71867. if(PointInfo[pointid][pTime] == 0)
  71868. {
  71869. SendClientMessageToAllEx(COLOR_YELLOW, "Point wars: %s is now available to capture.", PointInfo[pointid][pName]);
  71870. }
  71871. else
  71872. {
  71873. PointInfo[pointid][pCapturer] = INVALID_PLAYER_ID;
  71874. PointInfo[pointid][pCaptureTime] = 0;
  71875. }
  71876. ReloadPoint(pointid);
  71877. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE points SET time = %i WHERE id = %i", PointInfo[pointid][pTime], pointid);
  71878. mysql_tquery(connectionID, queryBuffer);
  71879. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the time of point %i to %i hours.", GetRPName(playerid), pointid, value);
  71880. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the time of point %i to %i hours.", pointid, value);
  71881. }
  71882. return 1;
  71883. }
  71884. CMD:removepoint(playerid, params[])
  71885. {
  71886. new pointid;
  71887. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pGangMod])
  71888. {
  71889. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  71890. }
  71891. if(sscanf(params, "i", pointid))
  71892. {
  71893. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /removepoint [pointid]");
  71894. }
  71895. if(!(0 <= pointid < MAX_POINTS) || !PointInfo[pointid][pExists])
  71896. {
  71897. return SendClientMessage(playerid, COLOR_GREY, "Invalid point.");
  71898. }
  71899. DestroyDynamic3DTextLabel(PointInfo[pointid][pText]);
  71900. DestroyDynamicPickup(PointInfo[pointid][pPickup]);
  71901. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM points WHERE id = %i", pointid);
  71902. mysql_tquery(connectionID, queryBuffer);
  71903. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has deleted point %s.", GetRPName(playerid), PointInfo[pointid][pName]);
  71904. SendClientMessageEx(playerid, COLOR_AQUA, "You have deleted point {F7A763}%s{33CCFF}.", PointInfo[pointid][pName]);
  71905. PointInfo[pointid][pExists] = 0;
  71906. PointInfo[pointid][pCapturedGang] = -1;
  71907. PointInfo[pointid][pTime] = 0;
  71908. return 1;
  71909. }
  71910. CMD:capture(playerid, params[])
  71911. {
  71912. if(PlayerData[playerid][pGang] == -1 || PlayerData[playerid][pGangRank] < 5)
  71913. {
  71914. return SendClientMessage(playerid, COLOR_GREY, "You are not rank 5+ in any gang at the moment.");
  71915. }
  71916. if(PlayerData[playerid][pCapturingPoint] >= 0)
  71917. {
  71918. return SendClientMessage(playerid, COLOR_GREY, "You are already attempting to capture the point.");
  71919. }
  71920. if(PlayerData[playerid][pInjured])
  71921. {
  71922. return SendClientMessage(playerid, COLOR_GREY, "You can't capture a point while injured.");
  71923. }
  71924. if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT)
  71925. {
  71926. return SendClientMessage(playerid, COLOR_GREY, "You must be onfoot in order to use this command.");
  71927. }
  71928. if(GangCapturingPoints(PlayerData[playerid][pGang]) >= MaxCapCount[1])
  71929. {
  71930. return SendClientMessageEx(playerid, COLOR_GREY, "You're gang is already capturing %i points.", MaxCapCount[1]);
  71931. }
  71932. for(new i = 0; i < MAX_POINTS; i ++)
  71933. {
  71934. if(PointInfo[i][pExists] && IsPlayerInRangeOfPoint(playerid, 1.0, PointInfo[i][pPointX], PointInfo[i][pPointY], PointInfo[i][pPointZ]) && GetPlayerInterior(playerid) == PointInfo[i][pPointInterior] && GetPlayerVirtualWorld(playerid) == PointInfo[i][pPointWorld])
  71935. {
  71936. if(PointInfo[i][pTime] > 0)
  71937. {
  71938. return SendClientMessage(playerid, COLOR_GREY, "This point is not available to capture yet.");
  71939. }
  71940. if(PointInfo[i][pCapturer] == playerid)
  71941. {
  71942. return SendClientMessage(playerid, COLOR_GREY, "This point is already being captured by you.");
  71943. }
  71944. if(PointInfo[i][pCapturer] != INVALID_PLAYER_ID && PlayerData[PointInfo[i][pCapturer]][pGang] == PlayerData[playerid][pGang])
  71945. {
  71946. return SendClientMessage(playerid, COLOR_GREY, "This point is already being captured by your gang.");
  71947. }
  71948. foreach(new x : Player)
  71949. {
  71950. if(PlayerData[x][pCapturingPoint] == i && PlayerData[x][pCaptureTime] > 0)
  71951. {
  71952. return SendClientMessage(playerid, COLOR_GREY, "Someone else is already attempting to capture. Please wait until they're done.");
  71953. }
  71954. }
  71955. PlayerData[playerid][pCapturingPoint] = i;
  71956. PlayerData[playerid][pCaptureTime] = 10;
  71957. GetPlayerPos(playerid, PlayerData[playerid][pPointX], PlayerData[playerid][pPointY], PlayerData[playerid][pPointZ]);
  71958. SendProximityMessage(playerid, 20.0, COLOR_RED, "(( %s is attempting to capture %s. ))", GetRPName(playerid), PointInfo[i][pName]);
  71959. return 1;
  71960. }
  71961. }
  71962. SendClientMessage(playerid, COLOR_GREY, "You are not in range of any points.");
  71963. return 1;
  71964. }
  71965. GangCapturingPoints(gang)
  71966. {
  71967. new capCount = 0;
  71968. for(new x = 0; x < MAX_POINTS; x++)
  71969. {
  71970. if(PointInfo[x][pExists] && PointInfo[x][pCapturer] != INVALID_PLAYER_ID && PointInfo[x][pTime] == 0)
  71971. {
  71972. if(PlayerData[PointInfo[x][pCapturer]][pGang] == gang)
  71973. {
  71974. capCount++;
  71975. }
  71976. }
  71977. }
  71978. return capCount;
  71979. }
  71980. GangClaimingTurfs(gang)
  71981. {
  71982. new capCount = 0;
  71983. for(new x = 0; x < MAX_TURFS; x++)
  71984. {
  71985. if(TurfInfo[x][tExists] && TurfInfo[x][tCapturer] != INVALID_PLAYER_ID && TurfInfo[x][tTime] == 0)
  71986. {
  71987. if(PlayerData[TurfInfo[x][tCapturer]][pGang] == gang)
  71988. {
  71989. capCount++;
  71990. }
  71991. }
  71992. }
  71993. return capCount;
  71994. }
  71995. CMD:claim(playerid, params[])
  71996. {
  71997. new turfid, count;
  71998. if((PlayerData[playerid][pGang] == -1 || PlayerData[playerid][pGangRank] < 5) && !IsLawEnforcement(playerid))
  71999. {
  72000. return SendClientMessage(playerid, COLOR_GREY, "You are not rank 5+ in a gang or apart of law enforcement.");
  72001. }
  72002. if((turfid = GetNearbyTurf(playerid)) == -1)
  72003. {
  72004. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any turfs which you can claim.");
  72005. }
  72006. if(IsLawEnforcement(playerid) && PlayerData[playerid][pGang] >= 0)
  72007. {
  72008. return SendClientMessage(playerid, COLOR_GREY, "You're not allowed to claim turfs as a law enforcer and a gang member.");
  72009. }
  72010. if(PlayerData[playerid][pInjured])
  72011. {
  72012. return SendClientMessage(playerid, COLOR_GREY, "You can't claim a turf while injured.");
  72013. }
  72014. if(TurfInfo[turfid][tTime] > 0)
  72015. {
  72016. return SendClientMessage(playerid, COLOR_GREY, "This turf is not yet available to claim.");
  72017. }
  72018. if(TurfInfo[turfid][tType] == 8)
  72019. {
  72020. return SendClientMessage(playerid, COLOR_GREY, "This is a locked turf and therefore cannot be claimed.");
  72021. }
  72022. if(TurfInfo[turfid][tCapturer] == playerid)
  72023. {
  72024. return SendClientMessage(playerid, COLOR_GREY, "This turf is already being captured by you.");
  72025. }
  72026. if(!IsLawEnforcement(playerid) && GangClaimingTurfs(PlayerData[playerid][pGang]) >= MaxCapCount[0])
  72027. {
  72028. return SendClientMessageEx(playerid, COLOR_GREY, "You're gang is already claiming %i turfs.", MaxCapCount[0]);
  72029. }
  72030. if(!IsLawEnforcement(playerid) && TurfInfo[turfid][tCapturer] != INVALID_PLAYER_ID && PlayerData[TurfInfo[turfid][tCapturer]][pGang] == PlayerData[playerid][pGang])
  72031. {
  72032. return SendClientMessage(playerid, COLOR_GREY, "This turf is already being claimed by your gang.");
  72033. }
  72034. if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT)
  72035. {
  72036. return SendClientMessage(playerid, COLOR_GREY, "You must be onfoot in order to use this command.");
  72037. }
  72038. if(GetPlayerInterior(playerid) > 0 || GetPlayerVirtualWorld(playerid) > 0)
  72039. {
  72040. return SendClientMessage(playerid, COLOR_GREY, "You can't claim a turf inside an interior.");
  72041. }
  72042. if(TurfInfo[turfid][tCapturer] != INVALID_PLAYER_ID && TurfInfo[turfid][tTime] == 0)
  72043. {
  72044. foreach(new i : Player)
  72045. {
  72046. if(i != playerid && GetNearbyTurf(i) == turfid && !PlayerData[i][pInjured] && !PlayerData[i][pAdminDuty] && !PlayerData[i][pAcceptedHelp] && !PlayerData[i][pAFK] && GetPlayerState(i) != PLAYER_STATE_SPECTATING)
  72047. {
  72048. if(PlayerData[TurfInfo[turfid][tCapturer]][pGang] >= 0 && PlayerData[i][pGang] == PlayerData[TurfInfo[turfid][tCapturer]][pGang] && PlayerData[i][pGang] != GangInfo[PlayerData[playerid][pGang]][gAlliance])
  72049. {
  72050. return SendClientMessage(playerid, COLOR_GREY, "You must eliminate all members of the attacking gang before you can claim this.");
  72051. }
  72052. else if(IsLawEnforcement(TurfInfo[turfid][tCapturer]) && IsLawEnforcement(i))
  72053. {
  72054. return SendClientMessage(playerid, COLOR_GREY, "You must eliminate all LEO in this turf before you can claim this.");
  72055. }
  72056. }
  72057. }
  72058. }
  72059. if(PlayerData[playerid][pGang] >= 0)
  72060. {
  72061. if(GangInfo[PlayerData[playerid][pGang]][gTurfTokens] <= 0)
  72062. {
  72063. return SendClientMessage(playerid, COLOR_GREY, "Your gang doesn't have any turf tokens left.");
  72064. }
  72065. foreach(new i : Player)
  72066. {
  72067. if(GetNearbyTurf(i) == turfid && PlayerData[i][pGang] == PlayerData[playerid][pGang])
  72068. {
  72069. count++;
  72070. }
  72071. }
  72072. if(count < TurfInfo[turfid][tCount])
  72073. {
  72074. return SendClientMessageEx(playerid, COLOR_GREY, "You need at least %d members of your gang in this turf to claim it.", TurfInfo[turfid][tCount]);
  72075. }
  72076. else
  72077. {
  72078. GangInfo[PlayerData[playerid][pGang]][gTurfTokens]--;
  72079. SendClientMessageToAllEx(COLOR_YELLOW, "Turf wars: %s has attempted to claim %s for %s. It will be their turf in 10 minutes!", GetRPName(playerid), TurfInfo[turfid][tName], GangInfo[PlayerData[playerid][pGang]][gName]);
  72080. TurfInfo[turfid][tBeingCaptured] = turfid;
  72081. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET turftokens = turftokens - 1 WHERE id = %i", PlayerData[playerid][pGang]);
  72082. mysql_tquery(connectionID, queryBuffer);
  72083. }
  72084. }
  72085. else if(IsLawEnforcement(playerid) && PlayerData[playerid][pGang] == -1)
  72086. {
  72087. if(FactionInfo[PlayerData[playerid][pFaction]][fTurfTokens] <= 0)
  72088. {
  72089. return SendClientMessage(playerid, COLOR_GREY, "Your faction doesn't have any turf tokens left.");
  72090. }
  72091. FactionInfo[PlayerData[playerid][pFaction]][fTurfTokens]--;
  72092. SendClientMessageToAllEx(COLOR_YELLOW, "Turf wars: %s has attempted to claim back %s. It will be their turf in 10 minutes!", GetRPName(playerid), TurfInfo[turfid][tName]);
  72093. TurfInfo[turfid][tBeingCaptured] = turfid;
  72094. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_FACTIONS" SET turftokens = turftokens - 1 WHERE id = %i", PlayerData[playerid][pFaction]);
  72095. mysql_tquery(connectionID, queryBuffer);
  72096. }
  72097. TurfInfo[turfid][tCapturer] = playerid;
  72098. TurfInfo[turfid][tCaptureTime] = 10;
  72099. ReloadTurf(turfid);
  72100. return 1;
  72101. }
  72102. CMD:reclaim(playerid, params[])
  72103. {
  72104. new turfid;
  72105. if(PlayerData[playerid][pGang] == -1)
  72106. {
  72107. return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any gang at the moment.");
  72108. }
  72109. if((turfid = GetNearbyTurf(playerid)) == -1)
  72110. {
  72111. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any turfs.");
  72112. }
  72113. if(IsLawEnforcement(playerid) && PlayerData[playerid][pGang] >= 0)
  72114. {
  72115. return SendClientMessage(playerid, COLOR_GREY, "You're not allowed to claim turfs as a law enforcer and a gang member.");
  72116. }
  72117. if(PlayerData[playerid][pInjured])
  72118. {
  72119. return SendClientMessage(playerid, COLOR_GREY, "You can't reclaim a turf while injured.");
  72120. }
  72121. if(TurfInfo[turfid][tCapturedGang] != PlayerData[playerid][pGang])
  72122. {
  72123. return SendClientMessage(playerid, COLOR_GREY, "This turf does not belong to your gang. Therefore you can't reclaim it.");
  72124. }
  72125. if(TurfInfo[turfid][tType] == 8)
  72126. {
  72127. return SendClientMessage(playerid, COLOR_GREY, "This is a locked turf and therefore cannot be claimed.");
  72128. }
  72129. if(TurfInfo[turfid][tCapturer] == INVALID_PLAYER_ID)
  72130. {
  72131. return SendClientMessage(playerid, COLOR_GREY, "This turf is not being claimed by anyone. Therefore you can't reclaim it.");
  72132. }
  72133. if(TurfInfo[turfid][tCapturer] != INVALID_PLAYER_ID && TurfInfo[turfid][tTime] == 0)
  72134. {
  72135. foreach(new i : Player)
  72136. {
  72137. if(i != playerid && GetNearbyTurf(i) == turfid && !PlayerData[i][pInjured] && !PlayerData[i][pAdminDuty] && !PlayerData[i][pAcceptedHelp] && !PlayerData[i][pAFK] && GetPlayerState(i) != PLAYER_STATE_SPECTATING)
  72138. {
  72139. if(PlayerData[TurfInfo[turfid][tCapturer]][pGang] >= 0 && PlayerData[i][pGang] == PlayerData[TurfInfo[turfid][tCapturer]][pGang] && PlayerData[i][pGang] != GangInfo[PlayerData[playerid][pGang]][gAlliance])
  72140. {
  72141. return SendClientMessage(playerid, COLOR_GREY, "You must eliminate all members of the attacking gang before you can claim this.");
  72142. }
  72143. else if(IsLawEnforcement(TurfInfo[turfid][tCapturer]) && IsLawEnforcement(i))
  72144. {
  72145. return SendClientMessage(playerid, COLOR_GREY, "You must eliminate all LEO in this turf before you can claim this.");
  72146. }
  72147. }
  72148. }
  72149. }
  72150. SendTurfMessage(turfid, COLOR_YELLOW, "Turf wars: %s has reclaimed %s for %s and ended the turf war.", GetRPName(playerid), TurfInfo[turfid][tName], GangInfo[PlayerData[playerid][pGang]][gName]);
  72151. TurfInfo[turfid][tBeingCaptured] = -1;
  72152. TurfInfo[turfid][tCapturer] = INVALID_PLAYER_ID;
  72153. TurfInfo[turfid][tCaptureTime] = 0;
  72154. ReloadTurf(turfid);
  72155. return 1;
  72156. }
  72157. CMD:guninv(playerid, params[])
  72158. {
  72159. SendClientMessage(playerid, COLOR_NAVYBLUE, "_____ My Weapons _____");
  72160. for(new i = 0; i < 13; i ++)
  72161. {
  72162. if(PlayerData[playerid][pWeapons][i] > 0)
  72163. {
  72164. SendClientMessageEx(playerid, COLOR_GREY2, "(ID: %i) %s", PlayerData[playerid][pWeapons][i], GetWeaponNameEx(PlayerData[playerid][pWeapons][i]));
  72165. }
  72166. }
  72167. return 1;
  72168. }
  72169. CMD:createturf(playerid, params[])
  72170. {
  72171. new type, name[32];
  72172. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pGangMod])
  72173. {
  72174. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  72175. }
  72176. if(sscanf(params, "is[32]", type, name))
  72177. {
  72178. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /createturf [special type] [name]");
  72179. SendClientMessage(playerid, COLOR_SYNTAX, "List of types: (0) None (1) Materials (2) Low weapons (3) Med weapons (4) High weapons");
  72180. SendClientMessage(playerid, COLOR_SYNTAX, "List of types: (5) Traphouse (6) Crackhouse (7) Sales taxing (8) Locked");
  72181. return 1;
  72182. }
  72183. if(!(0 <= type <= 8))
  72184. {
  72185. return SendClientMessage(playerid, COLOR_GREY, "Invalid type.");
  72186. }
  72187. if(GetNearbyTurf(playerid) >= 0)
  72188. {
  72189. return SendClientMessage(playerid, COLOR_GREY, "There is a turf in range. Find somewhere else to create this one.");
  72190. }
  72191. if(GetPlayerInterior(playerid) > 0 || GetPlayerVirtualWorld(playerid) > 0)
  72192. {
  72193. return SendClientMessage(playerid, COLOR_GREY, "You cannot create turfs indoors.");
  72194. }
  72195. PlayerData[playerid][pTurfType] = type;
  72196. PlayerData[playerid][pZoneType] = ZONETYPE_TURF;
  72197. strcpy(PlayerData[playerid][pTurfName], name, 32);
  72198. Dialog_Show(playerid, DIALOG_CREATEZONE, DIALOG_STYLE_MSGBOX, "Turf creation system", "You have entered turf creation mode. In order to create a turf you need\nto mark four points around the area you want your turf to be in, forming\na square. You must make a square or your outcome won't be as expected.\n\nPress {00AA00}Confirm{A9C4E4} to begin turf creation.", "Confirm", "Cancel");
  72199. return 1;
  72200. }
  72201. CMD:turfcancel(playerid, params[])
  72202. {
  72203. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pGangMod])
  72204. {
  72205. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  72206. }
  72207. if(PlayerData[playerid][pZoneCreation] != ZONETYPE_TURF)
  72208. {
  72209. return SendClientMessage(playerid, COLOR_GREY, "You are not creating a turf at the moment.");
  72210. }
  72211. CancelZoneCreation(playerid);
  72212. SendClientMessage(playerid, COLOR_LIGHTRED, "* Land creation cancelled.");
  72213. return 1;
  72214. }
  72215. CMD:gototurf(playerid, params[])
  72216. {
  72217. new turfid;
  72218. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  72219. {
  72220. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  72221. }
  72222. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  72223. {
  72224. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  72225. }
  72226. if(sscanf(params, "i", turfid))
  72227. {
  72228. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /gototurf [turfid]");
  72229. }
  72230. if(!(0 <= turfid < MAX_TURFS) || !TurfInfo[turfid][tExists])
  72231. {
  72232. return SendClientMessage(playerid, COLOR_GREY, "Invalid turf.");
  72233. }
  72234. GameTextForPlayer(playerid, "~w~Teleported", 5000, 1);
  72235. SetPlayerPos(playerid, TurfInfo[turfid][tMinX], TurfInfo[turfid][tMinY], TurfInfo[turfid][tHeight]);
  72236. SetPlayerInterior(playerid, 0);
  72237. SetPlayerVirtualWorld(playerid, 0);
  72238. SetCameraBehindPlayer(playerid);
  72239. return 1;
  72240. }
  72241. CMD:removeturf(playerid, params[])
  72242. {
  72243. new turfid;
  72244. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pGangMod])
  72245. {
  72246. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  72247. }
  72248. if(sscanf(params, "i", turfid))
  72249. {
  72250. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /removeturf [turfid]");
  72251. }
  72252. if(!(0 <= turfid < MAX_TURFS) || !TurfInfo[turfid][tExists])
  72253. {
  72254. return SendClientMessage(playerid, COLOR_GREY, "Invalid turf.");
  72255. }
  72256. GangZoneDestroy(TurfInfo[turfid][tGangZone]);
  72257. DestroyDynamicArea(TurfInfo[turfid][tArea]);
  72258. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM turfs WHERE id = %i", turfid);
  72259. mysql_tquery(connectionID, queryBuffer);
  72260. TurfInfo[turfid][tExists] = 0;
  72261. TurfInfo[turfid][tCapturedGang] = 0;
  72262. TurfInfo[turfid][tType] = 0;
  72263. Iter_Remove(Turf, turfid);
  72264. SendClientMessageEx(playerid, COLOR_AQUA, "* You have removed turf %i.", turfid);
  72265. return 1;
  72266. }
  72267. CMD:editturf(playerid, params[])
  72268. {
  72269. new turfid, option[14], param[32];
  72270. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pGangMod])
  72271. {
  72272. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  72273. }
  72274. if(sscanf(params, "is[14]S()[32]", turfid, option, param))
  72275. {
  72276. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editturf [turfid] [option]");
  72277. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: Name, CapturedBy, Gang, Type, Time, count");
  72278. return 1;
  72279. }
  72280. if(!(0 <= turfid < MAX_TURFS) || !TurfInfo[turfid][tExists])
  72281. {
  72282. return SendClientMessage(playerid, COLOR_GREY, "Invalid turf.");
  72283. }
  72284. if(!strcmp(option, "name", true))
  72285. {
  72286. if(isnull(param))
  72287. {
  72288. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editturf [turfid] [name] [text]");
  72289. }
  72290. strcpy(TurfInfo[turfid][tName], param, 32);
  72291. ReloadTurf(turfid);
  72292. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE turfs SET name = '%e' WHERE id = %i", TurfInfo[turfid][tName], turfid);
  72293. mysql_tquery(connectionID, queryBuffer);
  72294. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the name of turf %i to %s.", GetRPName(playerid), turfid, param);
  72295. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the name of turf %i to {F7A763}%s{33CCFF}.", turfid, param);
  72296. }
  72297. else if(!strcmp(option, "capturedby", true))
  72298. {
  72299. if(isnull(param) || strlen(params) > 24)
  72300. {
  72301. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editturf [turfid] [capturedby] [name]");
  72302. }
  72303. strcpy(TurfInfo[turfid][tCapturedBy], param, MAX_PLAYER_NAME);
  72304. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE turfs SET capturedby = '%e' WHERE id = %i", TurfInfo[turfid][tCapturedBy], turfid);
  72305. mysql_tquery(connectionID, queryBuffer);
  72306. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the capturer of turf %i to %s.", GetRPName(playerid), turfid, param);
  72307. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the capturer of turf %i to {F7A763}%s{33CCFF}.", turfid, param);
  72308. }
  72309. else if(!strcmp(option, "gang", true))
  72310. {
  72311. new gangid;
  72312. if(sscanf(param, "i", gangid))
  72313. {
  72314. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editturf [turfid] [gang] [gangid (-1 = none)]");
  72315. }
  72316. if(!(-1 <= gangid < MAX_GANGS) || (gangid >= 0 && !GangInfo[gangid][gSetup]))
  72317. {
  72318. return SendClientMessage(playerid, COLOR_GREY, "Invalid gang.");
  72319. }
  72320. TurfInfo[turfid][tCapturedGang] = gangid;
  72321. ReloadTurf(turfid);
  72322. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE turfs SET capturedgang = %i WHERE id = %i", TurfInfo[turfid][tCapturedGang], turfid);
  72323. mysql_tquery(connectionID, queryBuffer);
  72324. if(gangid == -1)
  72325. {
  72326. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has reset the capturing gang of turf %i.", GetRPName(playerid), turfid);
  72327. SendClientMessageEx(playerid, COLOR_AQUA, "You have reset the capturing gang of turf %i.", turfid);
  72328. }
  72329. else
  72330. {
  72331. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the capturing gang of turf %i to %s.", GetRPName(playerid), turfid, GangInfo[gangid][gName]);
  72332. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the capturing gang of turf %i to {00AA00}%s{33CCFF}.", turfid, GangInfo[gangid][gName]);
  72333. }
  72334. }
  72335. else if(!strcmp(option, "type", true))
  72336. {
  72337. new type;
  72338. if(sscanf(param, "i", type))
  72339. {
  72340. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editturf [turfid] [type] [value]");
  72341. SendClientMessage(playerid, COLOR_SYNTAX, "List of types: (0) None (1) Materials (2) Low weapons (3) Med weapons (4) High weapons");
  72342. SendClientMessage(playerid, COLOR_SYNTAX, "List of types: (5) Traphouse (6) Crackhouse (7) Sales taxing (8) Locked");
  72343. return 1;
  72344. }
  72345. if(!(0 <= type <= 8))
  72346. {
  72347. return SendClientMessage(playerid, COLOR_GREY, "Invalid type.");
  72348. }
  72349. TurfInfo[turfid][tType] = type;
  72350. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE turfs SET type = %i WHERE id = %i", TurfInfo[turfid][tType], turfid);
  72351. mysql_tquery(connectionID, queryBuffer);
  72352. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the type of turf %i to %i.", GetRPName(playerid), turfid, type);
  72353. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the type of turf %i to %i.", turfid, type);
  72354. }
  72355. else if(!strcmp(option, "time", true))
  72356. {
  72357. new value;
  72358. if(sscanf(param, "i", value))
  72359. {
  72360. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editturf [turfid] [time] [hours (0-24)]");
  72361. }
  72362. if(!(0 <= value <= 24))
  72363. {
  72364. return SendClientMessage(playerid, COLOR_GREY, "The amount of hours must range from 0 to 24.");
  72365. }
  72366. TurfInfo[turfid][tTime] = value;
  72367. if(TurfInfo[turfid][tTime] == 0 && TurfInfo[turfid][tType] != 8)
  72368. {
  72369. SendTurfMessage(turfid, COLOR_YELLOW, "Turf wars: %s is now available to capture.", TurfInfo[turfid][tName]);
  72370. }
  72371. else
  72372. {
  72373. TurfInfo[turfid][tCapturer] = INVALID_PLAYER_ID;
  72374. TurfInfo[turfid][tCaptureTime] = 0;
  72375. }
  72376. ReloadTurf(turfid);
  72377. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE turfs SET time = %i WHERE id = %i", TurfInfo[turfid][tTime], turfid);
  72378. mysql_tquery(connectionID, queryBuffer);
  72379. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the time of turf %i to %i hours.", GetRPName(playerid), turfid, value);
  72380. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the time of turf %i to %i hours.", turfid, value);
  72381. }
  72382. else if(!strcmp(option, "count", true))
  72383. {
  72384. new count;
  72385. if(sscanf(param, "i", count))
  72386. {
  72387. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editturf [turfid] [count] [0-10]");
  72388. }
  72389. if(!(0 <= count <= 10))
  72390. {
  72391. return SendClientMessage(playerid, COLOR_GREY, "The amount of members must range from 0 to 10.");
  72392. }
  72393. TurfInfo[turfid][tCount] = count;
  72394. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE turfs SET count = %i WHERE id = %i", TurfInfo[turfid][tCount], turfid);
  72395. mysql_tquery(connectionID, queryBuffer);
  72396. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the count members of turf %i to %i.", GetRPName(playerid), turfid, count);
  72397. SendClientMessageEx(playerid, COLOR_AQUA, "You have set the count members of turf %i to %i.", turfid, count);
  72398. }
  72399. return 1;
  72400. }
  72401. /*CMD:pointinfo(playerid, params[])
  72402. {
  72403. new
  72404. pointid = GetNearbyPoint(playerid),
  72405. string[12];
  72406. if(pointid == -1)
  72407. {
  72408. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any points.");
  72409. }
  72410. format(string, sizeof(string), "%i", pointid);
  72411. callcmd::points(playerid, string);
  72412. return 1;
  72413. }*/
  72414. CMD:pointinfo(playerid, params[])
  72415. {
  72416. new
  72417. iCount,
  72418. szMessage[128];
  72419. SendClientMessage(playerid, COLOR_ORANGE, "Point Info:");
  72420. for(new i; i < MAX_POINTS; i++) {
  72421. if(PointInfo[i][pExists]) {
  72422. if(PointInfo[i][pCapturer] != INVALID_PLAYER_ID) {
  72423. if(PointInfo[i][pCaptureTime] == 1) {
  72424. format(szMessage, sizeof(szMessage), "* %s | Capper: %s | Gang: %s | Time left: Less than 1 minute", PointInfo[i][pName], GetRPName(PointInfo[i][pCapturer]), GangInfo[PlayerData[PointInfo[i][pCapturer]][pGang]][gName]);
  72425. SendClientMessage(playerid, COLOR_WHITE, szMessage);
  72426. iCount++;
  72427. } else {
  72428. format(szMessage, sizeof(szMessage), "* %s | Capper: %s | Gang: %s | Time left: %d minutes", PointInfo[i][pName], GetRPName(PointInfo[i][pCapturer]), GangInfo[PlayerData[PointInfo[i][pCapturer]][pGang]][gName], PointInfo[i][pCaptureTime]);
  72429. SendClientMessage(playerid, COLOR_WHITE, szMessage);
  72430. iCount++;
  72431. }
  72432. }
  72433. }
  72434. }
  72435. if(iCount == 0)
  72436. return SendClientMessage(playerid, COLOR_GREY, "No gang has attempted to capture a point at this time.");
  72437. return 1;
  72438. }
  72439. CMD:turfinfo(playerid, params[])
  72440. {
  72441. new turfid, name[32] = "None", perk[32], color = -1;
  72442. if((turfid = GetNearbyTurf(playerid)) == -1)
  72443. {
  72444. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any turfs.");
  72445. }
  72446. if(TurfInfo[turfid][tCapturedGang] >= 0)
  72447. {
  72448. strcpy(name, GangInfo[TurfInfo[turfid][tCapturedGang]][gName]);
  72449. color = GangInfo[TurfInfo[turfid][tCapturedGang]][gColor];
  72450. }
  72451. switch(TurfInfo[turfid][tType])
  72452. {
  72453. case 0: perk = "Normal";
  72454. case 1: perk = "Materials";
  72455. case 2: perk = "Low class weapons";
  72456. case 3: perk = "Medium class weapons";
  72457. case 4: perk = "High class weapons";
  72458. case 5: perk = "Traphouse";
  72459. case 6: perk = "Crackhouse";
  72460. case 7: perk = "Sales tax";
  72461. case 8: perk = "Locked turf";
  72462. }
  72463. SendClientMessageEx(playerid, COLOR_NAVYBLUE, "_____ %s (%s) _____", TurfInfo[turfid][tName], perk);
  72464. if(TurfInfo[turfid][tType] == 8)
  72465. {
  72466. SendClientMessageEx(playerid, COLOR_WHITE, "* This turf is owned by {%06x}%s{FFFFFF} and is not available to capture.", color >>> 8, name);
  72467. }
  72468. else
  72469. {
  72470. SendClientMessageEx(playerid, COLOR_WHITE, "* This turf captured by %s for {%06x}%s{FFFFFF} will be available in %i hours.", TurfInfo[turfid][tCapturedBy], color >>> 8, name, TurfInfo[turfid][tTime]);
  72471. if(TurfInfo[turfid][tCapturer] != INVALID_PLAYER_ID)
  72472. {
  72473. SendClientMessageEx(playerid, COLOR_WHITE, "* This turf is being captured by %s and will be theirs in %i minutes.", GetRPName(TurfInfo[turfid][tCapturer]), TurfInfo[turfid][tCaptureTime]);
  72474. }
  72475. }
  72476. return 1;
  72477. }
  72478. CMD:carhelp(playerid, params[])
  72479. {
  72480. return callcmd::vehiclehelp(playerid, params);
  72481. }
  72482. CMD:armbomb(playerid, params[])
  72483. {
  72484. return callcmd::plantbomb(playerid, params);
  72485. }
  72486. CMD:defend(playerid, params[])
  72487. {
  72488. new targetid, amount, time = (5 - GetJobLevel(playerid, JOB_LAWYER)) * 30;
  72489. if(!PlayerHasJob(playerid, JOB_LAWYER))
  72490. {
  72491. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command unless you're a Lawyer.");
  72492. }
  72493. if(gettime() - PlayerData[playerid][pLastDefend] < time)
  72494. {
  72495. return SendClientMessageEx(playerid, COLOR_GREY, "You can only defend a player every %i seconds. Please wait %i more seconds.", time, time - (gettime() - PlayerData[playerid][pLastDefend]));
  72496. }
  72497. if(sscanf(params, "ui", targetid, amount))
  72498. {
  72499. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /defend [playerid] [amount]");
  72500. }
  72501. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  72502. {
  72503. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  72504. }
  72505. if(targetid == playerid)
  72506. {
  72507. return SendClientMessage(playerid, COLOR_GREY, "You can't defend yourself.");
  72508. }
  72509. if(!PlayerData[targetid][pWantedLevel])
  72510. {
  72511. return SendClientMessage(playerid, COLOR_GREY, "That player is not wanted.");
  72512. }
  72513. if(amount < 1000 || amount > 10000)
  72514. {
  72515. return SendClientMessage(playerid, COLOR_GREY, "The amount can't be below $1000 or above $10000.");
  72516. }
  72517. PlayerData[targetid][pDefendOffer] = playerid;
  72518. PlayerData[targetid][pDefendPrice] = amount;
  72519. PlayerData[playerid][pLastDefend] = gettime();
  72520. SendClientMessageEx(targetid, COLOR_AQUA, "* Lawyer %s has offered to defend your wanted level for $%i. (/accept lawyer)", GetRPName(playerid), amount);
  72521. SendClientMessageEx(playerid, COLOR_AQUA, "* You have offered to defend %s's wanted level for $%i.", GetRPName(targetid), amount);
  72522. return 1;
  72523. }
  72524. CMD:free(playerid, params[])
  72525. {
  72526. new targetid, time = GetJobLevel(playerid, JOB_LAWYER);
  72527. if(!PlayerHasJob(playerid, JOB_LAWYER))
  72528. {
  72529. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command unless you're a Lawyer.");
  72530. }
  72531. if(sscanf(params, "u", targetid))
  72532. {
  72533. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /free [playerid]");
  72534. }
  72535. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  72536. {
  72537. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  72538. }
  72539. if(targetid == playerid)
  72540. {
  72541. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command on yourself.");
  72542. }
  72543. if(PlayerData[targetid][pJailType] != 3)
  72544. {
  72545. return SendClientMessage(playerid, COLOR_GREY, "That player is not in IC jail.");
  72546. }
  72547. if(PlayerData[targetid][pJailTime] < time * 60)
  72548. {
  72549. return SendClientMessage(playerid, COLOR_GREY, "You can't free this player, their jail time expires soon.");
  72550. }
  72551. PlayerData[targetid][pJailTime] -= time * 60;
  72552. SendClientMessageEx(targetid, COLOR_AQUA, "* Lawyer %s has reduced your jail sentence by %i minutes.", GetRPName(playerid), time);
  72553. SendClientMessageEx(playerid, COLOR_AQUA, "* You have reduced %s's jail sentence by %i minutes.", GetRPName(targetid), time);
  72554. return 1;
  72555. }
  72556. CMD:eject(playerid, params[])
  72557. {
  72558. new targetid;
  72559. if(sscanf(params, "u", targetid))
  72560. {
  72561. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /eject [playerid]");
  72562. }
  72563. if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
  72564. {
  72565. return SendClientMessage(playerid, COLOR_GREY, "You are not driving any vehicle.");
  72566. }
  72567. if(!IsPlayerConnected(targetid) || !IsPlayerInVehicle(targetid, GetPlayerVehicleID(playerid)))
  72568. {
  72569. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected, or is not in your vehicle.");
  72570. }
  72571. RemovePlayerFromVehicle(targetid);
  72572. ShowActionBubble(playerid, "* %s ejects %s from the vehicle.", GetRPName(playerid), GetRPName(targetid));
  72573. return 1;
  72574. }
  72575. CMD:dicebet(playerid, params[])
  72576. {
  72577. new targetid, amount;
  72578. if(!IsPlayerInRangeOfPoint(playerid, 50.0, 1603.7220,-1176.7534,24.3658))
  72579. {
  72580. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the casino.");
  72581. }
  72582. if(PlayerData[playerid][pLevel] < 3)
  72583. {
  72584. return SendClientMessage(playerid, COLOR_GREY, "You need to be at least level 3+ in order to dice bet.");
  72585. }
  72586. if(sscanf(params, "ui", targetid, amount))
  72587. {
  72588. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /dicebet [playerid] [amount]");
  72589. }
  72590. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  72591. {
  72592. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  72593. }
  72594. if(targetid == playerid)
  72595. {
  72596. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command on yourself.");
  72597. }
  72598. if(PlayerData[targetid][pLevel] < 3)
  72599. {
  72600. return SendClientMessage(playerid, COLOR_GREY, "That player must be at least level 3+ to bet with them.");
  72601. }
  72602. if(amount < 1)
  72603. {
  72604. return SendClientMessage(playerid, COLOR_GREY, "The amount can't be below $1.");
  72605. }
  72606. if(PlayerData[playerid][pCash] < amount)
  72607. {
  72608. return SendClientMessage(playerid, COLOR_GREY, "You don't have that much money to bet.");
  72609. }
  72610. if(gettime() - PlayerData[playerid][pLastBet] < 10)
  72611. {
  72612. return SendClientMessageEx(playerid, COLOR_GREY, "You can only use this command every 10 seconds. Please wait %i more seconds.", 10 - (gettime() - PlayerData[playerid][pLastBet]));
  72613. }
  72614. PlayerData[targetid][pDiceOffer] = playerid;
  72615. PlayerData[targetid][pDiceBet] = amount;
  72616. PlayerData[targetid][pDiceRigged] = 0;
  72617. PlayerData[playerid][pLastBet] = gettime();
  72618. SendClientMessageEx(targetid, COLOR_AQUA, "* %s has initiated a dice bet with you for $%i (/accept dicebet).", GetRPName(playerid), amount);
  72619. SendClientMessageEx(playerid, COLOR_AQUA, "* You have initiated a dice bet against %s for $%i.", GetRPName(targetid), amount);
  72620. return 1;
  72621. }
  72622. CMD:dicebetrigged(playerid, params[]) // Added to keep the economy in control. And to make people qq when they lose all their cash.
  72623. {
  72624. new targetid, amount;
  72625. if(PlayerData[playerid][pAdmin] < MANAGEMENT)
  72626. {
  72627. return -1;
  72628. }
  72629. if(!IsPlayerInRangeOfPoint(playerid, 50.0, 1603.7220,-1176.7534,24.3658))
  72630. {
  72631. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the casino.");
  72632. }
  72633. if(sscanf(params, "ui", targetid, amount))
  72634. {
  72635. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /dicebetrigged [playerid] [amount]");
  72636. }
  72637. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  72638. {
  72639. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  72640. }
  72641. if(targetid == playerid)
  72642. {
  72643. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command on yourself.");
  72644. }
  72645. if(PlayerData[targetid][pLevel] < 3)
  72646. {
  72647. return SendClientMessage(playerid, COLOR_GREY, "That player must be at least level 3+ to bet with them.");
  72648. }
  72649. if(amount < 1)
  72650. {
  72651. return SendClientMessage(playerid, COLOR_GREY, "The amount can't be below $1.");
  72652. }
  72653. if(PlayerData[playerid][pCash] < amount)
  72654. {
  72655. return SendClientMessage(playerid, COLOR_GREY, "You don't have that much money to bet.");
  72656. }
  72657. if(gettime() - PlayerData[playerid][pLastBet] < 10)
  72658. {
  72659. return SendClientMessageEx(playerid, COLOR_GREY, "You can only use this command every 10 seconds. Please wait %i more seconds.", 10 - (gettime() - PlayerData[playerid][pLastBet]));
  72660. }
  72661. PlayerData[targetid][pDiceOffer] = playerid;
  72662. PlayerData[targetid][pDiceBet] = amount;
  72663. PlayerData[targetid][pDiceRigged] = 1;
  72664. PlayerData[playerid][pLastBet] = gettime();
  72665. SendClientMessageEx(targetid, COLOR_AQUA, "* %s has initiated a dice bet with you for $%i (/accept dicebet).", GetRPName(playerid), amount);
  72666. SendClientMessageEx(playerid, COLOR_AQUA, "* You have initiated a dice bet against %s for $%i.", GetRPName(targetid), amount);
  72667. return 1;
  72668. }
  72669. CMD:calculate(playerid, params[])
  72670. {
  72671. new option, Float:value1, Float:value2;
  72672. if(sscanf(params, "fcf", value1, option, value2))
  72673. {
  72674. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /calculate [value 1] [option] [value 2]");
  72675. SendClientMessage(playerid, COLOR_SYNTAX, "List of options: (+) Add (-) Subtract (*) Multiply (/) Divide");
  72676. return 1;
  72677. }
  72678. if(option == '/' && value2 == 0)
  72679. {
  72680. return SendClientMessage(playerid, COLOR_GREY, "You can't divide by zero.");
  72681. }
  72682. if(option == '+') {
  72683. SendClientMessageEx(playerid, COLOR_GREEN, "* Result: %.2f + %.2f = %.2f", value1, value2, value1 + value2);
  72684. } else if(option == '-') {
  72685. SendClientMessageEx(playerid, COLOR_GREEN, "* Result: %.2f - %.2f = %.2f", value1, value2, value1 - value2);
  72686. } else if(option == '*' || option == 'x') {
  72687. SendClientMessageEx(playerid, COLOR_GREEN, "* Result: %.2f * %.2f = %.2f", value1, value2, value1 * value2);
  72688. } else if(option == '/') {
  72689. SendClientMessageEx(playerid, COLOR_GREEN, "* Result: %.2f / %.2f = %.2f", value1, value2, value1 / value2);
  72690. }
  72691. return 1;
  72692. }
  72693. CMD:serverstats(playerid, params[])
  72694. {
  72695. new houses, businesses, garages, vehicles, lands, entrances, turfs, points, gangs, factions, lockers;
  72696. houses = Iter_Count(House);
  72697. businesses = Iter_Count(Business);
  72698. garages = Iter_Count(Garage);
  72699. vehicles = Iter_Count(Vehicle);
  72700. lands = Iter_Count(Land);
  72701. entrances = Iter_Count(Entrance);
  72702. turfs = Iter_Count(Turf);
  72703. for(new i = 0; i < MAX_POINTS; i ++) if(PointInfo[i][pExists]) points++;
  72704. for(new i = 0; i < MAX_GANGS; i ++) if(GangInfo[i][gSetup]) gangs++;
  72705. for(new i = 0; i < MAX_FACTIONS; i ++) if(FactionInfo[i][fType]) factions++;
  72706. for(new i = 0; i < MAX_LOCKERS; i ++) if(LockerInfo[i][lExists]) lockers++;
  72707. SendClientMessage(playerid, COLOR_NAVYBLUE, "______ Old School Roleplay Stats ______");
  72708. SendClientMessageEx(playerid, COLOR_GREY2, "Connections: %i - Registered: %i - Kill Counter: %i - Death Counter: %i - Hours Played: %i", gConnections, gTotalRegistered, gTotalKills, gTotalDeaths, gTotalHours);
  72709. SendClientMessageEx(playerid, COLOR_GREY2, "Houses: %i/%i - Businesses: %i/%i - Garages: %i/%i - Lands: %i/%i - Vehicles: %i/%i", houses, MAX_HOUSES, businesses, MAX_BUSINESSES, garages, MAX_GARAGES, lands, MAX_LANDS, vehicles, MAX_VEHICLES);
  72710. SendClientMessageEx(playerid, COLOR_GREY2, "Entrances: %i/%i - Turfs: %i/%i - Points: %i/%i - Gangs: %i/%i - Factions: %i/%i - Lockers: %i/%i", entrances, MAX_ENTRANCES, turfs, MAX_TURFS, points, MAX_POINTS, gangs, MAX_GANGS, factions, MAX_FACTIONS, lockers, MAX_LOCKERS);
  72711. SendClientMessageEx(playerid, COLOR_GREY2, "Players Online: %i/%i - Player Record: %i - Record Date: %s - Anticheat Bans: %i", Iter_Count(Player), MAX_PLAYERS, gPlayerRecord, gRecordDate, gAnticheatBans);
  72712. return 1;
  72713. }
  72714. CMD:ww(playerid, params[])
  72715. {
  72716. return callcmd::pw(playerid, params);
  72717. }
  72718. CMD:watch(playerid, params[])
  72719. {
  72720. return callcmd::pw(playerid, params);
  72721. }
  72722. CMD:pw(playerid, params[])
  72723. {
  72724. if(!PlayerData[playerid][pWatch])
  72725. {
  72726. return SendClientMessage(playerid, COLOR_GREY, "You don't have a pocket watch. You can buy one at 24/7.");
  72727. }
  72728. if(!PlayerData[playerid][pWatchOn])
  72729. {
  72730. if(PlayerData[playerid][pToggleTextdraws])
  72731. {
  72732. return SendClientMessage(playerid, COLOR_GREY, "You can't turn on your watch as you have textdraws toggled! (/toggle textdraws)");
  72733. }
  72734. PlayerData[playerid][pWatchOn] = 1;
  72735. TextDrawShowForPlayer(playerid, TimeTD);
  72736. ShowActionBubble(playerid, "* %s turns on their pocket watch.", GetRPName(playerid));
  72737. }
  72738. else
  72739. {
  72740. PlayerData[playerid][pWatchOn] = 0;
  72741. TextDrawHideForPlayer(playerid, TimeTD);
  72742. ShowActionBubble(playerid, "* %s turns off their pocket watch.", GetRPName(playerid));
  72743. }
  72744. return 1;
  72745. }
  72746. CMD:gps(playerid, params[])
  72747. {
  72748. if(!PlayerData[playerid][pGPS])
  72749. {
  72750. return SendClientMessage(playerid, COLOR_GREY, "You don't have a GPS. You can buy one at 24/7.");
  72751. }
  72752. if(!PlayerData[playerid][pGPSOn])
  72753. {
  72754. if(PlayerData[playerid][pToggleTextdraws])
  72755. {
  72756. return SendClientMessage(playerid, COLOR_GREY, "You can't turn on your GPS as you have textdraws toggled! (/toggle textdraws)");
  72757. }
  72758. PlayerData[playerid][pGPSOn] = 1;
  72759. PlayerTextDrawSetString(playerid, PlayerData[playerid][pText][0], "Loading...");
  72760. PlayerTextDrawShow(playerid, PlayerData[playerid][pText][0]);
  72761. ShowActionBubble(playerid, "* %s turns on their GPS.", GetRPName(playerid));
  72762. }
  72763. else
  72764. {
  72765. PlayerData[playerid][pGPSOn] = 0;
  72766. PlayerTextDrawHide(playerid, PlayerData[playerid][pText][0]);
  72767. ShowActionBubble(playerid, "* %s turns off their GPS.", GetRPName(playerid));
  72768. }
  72769. return 1;
  72770. }
  72771. CMD:fixvw(playerid, params[])
  72772. {
  72773. if(PlayerData[playerid][pPaintball] > 0 || PlayerData[playerid][pJoinedEvent] || PlayerData[playerid][pJailType] > 0 || PlayerData[playerid][pDueling] != INVALID_PLAYER_ID)
  72774. {
  72775. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment.");
  72776. }
  72777. if(GetPlayerVirtualWorld(playerid) > 0 && GetPlayerInterior(playerid) == 0)
  72778. {
  72779. SetPlayerVirtualWorld(playerid, 0);
  72780. SendClientMessage(playerid, COLOR_GREY, "Your virtual world has been fixed.");
  72781. }
  72782. else
  72783. {
  72784. SendClientMessage(playerid, COLOR_GREY, "Your virtual world is not bugged at the moment.");
  72785. }
  72786. return 1;
  72787. }
  72788. CMD:stuck(playerid, params[])
  72789. {
  72790. if(PlayerData[playerid][pTazedTime] > 0 || PlayerData[playerid][pInjured] > 0 || PlayerData[playerid][pHospital] > 0 || PlayerData[playerid][pCuffed] > 0 || PlayerData[playerid][pTied] > 0 || PlayerData[playerid][pAcceptedHelp] || PlayerData[playerid][pMiningTime] > 0 || PlayerData[playerid][pFishTime] > 0 || PlayerData[playerid][pLootTime] > 0 || GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CARRY || IsPlayerInAnyVehicle(playerid))
  72791. {
  72792. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment.");
  72793. }
  72794. if(gettime() - PlayerData[playerid][pLastStuck] < 5)
  72795. {
  72796. return SendClientMessageEx(playerid, COLOR_GREY, "You can only use this command every 5 seconds. Please wait %i more seconds.", 5 - (gettime() - PlayerData[playerid][pLastStuck]));
  72797. }
  72798. new
  72799. Float:x,
  72800. Float:y,
  72801. Float:z;
  72802. GetPlayerPos(playerid, x, y, z);
  72803. SetPlayerPos(playerid, x, y, z + 0.5);
  72804. ClearAnimations(playerid);
  72805. TogglePlayerControllable(playerid, 1);
  72806. ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.1, 0, 0, 0, 0, 0, 1);
  72807. SendClientMessage(playerid, COLOR_GREY, "You are no longer stuck.");
  72808. PlayerData[playerid][pLastStuck] = gettime();
  72809. return 1;
  72810. }
  72811. CMD:badge(playerid, params[])
  72812. {
  72813. if(!IsLawEnforcement(playerid) && GetFactionType(playerid) != FACTION_MEDIC && GetFactionType(playerid) != FACTION_GOVERNMENT && GetFactionType(playerid) != FACTION_NEWS)
  72814. {
  72815. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a medic or law enforcer.");
  72816. }
  72817. if(PlayerData[playerid][pTazedTime] > 0 || PlayerData[playerid][pInjured] > 0 || PlayerData[playerid][pHospital] > 0 || PlayerData[playerid][pCuffed] > 0 || PlayerData[playerid][pTied] > 0 || PlayerData[playerid][pJailTime] > 0 || PlayerData[playerid][pJoinedEvent] > 0 || PlayerData[playerid][pPaintball] > 0)
  72818. {
  72819. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment.");
  72820. }
  72821. if(!PlayerData[playerid][pDuty])
  72822. {
  72823. if(PlayerData[playerid][pJoinedEvent] || PlayerData[playerid][pPaintballTeam] >= 0)
  72824. {
  72825. return SendClientMessage(playerid, COLOR_GREY, "You can not put on your badge on while in a event or paintball match.");
  72826. }
  72827. PlayerData[playerid][pDuty] = 1;
  72828. SendClientMessage(playerid, COLOR_WHITE, "You have enabled your badge. Your nametag color now shows for all players.");
  72829. }
  72830. else
  72831. {
  72832. PlayerData[playerid][pDuty] = 0;
  72833. SendClientMessage(playerid, COLOR_WHITE, "You have disabled your badge. Your nametag color no longer shows for any players.");
  72834. }
  72835. return 1;
  72836. }
  72837. CMD:duel(playerid, params[])
  72838. {
  72839. new target1, target2, Float:health, Float:armor, weapon1, weapon2;
  72840. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  72841. {
  72842. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  72843. }
  72844. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  72845. {
  72846. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  72847. }
  72848. if(sscanf(params, "uuffii", target1, target2, health, armor, weapon1, weapon2))
  72849. {
  72850. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /duel [player1] [player2] [health] [armor] [weapon1] [weapon2]");
  72851. }
  72852. if(target1 == INVALID_PLAYER_ID || target2 == INVALID_PLAYER_ID)
  72853. {
  72854. return SendClientMessage(playerid, COLOR_GREY, "Invalid player specified.");
  72855. }
  72856. if(health < 1.0)
  72857. {
  72858. return SendClientMessage(playerid, COLOR_GREY, "Health can't be under 1.0.");
  72859. }
  72860. if(!(0 <= weapon1 <= 46) || !(0 <= weapon2 <= 46))
  72861. {
  72862. return SendClientMessage(playerid, COLOR_GREY, "Invalid weapon. Valid weapon IDs range from 0 to 46.");
  72863. }
  72864. SavePlayerVariables(target1);
  72865. SavePlayerVariables(target2);
  72866. ResetPlayerWeapons(target1);
  72867. ResetPlayerWeapons(target2);
  72868. SetPlayerPos(target1, 1370.3395, -15.4556, 1000.9219);
  72869. SetPlayerPos(target2, 1414.4841, -15.1239, 1000.9253);
  72870. SetPlayerFacingAngle(target1, 270.0000);
  72871. SetPlayerFacingAngle(target2, 90.0000);
  72872. SetPlayerInterior(target1, 1);
  72873. SetPlayerInterior(target2, 1);
  72874. SetPlayerVirtualWorld(target1, 0);
  72875. SetPlayerVirtualWorld(target2, 0);
  72876. SetPlayerHealth(target1, health);
  72877. SetPlayerArmour(target1, armor);
  72878. SetPlayerHealth(target2, health);
  72879. SetPlayerArmour(target2, armor);
  72880. GivePlayerWeaponEx(target1, weapon1, true);
  72881. GivePlayerWeaponEx(target1, weapon2, true);
  72882. GivePlayerWeaponEx(target2, weapon1, true);
  72883. GivePlayerWeaponEx(target2, weapon2, true);
  72884. GameTextForPlayer(target1, "~r~Duel time!", 3000, 3);
  72885. GameTextForPlayer(target2, "~r~Duel time!", 3000, 3);
  72886. PlayerData[target1][pDueling] = target2;
  72887. PlayerData[target2][pDueling] = target1;
  72888. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has forced %s and %s into a duel.", GetRPName(playerid), GetRPName(target1), GetRPName(target2));
  72889. return 1;
  72890. }
  72891. CMD:mole(playerid, params[]) // MADE BY THE ONE AND ONLY Hernandez!
  72892. {
  72893. if(GetFactionType(playerid) != FACTION_HITMAN && PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  72894. {
  72895. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  72896. }
  72897. if(isnull(params))
  72898. {
  72899. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /mole [text]");
  72900. SendClientMessage(playerid, COLOR_YELLOW, "This command sends a SMS to the entire server. Abusing this command will result in heavy punishment.");
  72901. return 1;
  72902. }
  72903. SendClientMessageToAllEx(COLOR_YELLOW, "* SMS from Satan: %s, Ph: 666 *", params);
  72904. return 1;
  72905. }
  72906. CMD:info(playerid, params[])
  72907. {
  72908. return callcmd::information(playerid, params);
  72909. }
  72910. CMD:information(playerid, params[])
  72911. {
  72912. SendClientMessage(playerid, COLOR_NAVYBLUE, "_____ Server Information _____");
  72913. SendClientMessageEx(playerid, COLOR_GREY2, "Website: www.os-rp.net");
  72914. SendClientMessageEx(playerid, COLOR_GREY2, "Discord: www.os-rp.net/discord");
  72915. SendClientMessageEx(playerid, COLOR_GREY2, "UCP: ucp.os-rp.net");
  72916. SendClientMessage(playerid, COLOR_GREY2, "Donate: www.os-rp.net/shop");
  72917. return 1;
  72918. }
  72919. CMD:takecall(playerid, params[])
  72920. {
  72921. new targetid, Float:x, Float:y, Float:z;
  72922. if(!PlayerHasJob(playerid, JOB_MECHANIC) && !PlayerHasJob(playerid, JOB_TAXIDRIVER))
  72923. {
  72924. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command unless you're a Mechanic or Taxi Driver.");
  72925. }
  72926. if(sscanf(params, "u", targetid))
  72927. {
  72928. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /takecall [playerid]");
  72929. }
  72930. if(!IsPlayerConnected(targetid))
  72931. {
  72932. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  72933. }
  72934. if(PlayerHasJob(playerid, JOB_MECHANIC) && PlayerData[targetid][pMechanicCall] > 0)
  72935. {
  72936. if(GetPlayerInterior(targetid))
  72937. {
  72938. return SendClientMessage(playerid, COLOR_GREY, "That player is currently unreachable.");
  72939. }
  72940. PlayerData[targetid][pMechanicCall] = 0;
  72941. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  72942. GetPlayerPos(targetid, x, y, z);
  72943. SetPlayerCheckpoint(playerid, x, y, z, 5.0);
  72944. SendClientMessageEx(playerid, COLOR_AQUA, "* You have accepted %s's mechanic call. Their location was marked on your map.", GetRPName(targetid));
  72945. SendClientMessageEx(targetid, COLOR_AQUA, "* %s has accepted your mechanic call. Please wait patiently until they arrive.", GetRPName(playerid));
  72946. }
  72947. else if(PlayerHasJob(playerid, JOB_TAXIDRIVER) && PlayerData[targetid][pTaxiCall] > 0)
  72948. {
  72949. if(GetPlayerInterior(targetid))
  72950. {
  72951. return SendClientMessage(playerid, COLOR_GREY, "That player is currently unreachable.");
  72952. }
  72953. PlayerData[targetid][pTaxiCall] = 0;
  72954. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  72955. GetPlayerPos(targetid, x, y, z);
  72956. SetPlayerCheckpoint(playerid, x, y, z, 5.0);
  72957. SendClientMessageEx(playerid, COLOR_AQUA, "* You have accepted %s's taxi call. Their location was marked on your map.", GetRPName(targetid));
  72958. SendClientMessageEx(targetid, COLOR_AQUA, "* %s has accepted your taxi call. Please wait patiently until they arrive.", GetRPName(playerid));
  72959. }
  72960. else
  72961. {
  72962. SendClientMessage(playerid, COLOR_GREY, "That player has no calls which can be taken.");
  72963. }
  72964. return 1;
  72965. }
  72966. CMD:listcallers(playerid, params[])
  72967. {
  72968. if(!IsLawEnforcement(playerid) && GetFactionType(playerid) != FACTION_MEDIC)
  72969. {
  72970. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a medic or law enforcer.");
  72971. }
  72972. SendClientMessage(playerid, COLOR_NAVYBLUE, "_____ Emergency Calls _____");
  72973. foreach(new i : Player)
  72974. {
  72975. if((PlayerData[i][pEmergencyCall] > 0) && ((PlayerData[i][pEmergencyType] == FACTION_MEDIC && GetFactionType(playerid) == FACTION_MEDIC) || (PlayerData[i][pEmergencyType] == FACTION_POLICE && IsLawEnforcement(playerid))))
  72976. {
  72977. SendClientMessageEx(playerid, COLOR_GREY2, "* %s[%i] - Expiry: %i seconds - Emergency: %s", GetRPName(i), i, PlayerData[i][pEmergencyCall], PlayerData[i][pEmergency]);
  72978. }
  72979. }
  72980. return 1;
  72981. }
  72982. CMD:trackcall(playerid, params[])
  72983. {
  72984. new targetid, Float:x, Float:y, Float:z;
  72985. if(!IsLawEnforcement(playerid) && GetFactionType(playerid) != FACTION_MEDIC)
  72986. {
  72987. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a medic or law enforcer.");
  72988. }
  72989. if(sscanf(params, "u", targetid))
  72990. {
  72991. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /trackcall [playerid]");
  72992. }
  72993. if(!IsPlayerConnected(targetid))
  72994. {
  72995. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  72996. }
  72997. if(!PlayerData[targetid][pEmergencyCall])
  72998. {
  72999. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't called 911 recently or their call expired.");
  73000. }
  73001. if(!GetPlayerPosEx(targetid, x, y, z))
  73002. {
  73003. return SendClientMessage(playerid, COLOR_GREY, "That player is currently unreachable.");
  73004. }
  73005. //PlayerData[targetid][pEmergencyCall] = 0;
  73006. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  73007. SetPlayerCheckpoint(playerid, x, y, z, 5.0);
  73008. SendClientMessageEx(playerid, COLOR_AQUA, "* You have accepted %s's emergency call. Their location was marked on your map.", GetRPName(targetid));
  73009. if(PlayerData[targetid][pEmergencyCall] == FACTION_MEDIC)
  73010. {
  73011. SendClientMessageEx(targetid, COLOR_AQUA, "* %s has accepted your emergency call. Please wait patiently until they arrive.", GetRPName(playerid));
  73012. }
  73013. return 1;
  73014. }
  73015. CMD:startchat(playerid, params[])
  73016. {
  73017. new targetid;
  73018. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  73019. {
  73020. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  73021. }
  73022. if(sscanf(params, "u", targetid))
  73023. {
  73024. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /startchat [playerid]");
  73025. }
  73026. if(IsPlayerChatActive(playerid))
  73027. {
  73028. return SendClientMessage(playerid, COLOR_GREY, "You are already in an active chat. /invitechat to invite them.");
  73029. }
  73030. if(!IsPlayerConnected(targetid))
  73031. {
  73032. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  73033. }
  73034. if(IsPlayerChatActive(targetid))
  73035. {
  73036. return SendClientMessage(playerid, COLOR_GREY, "That player is in an active chat with another admin.");
  73037. }
  73038. chattingWith[playerid]{targetid} = true;
  73039. chattingWith[targetid]{playerid} = true;
  73040. SendClientMessageEx(targetid, COLOR_YELLOW, "Administrator %s has started a chat with you. /(re)ply to speak with this admin.", GetRPName(playerid));
  73041. SendClientMessageEx(playerid, COLOR_YELLOW, "You have started a chat with %s (ID %i). /(re)ply to speak to the player.", GetRPName(targetid), targetid);
  73042. return 1;
  73043. }
  73044. CMD:invitechat(playerid, params[])
  73045. {
  73046. new targetid;
  73047. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  73048. {
  73049. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  73050. }
  73051. if(sscanf(params, "u", targetid))
  73052. {
  73053. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /invitechat [playerid]");
  73054. }
  73055. if(!IsPlayerChatActive(playerid))
  73056. {
  73057. return SendClientMessage(playerid, COLOR_GREY, "You have not started a chat yet. /startchat to start one.");
  73058. }
  73059. if(!IsPlayerConnected(targetid))
  73060. {
  73061. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  73062. }
  73063. if(IsPlayerChatActive(targetid))
  73064. {
  73065. return SendClientMessage(playerid, COLOR_GREY, "That player is in an active chat with another admin.");
  73066. }
  73067. chattingWith[playerid]{targetid} = true;
  73068. chattingWith[targetid]{playerid} = true;
  73069. SendClientMessageEx(targetid, COLOR_YELLOW, "Administrator %s has invited you to a chat. /(re)ply to speak with them.", GetRPName(playerid));
  73070. SendClientMessageEx(playerid, COLOR_YELLOW, "You have invited %s (ID %i) to your chat.", GetRPName(targetid), targetid);
  73071. return 1;
  73072. }
  73073. CMD:kickchat(playerid, params[])
  73074. {
  73075. new targetid;
  73076. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  73077. {
  73078. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  73079. }
  73080. if(sscanf(params, "u", targetid))
  73081. {
  73082. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /kickchat [playerid]");
  73083. }
  73084. if(!IsPlayerChatActive(playerid))
  73085. {
  73086. return SendClientMessage(playerid, COLOR_GREY, "You have not started a chat yet. /startchat to start one.");
  73087. }
  73088. if(!IsPlayerConnected(targetid))
  73089. {
  73090. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  73091. }
  73092. if(!chattingWith[playerid]{targetid})
  73093. {
  73094. return SendClientMessage(playerid, COLOR_GREY, "That player is currently not in a chat with you.");
  73095. }
  73096. chattingWith[playerid]{targetid} = false;
  73097. chattingWith[targetid]{playerid} = false;
  73098. SendClientMessageEx(targetid, COLOR_YELLOW, "Administrator %s has removed you from the chat.", GetRPName(playerid));
  73099. SendClientMessageEx(playerid, COLOR_YELLOW, "You have removed %s (ID %i) from your chat.", GetRPName(targetid), targetid);
  73100. return 1;
  73101. }
  73102. CMD:endchat(playerid, params[])
  73103. {
  73104. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  73105. {
  73106. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  73107. }
  73108. if(!IsPlayerChatActive(playerid))
  73109. {
  73110. return SendClientMessage(playerid, COLOR_GREY, "You have not started a chat yet. /startchat to start one.");
  73111. }
  73112. foreach(new i : Player)
  73113. {
  73114. if(i == playerid || chattingWith[playerid]{i})
  73115. {
  73116. chattingWith[playerid]{i} = false;
  73117. SendClientMessageEx(i, COLOR_YELLOW, "Administrator %s has ended the chat.", GetRPName(playerid));
  73118. }
  73119. }
  73120. return 1;
  73121. }
  73122. CMD:re(playerid, params[])
  73123. {
  73124. return callcmd::reply(playerid, params);
  73125. }
  73126. CMD:reply(playerid, params[])
  73127. {
  73128. if(isnull(params))
  73129. {
  73130. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /(re)ply [text]");
  73131. }
  73132. if(!IsPlayerChatActive(playerid))
  73133. {
  73134. return SendClientMessage(playerid, COLOR_GREY, "You haven't been invited to any chats by an admin.");
  73135. }
  73136. foreach(new i : Player)
  73137. {
  73138. if(i == playerid || chattingWith[i]{playerid})
  73139. {
  73140. if(PlayerData[playerid][pAdmin] > 1 && PlayerData[playerid][pAdminHide] == 0)
  73141. SendClientMessageEx(i, COLOR_YELLOW, "* %s %s (ID %i): %s *", GetAdminRank(playerid), GetRPName(playerid), playerid, params);
  73142. else
  73143. SendClientMessageEx(i, COLOR_YELLOW, "* Player %s (ID %i): %s *", GetRPName(playerid), playerid, params);
  73144. }
  73145. }
  73146. return 1;
  73147. }
  73148. CMD:gascan(playerid, params[])
  73149. {
  73150. new vehicleid = GetPlayerVehicleID(playerid), amount;
  73151. if(!vehicleid || GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
  73152. {
  73153. return SendClientMessage(playerid, COLOR_GREY, "You must be driving a vehicle to use this command.");
  73154. }
  73155. if(!VehicleHasEngine(vehicleid))
  73156. {
  73157. return SendClientMessage(playerid, COLOR_GREY, "This vehicle has no engine which runs off gas.");
  73158. }
  73159. if(sscanf(params, "i", amount))
  73160. {
  73161. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /gascan [amount]");
  73162. }
  73163. if(amount < 1 || amount > PlayerData[playerid][pGasCan])
  73164. {
  73165. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  73166. }
  73167. if(vehicleFuel[vehicleid] + amount > 100)
  73168. {
  73169. return SendClientMessage(playerid, COLOR_GREY, "You can't add that much gasoline to the vehicle.");
  73170. }
  73171. PlayerData[playerid][pGasCan] -= amount;
  73172. vehicleFuel[vehicleid] += amount;
  73173. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET gascan = %i WHERE uid = %i", PlayerData[playerid][pGasCan], PlayerData[playerid][pID]);
  73174. mysql_tquery(connectionID, queryBuffer);
  73175. ShowActionBubble(playerid, "* %s refills the %s's gas tank with %i liters of gasoline.", GetRPName(playerid), GetVehicleName(vehicleid), amount);
  73176. return 1;
  73177. }
  73178. CMD:robbiz(playerid, params[])
  73179. {
  73180. new bizid;
  73181. if(IsPlayerAdmin(playerid)) // disabled for now
  73182. {
  73183. if(PlayerData[playerid][pRobbingBiz] >= 0)
  73184. {
  73185. return SendClientMessage(playerid, COLOR_GREY, "You're already robbing a business.");
  73186. }
  73187. if((bizid = GetInsideBusiness(playerid)) != -1)
  73188. {
  73189. return SendClientMessage(playerid, COLOR_GREY, "You aren't inside a business that you can rob.");
  73190. }
  73191. if(PlayerData[playerid][pLootTime] > 0)
  73192. {
  73193. return SendClientMessage(playerid, COLOR_GREY, "You are already looting a business.");
  73194. }
  73195. if(PlayerData[playerid][pRobCash] >= 10000)
  73196. {
  73197. return SendClientMessage(playerid, COLOR_GREY, "Your pockets can't hold more than $10,000 of money!");
  73198. }
  73199. PlayerData[playerid][pRobbingBiz] = bizid;
  73200. PlayerData[playerid][pLootTime] = 5;
  73201. }
  73202. return 1;
  73203. }
  73204. CMD:stoprobbery(playerid, params[])
  73205. {
  73206. if(PlayerData[playerid][pRobbingBiz] < 0)
  73207. {
  73208. return SendClientMessage(playerid, COLOR_GREY, "You aren't actively robbing a business.");
  73209. }
  73210. if(GetInsideBusiness(playerid) != PlayerData[playerid][pRobbingBiz])
  73211. {
  73212. return SendClientMessage(playerid, COLOR_GREY, "You aren't inside the business you were robbing.");
  73213. }
  73214. PlayerData[playerid][pRobbingBiz] = -1;
  73215. PlayerData[playerid][pCP] = CHECKPOINT_ROBBERY;
  73216. SendClientMessageEx(playerid, COLOR_AQUA, "You have robbed a total of %s. You need to get this cash immediately to the {FF6347}marker{33CCFF} before the cops catch you!", FormatNumber(PlayerData[playerid][pRobCash]));
  73217. SetPlayerCheckpoint(playerid, 1429.9939, 1066.9581, 9.8938, 3.0);
  73218. return 1;
  73219. }
  73220. CMD:robbank(playerid, params[])
  73221. {
  73222. new count;
  73223. if(PlayerData[playerid][pLevel] < 7)
  73224. {
  73225. return SendClientMessage(playerid, COLOR_GREY, "You must be at least level 7+ to use this command.");
  73226. }
  73227. if(!IsPlayerInRangeOfPoint(playerid, 20.0, 1667.4260, -972.6691, 683.6873))
  73228. {
  73229. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the bank.");
  73230. }
  73231. if(RobberyInfo[rTime] > 0)
  73232. {
  73233. return SendClientMessageEx(playerid, COLOR_GREY, "The bank can be robbed again in %i hours. You can't rob it now.", RobberyInfo[rTime]);
  73234. }
  73235. if(RobberyInfo[rPlanning])
  73236. {
  73237. return SendClientMessage(playerid, COLOR_GREY, "There is a bank robbery being planned already. Ask the leader to join.");
  73238. }
  73239. if(RobberyInfo[rStarted])
  73240. {
  73241. return SendClientMessage(playerid, COLOR_GREY, "You can't rob the bank as a robbery has already started.");
  73242. }
  73243. if(IsLawEnforcement(playerid))
  73244. {
  73245. return SendClientMessage(playerid, COLOR_GREY, "You can't rob the bank as a law enforcer. Ask your boss for a raise.");
  73246. }
  73247. foreach(new i : Player)
  73248. {
  73249. if(IsLawEnforcement(i) && !PlayerData[i][pAdminDuty])
  73250. {
  73251. count++;
  73252. }
  73253. }
  73254. if(count < 5)
  73255. {
  73256. return SendClientMessage(playerid, COLOR_GREY, "There needs to be at least 5+ LEO online in order to rob the bank.");
  73257. }
  73258. RobberyInfo[rRobbers][0] = playerid;
  73259. RobberyInfo[rPlanning] = 1;
  73260. PlayerData[playerid][pCP] = CHECKPOINT_MISC;
  73261. SetPlayerCheckpoint(playerid, 1677.2610, -987.6659, 671.1152, 2.0);
  73262. SendClientMessage(playerid, COLOR_AQUA, "You have setup a {FF6347}bank robbery{33CCFF}. You need to /robinvite at least 2 more people in order to begin the heist.");
  73263. SendClientMessage(playerid, COLOR_AQUA, "After you've found two additional heisters, you can use /bombvault at the checkpoint to blow the vault.");
  73264. return 1;
  73265. }
  73266. CMD:robinvite(playerid, params[])
  73267. {
  73268. new targetid;
  73269. if(sscanf(params, "u", targetid))
  73270. {
  73271. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /robinvite [playerid]");
  73272. }
  73273. if(!(RobberyInfo[rPlanning] && RobberyInfo[rRobbers][0] == playerid))
  73274. {
  73275. return SendClientMessage(playerid, COLOR_GREY, "You are currently not planning a bank robbery.");
  73276. }
  73277. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  73278. {
  73279. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  73280. }
  73281. if(targetid == playerid)
  73282. {
  73283. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command on yourself.");
  73284. }
  73285. if(IsPlayerInBankRobbery(targetid))
  73286. {
  73287. return SendClientMessage(playerid, COLOR_GREY, "That player is already in the robbery with you.");
  73288. }
  73289. if(GetBankRobbers() >= MAX_BANK_ROBBERS)
  73290. {
  73291. return SendClientMessageEx(playerid, COLOR_GREY, "You can't have more than %i bank robbers in this robbery.", MAX_BANK_ROBBERS);
  73292. }
  73293. if(IsLawEnforcement(targetid))
  73294. {
  73295. return SendClientMessage(playerid, COLOR_GREY, "You can't invite law enforcement to rob the bank.");
  73296. }
  73297. PlayerData[targetid][pRobberyOffer] = playerid;
  73298. SendClientMessageEx(targetid, COLOR_AQUA, "* %s has invited you to a bank robbery. (/accept robbery)", GetRPName(playerid));
  73299. SendClientMessageEx(playerid, COLOR_AQUA, "* You have invited %s to join your bank robbery.", GetRPName(targetid));
  73300. return 1;
  73301. }
  73302. CMD:bombvault(playerid, params[])
  73303. {
  73304. if(RobberyInfo[rPlanning] == 0 && RobberyInfo[rRobbers][0] != playerid)
  73305. {
  73306. return SendClientMessage(playerid, COLOR_GREY, "You are currently not planning a bank robbery.");
  73307. }
  73308. if(GetBankRobbers() < 3)
  73309. {
  73310. return SendClientMessage(playerid, COLOR_GREY, "You need at least two other heisters in your robbery.");
  73311. }
  73312. if(!IsPlayerInRangeOfPoint(playerid, 3.0, 1677.2610, -987.6659, 671.1152))
  73313. {
  73314. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the vault.");
  73315. }
  73316. if(IsValidDynamicObject(RobberyInfo[rObjects][1]))
  73317. {
  73318. return SendClientMessage(playerid, COLOR_GREY, "The vault is already being bombed at the moment.");
  73319. }
  73320. RobberyInfo[rObjects][1] = CreateDynamicObject(1654, 1677.787475, -988.009765, 671.625366, 0.000000, 0.000000, 180.680709);
  73321. ShowActionBubble(playerid, "* %s firmly plants an explosive on the vault door.", GetRPName(playerid));
  73322. SendClientMessage(playerid, COLOR_WHITE, "* Bomb planted. Shoot at the bomb to blow that sumbitch' up!");
  73323. return 1;
  73324. }
  73325. CMD:lootbox(playerid, params[])
  73326. {
  73327. if(!IsPlayerInBankRobbery(playerid))
  73328. {
  73329. return SendClientMessage(playerid, COLOR_GREY, "You are not in an active bank robbery.");
  73330. }
  73331. if(!RobberyInfo[rStarted])
  73332. {
  73333. return SendClientMessage(playerid, COLOR_GREY, "The bank robbery hasn't started yet.");
  73334. }
  73335. if(!IsPlayerInRangeOfPoint(playerid, 3.0, 1680.2344, -994.6146, 671.0032) && !IsPlayerInRangeOfPoint(playerid, 3.0, 1680.2335, -998.6115, 671.0032) && !IsPlayerInRangeOfPoint(playerid, 3.0, 1680.2344, -1002.5356, 671.0032) && !IsPlayerInRangeOfPoint(playerid, 3.0, 1674.2708, -998.4954, 671.0032) && !IsPlayerInRangeOfPoint(playerid, 3.0, 1674.2708, -994.5173, 671.0032))
  73336. {
  73337. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the deposit boxes.");
  73338. }
  73339. if(PlayerData[playerid][pLootTime] > 0)
  73340. {
  73341. return SendClientMessage(playerid, COLOR_GREY, "You are already looting a deposit box.");
  73342. }
  73343. if(PlayerData[playerid][pRobCash] >= 100000)
  73344. {
  73345. return SendClientMessage(playerid, COLOR_GREY, "Your pockets can't hold more than $100,000 of money!");
  73346. }
  73347. if(!IsPlayerInBankRobbery(playerid))
  73348. {
  73349. return SendClientMessage(playerid, COLOR_GREY, "You are not apart of this bank robbery.");
  73350. }
  73351. PlayerData[playerid][pLootTime] = 5;
  73352. ApplyAnimation(playerid, "BOMBER", "BOM_Plant_Loop", 4.1, 1, 0, 0, 0, 0, 1);
  73353. GameTextForPlayer(playerid, "~w~Looting deposit box...", 5000, 3);
  73354. return 1;
  73355. }
  73356. CMD:robbers(playerid, params[])
  73357. {
  73358. if(!RobberyInfo[rStarted] && !IsPlayerInBankRobbery(playerid))
  73359. {
  73360. return SendClientMessage(playerid, COLOR_GREY, "There is no bank robbery currently active.");
  73361. }
  73362. SendClientMessage(playerid, COLOR_NAVYBLUE, "______ Robbers Alive ______");
  73363. foreach(new i : Player)
  73364. {
  73365. if(IsPlayerInBankRobbery(i))
  73366. {
  73367. SendClientMessageEx(playerid, COLOR_GREY2, "(ID: %i) %s {00AA00}(%s stolen)", i, GetRPName(i), FormatNumber(PlayerData[i][pRobCash]));
  73368. }
  73369. }
  73370. return 1;
  73371. }
  73372. CMD:motd(playerid, params[])
  73373. {
  73374. if(!isnull(gServerMOTD))
  73375. {
  73376. SendClientMessageEx(playerid, COLOR_YELLOW, "* MOTD: %s", gServerMOTD);
  73377. }
  73378. if(!isnull(adminMOTD) && PlayerData[playerid][pAdmin] > 0)
  73379. {
  73380. SendClientMessageEx(playerid, COLOR_LIGHTRED, "* Admin MOTD: %s", adminMOTD);
  73381. }
  73382. if(!isnull(helperMOTD) && (PlayerData[playerid][pHelper] > 0 || PlayerData[playerid][pAdmin] > 0))
  73383. {
  73384. SendClientMessageEx(playerid, COLOR_AQUA, "* Helper MOTD: %s", helperMOTD);
  73385. }
  73386. if(PlayerData[playerid][pGang] >= 0 && strcmp(GangInfo[PlayerData[playerid][pGang]][gMOTD], "None", true) != 0)
  73387. {
  73388. SendClientMessageEx(playerid, COLOR_YELLOW, "* Gang MOTD: %s", GangInfo[PlayerData[playerid][pGang]][gMOTD]);
  73389. }
  73390. if(PlayerData[playerid][pFaction] >= 0 && strcmp(FactionInfo[PlayerData[playerid][pFaction]][fMOTD], "None", true) != 0)
  73391. {
  73392. SendClientMessageEx(playerid, COLOR_YELLOW, "* Faction MOTD: %s", FactionInfo[PlayerData[playerid][pFaction]][fMOTD]);
  73393. }
  73394. return 1;
  73395. } // LEONE - ERROR ALERT, STILL WORKING ON THIS.
  73396. CMD:createlocation(playerid, params[])
  73397. {
  73398. new name[32], Float:x, Float:y, Float:z;
  73399. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pDynamicAdmin])
  73400. {
  73401. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  73402. }
  73403. if(sscanf(params, "s[32]", name))
  73404. {
  73405. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /createlocation [name]");
  73406. SendClientMessage(playerid, COLOR_WHITE, "* NOTE: The location will be created at the coordinates you are standing on.");
  73407. return 1;
  73408. }
  73409. if(GetPlayerInterior(playerid) != 0 || GetPlayerVirtualWorld(playerid) != 0)
  73410. {
  73411. return SendClientMessage(playerid, COLOR_GREY, "Your virtual world & interior must be 0!");
  73412. }
  73413. GetPlayerPos(playerid, x, y, z);
  73414. for(new i = 0; i < MAX_LOCATIONS; i ++)
  73415. {
  73416. if(!LocationInfo[i][locExists])
  73417. {
  73418. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO locations VALUES(null, '%e', '%f', '%f', '%f')", name, x, y, z);
  73419. mysql_tquery(connectionID, queryBuffer, "OnAdminCreateLocation", "iisfff", playerid, i, name, x, y, z);
  73420. return 1;
  73421. }
  73422. }
  73423. SendClientMessage(playerid, COLOR_GREY, "Location slots are currently full. Ask developers to increase the internal limit.");
  73424. return 1;
  73425. }
  73426. CMD:createatm(playerid, params[])
  73427. {
  73428. if (PlayerData[playerid][pAdmin] < 5)
  73429. {
  73430. return SendErrorMessage(playerid, "You are not privileged to use this command.");
  73431. }
  73432. else if (GetNearbyAtm(playerid) != -1)
  73433. {
  73434. return SendErrorMessage(playerid, "There is another ATM nearby.");
  73435. }
  73436. else
  73437. {
  73438. new
  73439. Float:x,
  73440. Float:y,
  73441. Float:z,
  73442. Float:angle,
  73443. id = -1;
  73444. GetPlayerPos(playerid, x, y, z);
  73445. GetPlayerFacingAngle(playerid, angle);
  73446. x += 2.0 * floatsin(-angle, degrees);
  73447. y += 2.0 * floatcos(-angle, degrees);
  73448. id = AddATMMachine(x, y, z, angle, GetPlayerInterior(playerid), GetPlayerVirtualWorld(playerid));
  73449. if (id == -1)
  73450. {
  73451. return SendErrorMessage(playerid, "There are no available ATM slots.");
  73452. }
  73453. else
  73454. {
  73455. EditDynamicObjectEx(playerid, EDIT_TYPE_ATM, ATM[id][atmObject], id);
  73456. SendInfoMessage(playerid, "You have added ATM machine %i (/editatm).", id);
  73457. }
  73458. }
  73459. return 1;
  73460. }
  73461. CMD:gotoatm(playerid, params[])
  73462. {
  73463. new id;
  73464. if (PlayerData[playerid][pAdmin] < 5)
  73465. {
  73466. return SendErrorMessage(playerid, "You are not privileged to use this command.");
  73467. }
  73468. else if (sscanf(params, "i", id))
  73469. {
  73470. return SendSyntaxMessage(playerid, "/gotoatm (machine ID)");
  73471. }
  73472. else if (!IsValidATMID(id))
  73473. {
  73474. return SendErrorMessage(playerid, "You have specified an invalid ATM machine.");
  73475. }
  73476. else
  73477. {
  73478. TeleportToCoords(playerid, ATM[id][atmSpawn][0], ATM[id][atmSpawn][1], ATM[id][atmSpawn][2], ATM[id][atmSpawn][3], ATM[id][atmInterior], ATM[id][atmWorld]);
  73479. SendInfoMessage(playerid, "You have teleported to ATM machine %i.", id);
  73480. }
  73481. return 1;
  73482. }
  73483. CMD:editatm(playerid, params[])
  73484. {
  73485. new id;
  73486. if (PlayerData[playerid][pAdmin] < 5)
  73487. {
  73488. return SendErrorMessage(playerid, "You are not privileged to use this command.");
  73489. }
  73490. else if (sscanf(params, "i", id))
  73491. {
  73492. return SendSyntaxMessage(playerid, "/editatm (machine ID)");
  73493. }
  73494. else if (!IsValidATMID(id))
  73495. {
  73496. return SendErrorMessage(playerid, "You have specified an invalid ATM machine.");
  73497. }
  73498. else
  73499. {
  73500. EditDynamicObjectEx(playerid, EDIT_TYPE_ATM, ATM[id][atmObject], id);
  73501. SendInfoMessage(playerid, "Click on the disk icon to save changes.");
  73502. }
  73503. return 1;
  73504. }
  73505. CMD:deleteatm(playerid, params[])
  73506. {
  73507. new id;
  73508. if (PlayerData[playerid][pAdmin] < 5)
  73509. {
  73510. return SendErrorMessage(playerid, "You are not privileged to use this command.");
  73511. }
  73512. else if (sscanf(params, "i", id))
  73513. {
  73514. return SendSyntaxMessage(playerid, "/deleteatm (machine ID)");
  73515. }
  73516. else if (!IsValidATMID(id))
  73517. {
  73518. return SendErrorMessage(playerid, "You have specified an invalid ATM machine.");
  73519. }
  73520. else
  73521. {
  73522. DestroyDynamic3DTextLabel(ATM[id][atmText]);
  73523. DestroyDynamicObject(ATM[id][atmObject]);
  73524. format(queryBuffer, sizeof(queryBuffer), "DELETE FROM rp_atms WHERE `atmID` = %i", ATM[id][atmID]);
  73525. mysql_tquery(connectionID, queryBuffer);
  73526. ATM[id][atmExists] = 0;
  73527. SendInfoMessage(playerid, "You have deleted ATM %i.", id);
  73528. }
  73529. return 1;
  73530. }
  73531. CMD:removelocation(playerid, params[])
  73532. {
  73533. new loc;
  73534. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pDynamicAdmin])
  73535. {
  73536. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  73537. }
  73538. if(sscanf(params, "i", loc))
  73539. {
  73540. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /removelocation [locationid]");
  73541. }
  73542. if(!(0 <= loc < MAX_LOCATIONS) || !LocationInfo[loc][locExists])
  73543. {
  73544. return SendClientMessage(playerid, COLOR_GREY, "Invalid location.");
  73545. }
  73546. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM locations WHERE id = %i", LocationInfo[loc][locID]);
  73547. mysql_tquery(connectionID, queryBuffer);
  73548. LocationInfo[loc][locName][0] = EOS;
  73549. LocationInfo[loc][locExists] = false;
  73550. LocationInfo[loc][locID] = 0;
  73551. SendClientMessageEx(playerid, COLOR_AQUA, "* You have removed location %i.", loc);
  73552. return 1;
  73553. }
  73554. CMD:createlocker(playerid, params[])
  73555. {
  73556. new factionid, Float:x, Float:y, Float:z;
  73557. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pFactionMod])
  73558. {
  73559. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  73560. }
  73561. if(sscanf(params, "i", factionid))
  73562. {
  73563. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /createlocker [factionid]");
  73564. }
  73565. if(!(0 <= factionid < MAX_FACTIONS) || FactionInfo[factionid][fType] == FACTION_NONE)
  73566. {
  73567. return SendClientMessage(playerid, COLOR_GREY, "Invalid faction.");
  73568. }
  73569. GetPlayerPos(playerid, x, y, z);
  73570. for(new i = 0; i < MAX_LOCKERS; i ++)
  73571. {
  73572. if(!LockerInfo[i][lExists])
  73573. {
  73574. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO factionlockers (factionid, pos_x, pos_y, pos_z, interior, world) VALUES(%i, '%f', '%f', '%f', %i, %i)", factionid, x, y, z, GetPlayerInterior(playerid), GetPlayerVirtualWorld(playerid));
  73575. mysql_tquery(connectionID, queryBuffer, "OnAdminCreateLocker", "iiifffii", playerid, i, factionid, x, y, z, GetPlayerInterior(playerid), GetPlayerVirtualWorld(playerid));
  73576. return 1;
  73577. }
  73578. }
  73579. SendClientMessage(playerid, COLOR_GREY, "Locker slots are currently full. Ask developers to increase the internal limit.");
  73580. return 1;
  73581. }
  73582. CMD:editland(playerid, params[])
  73583. {
  73584. new landid, option[32], param[32];
  73585. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pDynamicAdmin])
  73586. {
  73587. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  73588. }
  73589. if(sscanf(params, "is[32]S()[32]", landid, option, param))
  73590. {
  73591. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editland [landid] [option]");
  73592. SendClientMessage(playerid, COLOR_GREY, "OPTIONS: Price, Level, Height, Owner");
  73593. return 1;
  73594. }
  73595. if(!strcmp(option, "price", true))
  73596. {
  73597. new value;
  73598. if(sscanf(param, "i", value))
  73599. {
  73600. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /editland [%i] [%s] [value]", landid, option);
  73601. }
  73602. if(!(1<= value <= 100000000))
  73603. {
  73604. return SendClientMessageEx(playerid, COLOR_SYNTAX, "Value cannot be less than 1 or more than 100M");
  73605. }
  73606. LandInfo[landid][lPrice] = value;
  73607. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE lands SET price = %i WHERE id = %i", value, LandInfo[landid][lID]);
  73608. mysql_tquery(connectionID, queryBuffer);
  73609. SendClientMessageEx(playerid, COLOR_AQUA, "* You set land %i's price to %i.", landid, value);
  73610. ReloadLand(landid);
  73611. }
  73612. else if(!strcmp(option, "level", true))
  73613. {
  73614. new value;
  73615. if(sscanf(param, "i", value))
  73616. {
  73617. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /editland [%i] [%s] [value]", landid, option);
  73618. }
  73619. if(!(1 <= value <= 3))
  73620. {
  73621. return SendClientMessage(playerid, COLOR_SYNTAX, "Land levels cannot be below 0 or more than 3");
  73622. }
  73623. LandInfo[landid][lLevel] = value;
  73624. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE lands SET level = %i WHERE id = %i", value, LandInfo[landid][lID]);
  73625. mysql_tquery(connectionID, queryBuffer);
  73626. SendClientMessageEx(playerid, COLOR_AQUA, "* You set land %i's price to %i.", landid, value);
  73627. ReloadLand(landid);
  73628. }
  73629. else if(!strcmp(option, "height", true))
  73630. {
  73631. if(sscanf(param, "s", "confirm"))
  73632. {
  73633. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /editland [%i] [%s] [confirm]", landid, option);
  73634. }
  73635. GetPlayerPos(playerid, LandInfo[landid][lHeightX], LandInfo[landid][lHeightY], LandInfo[landid][lHeightZ]);
  73636. // LandInfo[landid][lPickup] = zCoord[1]; We need this, land pickup, when you create a land at height it will create a pickup like house pickup.
  73637. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE lands SET heightx = %f, heighty = %f, heightz = %f WHERE id = %i", LandInfo[landid][lHeightX], LandInfo[landid][lHeightY], LandInfo[landid][lHeightZ], LandInfo[landid][lID]);
  73638. mysql_tquery(connectionID, queryBuffer);
  73639. SendClientMessageEx(playerid, COLOR_AQUA, "* You have land %i's (height) pos to your current height Pos (%f %f %f).", landid, LandInfo[landid][lHeightX], LandInfo[landid][lHeightY], LandInfo[landid][lHeightZ]);
  73640. ReloadLand(landid);
  73641. }
  73642. else if(!strcmp(option, "owner", true))
  73643. {
  73644. new targetid;
  73645. if(sscanf(param, "u", targetid))
  73646. {
  73647. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /editland [%i] [%s] [value]", landid, option);
  73648. }
  73649. SetLandOwner(landid, targetid);
  73650. SendClientMessageEx(playerid, COLOR_AQUA, "* You set land %i's owner to %s.", landid, GetRPName(targetid));
  73651. ReloadLand(landid);
  73652. }
  73653. return 1;
  73654. }
  73655. CMD:editlocker(playerid, params[])
  73656. {
  73657. new lockerid, option[32], param[32];
  73658. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pFactionMod])
  73659. {
  73660. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  73661. }
  73662. if(sscanf(params, "is[32]S()[32]", lockerid, option, param))
  73663. {
  73664. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editlocker [lockerid] [option]");
  73665. SendClientMessage(playerid, COLOR_GREY, "OPTIONS: Position, FactionID, Icon, Label, Weapons");
  73666. return 1;
  73667. }
  73668. if(!(0 <= lockerid < MAX_LOCKERS) || !LockerInfo[lockerid][lExists])
  73669. {
  73670. return SendClientMessage(playerid, COLOR_GREY, "Invalid locker.");
  73671. }
  73672. if(!strcmp(option, "position", true))
  73673. {
  73674. GetPlayerPos(playerid, LockerInfo[lockerid][lPosX], LockerInfo[lockerid][lPosY], LockerInfo[lockerid][lPosZ]);
  73675. LockerInfo[lockerid][lInterior] = GetPlayerInterior(playerid);
  73676. LockerInfo[lockerid][lWorld] = GetPlayerVirtualWorld(playerid);
  73677. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factionlockers SET pos_x = '%f', pos_y = '%f', pos_z = '%f', interior = %i, world = %i WHERE id = %i", LockerInfo[lockerid][lPosX], LockerInfo[lockerid][lPosY], LockerInfo[lockerid][lPosZ], LockerInfo[lockerid][lInterior], LockerInfo[lockerid][lWorld], LockerInfo[lockerid][lID]);
  73678. mysql_tquery(connectionID, queryBuffer);
  73679. SendClientMessageEx(playerid, COLOR_AQUA, "* You have moved locker %i to your position.", lockerid);
  73680. ReloadLocker(lockerid);
  73681. }
  73682. else if(!strcmp(option, "factionid", true))
  73683. {
  73684. new value;
  73685. if(sscanf(param, "i", value))
  73686. {
  73687. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /editlocker [%i] [%s] [value]", lockerid, option);
  73688. }
  73689. LockerInfo[lockerid][lFaction] = value;
  73690. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factionlockers SET factionid = %i WHERE id = %i", LockerInfo[lockerid][lFaction], LockerInfo[lockerid][lID]);
  73691. mysql_tquery(connectionID, queryBuffer);
  73692. SendClientMessageEx(playerid, COLOR_AQUA, "* You set locker %i's faction to %i.", lockerid, value);
  73693. ReloadLocker(lockerid);
  73694. }
  73695. else if(!strcmp(option, "icon", true))
  73696. {
  73697. new iconid;
  73698. if(sscanf(param, "i", iconid))
  73699. {
  73700. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editlocker [lockerid] [icon] [iconid (19300 = hide)]");
  73701. }
  73702. if(!IsValidModel(iconid))
  73703. {
  73704. return SendClientMessage(playerid, COLOR_GREY, "Invalid model ID.");
  73705. }
  73706. LockerInfo[lockerid][lIcon] = iconid;
  73707. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factionlockers SET iconid = %i WHERE id = %i", LockerInfo[lockerid][lIcon], LockerInfo[lockerid][lID]);
  73708. mysql_tquery(connectionID, queryBuffer);
  73709. ReloadLocker(lockerid);
  73710. SendClientMessageEx(playerid, COLOR_AQUA, "* You've changed the pickup icon model of locker %i to %i.", lockerid, iconid);
  73711. }
  73712. else if(!strcmp(option, "label", true))
  73713. {
  73714. new status;
  73715. if(sscanf(param, "i", status) || !(0 <= status <= 1))
  73716. {
  73717. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editlocker [lockerid] [label] [0/1]");
  73718. }
  73719. LockerInfo[lockerid][lLabel] = status;
  73720. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factionlockers SET label = %i WHERE id = %i", LockerInfo[lockerid][lLabel], LockerInfo[lockerid][lID]);
  73721. mysql_tquery(connectionID, queryBuffer);
  73722. ReloadLocker(lockerid);
  73723. if(status)
  73724. SendClientMessageEx(playerid, COLOR_AQUA, "* You've enabled the 3D text label for locker %i.", lockerid);
  73725. else
  73726. SendClientMessageEx(playerid, COLOR_AQUA, "* You've disabled the 3D text label for locker %i.", lockerid);
  73727. }
  73728. else if(!strcmp(option, "weapons", true))
  73729. {
  73730. if(FactionInfo[LockerInfo[lockerid][lFaction]][fType] == FACTION_HITMAN)
  73731. {
  73732. return SendClientMessage(playerid, COLOR_GREY, "Weapons for hitman agency lockers cannot be edited in-game.");
  73733. }
  73734. new inputtext[24], opt2[8], amount;
  73735. if(sscanf(param, "s[24]s[8]i", inputtext, opt2, amount))
  73736. {
  73737. SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /editlocker [lockerid] [weapons] [weaponname] [option] [amount]");
  73738. SendClientMessage(playerid, COLOR_GREEN, "Weapon Name: Kevlar, Medkit, Nitestick, Mace, Deagle, Shotgun, M4, MP5, Spas12, Sniper, Camera, FireExt, Painkillers");
  73739. SendClientMessage(playerid, COLOR_YELLOW, "Options: Allow, Price");
  73740. SendClientMessage(playerid, COLOR_ORANGE, "Amount: Price (amount), Allow (1 or 0)");
  73741. return 1;
  73742. }
  73743. if(!strcmp(opt2, "allow", true))
  73744. {
  73745. if(!(0 <= amount <= 1)) return SendClientMessage(playerid, COLOR_GREY, "Amount can be 1 or 0");
  73746. if(!strcmp(inputtext, "Kevlar", true))
  73747. {
  73748. LockerInfo[lockerid][locKevlar][0] = amount;
  73749. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factionlockers SET weapon_kevlar = %i WHERE id = %i", LockerInfo[lockerid][locKevlar][0], LockerInfo[lockerid][lID]);
  73750. mysql_tquery(connectionID, queryBuffer);
  73751. }
  73752. else if(!strcmp(inputtext, "Medkit", true))
  73753. {
  73754. LockerInfo[lockerid][locMedKit][0] = amount;
  73755. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factionlockers SET weapon_medkit = %i WHERE id = %i", LockerInfo[lockerid][locMedKit][0], LockerInfo[lockerid][lID]);
  73756. mysql_tquery(connectionID, queryBuffer);
  73757. }
  73758. else if(!strcmp(inputtext, "Nitestick", true))
  73759. {
  73760. LockerInfo[lockerid][locNitestick][0] = amount;
  73761. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factionlockers SET weapon_nitestick = %i WHERE id = %i", LockerInfo[lockerid][locNitestick][0], LockerInfo[lockerid][lID]);
  73762. mysql_tquery(connectionID, queryBuffer);
  73763. }
  73764. else if(!strcmp(inputtext, "Mace", true))
  73765. {
  73766. LockerInfo[lockerid][locMace][0] = amount;
  73767. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factionlockers SET weapon_mace = %i WHERE id = %i", LockerInfo[lockerid][locMace][0], LockerInfo[lockerid][lID]);
  73768. mysql_tquery(connectionID, queryBuffer);
  73769. }
  73770. else if(!strcmp(inputtext, "Deagle", true))
  73771. {
  73772. LockerInfo[lockerid][locDeagle][0] = amount;
  73773. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factionlockers SET weapon_deagle = %i WHERE id = %i", LockerInfo[lockerid][locDeagle][0], LockerInfo[lockerid][lID]);
  73774. mysql_tquery(connectionID, queryBuffer);
  73775. }
  73776. else if(!strcmp(inputtext, "Shotgun", true))
  73777. {
  73778. LockerInfo[lockerid][locShotgun][0] = amount;
  73779. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factionlockers SET weapon_shotgun = %i WHERE id = %i", LockerInfo[lockerid][locShotgun][0], LockerInfo[lockerid][lID]);
  73780. mysql_tquery(connectionID, queryBuffer);
  73781. }
  73782. else if(!strcmp(inputtext, "MP5", true))
  73783. {
  73784. LockerInfo[lockerid][locMP5][0] = amount;
  73785. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factionlockers SET weapon_mp5 = %i WHERE id = %i", LockerInfo[lockerid][locMP5][0], LockerInfo[lockerid][lID]);
  73786. mysql_tquery(connectionID, queryBuffer);
  73787. }
  73788. else if(!strcmp(inputtext, "M4", true))
  73789. {
  73790. LockerInfo[lockerid][locM4][0] = amount;
  73791. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factionlockers SET weapon_m4 = %i WHERE id = %i", LockerInfo[lockerid][locM4][0], LockerInfo[lockerid][lID]);
  73792. mysql_tquery(connectionID, queryBuffer);
  73793. }
  73794. else if(!strcmp(inputtext, "Spas12", true))
  73795. {
  73796. LockerInfo[lockerid][locSpas12][0] = amount;
  73797. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factionlockers SET weapon_spas12 = %i WHERE id = %i", LockerInfo[lockerid][locSpas12][0], LockerInfo[lockerid][lID]);
  73798. mysql_tquery(connectionID, queryBuffer);
  73799. }
  73800. else if(!strcmp(inputtext, "Sniper", true))
  73801. {
  73802. LockerInfo[lockerid][locSniper][0] = amount;
  73803. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factionlockers SET weapon_sniper = %i WHERE id = %i", LockerInfo[lockerid][locSniper][0], LockerInfo[lockerid][lID]);
  73804. mysql_tquery(connectionID, queryBuffer);
  73805. }
  73806. else if(!strcmp(inputtext, "Camera", true))
  73807. {
  73808. LockerInfo[lockerid][locCamera][0] = amount;
  73809. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factionlockers SET weapon_camera = %i WHERE id = %i", LockerInfo[lockerid][locCamera][0], LockerInfo[lockerid][lID]);
  73810. mysql_tquery(connectionID, queryBuffer);
  73811. }
  73812. else if(!strcmp(inputtext, "FireExt", true))
  73813. {
  73814. LockerInfo[lockerid][locFireExt][0] = amount;
  73815. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factionlockers SET weapon_fire_extinguisher = %i WHERE id = %i", LockerInfo[lockerid][locFireExt][0], LockerInfo[lockerid][lID]);
  73816. mysql_tquery(connectionID, queryBuffer);
  73817. }
  73818. else if(!strcmp(inputtext, "Painkillers", true))
  73819. {
  73820. LockerInfo[lockerid][locPainKillers][0] = amount;
  73821. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factionlockers SET weapon_painkillers = %i WHERE id = %i", LockerInfo[lockerid][locPainKillers][0], LockerInfo[lockerid][lID]);
  73822. mysql_tquery(connectionID, queryBuffer);
  73823. }
  73824. SendClientMessageEx(playerid, COLOR_GREY, "Locker %i's %s status set to %i", lockerid, inputtext, amount);
  73825. }
  73826. else if(!strcmp(opt2, "price", true))
  73827. {
  73828. if(!strcmp(inputtext, "Kevlar", true))
  73829. {
  73830. LockerInfo[lockerid][locKevlar][1] = amount;
  73831. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factionlockers SET price_kevlar = %i WHERE id = %i", LockerInfo[lockerid][locKevlar], LockerInfo[lockerid][lID]);
  73832. mysql_tquery(connectionID, queryBuffer);
  73833. }
  73834. else if(!strcmp(inputtext, "Medkit", true))
  73835. {
  73836. LockerInfo[lockerid][locMedKit][1] = amount;
  73837. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factionlockers SET price_medkit = %i WHERE id = %i", LockerInfo[lockerid][locMedKit], LockerInfo[lockerid][lID]);
  73838. mysql_tquery(connectionID, queryBuffer);
  73839. }
  73840. else if(!strcmp(inputtext, "Nitestick", true))
  73841. {
  73842. LockerInfo[lockerid][locNitestick][1] = amount;
  73843. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factionlockers SET price_nitestick = %i WHERE id = %i", LockerInfo[lockerid][locNitestick][1], LockerInfo[lockerid][lID]);
  73844. mysql_tquery(connectionID, queryBuffer);
  73845. }
  73846. else if(!strcmp(inputtext, "Mace", true))
  73847. {
  73848. LockerInfo[lockerid][locMace][1] = amount;
  73849. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factionlockers SET price_mace = %i WHERE id = %i", LockerInfo[lockerid][locMace][1], LockerInfo[lockerid][lID]);
  73850. mysql_tquery(connectionID, queryBuffer);
  73851. }
  73852. else if(!strcmp(inputtext, "Deagle", true))
  73853. {
  73854. LockerInfo[lockerid][locDeagle][1] = amount;
  73855. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factionlockers SET price_deagle = %i WHERE id = %i", LockerInfo[lockerid][locDeagle][1], LockerInfo[lockerid][lID]);
  73856. mysql_tquery(connectionID, queryBuffer);
  73857. }
  73858. else if(!strcmp(inputtext, "Shotgun", true))
  73859. {
  73860. LockerInfo[lockerid][locShotgun][1] = amount;
  73861. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factionlockers SET price_shotgun = %i WHERE id = %i", LockerInfo[lockerid][locShotgun][1], LockerInfo[lockerid][lID]);
  73862. mysql_tquery(connectionID, queryBuffer);
  73863. }
  73864. else if(!strcmp(inputtext, "MP5", true))
  73865. {
  73866. LockerInfo[lockerid][locMP5][1] = amount;
  73867. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factionlockers SET price_mp5 = %i WHERE id = %i", LockerInfo[lockerid][locMP5][1], LockerInfo[lockerid][lID]);
  73868. mysql_tquery(connectionID, queryBuffer);
  73869. }
  73870. else if(!strcmp(inputtext, "M4", true))
  73871. {
  73872. LockerInfo[lockerid][locM4][1] = amount;
  73873. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factionlockers SET price_m4 = %i WHERE id = %i", LockerInfo[lockerid][locM4][1], LockerInfo[lockerid][lID]);
  73874. mysql_tquery(connectionID, queryBuffer);
  73875. }
  73876. else if(!strcmp(inputtext, "Spas12", true))
  73877. {
  73878. LockerInfo[lockerid][locSpas12][1] = amount;
  73879. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factionlockers SET price_spas12 = %i WHERE id = %i", LockerInfo[lockerid][locSpas12][1], LockerInfo[lockerid][lID]);
  73880. mysql_tquery(connectionID, queryBuffer);
  73881. }
  73882. else if(!strcmp(inputtext, "Sniper", true))
  73883. {
  73884. LockerInfo[lockerid][locSniper][1] = amount;
  73885. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factionlockers SET price_sniper = %i WHERE id = %i", LockerInfo[lockerid][locSniper][1], LockerInfo[lockerid][lID]);
  73886. mysql_tquery(connectionID, queryBuffer);
  73887. }
  73888. else if(!strcmp(inputtext, "Camera", true))
  73889. {
  73890. LockerInfo[lockerid][locCamera][1] = amount;
  73891. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factionlockers SET price_camera = %i WHERE id = %i", LockerInfo[lockerid][locCamera][1], LockerInfo[lockerid][lID]);
  73892. mysql_tquery(connectionID, queryBuffer);
  73893. }
  73894. else if(!strcmp(inputtext, "FireExt", true))
  73895. {
  73896. LockerInfo[lockerid][locFireExt][1] = amount;
  73897. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factionlockers SET price_fire_extinguisher = %i WHERE id = %i", LockerInfo[lockerid][locFireExt][1], LockerInfo[lockerid][lID]);
  73898. mysql_tquery(connectionID, queryBuffer);
  73899. }
  73900. else if(!strcmp(inputtext, "Painkillers", true))
  73901. {
  73902. LockerInfo[lockerid][locPainKillers][1] = amount;
  73903. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factionlockers SET price_painkillers = %i WHERE id = %i", LockerInfo[lockerid][locPainKillers][1], LockerInfo[lockerid][lID]);
  73904. mysql_tquery(connectionID, queryBuffer);
  73905. }
  73906. SendClientMessageEx(playerid, COLOR_GREY, "Locker %i's %s price set to %i", lockerid, inputtext, amount);
  73907. }
  73908. }
  73909. return 1;
  73910. }
  73911. CMD:removelocker(playerid, params[])
  73912. {
  73913. new lockerid;
  73914. if(PlayerData[playerid][pAdmin] < ASST_MANAGEMENT && !PlayerData[playerid][pFactionMod])
  73915. {
  73916. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  73917. }
  73918. if(sscanf(params, "i", lockerid))
  73919. {
  73920. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /removelocker [lockerid]");
  73921. }
  73922. if(!(0 <= lockerid < MAX_LOCKERS) || !LockerInfo[lockerid][lExists])
  73923. {
  73924. return SendClientMessage(playerid, COLOR_GREY, "Invalid locker.");
  73925. }
  73926. DestroyDynamic3DTextLabel(LockerInfo[lockerid][lText]);
  73927. DestroyDynamicPickup(LockerInfo[lockerid][lPickup]);
  73928. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM factionlockers WHERE id = %i", LockerInfo[lockerid][lID]);
  73929. mysql_tquery(connectionID, queryBuffer);
  73930. LockerInfo[lockerid][lExists] = 0;
  73931. LockerInfo[lockerid][lID] = 0;
  73932. SendClientMessageEx(playerid, COLOR_AQUA, "* You have removed locker %i.", lockerid);
  73933. return 1;
  73934. }
  73935. CMD:gotolocker(playerid, params[])
  73936. {
  73937. new lockerid;
  73938. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  73939. {
  73940. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  73941. }
  73942. if(!PlayerData[playerid][pAdminDuty] && PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  73943. {
  73944. return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty.");
  73945. }
  73946. if(sscanf(params, "i", lockerid))
  73947. {
  73948. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /gotolocker [lockerid]");
  73949. }
  73950. if(!(0 <= lockerid < MAX_LOCKERS) || !LockerInfo[lockerid][lExists])
  73951. {
  73952. return SendClientMessage(playerid, COLOR_GREY, "Invalid locker.");
  73953. }
  73954. GameTextForPlayer(playerid, "~w~Teleported", 5000, 1);
  73955. SetPlayerPos(playerid, LockerInfo[lockerid][lPosX], LockerInfo[lockerid][lPosY], LockerInfo[lockerid][lPosZ]);
  73956. SetPlayerInterior(playerid, LockerInfo[lockerid][lInterior]);
  73957. SetPlayerVirtualWorld(playerid, LockerInfo[lockerid][lWorld]);
  73958. SetCameraBehindPlayer(playerid);
  73959. return 1;
  73960. }
  73961. CMD:namehistory(playerid, params[])
  73962. {
  73963. new targetid;
  73964. if(PlayerData[playerid][pAdmin] < GENERAL_ADMIN)
  73965. {
  73966. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  73967. }
  73968. if(sscanf(params, "u", targetid))
  73969. {
  73970. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /namehistory [playerid]");
  73971. }
  73972. if(!IsPlayerConnected(targetid))
  73973. {
  73974. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  73975. }
  73976. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM log_namehistory WHERE uid = %i ORDER BY id DESC", PlayerData[targetid][pID]);
  73977. mysql_tquery(connectionID, queryBuffer, "OnAdminCheckNameHistory", "ii", playerid, targetid);
  73978. return 1;
  73979. }
  73980. CMD:unmute(playerid, params[])
  73981. {
  73982. new string[128];
  73983. if(isnull(params))
  73984. {
  73985. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /unmute [newbie | report | global]");
  73986. }
  73987. if(!strcmp(params, "newbie", true))
  73988. {
  73989. if(!PlayerData[playerid][pNewbieMuted])
  73990. {
  73991. return SendClientMessage(playerid, COLOR_GREY, "You are not muted from the newbie chat.");
  73992. }
  73993. if(PlayerData[playerid][pNewbieMuteTime] > gettime())
  73994. {
  73995. return SendClientMessageEx(playerid, COLOR_GREY, "You need to wait at least %i minutes before requesting an unmute.", (PlayerData[playerid][pNewbieMuteTime] - gettime()) / 60);
  73996. }
  73997. format(string, sizeof(string), "Fine ($%i)\n10 Minute Jail", percent(PlayerData[playerid][pCash]+PlayerData[playerid][pBank], 5));
  73998. Dialog_Show(playerid, DIALOG_NEWBIEUNMUTE, DIALOG_STYLE_LIST, "Choose your punishment for this unmute.", string, "Select", "Cancel");
  73999. }
  74000. else if(!strcmp(params, "report", true))
  74001. {
  74002. if(!PlayerData[playerid][pReportMuted])
  74003. {
  74004. return SendClientMessage(playerid, COLOR_GREY, "You are not muted from submitting reports.");
  74005. }
  74006. if(PlayerData[playerid][pReportMuted] <= 12)
  74007. {
  74008. return SendClientMessageEx(playerid, COLOR_GREY, "Your report mute is not indefinite and expires in %i playing hours.", PlayerData[playerid][pReportMuted]);
  74009. }
  74010. if(PlayerData[playerid][pReportMuteTime] > gettime())
  74011. {
  74012. return SendClientMessageEx(playerid, COLOR_GREY, "You need to wait at least %i minutes before requesting an unmute.", (PlayerData[playerid][pReportMuteTime] - gettime()) / 60);
  74013. }
  74014. format(string, sizeof(string), "Fine ($%i)\n10 Minute Jail", percent(PlayerData[playerid][pCash]+PlayerData[playerid][pBank], 5));
  74015. Dialog_Show(playerid, DIALOG_REPORTUNMUTE, DIALOG_STYLE_LIST, "Choose your punishment for this unmute.", string, "Select", "Cancel");
  74016. }
  74017. else if(!strcmp(params, "global", true))
  74018. {
  74019. if(!PlayerData[playerid][pGlobalMuted])
  74020. {
  74021. return SendClientMessage(playerid, COLOR_GREY, "You are not muted from the global chat.");
  74022. }
  74023. if(PlayerData[playerid][pGlobalMuteTime] > gettime())
  74024. {
  74025. return SendClientMessageEx(playerid, COLOR_GREY, "You need to wait at least %i minutes before requesting an unmute.", (PlayerData[playerid][pGlobalMuteTime] - gettime()) / 60);
  74026. }
  74027. format(string, sizeof(string), "Fine ($%i)\n10 Minute Jail", percent(PlayerData[playerid][pCash]+PlayerData[playerid][pBank], 5));
  74028. Dialog_Show(playerid, DIALOG_GLOBALUNMUTE, DIALOG_STYLE_LIST, "Choose your punishment for this unmute.", string, "Select", "Cancel");
  74029. }
  74030. return 1;
  74031. }
  74032. CMD:ahide(playerid, params[])
  74033. {
  74034. if(PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  74035. {
  74036. return 0;
  74037. }
  74038. if(!PlayerData[playerid][pAdminHide])
  74039. {
  74040. PlayerData[playerid][pAdminHide] = 1;
  74041. SendClientMessage(playerid, COLOR_AQUA, "You are now hidden in /admins and your admin rank no longer shows in /a, /g or /o.");
  74042. }
  74043. else
  74044. {
  74045. PlayerData[playerid][pAdminHide] = 0;
  74046. SendClientMessage(playerid, COLOR_AQUA, "You are no longer hidden as an administrator.");
  74047. }
  74048. return 1;
  74049. }
  74050. CMD:breakin(playerid, params[])
  74051. {
  74052. new vehicleid = GetNearbyVehicle(playerid);
  74053. if(PlayerData[playerid][pTazedTime] > 0 || PlayerData[playerid][pInjured] > 0 || PlayerData[playerid][pHospital] > 0 || PlayerData[playerid][pCuffed] > 0 || PlayerData[playerid][pTied] > 0 || PlayerData[playerid][pJoinedEvent] > 0 || PlayerData[playerid][pPaintball] > 0)
  74054. {
  74055. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment.");
  74056. }
  74057. if(IsPlayerInAnyVehicle(playerid))
  74058. {
  74059. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command from within the vehicle.");
  74060. }
  74061. if(vehicleid == INVALID_VEHICLE_ID)
  74062. {
  74063. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any vehicle.");
  74064. }
  74065. if(VehicleInfo[vehicleid][vOwnerID] == 0)
  74066. {
  74067. return SendClientMessage(playerid, COLOR_GREY, "You may only break into a player owned vehicle.");
  74068. }
  74069. if(VehicleInfo[vehicleid][vLocked] == 0)
  74070. {
  74071. return SendClientMessage(playerid, COLOR_GREY, "This vehicle is unlocked. Therefore you can't break into it.");
  74072. }
  74073. if(PlayerData[playerid][pLockBreak] == vehicleid)
  74074. {
  74075. return SendClientMessage(playerid, COLOR_GREY, "You are already attempting to break into this vehicle.");
  74076. }
  74077. /*if(!VehicleHasDoors(vehicleid))
  74078. {
  74079. return SendClientMessage(playerid, COLOR_GREY, "This vehicle cannot be broken into.");
  74080. }*/
  74081. if(IsVehicleOwner(playerid, vehicleid))
  74082. {
  74083. //return SendClientMessage(playerid, COLOR_GREY, "Why would you want to break into your own vehicle?");
  74084. }
  74085. if(IsVehicleBeingPicked(vehicleid))
  74086. {
  74087. return SendClientMessage(playerid, COLOR_GREY, "This vehicle is already being broken into by someone else.");
  74088. }
  74089. PlayerData[playerid][pLockBreak] = vehicleid;
  74090. PlayerData[playerid][pLockHealth] = 1000.0;
  74091. SendClientMessage(playerid, COLOR_AQUA, "You have started the {FF6347}break-in{33CCFF} process. Start hitting the driver or passenger side door to break it down.");
  74092. SendClientMessage(playerid, COLOR_AQUA, "You can use your fists for this job, however melee weapons are preferred and gets the job done faster.");
  74093. return 1;
  74094. }
  74095. CMD:breakcuffs(playerid, params[])
  74096. {
  74097. static
  74098. userid;
  74099. if (sscanf(params, "u", userid))
  74100. return SendClientMessage(playerid, COLOR_GREY, "Usage: /breakcuffs [playerid/name]");
  74101. if (PlayerData[playerid][pCrowbar] == 0)
  74102. return SendClientMessageEx(playerid, COLOR_GREY, "You don't have a crowbar.");
  74103. if (userid == INVALID_PLAYER_ID || !IsPlayerInRangeOfPlayer(playerid, userid, 6.0))
  74104. return SendClientMessageEx(playerid, COLOR_GREY, "The specified player is disconnected or not near you.");
  74105. if (!PlayerData[userid][pCuffed])
  74106. return SendClientMessageEx(playerid, COLOR_GREY, "The specified player is not cuffed.");
  74107. if (userid == playerid)
  74108. return SendClientMessageEx(playerid, COLOR_GREY, "You can't pick your own handcuffs.");
  74109. SetTimerEx("BreakCuffs", 3000, false, "dd", playerid, userid);
  74110. SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "* %s attempts to pick the cuffs with a crowbar.", GetRPName(playerid));
  74111. return 1;
  74112. }
  74113. forward BreakCuffs(playerid, userid);
  74114. public BreakCuffs(playerid, userid)
  74115. {
  74116. if (random(2))
  74117. {
  74118. SendClientMessageEx(playerid, COLOR_GREEN, "You have failed to pick the cuffs.");
  74119. SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "* %s has failed to pick the cuffs.", GetRPName(playerid));
  74120. }
  74121. else
  74122. {
  74123. PlayerData[userid][pCuffed] = 0;
  74124. SetPlayerSpecialAction(userid, SPECIAL_ACTION_NONE);
  74125. SendClientMessage(playerid, COLOR_GREEN, "You have picked the cuffs.");
  74126. SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "* %s has picked the cuffs from %s's wrists.", GetRPName(playerid), GetRPName(userid));
  74127. }
  74128. return 1;
  74129. }
  74130. CMD:dropcar(playerid, params[])
  74131. {
  74132. new vehicleid = GetPlayerVehicleID(playerid);
  74133. if(PlayerData[playerid][pThiefCooldown] > 0)
  74134. {
  74135. return SendClientMessageEx(playerid, COLOR_GREY, "You need to wait %i more seconds before dropping off another car.", PlayerData[playerid][pThiefCooldown]);
  74136. }
  74137. if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
  74138. {
  74139. return SendClientMessage(playerid, COLOR_GREY, "You are not driving any vehicle.");
  74140. }
  74141. if(IsVehicleOwner(playerid, vehicleid) || PlayerData[playerid][pVehicleKeys] == vehicleid)
  74142. {
  74143. return SendClientMessage(playerid, COLOR_GREY, "You can't drop off a vehicle that belongs to you.");
  74144. }
  74145. if(!GetVehicleCranePrice(vehicleid))
  74146. {
  74147. return SendClientMessage(playerid, COLOR_GREY, "This vehicle isn't worth anything. Therefore you can't sell it.");
  74148. }
  74149. if(PlayerData[playerid][pCP] != CHECKPOINT_NONE)
  74150. {
  74151. return SendClientMessage(playerid, COLOR_GREY, "You have an active checkpoint already. /killcp to cancel it.");
  74152. }
  74153. if(VehicleInfo[vehicleid][vID] > 0 && IsPointInRangeOfPoint(VehicleInfo[vehicleid][vPosX], VehicleInfo[vehicleid][vPosY], VehicleInfo[vehicleid][vPosZ], 600.0, 2695.8010, -2226.6643, 13.5501))
  74154. {
  74155. return SendClientMessage(playerid, COLOR_GREY, "This vehicle is parked too close to the crane.");
  74156. }
  74157. if(!IsPlayerInRangeOfPoint(playerid, 300.0, 2695.8010, -2226.6643, 13.5501))
  74158. {
  74159. PlayerData[playerid][pDropTime] = gettime();
  74160. }
  74161. PlayerData[playerid][pCP] = CHECKPOINT_DROPCAR;
  74162. SendClientMessage(playerid, COLOR_AQUA, "Navigate to the {FF6347}checkpoint{33CCFF} at the crane to drop off your vehicle.");
  74163. SetPlayerCheckpoint(playerid, 2695.8010, -2226.6643, 13.5501, 5.0);
  74164. return 1;
  74165. }
  74166. CMD:carvalue(playerid, params[])
  74167. {
  74168. new vehicleid = GetPlayerVehicleID(playerid);
  74169. if(!vehicleid)
  74170. {
  74171. return SendClientMessage(playerid, COLOR_GREY, "You need to be in a vehicle to use this command.");
  74172. }
  74173. if(IsVehicleOwner(playerid, vehicleid) || PlayerData[playerid][pVehicleKeys] == vehicleid)
  74174. {
  74175. //return SendClientMessage(playerid, COLOR_GREY, "This vehicle belongs to you. It's not worth anything.");
  74176. }
  74177. if(!GetVehicleCranePrice(vehicleid))
  74178. {
  74179. return SendClientMessage(playerid, COLOR_GREY, "This vehicle isn't worth anything.");
  74180. }
  74181. SendClientMessage(playerid, COLOR_NAVYBLUE, "_____ Car Value _____");
  74182. SendClientMessageEx(playerid, COLOR_GREY2, "Name: %s", GetVehicleName(vehicleid));
  74183. if(GetVehicleCranePrice(vehicleid, false) == GetVehicleCranePrice(vehicleid))
  74184. {
  74185. SendClientMessageEx(playerid, COLOR_GREY2, "Value: {00AA00}$%i", GetVehicleCranePrice(vehicleid));
  74186. }
  74187. else
  74188. {
  74189. SendClientMessageEx(playerid, COLOR_GREY2, "Value: {00AA00}$%i", GetVehicleCranePrice(vehicleid, false));
  74190. if(VehicleInfo[vehicleid][vOwnerID] > 0)
  74191. {
  74192. if(VehicleInfo[vehicleid][vNeon] != 0)
  74193. {
  74194. SendClientMessage(playerid, COLOR_GREY2, "Neon: {00AA00}+$1000");
  74195. }
  74196. if(VehicleInfo[vehicleid][vAlarm] != 0)
  74197. {
  74198. SendClientMessageEx(playerid, COLOR_GREY2, "Alarm: {00AA00}+$%i", VehicleInfo[vehicleid][vAlarm] * 500);
  74199. }
  74200. if(VehicleInfo[vehicleid][vTrunk] != 0)
  74201. {
  74202. SendClientMessageEx(playerid, COLOR_GREY2, "Trunk: {00AA00}+$%i", VehicleInfo[vehicleid][vTrunk] * 250);
  74203. }
  74204. }
  74205. SendClientMessageEx(playerid, COLOR_GREY2, "Total Value: {00AA00}$%i", GetVehicleCranePrice(vehicleid));
  74206. }
  74207. return 1;
  74208. }
  74209. CMD:cracktrunk(playerid, params[])
  74210. {
  74211. new vehicleid = GetNearbyVehicle(playerid);
  74212. if(PlayerData[playerid][pCocaineCooldown] > 0)
  74213. {
  74214. return SendClientMessageEx(playerid, COLOR_GREY, "You need to wait %i more seconds before cracking into another trunk.", PlayerData[playerid][pCocaineCooldown]);
  74215. }
  74216. if(vehicleid == INVALID_VEHICLE_ID || !IsPlayerInRangeOfBoot(playerid, vehicleid))
  74217. {
  74218. return SendClientMessage(playerid, COLOR_GREY, "You need to be close to a vehicle's trunk.");
  74219. }
  74220. if(IsPlayerInAnyVehicle(playerid))
  74221. {
  74222. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command from inside the vehicle.");
  74223. }
  74224. if(IsVehicleOwner(playerid, vehicleid))
  74225. {
  74226. return SendClientMessage(playerid, COLOR_GREY, "You can't crack the trunk on your own vehicle.");
  74227. }
  74228. if(VehicleInfo[vehicleid][vOwnerID] == 0)
  74229. {
  74230. return SendClientMessage(playerid, COLOR_GREY, "You can only crack into a player owned vehicle's trunk.");
  74231. }
  74232. if(VehicleInfo[vehicleid][vLocked])
  74233. {
  74234. return SendClientMessage(playerid, COLOR_GREY, "This vehicle is locked. /breakin to attempt to unlock it.");
  74235. }
  74236. if(PlayerData[playerid][pCocaineTrunk] != INVALID_VEHICLE_ID)
  74237. {
  74238. return SendClientMessage(playerid, COLOR_GREY, "You are already cracking a trunk at the moment. Leave the area to cancel.");
  74239. }
  74240. PlayerData[playerid][pCocaineTrunk] = vehicleid;
  74241. ShowActionBubble(playerid, "* %s begins to pry open the trunk of the %s.", GetRPName(playerid), GetVehicleName(vehicleid));
  74242. SendClientMessageEx(playerid, COLOR_WHITE, "* This will take about %i seconds. Do not move during the process.", PlayerData[playerid][pCocaineTime]);
  74243. return 1;
  74244. }
  74245. CMD:achievements(playerid, params[])
  74246. {
  74247. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM achievements WHERE uid = %i", PlayerData[playerid][pID]);
  74248. mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LIST_ACHIEVEMENTS, playerid);
  74249. return 1;
  74250. }
  74251. CMD:buyinsurance(playerid, params[])
  74252. {
  74253. if(!IsPlayerInRangeOfPoint(playerid, 3.0, -2323.3250,110.9966,-5.3942))
  74254. {
  74255. return SendClientMessage(playerid, COLOR_GREY, "You are not in any of the hospitals.");
  74256. }
  74257. if(PlayerData[playerid][pCash] < 2000)
  74258. {
  74259. return SendClientMessage(playerid, COLOR_GREY, "You can't afford insurance.");
  74260. }
  74261. switch(GetPlayerVirtualWorld(playerid))
  74262. {
  74263. case HOSPITAL_COUNTY:
  74264. {
  74265. if(PlayerData[playerid][pInsurance] == HOSPITAL_COUNTY)
  74266. {
  74267. return SendClientMessage(playerid, COLOR_GREY, "You are already insured at this hospital.");
  74268. }
  74269. GivePlayerCash(playerid, -2000);
  74270. GameTextForPlayer(playerid, "~r~-$2000", 5000, 1);
  74271. SendClientMessage(playerid, COLOR_AQUA, "You paid $2000 for insurance at {FF8282}County General{33CCFF}. You will now spawn here after death.");
  74272. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET insurance = %i WHERE uid = %i", HOSPITAL_COUNTY, PlayerData[playerid][pID]);
  74273. mysql_tquery(connectionID, queryBuffer);
  74274. PlayerData[playerid][pInsurance] = HOSPITAL_COUNTY;
  74275. }
  74276. case HOSPITAL_ALLSAINTS:
  74277. {
  74278. if(PlayerData[playerid][pInsurance] == HOSPITAL_ALLSAINTS)
  74279. {
  74280. return SendClientMessage(playerid, COLOR_GREY, "You are already insured at this hospital.");
  74281. }
  74282. GivePlayerCash(playerid, -2000);
  74283. GameTextForPlayer(playerid, "~r~-$2000", 5000, 1);
  74284. SendClientMessage(playerid, COLOR_AQUA, "You paid $2000 for insurance at {FF8282}All Saints Hospital{33CCFF}. You will now spawn here after death.");
  74285. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET insurance = %i WHERE uid = %i", HOSPITAL_ALLSAINTS, PlayerData[playerid][pID]);
  74286. mysql_tquery(connectionID, queryBuffer);
  74287. PlayerData[playerid][pInsurance] = HOSPITAL_ALLSAINTS;
  74288. }
  74289. }
  74290. return 1;
  74291. }
  74292. CMD:tie(playerid, params[])
  74293. {
  74294. new targetid;
  74295. if(sscanf(params, "u", targetid))
  74296. {
  74297. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /tie [playerid]");
  74298. }
  74299. if(PlayerData[playerid][pRope] <= 0)
  74300. {
  74301. return SendClientMessage(playerid, COLOR_GREY, "You don't have any ropes left.");
  74302. }
  74303. if(!IsPlayerInAnyVehicle(playerid))
  74304. {
  74305. return SendClientMessage(playerid, COLOR_GREY, "You are not inside of any vehicle.");
  74306. }
  74307. if(!IsPlayerConnected(targetid) || !IsPlayerInVehicle(targetid, GetPlayerVehicleID(playerid)))
  74308. {
  74309. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected, or is not in your vehicle.");
  74310. }
  74311. if(GetPlayerState(targetid) == PLAYER_STATE_DRIVER)
  74312. {
  74313. return SendClientMessage(playerid, COLOR_GREY, "You can't tie up the driver.");
  74314. }
  74315. if(targetid == playerid)
  74316. {
  74317. return SendClientMessage(playerid, COLOR_GREY, "You can't tie yourself.");
  74318. }
  74319. if(PlayerData[targetid][pTied])
  74320. {
  74321. return SendClientMessage(playerid, COLOR_GREY, "That player is already tied. /untie to free them.");
  74322. }
  74323. if(PlayerData[targetid][pAcceptedHelp])
  74324. {
  74325. return SendClientMessage(playerid, COLOR_GREY, "You can't tie a helper who is assisting someone.");
  74326. }
  74327. if(PlayerData[targetid][pAdminDuty])
  74328. {
  74329. return SendClientMessage(playerid, COLOR_GREY, "You can't tie an on duty administrator.");
  74330. }
  74331. if(PlayerData[playerid][pHurt])
  74332. {
  74333. return SendClientMessageEx(playerid, COLOR_GREY, "You're too hurt to tie anyone. Please wait %i seconds before trying again.", PlayerData[playerid][pHurt]);
  74334. }
  74335. PlayerData[playerid][pRope]--;
  74336. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET rope = %i WHERE uid = %i", PlayerData[playerid][pRope], PlayerData[playerid][pID]);
  74337. mysql_tquery(connectionID, queryBuffer);
  74338. GameTextForPlayer(targetid, "~r~Tied", 3000, 3);
  74339. ShowActionBubble(playerid, "* %s ties %s with a rope.", GetRPName(playerid), GetRPName(targetid));
  74340. TogglePlayerControllable(targetid, 0);
  74341. PlayerData[targetid][pTied] = 1;
  74342. return 1;
  74343. }
  74344. CMD:blindfold(playerid, params[])
  74345. {
  74346. new targetid;
  74347. if(sscanf(params, "u", targetid))
  74348. {
  74349. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /blindfold [playerid]");
  74350. }
  74351. if(PlayerData[playerid][pBlindfold] <= 0)
  74352. {
  74353. return SendClientMessage(playerid, COLOR_GREY, "You don't have any blindfolds left.");
  74354. }
  74355. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  74356. {
  74357. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  74358. }
  74359. if(targetid == playerid)
  74360. {
  74361. return SendClientMessage(playerid, COLOR_GREY, "You can't blindfold yourself.");
  74362. }
  74363. if(!PlayerData[targetid][pTied])
  74364. {
  74365. return SendClientMessage(playerid, COLOR_GREY, "The player specified is not tied.");
  74366. }
  74367. if(PlayerData[targetid][pBlinded])
  74368. {
  74369. return SendClientMessage(playerid, COLOR_GREY, "That player is already blindfolded.");
  74370. }
  74371. if(PlayerData[playerid][pHurt])
  74372. {
  74373. return SendClientMessageEx(playerid, COLOR_GREY, "You're too hurt to blindfold anyone. Please wait %i seconds before trying again.", PlayerData[playerid][pHurt]);
  74374. }
  74375. PlayerData[playerid][pBlindfold]--;
  74376. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET blindfold = %i WHERE uid = %i", PlayerData[playerid][pBlindfold], PlayerData[playerid][pID]);
  74377. mysql_tquery(connectionID, queryBuffer);
  74378. TextDrawShowForPlayer(targetid, Blind);
  74379. GameTextForPlayer(targetid, "~r~Blindfolded", 3000, 3);
  74380. ShowActionBubble(playerid, "* %s blindfolds %s with a piece of rag.", GetRPName(playerid), GetRPName(targetid));
  74381. PlayerData[targetid][pBlinded] = 1;
  74382. return 1;
  74383. }
  74384. CMD:removeblindfold(playerid, params[])
  74385. {
  74386. new targetid;
  74387. if(sscanf(params, "u", targetid))
  74388. {
  74389. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /removeblindfold [playerid]");
  74390. }
  74391. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  74392. {
  74393. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  74394. }
  74395. if(targetid == playerid && PlayerData[playerid][pTied])
  74396. {
  74397. return SendClientMessage(playerid, COLOR_GREY, "You can't remove your own blindfold while tied.");
  74398. }
  74399. if(!PlayerData[targetid][pBlinded])
  74400. {
  74401. return SendClientMessage(playerid, COLOR_GREY, "That player is not blindfolded.");
  74402. }
  74403. if(PlayerData[playerid][pHurt])
  74404. {
  74405. return SendClientMessageEx(playerid, COLOR_GREY, "You're too hurt to remove anyone's blindfold. Please wait %i seconds before trying again.", PlayerData[playerid][pHurt]);
  74406. }
  74407. TextDrawHideForPlayer(targetid, Blind);
  74408. ShowActionBubble(playerid, "* %s removes the blindfold from %s.", GetRPName(playerid), GetRPName(targetid));
  74409. PlayerData[targetid][pBlinded] = 0;
  74410. return 1;
  74411. }
  74412. CMD:untie(playerid, params[])
  74413. {
  74414. new targetid;
  74415. if(sscanf(params, "u", targetid))
  74416. {
  74417. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /untie [playerid]");
  74418. }
  74419. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0))
  74420. {
  74421. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  74422. }
  74423. if(targetid == playerid)
  74424. {
  74425. return SendClientMessage(playerid, COLOR_GREY, "You can't untie yourself.");
  74426. }
  74427. if(!PlayerData[targetid][pTied])
  74428. {
  74429. return SendClientMessage(playerid, COLOR_GREY, "That player is not tied.");
  74430. }
  74431. if(IsPlayerInAnyVehicle(targetid) && !IsPlayerInVehicle(playerid, GetPlayerVehicleID(targetid)))
  74432. {
  74433. return SendClientMessage(playerid, COLOR_GREY, "You must be in that player's vehicle in order to untie them.");
  74434. }
  74435. if(PlayerData[playerid][pHurt])
  74436. {
  74437. return SendClientMessageEx(playerid, COLOR_GREY, "You're too hurt to untie anyone. Please wait %i seconds before trying again.", PlayerData[playerid][pHurt]);
  74438. }
  74439. GameTextForPlayer(targetid, "~g~Untied", 3000, 3);
  74440. ShowActionBubble(playerid, "* %s unties the rope from %s.", GetRPName(playerid), GetRPName(targetid));
  74441. TogglePlayerControllable(targetid, 1);
  74442. PlayerData[targetid][pTied] = 0;
  74443. return 1;
  74444. }
  74445. CMD:repaircar(playerid, params[])
  74446. {
  74447. new entranceid = GetNearbyEntrance(playerid);
  74448. if(entranceid == -1 || EntranceInfo[entranceid][eType] != 2)
  74449. {
  74450. return SendClientMessage(playerid, COLOR_GREY, "You aren't nearby any repairshops.");
  74451. }
  74452. if(EntranceInfo[entranceid][eAdminLevel] && PlayerData[playerid][pAdmin] < EntranceInfo[entranceid][eAdminLevel])
  74453. {
  74454. return SendClientMessage(playerid, COLOR_GREY, "Your administrator level is too low to repair here.");
  74455. }
  74456. if(EntranceInfo[entranceid][eFactionType] > 0 && GetFactionType(playerid) != EntranceInfo[entranceid][eFactionType])
  74457. {
  74458. return SendClientMessage(playerid, COLOR_GREY, "This command is restricted to a specific faction type.");
  74459. }
  74460. if(EntranceInfo[entranceid][eGang] >= 0 && EntranceInfo[entranceid][eGang] != PlayerData[playerid][pGang])
  74461. {
  74462. return SendClientMessage(playerid, COLOR_GREY, "This command is restricted to a specific gang type.");
  74463. }
  74464. if(EntranceInfo[entranceid][eVIP] && PlayerData[playerid][pDonator] < EntranceInfo[entranceid][eVIP])
  74465. {
  74466. return SendClientMessage(playerid, COLOR_GREY, "This command is restricted to a higher VIP level.");
  74467. }
  74468. if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
  74469. {
  74470. return SendClientMessage(playerid, COLOR_GREY, "You aren't driving a vehicle.");
  74471. }
  74472. RepairVehicle(GetPlayerVehicleID(playerid));
  74473. SendClientMessage(playerid, COLOR_GREY, "Your vehicle was repaired.");
  74474. return 1;
  74475. }
  74476. CMD:offerduel(playerid, params[])
  74477. {
  74478. new entranceid = GetInsideEntrance(playerid), targetid;
  74479. if(entranceid == -1 || EntranceInfo[entranceid][eType] != 1)
  74480. {
  74481. return SendClientMessage(playerid, COLOR_GREY, "You are not inside of a duel arena.");
  74482. }
  74483. if(EntranceInfo[entranceid][eAdminLevel] && PlayerData[playerid][pAdmin] < EntranceInfo[entranceid][eAdminLevel])
  74484. {
  74485. return SendClientMessage(playerid, COLOR_GREY, "Your administrator level is too low to initiate duels here.");
  74486. }
  74487. if(EntranceInfo[entranceid][eFactionType] > 0 && GetFactionType(playerid) != EntranceInfo[entranceid][eFactionType])
  74488. {
  74489. return SendClientMessage(playerid, COLOR_GREY, "This command is restricted to a specific faction type.");
  74490. }
  74491. if(EntranceInfo[entranceid][eGang] >= 0 && EntranceInfo[entranceid][eGang] != PlayerData[playerid][pGang])
  74492. {
  74493. return SendClientMessage(playerid, COLOR_GREY, "This command is restricted to a specific gang type.");
  74494. }
  74495. if(EntranceInfo[entranceid][eVIP] && PlayerData[playerid][pDonator] < EntranceInfo[entranceid][eVIP])
  74496. {
  74497. return SendClientMessage(playerid, COLOR_GREY, "This command is restricted to a higher VIP level.");
  74498. }
  74499. if(sscanf(params, "u", targetid))
  74500. {
  74501. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /offerduel [playerid]");
  74502. }
  74503. if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 15.0))
  74504. {
  74505. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range.");
  74506. }
  74507. if(targetid == playerid)
  74508. {
  74509. return SendClientMessage(playerid, COLOR_GREY, "You can't offer to duel with yourself.");
  74510. }
  74511. if(PlayerData[targetid][pDueling] != INVALID_PLAYER_ID)
  74512. {
  74513. return SendClientMessage(playerid, COLOR_GREY, "That player is already in a duel.");
  74514. }
  74515. PlayerData[targetid][pDuelOffer] = playerid;
  74516. SendClientMessageEx(targetid, COLOR_AQUA, "* %s has offered you to duel with them. (/accept duel)", GetRPName(playerid));
  74517. SendClientMessageEx(playerid, COLOR_AQUA, "* You have sent %s a duel offer.", GetRPName(targetid));
  74518. return 1;
  74519. }
  74520. CMD:gbackup(playerid, params[])
  74521. {
  74522. if(PlayerData[playerid][pGang] == -1)
  74523. {
  74524. return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any gang at the moment.");
  74525. }
  74526. if(PlayerData[playerid][pInjured])
  74527. {
  74528. return SendClientMessage(playerid, COLOR_GREY, "You cannot call for backup when you are dead.");
  74529. }
  74530. if(PlayerData[playerid][pCuffed])
  74531. {
  74532. return SendClientMessage(playerid, COLOR_GREY, "You cannot use this command while cuffed.");
  74533. }
  74534. if(PlayerData[playerid][pTied])
  74535. {
  74536. return SendClientMessage(playerid, COLOR_GREY, "You cannot use this command while tied.");
  74537. }
  74538. if(!PlayerData[playerid][pBackup])
  74539. {
  74540. PlayerData[playerid][pBackup] = 1;
  74541. }
  74542. else
  74543. {
  74544. PlayerData[playerid][pBackup] = 0;
  74545. }
  74546. foreach(new i : Player)
  74547. {
  74548. if(PlayerData[i][pGang] == PlayerData[playerid][pGang])
  74549. {
  74550. if(PlayerData[playerid][pBackup])
  74551. {
  74552. SendClientMessageEx(i, COLOR_AQUA, "* %s %s is requesting backup in %s (marked on map). *", GangRanks[PlayerData[playerid][pGang]][PlayerData[playerid][pGangRank]], GetRPName(playerid), GetPlayerZoneName(playerid));
  74553. SetPlayerMarkerForPlayer(i, playerid, (GangInfo[PlayerData[playerid][pGang]][gColor] & ~0xff) + 0xFF);
  74554. }
  74555. else
  74556. {
  74557. SendClientMessageEx(i, COLOR_AQUA, "* %s %s has cancelled their backup request. *", GangRanks[PlayerData[playerid][pGang]][PlayerData[playerid][pGangRank]], GetRPName(playerid), GetPlayerZoneName(playerid));
  74558. SetPlayerMarkerForPlayer(i, playerid, GetPlayerColor(playerid));
  74559. }
  74560. }
  74561. }
  74562. return 1;
  74563. }
  74564. CMD:confirmupgrade(playerid, params[])
  74565. {
  74566. new houseid = PlayerData[playerid][pPreviewHouse], type = PlayerData[playerid][pPreviewType];
  74567. if(houseid == -1 || !IsHouseOwner(playerid, houseid))
  74568. {
  74569. return SendClientMessage(playerid, COLOR_GREY, "You aren't previewing a house interior. '/upgradehouse interior' to begin.");
  74570. }
  74571. if(PlayerData[playerid][pCash] < houseInteriors[type][intPrice])
  74572. {
  74573. return SendClientMessage(playerid, COLOR_GREY, "You can't afford to upgrade to this interior.");
  74574. }
  74575. foreach(new i : Player)
  74576. {
  74577. if(GetInsideHouse(i) == houseid)
  74578. {
  74579. SetPlayerPos(i, houseInteriors[type][intX], houseInteriors[type][intY], houseInteriors[type][intZ]);
  74580. SetPlayerFacingAngle(i, houseInteriors[type][intA]);
  74581. SetPlayerInterior(i, houseInteriors[type][intID]);
  74582. SetCameraBehindPlayer(i);
  74583. }
  74584. }
  74585. GivePlayerCash(playerid, -houseInteriors[type][intPrice]);
  74586. HouseInfo[houseid][hType] = type;
  74587. HouseInfo[houseid][hPrice] = houseInteriors[type][intPrice];
  74588. HouseInfo[houseid][hInterior] = houseInteriors[type][intID];
  74589. HouseInfo[houseid][hIntX] = houseInteriors[type][intX];
  74590. HouseInfo[houseid][hIntY] = houseInteriors[type][intY];
  74591. HouseInfo[houseid][hIntZ] = houseInteriors[type][intZ];
  74592. HouseInfo[houseid][hIntA] = houseInteriors[type][intA];
  74593. PlayerData[playerid][pPreviewHouse] = -1;
  74594. PlayerData[playerid][pPreviewType] = 0;
  74595. PlayerData[playerid][pPreviewTime] = 0;
  74596. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET type = %i, price = %i, int_x = '%f', int_y = '%f', int_z = '%f', int_a = '%f', interior = %i, world = %i WHERE id = %i", type, HouseInfo[houseid][hPrice], HouseInfo[houseid][hIntX], HouseInfo[houseid][hIntY], HouseInfo[houseid][hIntZ], HouseInfo[houseid][hIntA], HouseInfo[houseid][hInterior], HouseInfo[houseid][hWorld], HouseInfo[houseid][hID]);
  74597. mysql_tquery(connectionID, queryBuffer);
  74598. SendClientMessageEx(playerid, COLOR_GREEN, "You have upgraded your house to this interior for $%i.", houseInteriors[type][intPrice]);
  74599. Log_Write("log_property", "%s (uid: %i) upgraded their house interior (id: %i) to interior %i for $%i.", GetPlayerNameEx(playerid), PlayerData[playerid][pID], HouseInfo[houseid][hID], type, houseInteriors[type][intPrice]);
  74600. return 1;
  74601. }
  74602. CMD:cancelupgrade(playerid, params[])
  74603. {
  74604. new houseid = PlayerData[playerid][pPreviewHouse];
  74605. if(houseid == -1 || !IsHouseOwner(playerid, houseid))
  74606. {
  74607. return SendClientMessage(playerid, COLOR_GREY, "You aren't previewing a house interior at the moment.");
  74608. }
  74609. SetPlayerPos(playerid, HouseInfo[houseid][hIntX], HouseInfo[houseid][hIntY], HouseInfo[houseid][hIntZ]);
  74610. SetPlayerFacingAngle(playerid, HouseInfo[houseid][hIntA]);
  74611. SetPlayerInterior(playerid, HouseInfo[houseid][hInterior]);
  74612. SetPlayerVirtualWorld(playerid, HouseInfo[houseid][hWorld]);
  74613. SetCameraBehindPlayer(playerid);
  74614. PlayerData[playerid][pPreviewHouse] = -1;
  74615. PlayerData[playerid][pPreviewType] = 0;
  74616. PlayerData[playerid][pPreviewTime] = 0;
  74617. SendClientMessage(playerid, COLOR_WHITE, "You have cancelled your interior upgrade. You were returned back to your old one.");
  74618. return 1;
  74619. }
  74620. CMD:giveachievement(playerid, params[])
  74621. {
  74622. new targetid, name[32];
  74623. if(PlayerData[playerid][pAdmin] < GENERAL_MANAGER)
  74624. {
  74625. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  74626. }
  74627. if(sscanf(params, "us[32]", targetid, name))
  74628. {
  74629. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /giveachievement [playerid] [name]");
  74630. }
  74631. if(!IsPlayerConnected(targetid))
  74632. {
  74633. return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected.");
  74634. }
  74635. if(!PlayerData[targetid][pLogged])
  74636. {
  74637. return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet.");
  74638. }
  74639. if(!AwardAchievement(targetid, name))
  74640. {
  74641. SendClientMessage(playerid, COLOR_GREY, "Invalid achievement.");
  74642. }
  74643. else
  74644. {
  74645. SendClientMessageEx(targetid, COLOR_AQUA, "%s has awarded you with the {FF6347}%s{33CCFF} achievement.", GetRPName(playerid), name);
  74646. SendClientMessageEx(playerid, COLOR_AQUA, "You have awarded %s with the {FF6347}%s{33CCFF} achievement.", GetRPName(targetid), name);
  74647. }
  74648. return 1;
  74649. }
  74650. CMD:vipmusic(playerid, params[])
  74651. {
  74652. if(PlayerData[playerid][pDonator] < 1)
  74653. {
  74654. return SendClientMessage(playerid, COLOR_GREY, "You must be a donator to use this command!");
  74655. }
  74656. if(isnull(params))
  74657. {
  74658. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /vipmusic [songname.mp3]");
  74659. }
  74660. if(gettime() - gLastMusic < 300)
  74661. {
  74662. return SendClientMessage(playerid, COLOR_GREY, "Music can only be played globally every 5 minutes.");
  74663. }
  74664. new url[144];
  74665. format(url, sizeof(url), "http://%s/%i/%s", VIP_MUSIC_URL, PlayerData[playerid][pID], params);
  74666. foreach(new i : Player)
  74667. {
  74668. if(!PlayerData[i][pToggleMusic] && PlayerData[i][pStreamType] == MUSIC_NONE)
  74669. {
  74670. PlayAudioStreamForPlayer(i, url);
  74671. }
  74672. }
  74673. SendClientMessageToAllEx(COLOR_VIP, "VIP Music: %s VIP %s has started the global playback of %s from their music folder!", GetVIPRank(PlayerData[playerid][pDonator]), GetRPName(playerid), params);
  74674. gLastMusic = gettime();
  74675. return 1;
  74676. }
  74677. CMD:forcetut(playerid, params[])
  74678. {
  74679. if(PlayerData[playerid][pAdmin] < SENIOR_ADMIN)
  74680. {
  74681. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  74682. }
  74683. new targetid;
  74684. if(sscanf(params, "u", targetid))
  74685. {
  74686. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /forcetut [playerid]");
  74687. }
  74688. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has forced %s to watch the server tutorial", GetRPName(playerid), GetRPName(targetid));
  74689. SendClientMessageEx(targetid, COLOR_LIGHTRED, "Administrator %s has forced you to rewatch the server tutorial.", GetRPName(playerid));
  74690. PlayerData[targetid][pTutorial] = 1;
  74691. PlayerData[targetid][pTutorialTimer] = SetTimerEx("TutorialTimer", 1000, false, "ii", targetid, 1);
  74692. return 1;
  74693. }
  74694. CMD:garbage(playerid, params[])
  74695. {
  74696. new vehicleid = GetPlayerVehicleID(playerid);
  74697. if(!PlayerHasJob(playerid, JOB_GARBAGEMAN))
  74698. {
  74699. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you are not a Garbage Man.");
  74700. }
  74701. if(!IsPlayerInRangeOfPoint(playerid, 8.0, 2449.1167,-2090.1445,13.5469))
  74702. {
  74703. return SendClientMessage(playerid, COLOR_GREY, "You are not at the starting point");
  74704. }
  74705. if(PlayerData[playerid][pGarbage] > 0)
  74706. {
  74707. return SendClientMessage(playerid, COLOR_GREY, "You're already doing a garbage run!");
  74708. }
  74709. if(GetVehicleModel(vehicleid) == 408 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  74710. {
  74711. GameTextForPlayer(playerid, "Proceed to the~n~Checkpoint", 5000, 3);
  74712. PlayerData[playerid][pGarbage] = 1;
  74713. PlayerData[playerid][pCP] = CHECKPOINT_GARBAGE;
  74714. SetPlayerCheckpoint(playerid, 2382.1963,-1937.9064,13.5469, 5.0);
  74715. }
  74716. else
  74717. {
  74718. SendClientMessage(playerid, COLOR_GREY, "You must be in a trashmaster vehicle as a driver");
  74719. }
  74720. return 1;
  74721. }
  74722. CMD:clearreports(playerid, params[])
  74723. {
  74724. if(PlayerData[playerid][pAdmin] < HEAD_ADMIN)
  74725. {
  74726. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  74727. }
  74728. for(new i = 0; i < MAX_REPORTS; i ++)
  74729. {
  74730. if(ReportInfo[i][rExists])
  74731. {
  74732. ReportInfo[i][rExists] = 0;
  74733. }
  74734. }
  74735. SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has cleared all active reports.", GetRPName(playerid));
  74736. return 1;
  74737. }
  74738. CMD:endalliance(playerid, params[])
  74739. {
  74740. new gangid = PlayerData[playerid][pGang];
  74741. new allyid = GangInfo[gangid][gAlliance];
  74742. new color, color2;
  74743. if(isnull(params) || strcmp(params, "confirm", true) != 0)
  74744. {
  74745. return SendClientMessage(playerid, COLOR_SYNTAX, "USAGE: /endalliance [confirm]");
  74746. }
  74747. if(PlayerData[playerid][pGang] == -1)
  74748. {
  74749. return SendClientMessage(playerid, COLOR_GREY, "You need to be in a gang to use this command");
  74750. }
  74751. if(PlayerData[playerid][pGangRank] < 6)
  74752. {
  74753. return SendClientMessage(playerid, COLOR_GREY, "You need to be rank 6 to use this command.");
  74754. }
  74755. if(GangInfo[gangid][gAlliance] == -1)
  74756. {
  74757. return SendClientMessage(playerid, COLOR_GREY, "Your gang isn't currently in an alliance.");
  74758. }
  74759. SendClientMessageEx(playerid, COLOR_YELLOW, "You just ended your alliance with %s.", GangInfo[gangid][gName]);
  74760. if(GangInfo[gangid][gColor] == -1 || GangInfo[gangid][gColor] == -256)
  74761. {
  74762. color = 0xC8C8C8FF;
  74763. }
  74764. else
  74765. {
  74766. color = GangInfo[gangid][gColor];
  74767. }
  74768. if(GangInfo[allyid][gColor] == -1 || GangInfo[allyid][gColor] == -256)
  74769. {
  74770. color2 = 0xC8C8C8FF;
  74771. }
  74772. else
  74773. {
  74774. color2 = GangInfo[allyid][gColor];
  74775. }
  74776. SendClientMessageToAllEx(COLOR_WHITE, "(( Gang News: {%06x}%s{FFFFFF} has ended their alliance with {%06x}%s{FFFFFF} ))", color >>> 8, GangInfo[gangid][gName], color2 >>> 8, GangInfo[allyid][gName]);
  74777. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET alliance = -1 WHERE id = %i", gangid);
  74778. mysql_tquery(connectionID, queryBuffer);
  74779. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_GANGS" SET alliance = -1 WHERE id = %i", allyid);
  74780. mysql_tquery(connectionID, queryBuffer);
  74781. GangInfo[allyid][gAlliance] = -1;
  74782. GangInfo[gangid][gAlliance] = -1;
  74783. return 1;
  74784. }
  74785. CMD:clothes(playerid, params[])
  74786. {
  74787. if(PlayerData[playerid][pDonator] < 1)
  74788. {
  74789. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you don't have a VIP subscription.");
  74790. }
  74791. if(!IsPlayerInRangeOfPoint(playerid, 3.0, 3088.6802,221.4168,1053.4829))
  74792. {
  74793. return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the VIP locker.");
  74794. }
  74795. ShowPlayerSelectionMenu(playerid, MODEL_SELECTION_VIPCLOTHES, "VIP Clothes", VipSkins, sizeof(VipSkins));
  74796. return 1;
  74797. }
  74798. CMD:firstaid(playerid, params[])
  74799. {
  74800. if(PlayerData[playerid][pFirstAid] <= 0)
  74801. {
  74802. return SendClientMessage(playerid, COLOR_GREY, "You don't have any first aid kits.");
  74803. }
  74804. if(GetPlayerHealthEx(playerid) >= 100)
  74805. {
  74806. return SendClientMessage(playerid, COLOR_GREY, "You can only use a first aid kit if your health is below 100.");
  74807. }
  74808. if(PlayerData[playerid][pReceivingAid])
  74809. {
  74810. return SendClientMessage(playerid, COLOR_GREY, "You have already used a first aid kit.");
  74811. }
  74812. PlayerData[playerid][pFirstAid]--;
  74813. PlayerData[playerid][pReceivingAid] = 1;
  74814. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET firstaid = %i WHERE uid = %i", PlayerData[playerid][pFirstAid], PlayerData[playerid][pID]);
  74815. mysql_tquery(connectionID, queryBuffer);
  74816. ShowActionBubble(playerid, "* %s administers first aid to their self.", GetRPName(playerid));
  74817. SendClientMessage(playerid, COLOR_WHITE, "HINT: Your first aid kit is in effect until your health is full.");
  74818. return 1;
  74819. }
  74820. CMD:scanner(playerid, params[])
  74821. {
  74822. if(!PlayerData[playerid][pPoliceScanner])
  74823. {
  74824. return SendClientMessage(playerid, COLOR_GREY, "You don't have a police scanner.");
  74825. }
  74826. if(!PlayerData[playerid][pScannerOn])
  74827. {
  74828. PlayerData[playerid][pScannerOn] = 1;
  74829. ShowActionBubble(playerid, "* %s turns on their police scanner.", GetRPName(playerid));
  74830. SendClientMessage(playerid, COLOR_WHITE, "You will now hear messages from emergency and department chats.");
  74831. }
  74832. else
  74833. {
  74834. PlayerData[playerid][pScannerOn] = 0;
  74835. ShowActionBubble(playerid, "* %s turns off their police scanner.", GetRPName(playerid));
  74836. }
  74837. return 1;
  74838. }
  74839. CMD:bodykit(playerid, params[])
  74840. {
  74841. if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
  74842. {
  74843. return SendClientMessage(playerid, COLOR_GREY, "You are not driving any vehicle.");
  74844. }
  74845. if(PlayerData[playerid][pBodykits] <= 0)
  74846. {
  74847. return SendClientMessage(playerid, COLOR_GREY, "You have no bodywork kits which you can use.");
  74848. }
  74849. if(gettime() - PlayerData[playerid][pLastRepair] < 60)
  74850. {
  74851. return SendClientMessageEx(playerid, COLOR_GREY, "You can only repair a vehicle every 60 seconds. Please wait %i more seconds.", 60 - (gettime() - PlayerData[playerid][pLastRepair]));
  74852. }
  74853. PlayerData[playerid][pBodykits]--;
  74854. PlayerData[playerid][pLastRepair] = gettime();
  74855. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE "#TABLE_USERS" SET bodykits = %i WHERE uid = %i", PlayerData[playerid][pBodykits], PlayerData[playerid][pID]);
  74856. mysql_tquery(connectionID, queryBuffer);
  74857. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  74858. RepairVehicle(GetPlayerVehicleID(playerid));
  74859. ShowActionBubble(playerid, "* %s repairs the health and bodywork on their vehicle.", GetRPName(playerid));
  74860. return 1;
  74861. }
  74862. CMD:viprimkit(playerid, params[])
  74863. {
  74864. new vehicleid = GetPlayerVehicleID(playerid);
  74865. if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
  74866. {
  74867. return SendClientMessage(playerid, COLOR_GREY, "You are not driving any vehicle.");
  74868. }
  74869. if(PlayerData[playerid][pDonator] < 3)
  74870. {
  74871. return SendClientMessage(playerid, COLOR_GREY, "You must be a Legendary VIP to use this command.");
  74872. }
  74873. if(!IsVehicleOwner(playerid, vehicleid) && PlayerData[playerid][pVehicleKeys] != vehicleid && !(VehicleInfo[vehicleid][vGang] >= 0 && PlayerData[playerid][pGang] == VehicleInfo[vehicleid][vGang]))
  74874. {
  74875. return SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't belong to you.");
  74876. }
  74877. if(!VehicleHasDoors(vehicleid))
  74878. {
  74879. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command in this type of vehicle.");
  74880. }
  74881. Dialog_Show(playerid, DIALOG_USERIMKIT, DIALOG_STYLE_LIST, "Choose which set of rims to install.", "Offroad\nShadow\nMega\nRimshine\nWires\nClassic\nTwist\nCutter\nSwitch\nGrove\nImport\nDollar\nTrance\nAtomic\nAhab\nVirtual\nAccess", "Select", "Cancel");
  74882. return 1;
  74883. }
  74884. CMD:rimkit(playerid, params[])
  74885. {
  74886. new vehicleid = GetPlayerVehicleID(playerid);
  74887. if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
  74888. {
  74889. return SendClientMessage(playerid, COLOR_GREY, "You are not driving any vehicle.");
  74890. }
  74891. if(PlayerData[playerid][pRimkits] <= 0)
  74892. {
  74893. return SendClientMessage(playerid, COLOR_GREY, "You have no rimkits which you can use.");
  74894. }
  74895. if(!IsVehicleOwner(playerid, vehicleid) && PlayerData[playerid][pVehicleKeys] != vehicleid && !(VehicleInfo[vehicleid][vGang] >= 0 && PlayerData[playerid][pGang] == VehicleInfo[vehicleid][vGang]))
  74896. {
  74897. return SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't belong to you.");
  74898. }
  74899. if(!VehicleHasDoors(vehicleid))
  74900. {
  74901. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command in this type of vehicle.");
  74902. }
  74903. Dialog_Show(playerid, DIALOG_USERIMKIT, DIALOG_STYLE_LIST, "Choose which set of rims to install.", "Offroad\nShadow\nMega\nRimshine\nWires\nClassic\nTwist\nCutter\nSwitch\nGrove\nImport\nDollar\nTrance\nAtomic\nAhab\nVirtual\nAccess", "Select", "Cancel");
  74904. return 1;
  74905. }
  74906. CMD:shutdownserver(playerid, params[])
  74907. {
  74908. if(PlayerData[playerid][pAdmin] >= MANAGEMENT)
  74909. {
  74910. if(strcmp(params, "confirm", true))
  74911. {
  74912. SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /shutdown [confirm]");
  74913. SendClientMessage(playerid, COLOR_GREY3, "This command save all player accounts and shutsdown the server.");
  74914. return 1;
  74915. }
  74916. if(gGMX)
  74917. {
  74918. return SendClientMessage(playerid, COLOR_GREY, "You have already called for a server shutdown. You can't cancel it.");
  74919. }
  74920. gGMX = 0;
  74921. SetTimer("FinishServerShutdown", 5000, false);
  74922. SendClientMessage(playerid, COLOR_GREY, "Server will shutdown in 5 seconds.");
  74923. foreach(new i : Player)
  74924. {
  74925. TogglePlayerControllable(i, 0);
  74926. SavePlayerVariables(i);
  74927. }
  74928. }
  74929. return 1;
  74930. }
  74931. CMD:showturfs(playerid, params[])
  74932. {
  74933. if(!PlayerData[playerid][pShowTurfs])
  74934. {
  74935. ShowTurfsOnMap(playerid, true);
  74936. SendClientMessage(playerid, COLOR_AQUA, "You will now see turfs on your mini-map.");
  74937. }
  74938. else
  74939. {
  74940. ShowTurfsOnMap(playerid, false);
  74941. SendClientMessage(playerid, COLOR_AQUA, "You will no longer see any turfs on your mini-map.");
  74942. }
  74943. return 1;
  74944. }
  74945. CMD:turfs(playerid, params[])
  74946. {
  74947. new turfid, name[32], color, timeleft[32], string[2048];
  74948. //SendClientMessageEx(playerid, COLOR_GREEN, "---- Turfs ----");
  74949. string = "Id\tName\tOwner\tPerk\tTime Left\t";
  74950. tsstring = "Id\tName\tOwner\tPerk\t";
  74951. for(turfid = 0; turfid < MAX_TURFS; turfid++)
  74952. {
  74953. if((TurfInfo[turfid][tType] < 8 && TurfInfo[turfid][tType] > 0) && TurfInfo[turfid][tExists])
  74954. {
  74955. if(TurfInfo[turfid][tCapturedGang] >= 0)
  74956. {
  74957. strcpy(name, GangInfo[TurfInfo[turfid][tCapturedGang]][gName]);
  74958. color = GangInfo[TurfInfo[turfid][tCapturedGang]][gColor];
  74959. }
  74960. else if(TurfInfo[turfid][tCapturedGang] == -5)
  74961. {
  74962. name = "Shutdown by The Police";
  74963. color = 0x8D8DFF00;
  74964. }
  74965. else
  74966. {
  74967. color = COLOR_FACTIONCHAT;
  74968. name = "None";
  74969. }
  74970. if(TurfInfo[turfid][tTime] > 0) format(timeleft, sizeof(timeleft), "%d hours left", TurfInfo[turfid][tTime]);
  74971. else format(timeleft, sizeof(timeleft), "Vulnerable");
  74972. format(string, sizeof(string), "%s\n{FFFFFF}%i\t %s\t{%06x}%s{FFFFFF}\t%s\t%s\n",string,turfid,TurfInfo[turfid][tName],color >>> 8,name,getTurftype(turfid),timeleft);
  74973. // else
  74974. // {
  74975. // format(tsstring, sizeof(tsstring), "%s\n{FFFFFF}%i\t %s\t{%06x}%s{FFFFFF}\t%s\t%s\n",tsstring,turfid,TurfInfo[turfid][tName],color >>> 8,name,getTurftype(turfid),timeleft);
  74976. // }
  74977. }
  74978. }
  74979. Dialog_Show(playerid, DIALOG_NONE, DIALOG_STYLE_TABLIST_HEADERS, "Turf list", string, "Cancel", "");
  74980. return 1;
  74981. }
  74982. CMD:showrules(playerid, params[])
  74983. {
  74984. new giveplayerid;
  74985. if(!(PlayerData[playerid][pAdmin]>=1 || PlayerData[playerid][pHelper]>=2)) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command");
  74986. if(sscanf(params,"i",giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "/showrules [playerid]");
  74987. if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "That player is not connected");
  74988. return ShowDialogToPlayer(giveplayerid, DIALOG_RULES);
  74989. }
  74990. CMD:rules(playerid, params[])
  74991. {
  74992. return ShowDialogToPlayer(playerid, DIALOG_RULES);
  74993. }
  74994. CMD:fpm(playerid, params[]) {
  74995. if(!firstperson[playerid])
  74996. {
  74997. firstperson[playerid] = 1;
  74998. new iObjectID = CreateObject(19300, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  74999. SetPVarInt(playerid, "FP_OBJ", iObjectID);
  75000. AttachObjectToPlayer(iObjectID, playerid, 0.0, 0.12, 0.7, 0.0, 0.0, 0.0);
  75001. AttachCameraToObject(playerid, iObjectID);
  75002. }
  75003. else {
  75004. firstperson[playerid] = 0;
  75005. DestroyObject(GetPVarInt(playerid, "FP_OBJ"));
  75006. DeletePVar(playerid, "FP_OBJ");
  75007. SetCameraBehindPlayer(playerid);
  75008. }
  75009. return 1;
  75010. }
  75011. /* Commands */
  75012. CMD:mdc(playerid, params[]) {
  75013. if(GetPVarInt(playerid, "mdc_shown") != 0) return SendClientMessage(playerid, COLOR_GREY, "You already have the Mobile Data Computer opened (Reminder: Use /cursor to get your cursor back active).");
  75014. if(!IsLawEnforcement(playerid) && GetFactionType(playerid) != FACTION_GOVERNMENT) return SendClientMessage(playerid, COLOR_GREY, "You have to be a police officer or government official to access the Mobile Data Computer.");
  75015. new vehicleID = GetPlayerVehicleID(playerid),
  75016. bool:access = false;
  75017. if(VehicleInfo[vehicleID][vFactionType] == FACTION_POLICE || VehicleInfo[vehicleID][vFactionType] == FACTION_GOVERNMENT) {
  75018. access = true;
  75019. }
  75020. if(access != true) {
  75021. for(new i = 0; i < sizeof(mdc_coordinates); i++) {
  75022. if(IsPlayerInRangeOfPoint(playerid, 3.0, mdc_coordinates[i][0], mdc_coordinates[i][1], mdc_coordinates[i][2])) {
  75023. access = true;
  75024. }
  75025. }
  75026. }
  75027. if(access == true) {
  75028. mdc_ShowPlayerStartScreen(playerid);
  75029. SendClientMessage(playerid, COLOR_BLUE, "[TIP] {FFFFFF}Press ESC to disable the cursor and use /cursor to get your cursor back active.");
  75030. SetPVarInt(playerid, "mdc_shown", 1);
  75031. } else {
  75032. SendClientMessage(playerid, COLOR_GREY, "You are not close to a computer of the Los Santos Police Department and are not in a government vehicle equipped with a Mobile Data Computer.");
  75033. }
  75034. return 1;
  75035. }
  75036. CMD:cursor(playerid, params) {
  75037. SelectTextDraw(playerid, -1);
  75038. return 1;
  75039. }
  75040. /* Functions */
  75041. stock mdc_LoadTextdraws() {
  75042. td_mdc_Box = TextDrawCreate(442.000000, 178.000000, "New Textdraw");
  75043. TextDrawBackgroundColor(td_mdc_Box, 255);
  75044. TextDrawFont(td_mdc_Box, 1);
  75045. TextDrawLetterSize(td_mdc_Box, 0.000000, 6.399999);
  75046. TextDrawColor(td_mdc_Box, -1);
  75047. TextDrawSetOutline(td_mdc_Box, 0);
  75048. TextDrawSetProportional(td_mdc_Box, 1);
  75049. TextDrawSetShadow(td_mdc_Box, 1);
  75050. TextDrawUseBox(td_mdc_Box, 1);
  75051. TextDrawBoxColor(td_mdc_Box, 125);
  75052. TextDrawTextSize(td_mdc_Box, 198.000000, 0.000000);
  75053. TextDrawSetSelectable(td_mdc_Box, 0);
  75054. td_mdc_HeaderBox = TextDrawCreate(442.000000, 178.000000, "New Textdraw");
  75055. TextDrawBackgroundColor(td_mdc_HeaderBox, 255);
  75056. TextDrawFont(td_mdc_HeaderBox, 1);
  75057. TextDrawLetterSize(td_mdc_HeaderBox, 0.000000, 1.799998);
  75058. TextDrawColor(td_mdc_HeaderBox, -1);
  75059. TextDrawSetOutline(td_mdc_HeaderBox, 0);
  75060. TextDrawSetProportional(td_mdc_HeaderBox, 1);
  75061. TextDrawSetShadow(td_mdc_HeaderBox, 1);
  75062. TextDrawUseBox(td_mdc_HeaderBox, 1);
  75063. TextDrawBoxColor(td_mdc_HeaderBox, 100);
  75064. TextDrawTextSize(td_mdc_HeaderBox, 198.000000, 0.000000);
  75065. TextDrawSetSelectable(td_mdc_HeaderBox, 0);
  75066. td_mdc_CitizenBox = TextDrawCreate(442.000000, 178.000000, "New Textdraw");
  75067. TextDrawBackgroundColor(td_mdc_CitizenBox, 255);
  75068. TextDrawFont(td_mdc_CitizenBox, 1);
  75069. TextDrawLetterSize(td_mdc_CitizenBox, 0.000000, 11.699997);
  75070. TextDrawColor(td_mdc_CitizenBox, -1);
  75071. TextDrawSetOutline(td_mdc_CitizenBox, 0);
  75072. TextDrawSetProportional(td_mdc_CitizenBox, 1);
  75073. TextDrawSetShadow(td_mdc_CitizenBox, 1);
  75074. TextDrawUseBox(td_mdc_CitizenBox, 1);
  75075. TextDrawBoxColor(td_mdc_CitizenBox, 125);
  75076. TextDrawTextSize(td_mdc_CitizenBox, 198.000000, 0.000000);
  75077. TextDrawSetSelectable(td_mdc_CitizenBox, 0);
  75078. td_mdc_DataBox = TextDrawCreate(432.000000, 223.000000, "New Textdraw");
  75079. TextDrawBackgroundColor(td_mdc_DataBox, 255);
  75080. TextDrawFont(td_mdc_DataBox, 1);
  75081. TextDrawLetterSize(td_mdc_DataBox, 0.000000, 5.199998);
  75082. TextDrawColor(td_mdc_DataBox, -1);
  75083. TextDrawSetOutline(td_mdc_DataBox, 0);
  75084. TextDrawSetProportional(td_mdc_DataBox, 1);
  75085. TextDrawSetShadow(td_mdc_DataBox, 1);
  75086. TextDrawUseBox(td_mdc_DataBox, 1);
  75087. TextDrawBoxColor(td_mdc_DataBox, 125);
  75088. TextDrawTextSize(td_mdc_DataBox, 255.000000, 0.000000);
  75089. TextDrawSetSelectable(td_mdc_DataBox, 0);
  75090. td_mdc_OptionsBox = TextDrawCreate(432.000000, 329.000000, "New Textdraw");
  75091. TextDrawBackgroundColor(td_mdc_OptionsBox, 255);
  75092. TextDrawFont(td_mdc_OptionsBox, 1);
  75093. TextDrawLetterSize(td_mdc_OptionsBox, 0.000000, 2.699999);
  75094. TextDrawColor(td_mdc_OptionsBox, -1);
  75095. TextDrawSetOutline(td_mdc_OptionsBox, 0);
  75096. TextDrawSetProportional(td_mdc_OptionsBox, 1);
  75097. TextDrawSetShadow(td_mdc_OptionsBox, 1);
  75098. TextDrawUseBox(td_mdc_OptionsBox, 1);
  75099. TextDrawBoxColor(td_mdc_OptionsBox, 125);
  75100. TextDrawTextSize(td_mdc_OptionsBox, 208.000000, -70.000000);
  75101. TextDrawSetSelectable(td_mdc_OptionsBox, 0);
  75102. for(new i = 0; i < sizeof(td_mdc_cr_Box); i++) {
  75103. td_mdc_cr_Box[i] = TextDrawCreate(442.000000, 178.000000, "New Textdraw");
  75104. TextDrawBackgroundColor(td_mdc_cr_Box[i], 255);
  75105. TextDrawFont(td_mdc_cr_Box[i], 1);
  75106. TextDrawLetterSize(td_mdc_cr_Box[i], 0.000000, 5.4999 + i * 0.8167);
  75107. TextDrawColor(td_mdc_cr_Box[i], -1);
  75108. TextDrawSetOutline(td_mdc_cr_Box[i], 0);
  75109. TextDrawSetProportional(td_mdc_cr_Box[i], 1);
  75110. TextDrawSetShadow(td_mdc_cr_Box[i], 1);
  75111. TextDrawUseBox(td_mdc_cr_Box[i], 1);
  75112. TextDrawBoxColor(td_mdc_cr_Box[i], 125);
  75113. TextDrawTextSize(td_mdc_cr_Box[i], 198.000000, 0.000000);
  75114. TextDrawSetSelectable(td_mdc_cr_Box[i], 0);
  75115. }
  75116. for(new i = 0; i < sizeof(td_mdc_cr_InnerBox); i++) {
  75117. td_mdc_cr_InnerBox[i] = TextDrawCreate(432.000000, 228.000000, "New Textdraw");
  75118. TextDrawBackgroundColor(td_mdc_cr_InnerBox[i], 255);
  75119. TextDrawFont(td_mdc_cr_InnerBox[i], 1);
  75120. TextDrawLetterSize(td_mdc_cr_InnerBox[i], 0.000000, 2.0999 + i * 0.8167);
  75121. TextDrawColor(td_mdc_cr_InnerBox[i], -1);
  75122. TextDrawSetOutline(td_mdc_cr_InnerBox[i], 0);
  75123. TextDrawSetProportional(td_mdc_cr_InnerBox[i], 1);
  75124. TextDrawSetShadow(td_mdc_cr_InnerBox[i], 1);
  75125. TextDrawUseBox(td_mdc_cr_InnerBox[i], 1);
  75126. TextDrawBoxColor(td_mdc_cr_InnerBox[i], 100);
  75127. TextDrawTextSize(td_mdc_cr_InnerBox[i], 208.000000, 0.000000);
  75128. TextDrawSetSelectable(td_mdc_cr_InnerBox[i], 1);
  75129. }
  75130. td_mdc_veh_Box = TextDrawCreate(442.000000, 178.000000, "New Textdraw");
  75131. TextDrawBackgroundColor(td_mdc_veh_Box, 255);
  75132. TextDrawFont(td_mdc_veh_Box, 1);
  75133. TextDrawLetterSize(td_mdc_veh_Box, 0.000000, 6.299985);
  75134. TextDrawColor(td_mdc_veh_Box, -1);
  75135. TextDrawSetOutline(td_mdc_veh_Box, 0);
  75136. TextDrawSetProportional(td_mdc_veh_Box, 1);
  75137. TextDrawSetShadow(td_mdc_veh_Box, 1);
  75138. TextDrawUseBox(td_mdc_veh_Box, 1);
  75139. TextDrawBoxColor(td_mdc_veh_Box, 125);
  75140. TextDrawTextSize(td_mdc_veh_Box, 198.000000, 0.000000);
  75141. TextDrawSetSelectable(td_mdc_veh_Box, 0);
  75142. td_mdc_veh_InnerBox = TextDrawCreate(432.000000, 223.000000, "New Textdraw");
  75143. TextDrawBackgroundColor(td_mdc_veh_InnerBox, 255);
  75144. TextDrawFont(td_mdc_veh_InnerBox, 1);
  75145. TextDrawLetterSize(td_mdc_veh_InnerBox, 0.000000, 3.199998);
  75146. TextDrawColor(td_mdc_veh_InnerBox, -1);
  75147. TextDrawSetOutline(td_mdc_veh_InnerBox, 0);
  75148. TextDrawSetProportional(td_mdc_veh_InnerBox, 1);
  75149. TextDrawSetShadow(td_mdc_veh_InnerBox, 1);
  75150. TextDrawUseBox(td_mdc_veh_InnerBox, 1);
  75151. TextDrawBoxColor(td_mdc_veh_InnerBox, 100);
  75152. TextDrawTextSize(td_mdc_veh_InnerBox, 255.000000, -10.000000);
  75153. TextDrawSetSelectable(td_mdc_veh_InnerBox, 1);
  75154. td_mdc_veh_BoxNoEnt = TextDrawCreate(442.000000, 178.000000, "New Textdraw");
  75155. TextDrawBackgroundColor(td_mdc_veh_BoxNoEnt, 255);
  75156. TextDrawFont(td_mdc_veh_BoxNoEnt, 1);
  75157. TextDrawLetterSize(td_mdc_veh_BoxNoEnt, 0.000000, 4.199985);
  75158. TextDrawColor(td_mdc_veh_BoxNoEnt, -1);
  75159. TextDrawSetOutline(td_mdc_veh_BoxNoEnt, 0);
  75160. TextDrawSetProportional(td_mdc_veh_BoxNoEnt, 1);
  75161. TextDrawSetShadow(td_mdc_veh_BoxNoEnt, 1);
  75162. TextDrawUseBox(td_mdc_veh_BoxNoEnt, 1);
  75163. TextDrawBoxColor(td_mdc_veh_BoxNoEnt, 125);
  75164. TextDrawTextSize(td_mdc_veh_BoxNoEnt, 198.000000, 0.000000);
  75165. TextDrawSetSelectable(td_mdc_veh_BoxNoEnt, 0);
  75166. td_mdc_veh_InnerBoxNoEnt = TextDrawCreate(432.000000, 223.000000, "New Textdraw");
  75167. TextDrawBackgroundColor(td_mdc_veh_InnerBoxNoEnt, 255);
  75168. TextDrawFont(td_mdc_veh_InnerBoxNoEnt, 1);
  75169. TextDrawLetterSize(td_mdc_veh_InnerBoxNoEnt, 0.000000, 1.199998);
  75170. TextDrawColor(td_mdc_veh_InnerBoxNoEnt, -1);
  75171. TextDrawSetOutline(td_mdc_veh_InnerBoxNoEnt, 0);
  75172. TextDrawSetProportional(td_mdc_veh_InnerBoxNoEnt, 1);
  75173. TextDrawSetShadow(td_mdc_veh_InnerBoxNoEnt, 1);
  75174. TextDrawUseBox(td_mdc_veh_InnerBoxNoEnt, 1);
  75175. TextDrawBoxColor(td_mdc_veh_InnerBoxNoEnt, 100);
  75176. TextDrawTextSize(td_mdc_veh_InnerBoxNoEnt, 255.000000, -10.000000);
  75177. TextDrawSetSelectable(td_mdc_veh_InnerBoxNoEnt, 1);
  75178. td_mdc_veh_TextNoEnt = TextDrawCreate(267.000000, 228.000000, "No entries could be found.");
  75179. TextDrawBackgroundColor(td_mdc_veh_TextNoEnt, 255);
  75180. TextDrawFont(td_mdc_veh_TextNoEnt, 2);
  75181. TextDrawLetterSize(td_mdc_veh_TextNoEnt, 0.170000, 1.000000);
  75182. TextDrawColor(td_mdc_veh_TextNoEnt, -1);
  75183. TextDrawSetOutline(td_mdc_veh_TextNoEnt, 0);
  75184. TextDrawSetProportional(td_mdc_veh_TextNoEnt, 1);
  75185. TextDrawSetShadow(td_mdc_veh_TextNoEnt, 1);
  75186. TextDrawSetSelectable(td_mdc_veh_TextNoEnt, 0);
  75187. td_mdc_veh_Model = TextDrawCreate(329.000000, 228.000000, "~b~~h~~h~~h~Model Name:");
  75188. TextDrawAlignment(td_mdc_veh_Model, 3);
  75189. TextDrawBackgroundColor(td_mdc_veh_Model, 255);
  75190. TextDrawFont(td_mdc_veh_Model, 2);
  75191. TextDrawLetterSize(td_mdc_veh_Model, 0.170000, 1.000000);
  75192. TextDrawColor(td_mdc_veh_Model, -524057345);
  75193. TextDrawSetOutline(td_mdc_veh_Model, 0);
  75194. TextDrawSetProportional(td_mdc_veh_Model, 1);
  75195. TextDrawSetShadow(td_mdc_veh_Model, 1);
  75196. TextDrawSetSelectable(td_mdc_veh_Model, 0);
  75197. td_mdc_veh_Owner = TextDrawCreate(329.000000, 240.000000, "~b~~h~~h~~h~Owner:");
  75198. TextDrawAlignment(td_mdc_veh_Owner, 3);
  75199. TextDrawBackgroundColor(td_mdc_veh_Owner, 255);
  75200. TextDrawFont(td_mdc_veh_Owner, 2);
  75201. TextDrawLetterSize(td_mdc_veh_Owner, 0.170000, 1.000000);
  75202. TextDrawColor(td_mdc_veh_Owner, -524057345);
  75203. TextDrawSetOutline(td_mdc_veh_Owner, 0);
  75204. TextDrawSetProportional(td_mdc_veh_Owner, 1);
  75205. TextDrawSetShadow(td_mdc_veh_Owner, 1);
  75206. TextDrawSetSelectable(td_mdc_veh_Owner, 0);
  75207. td_mdc_veh_Plate = TextDrawCreate(329.000000, 252.000000, "~b~~h~~h~~h~License Plate:");
  75208. TextDrawAlignment(td_mdc_veh_Plate, 3);
  75209. TextDrawBackgroundColor(td_mdc_veh_Plate, 255);
  75210. TextDrawFont(td_mdc_veh_Plate, 2);
  75211. TextDrawLetterSize(td_mdc_veh_Plate, 0.170000, 1.000000);
  75212. TextDrawColor(td_mdc_veh_Plate, -524057345);
  75213. TextDrawSetOutline(td_mdc_veh_Plate, 0);
  75214. TextDrawSetProportional(td_mdc_veh_Plate, 1);
  75215. TextDrawSetShadow(td_mdc_veh_Plate, 1);
  75216. TextDrawSetSelectable(td_mdc_veh_Plate, 0);
  75217. td_mdc_veh_Insurance = TextDrawCreate(329.000000, 264.000000, "~b~~h~~h~~h~Insurance:");
  75218. TextDrawAlignment(td_mdc_veh_Insurance, 3);
  75219. TextDrawBackgroundColor(td_mdc_veh_Insurance, 255);
  75220. TextDrawFont(td_mdc_veh_Insurance, 2);
  75221. TextDrawLetterSize(td_mdc_veh_Insurance, 0.170000, 1.000000);
  75222. TextDrawColor(td_mdc_veh_Insurance, -524057345);
  75223. TextDrawSetOutline(td_mdc_veh_Insurance, 0);
  75224. TextDrawSetProportional(td_mdc_veh_Insurance, 1);
  75225. TextDrawSetShadow(td_mdc_veh_Insurance, 1);
  75226. TextDrawSetSelectable(td_mdc_veh_Insurance, 0);
  75227. td_mdc_veh_ArrowRight = TextDrawCreate(425.000000, 276.000000, "LD_BEAT:right");
  75228. TextDrawBackgroundColor(td_mdc_veh_ArrowRight, 255);
  75229. TextDrawFont(td_mdc_veh_ArrowRight, 4);
  75230. TextDrawLetterSize(td_mdc_veh_ArrowRight, 0.500000, 1.000000);
  75231. TextDrawColor(td_mdc_veh_ArrowRight, -1);
  75232. TextDrawSetOutline(td_mdc_veh_ArrowRight, 0);
  75233. TextDrawSetProportional(td_mdc_veh_ArrowRight, 1);
  75234. TextDrawSetShadow(td_mdc_veh_ArrowRight, 1);
  75235. TextDrawUseBox(td_mdc_veh_ArrowRight, 1);
  75236. TextDrawBoxColor(td_mdc_veh_ArrowRight, 255);
  75237. TextDrawTextSize(td_mdc_veh_ArrowRight, 10.000000, 12.000000);
  75238. TextDrawSetSelectable(td_mdc_veh_ArrowRight, 1);
  75239. td_mdc_veh_Next = TextDrawCreate(404.000000, 276.000000, "~b~~h~~h~~h~Next");
  75240. TextDrawBackgroundColor(td_mdc_veh_Next, 255);
  75241. TextDrawFont(td_mdc_veh_Next, 2);
  75242. TextDrawLetterSize(td_mdc_veh_Next, 0.170000, 1.000000);
  75243. TextDrawColor(td_mdc_veh_Next, -1);
  75244. TextDrawSetOutline(td_mdc_veh_Next, 0);
  75245. TextDrawSetProportional(td_mdc_veh_Next, 1);
  75246. TextDrawSetShadow(td_mdc_veh_Next, 1);
  75247. TextDrawTextSize(td_mdc_veh_Next, 423.000000, 152.000000);
  75248. TextDrawSetSelectable(td_mdc_veh_Next, 1);
  75249. td_mdc_veh_Label = TextDrawCreate(254.000000, 217.000000, "~b~Vehicles");
  75250. TextDrawBackgroundColor(td_mdc_veh_Label, 255);
  75251. TextDrawFont(td_mdc_veh_Label, 2);
  75252. TextDrawLetterSize(td_mdc_veh_Label, 0.170000, 1.000000);
  75253. TextDrawColor(td_mdc_veh_Label, -1384438529);
  75254. TextDrawSetOutline(td_mdc_veh_Label, 0);
  75255. TextDrawSetProportional(td_mdc_veh_Label, 1);
  75256. TextDrawSetShadow(td_mdc_veh_Label, 1);
  75257. TextDrawSetPreviewModel(td_mdc_veh_Label, 480);
  75258. TextDrawSetPreviewRot(td_mdc_veh_Label, -16.000000, 0.000000, -55.000000, 1.000000);
  75259. TextDrawSetSelectable(td_mdc_veh_Label, 0);
  75260. td_mdc_HeaderText = TextDrawCreate(209.000000, 189.000000, "~b~~h~Mobile Data Computer");
  75261. TextDrawBackgroundColor(td_mdc_HeaderText, 255);
  75262. TextDrawFont(td_mdc_HeaderText, 2);
  75263. TextDrawLetterSize(td_mdc_HeaderText, 0.219999, 1.200000);
  75264. TextDrawColor(td_mdc_HeaderText, -1384438529);
  75265. TextDrawSetOutline(td_mdc_HeaderText, 0);
  75266. TextDrawSetProportional(td_mdc_HeaderText, 1);
  75267. TextDrawSetShadow(td_mdc_HeaderText, 1);
  75268. TextDrawSetSelectable(td_mdc_HeaderText, 0);
  75269. td_mdc_Exit = TextDrawCreate(420.000000, 189.000000, "LD_BEAT:cross");
  75270. TextDrawBackgroundColor(td_mdc_Exit, 255);
  75271. TextDrawFont(td_mdc_Exit, 4);
  75272. TextDrawLetterSize(td_mdc_Exit, 0.500000, 1.000000);
  75273. TextDrawColor(td_mdc_Exit, -1);
  75274. TextDrawSetOutline(td_mdc_Exit, 0);
  75275. TextDrawSetProportional(td_mdc_Exit, 1);
  75276. TextDrawSetShadow(td_mdc_Exit, 1);
  75277. TextDrawUseBox(td_mdc_Exit, 1);
  75278. TextDrawBoxColor(td_mdc_Exit, 255);
  75279. TextDrawTextSize(td_mdc_Exit, 10.000000, 12.000000);
  75280. TextDrawSetSelectable(td_mdc_Exit, 1);
  75281. td_mdc_Section[0] = TextDrawCreate(316.000000, 228.000000, "New Textdraw");
  75282. TextDrawBackgroundColor(td_mdc_Section[0], 255);
  75283. TextDrawFont(td_mdc_Section[0], 1);
  75284. TextDrawLetterSize(td_mdc_Section[0], 0.000000, 1.199999);
  75285. TextDrawColor(td_mdc_Section[0], -1);
  75286. TextDrawSetOutline(td_mdc_Section[0], 0);
  75287. TextDrawSetProportional(td_mdc_Section[0], 1);
  75288. TextDrawSetShadow(td_mdc_Section[0], 1);
  75289. TextDrawUseBox(td_mdc_Section[0], 1);
  75290. TextDrawBoxColor(td_mdc_Section[0], 100);
  75291. TextDrawTextSize(td_mdc_Section[0], 208.000000, 0.000000);
  75292. TextDrawSetSelectable(td_mdc_Section[0], 0);
  75293. td_mdc_Section[1] = TextDrawCreate(316.000000, 257.000000, "New Textdraw");
  75294. TextDrawBackgroundColor(td_mdc_Section[1], 255);
  75295. TextDrawFont(td_mdc_Section[1], 1);
  75296. TextDrawLetterSize(td_mdc_Section[1], 0.000000, 1.199999);
  75297. TextDrawColor(td_mdc_Section[1], -1);
  75298. TextDrawSetOutline(td_mdc_Section[1], 0);
  75299. TextDrawSetProportional(td_mdc_Section[1], 1);
  75300. TextDrawSetShadow(td_mdc_Section[1], 1);
  75301. TextDrawUseBox(td_mdc_Section[1], 1);
  75302. TextDrawBoxColor(td_mdc_Section[1], 100);
  75303. TextDrawTextSize(td_mdc_Section[1], 208.000000, 0.000000);
  75304. TextDrawSetSelectable(td_mdc_Section[1], 0);
  75305. td_mdc_Section[2] = TextDrawCreate(432.000000, 257.000000, "New Textdraw");
  75306. TextDrawBackgroundColor(td_mdc_Section[2], 255);
  75307. TextDrawFont(td_mdc_Section[2], 1);
  75308. TextDrawLetterSize(td_mdc_Section[2], 0.000000, 1.199999);
  75309. TextDrawColor(td_mdc_Section[2], -1);
  75310. TextDrawSetOutline(td_mdc_Section[2], 0);
  75311. TextDrawSetProportional(td_mdc_Section[2], 1);
  75312. TextDrawSetShadow(td_mdc_Section[2], 1);
  75313. TextDrawUseBox(td_mdc_Section[2], 1);
  75314. TextDrawBoxColor(td_mdc_Section[2], 100);
  75315. TextDrawTextSize(td_mdc_Section[2], 323.000000, 0.000000);
  75316. TextDrawSetSelectable(td_mdc_Section[2], 0);
  75317. td_mdc_Section[3] = TextDrawCreate(432.000000, 228.000000, "New Textdraw");
  75318. TextDrawBackgroundColor(td_mdc_Section[3], 255);
  75319. TextDrawFont(td_mdc_Section[3], 1);
  75320. TextDrawLetterSize(td_mdc_Section[3], 0.000000, 1.199999);
  75321. TextDrawColor(td_mdc_Section[3], -1);
  75322. TextDrawSetOutline(td_mdc_Section[3], 0);
  75323. TextDrawSetProportional(td_mdc_Section[3], 1);
  75324. TextDrawSetShadow(td_mdc_Section[3], 1);
  75325. TextDrawUseBox(td_mdc_Section[3], 1);
  75326. TextDrawBoxColor(td_mdc_Section[3], 100);
  75327. TextDrawTextSize(td_mdc_Section[3], 323.000000, 0.000000);
  75328. TextDrawSetSelectable(td_mdc_Section[3], 0);
  75329. td_mdc_SectionText[0] = TextDrawCreate(262.000000, 234.000000, "~b~~h~~h~~h~Search Citizen");
  75330. TextDrawAlignment(td_mdc_SectionText[0], 2);
  75331. TextDrawBackgroundColor(td_mdc_SectionText[0], 255);
  75332. TextDrawFont(td_mdc_SectionText[0], 2);
  75333. TextDrawLetterSize(td_mdc_SectionText[0], 0.170000, 1.000000);
  75334. TextDrawColor(td_mdc_SectionText[0], -524057345);
  75335. TextDrawSetOutline(td_mdc_SectionText[0], 0);
  75336. TextDrawSetProportional(td_mdc_SectionText[0], 1);
  75337. TextDrawSetShadow(td_mdc_SectionText[0], 1);
  75338. TextDrawTextSize(td_mdc_SectionText[0], 15.000000, 102.000000);
  75339. TextDrawSetSelectable(td_mdc_SectionText[0], 1);
  75340. td_mdc_SectionText[1] = TextDrawCreate(262.000000, 263.000000, "~b~~h~~h~~h~Search Weapon Serial");
  75341. TextDrawAlignment(td_mdc_SectionText[1], 2);
  75342. TextDrawBackgroundColor(td_mdc_SectionText[1], 255);
  75343. TextDrawFont(td_mdc_SectionText[1], 2);
  75344. TextDrawLetterSize(td_mdc_SectionText[1], 0.170000, 1.000000);
  75345. TextDrawColor(td_mdc_SectionText[1], -524057345);
  75346. TextDrawSetOutline(td_mdc_SectionText[1], 0);
  75347. TextDrawSetProportional(td_mdc_SectionText[1], 1);
  75348. TextDrawSetShadow(td_mdc_SectionText[1], 1);
  75349. TextDrawTextSize(td_mdc_SectionText[1], 15.000000, 102.000000);
  75350. TextDrawSetSelectable(td_mdc_SectionText[1], 1);
  75351. td_mdc_SectionText[2] = TextDrawCreate(378.000000, 263.000000, "~b~~h~~h~~h~Search Phone Number");
  75352. TextDrawAlignment(td_mdc_SectionText[2], 2);
  75353. TextDrawBackgroundColor(td_mdc_SectionText[2], 255);
  75354. TextDrawFont(td_mdc_SectionText[2], 2);
  75355. TextDrawLetterSize(td_mdc_SectionText[2], 0.170000, 1.000000);
  75356. TextDrawColor(td_mdc_SectionText[2], -524057345);
  75357. TextDrawSetOutline(td_mdc_SectionText[2], 0);
  75358. TextDrawSetProportional(td_mdc_SectionText[2], 1);
  75359. TextDrawSetShadow(td_mdc_SectionText[2], 1);
  75360. TextDrawTextSize(td_mdc_SectionText[2], 15.000000, 102.000000);
  75361. TextDrawSetSelectable(td_mdc_SectionText[2], 1);
  75362. td_mdc_SectionText[3] = TextDrawCreate(378.000000, 234.000000, "~b~~h~~h~~h~Search License Plate");
  75363. TextDrawAlignment(td_mdc_SectionText[3], 2);
  75364. TextDrawBackgroundColor(td_mdc_SectionText[3], 255);
  75365. TextDrawFont(td_mdc_SectionText[3], 2);
  75366. TextDrawLetterSize(td_mdc_SectionText[3], 0.170000, 1.000000);
  75367. TextDrawColor(td_mdc_SectionText[3], -524057345);
  75368. TextDrawSetOutline(td_mdc_SectionText[3], 0);
  75369. TextDrawSetProportional(td_mdc_SectionText[3], 1);
  75370. TextDrawSetShadow(td_mdc_SectionText[3], 1);
  75371. TextDrawTextSize(td_mdc_SectionText[3], 15.000000, 103.000000);
  75372. TextDrawSetSelectable(td_mdc_SectionText[3], 1);
  75373. td_mdc_SectionHeaderText = TextDrawCreate(207.000000, 220.000000, "~b~Sections");
  75374. TextDrawBackgroundColor(td_mdc_SectionHeaderText, 255);
  75375. TextDrawFont(td_mdc_SectionHeaderText, 2);
  75376. TextDrawLetterSize(td_mdc_SectionHeaderText, 0.170000, 1.000000);
  75377. TextDrawColor(td_mdc_SectionHeaderText, -1384438529);
  75378. TextDrawSetOutline(td_mdc_SectionHeaderText, 0);
  75379. TextDrawSetProportional(td_mdc_SectionHeaderText, 1);
  75380. TextDrawSetShadow(td_mdc_SectionHeaderText, 1);
  75381. TextDrawSetSelectable(td_mdc_SectionHeaderText, 0);
  75382. td_mdc_Gender = TextDrawCreate(329.000000, 252.000000, "~b~~h~~h~~h~Gender:");
  75383. TextDrawAlignment(td_mdc_Gender, 3);
  75384. TextDrawBackgroundColor(td_mdc_Gender, 255);
  75385. TextDrawFont(td_mdc_Gender, 2);
  75386. TextDrawLetterSize(td_mdc_Gender, 0.170000, 1.000000);
  75387. TextDrawColor(td_mdc_Gender, -524057345);
  75388. TextDrawSetOutline(td_mdc_Gender, 0);
  75389. TextDrawSetProportional(td_mdc_Gender, 1);
  75390. TextDrawSetShadow(td_mdc_Gender, 1);
  75391. TextDrawSetSelectable(td_mdc_Gender, 0);
  75392. td_mdc_Job = TextDrawCreate(329.000000, 264.000000, "~b~~h~~h~~h~Occupation:");
  75393. TextDrawAlignment(td_mdc_Job, 3);
  75394. TextDrawBackgroundColor(td_mdc_Job, 255);
  75395. TextDrawFont(td_mdc_Job, 2);
  75396. TextDrawLetterSize(td_mdc_Job, 0.170000, 1.000000);
  75397. TextDrawColor(td_mdc_Job, -524057345);
  75398. TextDrawSetOutline(td_mdc_Job, 0);
  75399. TextDrawSetProportional(td_mdc_Job, 1);
  75400. TextDrawSetShadow(td_mdc_Job, 1);
  75401. TextDrawSetSelectable(td_mdc_Job, 0);
  75402. td_mdc_DriveLic = TextDrawCreate(329.000000, 276.000000, "~b~~h~~h~~h~Driver's License:");
  75403. TextDrawAlignment(td_mdc_DriveLic, 3);
  75404. TextDrawBackgroundColor(td_mdc_DriveLic, 255);
  75405. TextDrawFont(td_mdc_DriveLic, 2);
  75406. TextDrawLetterSize(td_mdc_DriveLic, 0.170000, 1.000000);
  75407. TextDrawColor(td_mdc_DriveLic, -524057345);
  75408. TextDrawSetOutline(td_mdc_DriveLic, 0);
  75409. TextDrawSetProportional(td_mdc_DriveLic, 1);
  75410. TextDrawSetShadow(td_mdc_DriveLic, 1);
  75411. TextDrawSetSelectable(td_mdc_DriveLic, 0);
  75412. td_mdc_GunLic = TextDrawCreate(329.000000, 288.000000, "~b~~h~~h~~h~Weapon License:");
  75413. TextDrawAlignment(td_mdc_GunLic, 3);
  75414. TextDrawBackgroundColor(td_mdc_GunLic, 255);
  75415. TextDrawFont(td_mdc_GunLic, 2);
  75416. TextDrawLetterSize(td_mdc_GunLic, 0.170000, 1.000000);
  75417. TextDrawColor(td_mdc_GunLic, -524057345);
  75418. TextDrawSetOutline(td_mdc_GunLic, 0);
  75419. TextDrawSetProportional(td_mdc_GunLic, 1);
  75420. TextDrawSetShadow(td_mdc_GunLic, 1);
  75421. TextDrawSetSelectable(td_mdc_GunLic, 0);
  75422. td_mdc_PhoneNumber = TextDrawCreate(329.000000, 300.000000, "~b~~h~~h~~h~Phone Number:");
  75423. TextDrawAlignment(td_mdc_PhoneNumber, 3);
  75424. TextDrawBackgroundColor(td_mdc_PhoneNumber, 255);
  75425. TextDrawFont(td_mdc_PhoneNumber, 2);
  75426. TextDrawLetterSize(td_mdc_PhoneNumber, 0.170000, 1.000000);
  75427. TextDrawColor(td_mdc_PhoneNumber, -524057345);
  75428. TextDrawSetOutline(td_mdc_PhoneNumber, 0);
  75429. TextDrawSetProportional(td_mdc_PhoneNumber, 1);
  75430. TextDrawSetShadow(td_mdc_PhoneNumber, 1);
  75431. TextDrawSetSelectable(td_mdc_PhoneNumber, 0);
  75432. td_mdc_Name = TextDrawCreate(329.000000, 228.000000, "~b~~h~~h~~h~Full Name:");
  75433. TextDrawAlignment(td_mdc_Name, 3);
  75434. TextDrawBackgroundColor(td_mdc_Name, 255);
  75435. TextDrawFont(td_mdc_Name, 2);
  75436. TextDrawLetterSize(td_mdc_Name, 0.170000, 1.000000);
  75437. TextDrawColor(td_mdc_Name, -524057345);
  75438. TextDrawSetOutline(td_mdc_Name, 0);
  75439. TextDrawSetProportional(td_mdc_Name, 1);
  75440. TextDrawSetShadow(td_mdc_Name, 1);
  75441. TextDrawSetSelectable(td_mdc_Name, 0);
  75442. td_mdc_PropertiesArrow = TextDrawCreate(411.000000, 357.000000, "LD_BEAT:right");
  75443. TextDrawBackgroundColor(td_mdc_PropertiesArrow, 255);
  75444. TextDrawFont(td_mdc_PropertiesArrow, 4);
  75445. TextDrawLetterSize(td_mdc_PropertiesArrow, 0.500000, 1.000000);
  75446. TextDrawColor(td_mdc_PropertiesArrow, -1);
  75447. TextDrawSetOutline(td_mdc_PropertiesArrow, 0);
  75448. TextDrawSetProportional(td_mdc_PropertiesArrow, 1);
  75449. TextDrawSetShadow(td_mdc_PropertiesArrow, 1);
  75450. TextDrawUseBox(td_mdc_PropertiesArrow, 1);
  75451. TextDrawBoxColor(td_mdc_PropertiesArrow, 255);
  75452. TextDrawTextSize(td_mdc_PropertiesArrow, 10.000000, 14.000000);
  75453. TextDrawSetSelectable(td_mdc_PropertiesArrow, 1);
  75454. td_mdc_VehiclesArrow = TextDrawCreate(411.000000, 337.000000, "LD_BEAT:right");
  75455. TextDrawBackgroundColor(td_mdc_VehiclesArrow, 255);
  75456. TextDrawFont(td_mdc_VehiclesArrow, 4);
  75457. TextDrawLetterSize(td_mdc_VehiclesArrow, 0.500000, 1.000000);
  75458. TextDrawColor(td_mdc_VehiclesArrow, -1);
  75459. TextDrawSetOutline(td_mdc_VehiclesArrow, 0);
  75460. TextDrawSetProportional(td_mdc_VehiclesArrow, 1);
  75461. TextDrawSetShadow(td_mdc_VehiclesArrow, 1);
  75462. TextDrawUseBox(td_mdc_VehiclesArrow, 1);
  75463. TextDrawBoxColor(td_mdc_VehiclesArrow, 255);
  75464. TextDrawTextSize(td_mdc_VehiclesArrow, 10.000000, 14.000000);
  75465. TextDrawSetSelectable(td_mdc_VehiclesArrow, 1);
  75466. td_mdc_Vehicles = TextDrawCreate(372.000000, 338.000000, "~b~~h~~h~~h~Vehicles");
  75467. TextDrawBackgroundColor(td_mdc_Vehicles, 255);
  75468. TextDrawFont(td_mdc_Vehicles, 2);
  75469. TextDrawLetterSize(td_mdc_Vehicles, 0.170000, 1.000000);
  75470. TextDrawColor(td_mdc_Vehicles, -524057345);
  75471. TextDrawSetOutline(td_mdc_Vehicles, 0);
  75472. TextDrawSetProportional(td_mdc_Vehicles, 1);
  75473. TextDrawSetShadow(td_mdc_Vehicles, 1);
  75474. TextDrawTextSize(td_mdc_Vehicles, 410.0, 20.0);
  75475. TextDrawSetSelectable(td_mdc_Vehicles, 1);
  75476. td_mdc_Properties = TextDrawCreate(363.000000, 358.000000, "~b~~h~~h~~h~Properties");
  75477. TextDrawBackgroundColor(td_mdc_Properties, 255);
  75478. TextDrawFont(td_mdc_Properties, 2);
  75479. TextDrawLetterSize(td_mdc_Properties, 0.170000, 1.000000);
  75480. TextDrawColor(td_mdc_Properties, -524057345);
  75481. TextDrawSetOutline(td_mdc_Properties, 0);
  75482. TextDrawSetProportional(td_mdc_Properties, 1);
  75483. TextDrawSetShadow(td_mdc_Properties, 1);
  75484. TextDrawTextSize(td_mdc_Properties, 410.0, 20.0);
  75485. TextDrawSetSelectable(td_mdc_Properties, 1);
  75486. td_mdc_Age = TextDrawCreate(329.000000, 240.000000, "~b~~h~~h~~h~Age:");
  75487. TextDrawAlignment(td_mdc_Age, 3);
  75488. TextDrawBackgroundColor(td_mdc_Age, 255);
  75489. TextDrawFont(td_mdc_Age, 2);
  75490. TextDrawLetterSize(td_mdc_Age, 0.170000, 1.000000);
  75491. TextDrawColor(td_mdc_Age, -524057345);
  75492. TextDrawSetOutline(td_mdc_Age, 0);
  75493. TextDrawSetProportional(td_mdc_Age, 1);
  75494. TextDrawSetShadow(td_mdc_Age, 1);
  75495. TextDrawSetSelectable(td_mdc_Age, 0);
  75496. td_mdc_CasesArrow = TextDrawCreate(219.000000, 357.000000, "LD_BEAT:left");
  75497. TextDrawBackgroundColor(td_mdc_CasesArrow, 255);
  75498. TextDrawFont(td_mdc_CasesArrow, 4);
  75499. TextDrawLetterSize(td_mdc_CasesArrow, 0.500000, 1.000000);
  75500. TextDrawColor(td_mdc_CasesArrow, -1);
  75501. TextDrawSetOutline(td_mdc_CasesArrow, 0);
  75502. TextDrawSetProportional(td_mdc_CasesArrow, 1);
  75503. TextDrawSetShadow(td_mdc_CasesArrow, 1);
  75504. TextDrawUseBox(td_mdc_CasesArrow, 1);
  75505. TextDrawBoxColor(td_mdc_CasesArrow, 255);
  75506. TextDrawTextSize(td_mdc_CasesArrow, 10.000000, 14.000000);
  75507. TextDrawSetSelectable(td_mdc_CasesArrow, 1);
  75508. td_mdc_CriminalRecordArrow = TextDrawCreate(219.000000, 337.000000, "LD_BEAT:left");
  75509. TextDrawBackgroundColor(td_mdc_CriminalRecordArrow, 255);
  75510. TextDrawFont(td_mdc_CriminalRecordArrow, 4);
  75511. TextDrawLetterSize(td_mdc_CriminalRecordArrow, 0.500000, 1.000000);
  75512. TextDrawColor(td_mdc_CriminalRecordArrow, -1);
  75513. TextDrawSetOutline(td_mdc_CriminalRecordArrow, 0);
  75514. TextDrawSetProportional(td_mdc_CriminalRecordArrow, 1);
  75515. TextDrawSetShadow(td_mdc_CriminalRecordArrow, 1);
  75516. TextDrawUseBox(td_mdc_CriminalRecordArrow, 1);
  75517. TextDrawBoxColor(td_mdc_CriminalRecordArrow, 255);
  75518. TextDrawTextSize(td_mdc_CriminalRecordArrow, 10.000000, 14.000000);
  75519. TextDrawSetSelectable(td_mdc_CriminalRecordArrow, 1);
  75520. td_mdc_CriminalRecord = TextDrawCreate(233.000000, 338.000000, "~b~~h~~h~~h~Criminal Record");
  75521. TextDrawBackgroundColor(td_mdc_CriminalRecord, 255);
  75522. TextDrawFont(td_mdc_CriminalRecord, 2);
  75523. TextDrawLetterSize(td_mdc_CriminalRecord, 0.170000, 1.000000);
  75524. TextDrawColor(td_mdc_CriminalRecord, -524057345);
  75525. TextDrawSetOutline(td_mdc_CriminalRecord, 0);
  75526. TextDrawSetProportional(td_mdc_CriminalRecord, 1);
  75527. TextDrawSetShadow(td_mdc_CriminalRecord, 1);
  75528. TextDrawTextSize(td_mdc_CriminalRecord, 294.0, 20.0);
  75529. TextDrawSetSelectable(td_mdc_CriminalRecord, 1);
  75530. td_mdc_Cases = TextDrawCreate(233.000000, 358.000000, "~b~~h~~h~~h~Cases");
  75531. TextDrawBackgroundColor(td_mdc_Cases, 255);
  75532. TextDrawFont(td_mdc_Cases, 2);
  75533. TextDrawLetterSize(td_mdc_Cases, 0.170000, 1.000000);
  75534. TextDrawColor(td_mdc_Cases, -524057345);
  75535. TextDrawSetOutline(td_mdc_Cases, 0);
  75536. TextDrawSetProportional(td_mdc_Cases, 1);
  75537. TextDrawSetShadow(td_mdc_Cases, 1);
  75538. TextDrawTextSize(td_mdc_Cases, 260.0, 20.0);
  75539. TextDrawSetSelectable(td_mdc_Cases, 1);
  75540. td_mdc_Browse = TextDrawCreate(207.000000, 321.000000, "~b~Browse");
  75541. TextDrawBackgroundColor(td_mdc_Browse, 255);
  75542. TextDrawFont(td_mdc_Browse, 2);
  75543. TextDrawLetterSize(td_mdc_Browse, 0.170000, 1.000000);
  75544. TextDrawColor(td_mdc_Browse, -1384438529);
  75545. TextDrawSetOutline(td_mdc_Browse, 0);
  75546. TextDrawSetProportional(td_mdc_Browse, 1);
  75547. TextDrawSetShadow(td_mdc_Browse, 1);
  75548. TextDrawSetSelectable(td_mdc_Browse, 0);
  75549. td_mdc_cr_TypeTitle = TextDrawCreate(220.000000, 234.000000, "~b~~h~~h~~h~Type");
  75550. TextDrawBackgroundColor(td_mdc_cr_TypeTitle, 255);
  75551. TextDrawFont(td_mdc_cr_TypeTitle, 2);
  75552. TextDrawLetterSize(td_mdc_cr_TypeTitle, 0.170000, 1.000000);
  75553. TextDrawColor(td_mdc_cr_TypeTitle, -524057345);
  75554. TextDrawSetOutline(td_mdc_cr_TypeTitle, 0);
  75555. TextDrawSetProportional(td_mdc_cr_TypeTitle, 1);
  75556. TextDrawSetShadow(td_mdc_cr_TypeTitle, 1);
  75557. TextDrawSetSelectable(td_mdc_cr_TypeTitle, 0);
  75558. td_mdc_cr_DescriptionTitle = TextDrawCreate(257.000000, 234.000000, "~b~~h~~h~~h~Description");
  75559. TextDrawBackgroundColor(td_mdc_cr_DescriptionTitle, 255);
  75560. TextDrawFont(td_mdc_cr_DescriptionTitle, 2);
  75561. TextDrawLetterSize(td_mdc_cr_DescriptionTitle, 0.170000, 1.000000);
  75562. TextDrawColor(td_mdc_cr_DescriptionTitle, -524057345);
  75563. TextDrawSetOutline(td_mdc_cr_DescriptionTitle, 0);
  75564. TextDrawSetProportional(td_mdc_cr_DescriptionTitle, 1);
  75565. TextDrawSetShadow(td_mdc_cr_DescriptionTitle, 1);
  75566. TextDrawSetSelectable(td_mdc_cr_DescriptionTitle, 0);
  75567. td_mdc_cr_DateTitle = TextDrawCreate(375.000000, 234.000000, "~b~~h~~h~~h~Date");
  75568. TextDrawAlignment(td_mdc_cr_DateTitle, 2);
  75569. TextDrawBackgroundColor(td_mdc_cr_DateTitle, 255);
  75570. TextDrawFont(td_mdc_cr_DateTitle, 2);
  75571. TextDrawLetterSize(td_mdc_cr_DateTitle, 0.170000, 1.000000);
  75572. TextDrawColor(td_mdc_cr_DateTitle, -524057345);
  75573. TextDrawSetOutline(td_mdc_cr_DateTitle, 0);
  75574. TextDrawSetProportional(td_mdc_cr_DateTitle, 1);
  75575. TextDrawSetShadow(td_mdc_cr_DateTitle, 1);
  75576. TextDrawSetSelectable(td_mdc_cr_DateTitle, 0);
  75577. for(new i = 0; i < sizeof(td_mdc_cr_Info); i++) {
  75578. td_mdc_cr_Info[i] = TextDrawCreate(412.000000, 249.000000 + i * 15, "LD_CHAT:badchat");
  75579. TextDrawBackgroundColor(td_mdc_cr_Info[i], 255);
  75580. TextDrawFont(td_mdc_cr_Info[i], 4);
  75581. TextDrawLetterSize(td_mdc_cr_Info[i], 0.500000, 1.000000);
  75582. TextDrawColor(td_mdc_cr_Info[i], -1);
  75583. TextDrawSetOutline(td_mdc_cr_Info[i], 0);
  75584. TextDrawSetProportional(td_mdc_cr_Info[i], 1);
  75585. TextDrawSetShadow(td_mdc_cr_Info[i], 1);
  75586. TextDrawUseBox(td_mdc_cr_Info[i], 1);
  75587. TextDrawBoxColor(td_mdc_cr_Info[i], 255);
  75588. TextDrawTextSize(td_mdc_cr_Info[i], 8.000000, 9.000000);
  75589. TextDrawSetSelectable(td_mdc_cr_Info[i], 1);
  75590. }
  75591. td_mdc_cr_ArrowDown = TextDrawCreate(425.000000, 351.000000, "LD_BEAT:down");
  75592. TextDrawBackgroundColor(td_mdc_cr_ArrowDown, 255);
  75593. TextDrawFont(td_mdc_cr_ArrowDown, 4);
  75594. TextDrawLetterSize(td_mdc_cr_ArrowDown, 0.500000, 1.000000);
  75595. TextDrawColor(td_mdc_cr_ArrowDown, -1);
  75596. TextDrawSetOutline(td_mdc_cr_ArrowDown, 0);
  75597. TextDrawSetProportional(td_mdc_cr_ArrowDown, 1);
  75598. TextDrawSetShadow(td_mdc_cr_ArrowDown, 1);
  75599. TextDrawUseBox(td_mdc_cr_ArrowDown, 1);
  75600. TextDrawBoxColor(td_mdc_cr_ArrowDown, 255);
  75601. TextDrawTextSize(td_mdc_cr_ArrowDown, 11.000000, 12.000000);
  75602. TextDrawSetSelectable(td_mdc_cr_ArrowDown, 1);
  75603. td_mdc_cr_ArrowUp = TextDrawCreate(425.000000, 335.000000, "LD_BEAT:up");
  75604. TextDrawBackgroundColor(td_mdc_cr_ArrowUp, 255);
  75605. TextDrawFont(td_mdc_cr_ArrowUp, 4);
  75606. TextDrawLetterSize(td_mdc_cr_ArrowUp, 0.500000, 1.000000);
  75607. TextDrawColor(td_mdc_cr_ArrowUp, -1);
  75608. TextDrawSetOutline(td_mdc_cr_ArrowUp, 0);
  75609. TextDrawSetProportional(td_mdc_cr_ArrowUp, 1);
  75610. TextDrawSetShadow(td_mdc_cr_ArrowUp, 1);
  75611. TextDrawUseBox(td_mdc_cr_ArrowUp, 1);
  75612. TextDrawBoxColor(td_mdc_cr_ArrowUp, 255);
  75613. TextDrawTextSize(td_mdc_cr_ArrowUp, 11.000000, 12.000000);
  75614. TextDrawSetSelectable(td_mdc_cr_ArrowUp, 1);
  75615. td_mdc_cr_Title = TextDrawCreate(207.000000, 220.000000, "~b~Criminal Record");
  75616. TextDrawBackgroundColor(td_mdc_cr_Title, 255);
  75617. TextDrawFont(td_mdc_cr_Title, 2);
  75618. TextDrawLetterSize(td_mdc_cr_Title, 0.170000, 1.000000);
  75619. TextDrawColor(td_mdc_cr_Title, -1384438529);
  75620. TextDrawSetOutline(td_mdc_cr_Title, 0);
  75621. TextDrawSetProportional(td_mdc_cr_Title, 1);
  75622. TextDrawSetShadow(td_mdc_cr_Title, 1);
  75623. TextDrawSetSelectable(td_mdc_cr_Title, 0);
  75624. }
  75625. stock mdc_LoadPlayerTextdraws(playerid) {
  75626. td_mdc_Skin = CreatePlayerTextDraw(playerid, 264.000000, 231.000000, "New Textdraw");
  75627. PlayerTextDrawBackgroundColor(playerid, td_mdc_Skin, 0);
  75628. PlayerTextDrawFont(playerid, td_mdc_Skin, 5);
  75629. PlayerTextDrawLetterSize(playerid, td_mdc_Skin, 0.500000, 1.000000);
  75630. PlayerTextDrawColor(playerid, td_mdc_Skin, -1);
  75631. PlayerTextDrawSetOutline(playerid, td_mdc_Skin, 0);
  75632. PlayerTextDrawSetProportional(playerid, td_mdc_Skin, 1);
  75633. PlayerTextDrawSetShadow(playerid, td_mdc_Skin, 1);
  75634. PlayerTextDrawUseBox(playerid, td_mdc_Skin, 1);
  75635. PlayerTextDrawBoxColor(playerid, td_mdc_Skin, 0);
  75636. PlayerTextDrawTextSize(playerid, td_mdc_Skin, -70.000000, 80.000000);
  75637. PlayerTextDrawSetPreviewModel(playerid, td_mdc_Skin, 107);
  75638. PlayerTextDrawSetPreviewRot(playerid, td_mdc_Skin, -16.000000, 0.000000, -30.000000, 1.000000);
  75639. PlayerTextDrawSetSelectable(playerid, td_mdc_Skin, 0);
  75640. td_mdc_NameValue = CreatePlayerTextDraw(playerid, 338.000000, 228.000000, "Firstname Lastname");
  75641. PlayerTextDrawBackgroundColor(playerid, td_mdc_NameValue, 255);
  75642. PlayerTextDrawFont(playerid, td_mdc_NameValue, 2);
  75643. PlayerTextDrawLetterSize(playerid, td_mdc_NameValue, 0.170000, 1.000000);
  75644. PlayerTextDrawColor(playerid, td_mdc_NameValue, -1);
  75645. PlayerTextDrawSetOutline(playerid, td_mdc_NameValue, 0);
  75646. PlayerTextDrawSetProportional(playerid, td_mdc_NameValue, 1);
  75647. PlayerTextDrawSetShadow(playerid, td_mdc_NameValue, 1);
  75648. PlayerTextDrawSetSelectable(playerid, td_mdc_NameValue, 0);
  75649. td_mdc_AgeValue = CreatePlayerTextDraw(playerid, 338.000000, 240.000000, "21");
  75650. PlayerTextDrawBackgroundColor(playerid, td_mdc_AgeValue, 255);
  75651. PlayerTextDrawFont(playerid, td_mdc_AgeValue, 2);
  75652. PlayerTextDrawLetterSize(playerid, td_mdc_AgeValue, 0.170000, 1.000000);
  75653. PlayerTextDrawColor(playerid, td_mdc_AgeValue, -1);
  75654. PlayerTextDrawSetOutline(playerid, td_mdc_AgeValue, 0);
  75655. PlayerTextDrawSetProportional(playerid, td_mdc_AgeValue, 1);
  75656. PlayerTextDrawSetShadow(playerid, td_mdc_AgeValue, 1);
  75657. PlayerTextDrawSetSelectable(playerid, td_mdc_AgeValue, 0);
  75658. td_mdc_GenderValue = CreatePlayerTextDraw(playerid, 338.000000, 252.000000, "Male");
  75659. PlayerTextDrawBackgroundColor(playerid, td_mdc_GenderValue, 255);
  75660. PlayerTextDrawFont(playerid, td_mdc_GenderValue, 2);
  75661. PlayerTextDrawLetterSize(playerid, td_mdc_GenderValue, 0.170000, 1.000000);
  75662. PlayerTextDrawColor(playerid, td_mdc_GenderValue, -1);
  75663. PlayerTextDrawSetOutline(playerid, td_mdc_GenderValue, 0);
  75664. PlayerTextDrawSetProportional(playerid, td_mdc_GenderValue, 1);
  75665. PlayerTextDrawSetShadow(playerid, td_mdc_GenderValue, 1);
  75666. PlayerTextDrawSetSelectable(playerid, td_mdc_GenderValue, 0);
  75667. td_mdc_JobValue = CreatePlayerTextDraw(playerid, 338.000000, 264.000000, "Unemployed");
  75668. PlayerTextDrawBackgroundColor(playerid, td_mdc_JobValue, 255);
  75669. PlayerTextDrawFont(playerid, td_mdc_JobValue, 2);
  75670. PlayerTextDrawLetterSize(playerid, td_mdc_JobValue, 0.170000, 1.000000);
  75671. PlayerTextDrawColor(playerid, td_mdc_JobValue, -1);
  75672. PlayerTextDrawSetOutline(playerid, td_mdc_JobValue, 0);
  75673. PlayerTextDrawSetProportional(playerid, td_mdc_JobValue, 1);
  75674. PlayerTextDrawSetShadow(playerid, td_mdc_JobValue, 1);
  75675. PlayerTextDrawSetSelectable(playerid, td_mdc_JobValue, 0);
  75676. td_mdc_DriveLicValue = CreatePlayerTextDraw(playerid, 338.000000, 276.000000, "Passed");
  75677. PlayerTextDrawBackgroundColor(playerid, td_mdc_DriveLicValue, 255);
  75678. PlayerTextDrawFont(playerid, td_mdc_DriveLicValue, 2);
  75679. PlayerTextDrawLetterSize(playerid, td_mdc_DriveLicValue, 0.170000, 1.000000);
  75680. PlayerTextDrawColor(playerid, td_mdc_DriveLicValue, -1);
  75681. PlayerTextDrawSetOutline(playerid, td_mdc_DriveLicValue, 0);
  75682. PlayerTextDrawSetProportional(playerid, td_mdc_DriveLicValue, 1);
  75683. PlayerTextDrawSetShadow(playerid, td_mdc_DriveLicValue, 1);
  75684. PlayerTextDrawSetSelectable(playerid, td_mdc_DriveLicValue, 0);
  75685. td_mdc_GunLicValue = CreatePlayerTextDraw(playerid, 338.000000, 288.000000, "Not Passed");
  75686. PlayerTextDrawBackgroundColor(playerid, td_mdc_GunLicValue, 255);
  75687. PlayerTextDrawFont(playerid, td_mdc_GunLicValue, 2);
  75688. PlayerTextDrawLetterSize(playerid, td_mdc_GunLicValue, 0.170000, 1.000000);
  75689. PlayerTextDrawColor(playerid, td_mdc_GunLicValue, -1);
  75690. PlayerTextDrawSetOutline(playerid, td_mdc_GunLicValue, 0);
  75691. PlayerTextDrawSetProportional(playerid, td_mdc_GunLicValue, 1);
  75692. PlayerTextDrawSetShadow(playerid, td_mdc_GunLicValue, 1);
  75693. PlayerTextDrawSetSelectable(playerid, td_mdc_GunLicValue, 0);
  75694. td_mdc_PhoneNumberValue = CreatePlayerTextDraw(playerid, 338.000000, 300.000000, "4701958");
  75695. PlayerTextDrawBackgroundColor(playerid, td_mdc_PhoneNumberValue, 255);
  75696. PlayerTextDrawFont(playerid, td_mdc_PhoneNumberValue, 2);
  75697. PlayerTextDrawLetterSize(playerid, td_mdc_PhoneNumberValue, 0.170000, 1.000000);
  75698. PlayerTextDrawColor(playerid, td_mdc_PhoneNumberValue, -1);
  75699. PlayerTextDrawSetOutline(playerid, td_mdc_PhoneNumberValue, 0);
  75700. PlayerTextDrawSetProportional(playerid, td_mdc_PhoneNumberValue, 1);
  75701. PlayerTextDrawSetShadow(playerid, td_mdc_PhoneNumberValue, 1);
  75702. PlayerTextDrawSetSelectable(playerid, td_mdc_PhoneNumberValue, 0);
  75703. for(new i = 0; i < sizeof(td_mdc_cr_Date); i++) {
  75704. td_mdc_cr_Date[i] = CreatePlayerTextDraw(playerid, 366.000000, 249.000000 + i * 15, "21.02.2014");
  75705. PlayerTextDrawBackgroundColor(playerid, td_mdc_cr_Date[i], 255);
  75706. PlayerTextDrawFont(playerid, td_mdc_cr_Date[i], 2);
  75707. PlayerTextDrawLetterSize(playerid, td_mdc_cr_Date[i], 0.170000, 1.000000);
  75708. PlayerTextDrawColor(playerid, td_mdc_cr_Date[i], -1);
  75709. PlayerTextDrawSetOutline(playerid, td_mdc_cr_Date[i], 0);
  75710. PlayerTextDrawSetProportional(playerid, td_mdc_cr_Date[i], 1);
  75711. PlayerTextDrawSetShadow(playerid, td_mdc_cr_Date[i], 1);
  75712. PlayerTextDrawSetSelectable(playerid, td_mdc_cr_Date[i], 0);
  75713. td_mdc_cr_Description[i] = CreatePlayerTextDraw(playerid, 257.000000, 249.000000 + i * 15, "Possession of a firearm w...");
  75714. PlayerTextDrawBackgroundColor(playerid, td_mdc_cr_Description[i], 255);
  75715. PlayerTextDrawFont(playerid, td_mdc_cr_Description[i], 2);
  75716. PlayerTextDrawLetterSize(playerid, td_mdc_cr_Description[i], 0.170000, 1.000000);
  75717. PlayerTextDrawColor(playerid, td_mdc_cr_Description[i], -1);
  75718. PlayerTextDrawSetOutline(playerid, td_mdc_cr_Description[i], 0);
  75719. PlayerTextDrawSetProportional(playerid, td_mdc_cr_Description[i], 1);
  75720. PlayerTextDrawSetShadow(playerid, td_mdc_cr_Description[i], 1);
  75721. PlayerTextDrawSetSelectable(playerid, td_mdc_cr_Description[i], 0);
  75722. td_mdc_cr_Type[i] = CreatePlayerTextDraw(playerid, 220.000000, 249.000000 + i * 15, "Ticket");
  75723. PlayerTextDrawBackgroundColor(playerid, td_mdc_cr_Type[i], 255);
  75724. PlayerTextDrawFont(playerid, td_mdc_cr_Type[i], 2);
  75725. PlayerTextDrawLetterSize(playerid, td_mdc_cr_Type[i], 0.170000, 1.000000);
  75726. PlayerTextDrawColor(playerid, td_mdc_cr_Type[i], -1);
  75727. PlayerTextDrawSetOutline(playerid, td_mdc_cr_Type[i], 0);
  75728. PlayerTextDrawSetProportional(playerid, td_mdc_cr_Type[i], 1);
  75729. PlayerTextDrawSetShadow(playerid, td_mdc_cr_Type[i], 1);
  75730. PlayerTextDrawSetSelectable(playerid, td_mdc_cr_Type[i], 0);
  75731. }
  75732. td_mdc_veh_ModelValue = CreatePlayerTextDraw(playerid, 338.000000, 228.000000, "Landstalker");
  75733. PlayerTextDrawBackgroundColor(playerid, td_mdc_veh_ModelValue, 255);
  75734. PlayerTextDrawFont(playerid, td_mdc_veh_ModelValue, 2);
  75735. PlayerTextDrawLetterSize(playerid, td_mdc_veh_ModelValue, 0.170000, 1.000000);
  75736. PlayerTextDrawColor(playerid, td_mdc_veh_ModelValue, -1);
  75737. PlayerTextDrawSetOutline(playerid, td_mdc_veh_ModelValue, 0);
  75738. PlayerTextDrawSetProportional(playerid, td_mdc_veh_ModelValue, 1);
  75739. PlayerTextDrawSetShadow(playerid, td_mdc_veh_ModelValue, 1);
  75740. PlayerTextDrawSetSelectable(playerid, td_mdc_veh_ModelValue, 0);
  75741. td_mdc_veh_VehicleModel = CreatePlayerTextDraw(playerid, 191.000000, 200.000000, "New Textdraw");
  75742. PlayerTextDrawBackgroundColor(playerid, td_mdc_veh_VehicleModel, 0);
  75743. PlayerTextDrawFont(playerid, td_mdc_veh_VehicleModel, 5);
  75744. PlayerTextDrawLetterSize(playerid, td_mdc_veh_VehicleModel, 0.500000, 1.000000);
  75745. PlayerTextDrawColor(playerid, td_mdc_veh_VehicleModel, -1);
  75746. PlayerTextDrawSetOutline(playerid, td_mdc_veh_VehicleModel, 0);
  75747. PlayerTextDrawSetProportional(playerid, td_mdc_veh_VehicleModel, 1);
  75748. PlayerTextDrawSetShadow(playerid, td_mdc_veh_VehicleModel, 1);
  75749. PlayerTextDrawUseBox(playerid, td_mdc_veh_VehicleModel, 1);
  75750. PlayerTextDrawBoxColor(playerid, td_mdc_veh_VehicleModel, 0);
  75751. PlayerTextDrawTextSize(playerid, td_mdc_veh_VehicleModel, 68.000000, 94.000000);
  75752. PlayerTextDrawSetPreviewModel(playerid, td_mdc_veh_VehicleModel, 400);
  75753. PlayerTextDrawSetPreviewRot(playerid, td_mdc_veh_VehicleModel, -16.000000, 0.000000, 35.000000, 1.000000);
  75754. PlayerTextDrawSetSelectable(playerid, td_mdc_veh_VehicleModel, 0);
  75755. td_mdc_veh_OwnerValue = CreatePlayerTextDraw(playerid, 338.000000, 240.000000, "Test Name");
  75756. PlayerTextDrawBackgroundColor(playerid, td_mdc_veh_OwnerValue, 255);
  75757. PlayerTextDrawFont(playerid, td_mdc_veh_OwnerValue, 2);
  75758. PlayerTextDrawLetterSize(playerid, td_mdc_veh_OwnerValue, 0.170000, 1.000000);
  75759. PlayerTextDrawColor(playerid, td_mdc_veh_OwnerValue, -1);
  75760. PlayerTextDrawSetOutline(playerid, td_mdc_veh_OwnerValue, 0);
  75761. PlayerTextDrawSetProportional(playerid, td_mdc_veh_OwnerValue, 1);
  75762. PlayerTextDrawSetShadow(playerid, td_mdc_veh_OwnerValue, 1);
  75763. PlayerTextDrawSetSelectable(playerid, td_mdc_veh_OwnerValue, 0);
  75764. td_mdc_veh_PlateValue = CreatePlayerTextDraw(playerid, 338.000000, 252.000000, "P-205-LS");
  75765. PlayerTextDrawBackgroundColor(playerid, td_mdc_veh_PlateValue, 255);
  75766. PlayerTextDrawFont(playerid, td_mdc_veh_PlateValue, 2);
  75767. PlayerTextDrawLetterSize(playerid, td_mdc_veh_PlateValue, 0.170000, 1.000000);
  75768. PlayerTextDrawColor(playerid, td_mdc_veh_PlateValue, -1);
  75769. PlayerTextDrawSetOutline(playerid, td_mdc_veh_PlateValue, 0);
  75770. PlayerTextDrawSetProportional(playerid, td_mdc_veh_PlateValue, 1);
  75771. PlayerTextDrawSetShadow(playerid, td_mdc_veh_PlateValue, 1);
  75772. PlayerTextDrawSetSelectable(playerid, td_mdc_veh_PlateValue, 0);
  75773. td_mdc_veh_InsuranceValue = CreatePlayerTextDraw(playerid, 338.000000, 264.000000, "Yes");
  75774. PlayerTextDrawBackgroundColor(playerid, td_mdc_veh_InsuranceValue, 255);
  75775. PlayerTextDrawFont(playerid, td_mdc_veh_InsuranceValue, 2);
  75776. PlayerTextDrawLetterSize(playerid, td_mdc_veh_InsuranceValue, 0.170000, 1.000000);
  75777. PlayerTextDrawColor(playerid, td_mdc_veh_InsuranceValue, -1);
  75778. PlayerTextDrawSetOutline(playerid, td_mdc_veh_InsuranceValue, 0);
  75779. PlayerTextDrawSetProportional(playerid, td_mdc_veh_InsuranceValue, 1);
  75780. PlayerTextDrawSetShadow(playerid, td_mdc_veh_InsuranceValue, 1);
  75781. PlayerTextDrawSetSelectable(playerid, td_mdc_veh_InsuranceValue, 0);
  75782. }
  75783. stock mdc_ShowPlayerStartScreen(playerid) {
  75784. TextDrawShowForPlayer(playerid, td_mdc_Box);
  75785. TextDrawShowForPlayer(playerid, td_mdc_HeaderBox);
  75786. TextDrawShowForPlayer(playerid, td_mdc_HeaderText);
  75787. TextDrawShowForPlayer(playerid, td_mdc_Exit);
  75788. for(new i = 0; i < sizeof(td_mdc_Section); i++) {
  75789. TextDrawShowForPlayer(playerid, td_mdc_Section[i]);
  75790. TextDrawShowForPlayer(playerid, td_mdc_SectionText[i]);
  75791. }
  75792. TextDrawShowForPlayer(playerid, td_mdc_SectionHeaderText);
  75793. SelectTextDraw(playerid, -1);
  75794. }
  75795. stock mdc_Hide(playerid, bool:close = false) {
  75796. TextDrawHideForPlayer(playerid, td_mdc_CitizenBox);
  75797. TextDrawHideForPlayer(playerid, td_mdc_Box);
  75798. TextDrawHideForPlayer(playerid, td_mdc_HeaderBox);
  75799. TextDrawHideForPlayer(playerid, td_mdc_DataBox);
  75800. TextDrawHideForPlayer(playerid, td_mdc_OptionsBox);
  75801. TextDrawHideForPlayer(playerid, td_mdc_veh_Box);
  75802. TextDrawHideForPlayer(playerid, td_mdc_veh_InnerBox);
  75803. TextDrawHideForPlayer(playerid, td_mdc_veh_BoxNoEnt);
  75804. TextDrawHideForPlayer(playerid, td_mdc_veh_InnerBoxNoEnt);
  75805. for(new i = 0; i < sizeof(td_mdc_cr_Box); i++) {
  75806. TextDrawHideForPlayer(playerid, td_mdc_cr_Box[i]);
  75807. }
  75808. for(new i = 0; i < sizeof(td_mdc_cr_InnerBox); i++) {
  75809. TextDrawHideForPlayer(playerid, td_mdc_cr_InnerBox[i]);
  75810. }
  75811. TextDrawHideForPlayer(playerid, td_mdc_HeaderText);
  75812. TextDrawHideForPlayer(playerid, td_mdc_Exit);
  75813. for(new i = 0; i < sizeof(td_mdc_Section); i++) {
  75814. TextDrawHideForPlayer(playerid, td_mdc_Section[i]);
  75815. TextDrawHideForPlayer(playerid, td_mdc_SectionText[i]);
  75816. }
  75817. TextDrawHideForPlayer(playerid, td_mdc_SectionHeaderText);
  75818. TextDrawHideForPlayer(playerid, td_mdc_Gender);
  75819. TextDrawHideForPlayer(playerid, td_mdc_Job);
  75820. TextDrawHideForPlayer(playerid, td_mdc_DriveLic);
  75821. TextDrawHideForPlayer(playerid, td_mdc_GunLic);
  75822. TextDrawHideForPlayer(playerid, td_mdc_PhoneNumber);
  75823. TextDrawHideForPlayer(playerid, td_mdc_Name);
  75824. TextDrawHideForPlayer(playerid, td_mdc_PropertiesArrow);
  75825. TextDrawHideForPlayer(playerid, td_mdc_VehiclesArrow);
  75826. TextDrawHideForPlayer(playerid, td_mdc_Vehicles);
  75827. TextDrawHideForPlayer(playerid, td_mdc_Properties);
  75828. TextDrawHideForPlayer(playerid, td_mdc_Age);
  75829. TextDrawHideForPlayer(playerid, td_mdc_CriminalRecordArrow);
  75830. TextDrawHideForPlayer(playerid, td_mdc_CasesArrow);
  75831. TextDrawHideForPlayer(playerid, td_mdc_CriminalRecord);
  75832. TextDrawHideForPlayer(playerid, td_mdc_Cases);
  75833. TextDrawHideForPlayer(playerid, td_mdc_Browse);
  75834. PlayerTextDrawHide(playerid, td_mdc_Skin);
  75835. PlayerTextDrawHide(playerid, td_mdc_NameValue);
  75836. PlayerTextDrawHide(playerid, td_mdc_AgeValue);
  75837. PlayerTextDrawHide(playerid, td_mdc_GenderValue);
  75838. PlayerTextDrawHide(playerid, td_mdc_JobValue);
  75839. PlayerTextDrawHide(playerid, td_mdc_DriveLicValue);
  75840. PlayerTextDrawHide(playerid, td_mdc_GunLicValue);
  75841. PlayerTextDrawHide(playerid, td_mdc_PhoneNumberValue);
  75842. TextDrawHideForPlayer(playerid, td_mdc_cr_Title);
  75843. TextDrawHideForPlayer(playerid, td_mdc_cr_ArrowUp);
  75844. TextDrawHideForPlayer(playerid, td_mdc_cr_ArrowDown);
  75845. TextDrawHideForPlayer(playerid, td_mdc_cr_TypeTitle);
  75846. TextDrawHideForPlayer(playerid, td_mdc_cr_DescriptionTitle);
  75847. TextDrawHideForPlayer(playerid, td_mdc_cr_DateTitle);
  75848. TextDrawHideForPlayer(playerid, td_mdc_veh_Model);
  75849. TextDrawHideForPlayer(playerid, td_mdc_veh_Owner);
  75850. TextDrawHideForPlayer(playerid, td_mdc_veh_Plate);
  75851. TextDrawHideForPlayer(playerid, td_mdc_veh_Insurance);
  75852. TextDrawHideForPlayer(playerid, td_mdc_veh_ArrowRight);
  75853. TextDrawHideForPlayer(playerid, td_mdc_veh_Next);
  75854. TextDrawHideForPlayer(playerid, td_mdc_veh_Label);
  75855. PlayerTextDrawHide(playerid, td_mdc_veh_ModelValue);
  75856. PlayerTextDrawHide(playerid, td_mdc_veh_VehicleModel);
  75857. PlayerTextDrawHide(playerid, td_mdc_veh_OwnerValue);
  75858. PlayerTextDrawHide(playerid, td_mdc_veh_PlateValue);
  75859. PlayerTextDrawHide(playerid, td_mdc_veh_InsuranceValue);
  75860. TextDrawHideForPlayer(playerid, td_mdc_veh_TextNoEnt);
  75861. for(new i = 0; i < sizeof(td_mdc_cr_Info); i++) {
  75862. TextDrawHideForPlayer(playerid, td_mdc_cr_Info[i]);
  75863. }
  75864. for(new i = 0; i < sizeof(td_mdc_cr_Info); i++) {
  75865. PlayerTextDrawHide(playerid, td_mdc_cr_Type[i]);
  75866. PlayerTextDrawHide(playerid, td_mdc_cr_Description[i]);
  75867. PlayerTextDrawHide(playerid, td_mdc_cr_Date[i]);
  75868. }
  75869. if(close != false) {
  75870. DeletePVar(playerid, "mdc_Citizen");
  75871. DeletePVar(playerid, "mdc_VehicleIndex");
  75872. DeletePVar(playerid, "mdc_Shown");
  75873. CancelSelectTextDraw(playerid);
  75874. }
  75875. }
  75876. stock mdc_SearchCitizen(playerid, name[]) {
  75877. new user;
  75878. for(new i = 0; i < strlen(name); i++) {
  75879. if(name[i] == ' ') {
  75880. name[i] = '_';
  75881. }
  75882. }
  75883. user = GetPlayerID(name);
  75884. if(user != -1) {
  75885. SetPVarString(playerid, "mdc_Citizen", name);
  75886. mdc_ShowCitizen(playerid, GetPlayerNameEx(user), GetPlayerSkinScript(user), PlayerData[user][pAge], PlayerData[user][pGender], PlayerData[user][pCarLicense], PlayerData[user][pGunLicense],
  75887. PlayerData[playerid][pJob], PlayerData[playerid][pPhone]);
  75888. } else {
  75889. new query[135];
  75890. format(query, sizeof(query), "SELECT `skin`, `age`, `gender`, `carlicense`, `gunlicense`, `job`, `phone` FROM `users` WHERE `username` = '%s';", name);
  75891. mysql_tquery(connectionID, query, "mdc_SearchCitizenResult", "ds", playerid, name);
  75892. }
  75893. }
  75894. stock mdc_ShowCitizen(playerid, name[], skin, age, sex, driveLic, weaponLic, jobID, phoneNumber) {
  75895. new value[20];
  75896. mdc_Hide(playerid, false);
  75897. // Skin
  75898. PlayerTextDrawSetPreviewModel(playerid, td_mdc_Skin, skin);
  75899. PlayerTextDrawShow(playerid, td_mdc_Skin);
  75900. // Name
  75901. PlayerTextDrawSetString(playerid, td_mdc_NameValue, name);
  75902. PlayerTextDrawShow(playerid, td_mdc_NameValue);
  75903. // Age
  75904. format(value, sizeof(value), "%i", age);
  75905. PlayerTextDrawSetString(playerid, td_mdc_AgeValue, value);
  75906. PlayerTextDrawShow(playerid, td_mdc_AgeValue);
  75907. // Gender
  75908. PlayerTextDrawSetString(playerid, td_mdc_GenderValue, GetGenderString(sex));
  75909. PlayerTextDrawShow(playerid, td_mdc_GenderValue);
  75910. // Job
  75911. PlayerTextDrawSetString(playerid, td_mdc_JobValue, GetJobName(jobID));
  75912. PlayerTextDrawShow(playerid, td_mdc_JobValue);
  75913. // Driver's License
  75914. PlayerTextDrawSetString(playerid, td_mdc_DriveLicValue, GetDriveLicStatus(driveLic));
  75915. PlayerTextDrawShow(playerid, td_mdc_DriveLicValue);
  75916. // Weapon License
  75917. PlayerTextDrawSetString(playerid, td_mdc_GunLicValue, GetWeaponLicStatus(weaponLic));
  75918. PlayerTextDrawShow(playerid, td_mdc_GunLicValue);
  75919. // Phone Number
  75920. format(value, sizeof(value), "%i", phoneNumber);
  75921. PlayerTextDrawSetString(playerid, td_mdc_PhoneNumberValue, value);
  75922. PlayerTextDrawShow(playerid, td_mdc_PhoneNumberValue);
  75923. // Other
  75924. TextDrawShowForPlayer(playerid, td_mdc_CitizenBox);
  75925. TextDrawShowForPlayer(playerid, td_mdc_HeaderBox);
  75926. TextDrawShowForPlayer(playerid, td_mdc_DataBox);
  75927. TextDrawShowForPlayer(playerid, td_mdc_OptionsBox);
  75928. TextDrawShowForPlayer(playerid, td_mdc_HeaderText);
  75929. TextDrawShowForPlayer(playerid, td_mdc_Exit);
  75930. TextDrawShowForPlayer(playerid, td_mdc_Gender);
  75931. TextDrawShowForPlayer(playerid, td_mdc_Job);
  75932. TextDrawShowForPlayer(playerid, td_mdc_DriveLic);
  75933. TextDrawShowForPlayer(playerid, td_mdc_GunLic);
  75934. TextDrawShowForPlayer(playerid, td_mdc_PhoneNumber);
  75935. TextDrawShowForPlayer(playerid, td_mdc_Name);
  75936. TextDrawShowForPlayer(playerid, td_mdc_PropertiesArrow);
  75937. TextDrawShowForPlayer(playerid, td_mdc_VehiclesArrow);
  75938. TextDrawShowForPlayer(playerid, td_mdc_Vehicles);
  75939. TextDrawShowForPlayer(playerid, td_mdc_Properties);
  75940. TextDrawShowForPlayer(playerid, td_mdc_Age);
  75941. TextDrawShowForPlayer(playerid, td_mdc_CriminalRecordArrow);
  75942. TextDrawShowForPlayer(playerid, td_mdc_CasesArrow);
  75943. TextDrawShowForPlayer(playerid, td_mdc_CriminalRecord);
  75944. TextDrawShowForPlayer(playerid, td_mdc_Cases);
  75945. TextDrawShowForPlayer(playerid, td_mdc_Browse);
  75946. SelectTextDraw(playerid, -1);
  75947. }
  75948. stock mdc_ShowCriminalRecord(playerid, name[]) {
  75949. new query[130];
  75950. format(query, sizeof(query), "SELECT `officer`, `time`, `date`, `amount`, `reason`, `paid` FROM `tickets` WHERE `player` = '%s';", name);
  75951. mysql_tquery(connectionID, query, "mdc_FetchTickets", "ds", playerid, name);
  75952. }
  75953. stock mdc_ShowCriminalRecordDetails(playerid, idx) {
  75954. new dialogMsg[600];
  75955. if(CriminalRecordData[playerid][idx][mdc_cr_type] == RECORD_TICKET) {
  75956. if(CriminalRecordData[playerid][idx][mdc_cr_paid] == 0) {
  75957. format(dialogMsg, sizeof(dialogMsg), "{3D62A8}Ticket Issued By The Los Santos Police Department\n\n{ffffff}Offender:\t{a9c4e4}%s\n{ffffff}Police Officer:\t{a9c4e4}%s\
  75958. \n{ffffff}Date:\t\t{a9c4e4}%s\n{ffffff}Time:\t\t{a9c4e4}%s\n{ffffff}Price:\t\t{a9c4e4}$%i\n{ffffff}Offence:\t{a9c4e4}%s\n\n\
  75959. {ffffff}Information:\t{a9c4e4}The offender has {3D62A8}NOT {a9c4e4}yet paid the ticket.",
  75960. GetNameWithSpace(CriminalRecordData[playerid][idx][mdc_cr_offender]), GetNameWithSpace(CriminalRecordData[playerid][idx][mdc_cr_officer]),
  75961. CriminalRecordData[playerid][idx][mdc_cr_date], CriminalRecordData[playerid][idx][mdc_cr_time],
  75962. CriminalRecordData[playerid][idx][mdc_cr_price], CriminalRecordData[playerid][idx][mdc_cr_description]);
  75963. } else {
  75964. format(dialogMsg, sizeof(dialogMsg), "{3D62A8}Ticket Issued By The Los Santos Police Department\n\n{ffffff}Offender:\t{a9c4e4}%s\n{ffffff}Police Officer:\t{a9c4e4}%s\n\
  75965. {ffffff}Date:\t\t{a9c4e4}%s\n{ffffff}Time:\t\t{a9c4e4}%s\n{ffffff}Price:\t\t{a9c4e4}$%i\n{ffffff}Offence:\t{a9c4e4}%s\n\n{ffffff}\
  75966. Information:\t{a9c4e4}The offender has paid the ticket.", GetNameWithSpace(CriminalRecordData[playerid][idx][mdc_cr_offender]),
  75967. GetNameWithSpace(CriminalRecordData[playerid][idx][mdc_cr_officer]), CriminalRecordData[playerid][idx][mdc_cr_date],
  75968. CriminalRecordData[playerid][idx][mdc_cr_time], CriminalRecordData[playerid][idx][mdc_cr_price],
  75969. CriminalRecordData[playerid][idx][mdc_cr_description]);
  75970. }
  75971. } else {
  75972. if(CriminalRecordData[playerid][idx][mdc_cr_served] == 0) {
  75973. format(dialogMsg, sizeof(dialogMsg), "{3D62A8}Charge Issued By The Los Santos Police Department\n\n{ffffff}Offender:\t{a9c4e4}%s\n{ffffff}Police Officer:\t{a9c4e4}%s\n\
  75974. {ffffff}Date:\t\t{a9c4e4}%s\n{ffffff}Time:\t\t{a9c4e4}%s\n{ffffff}Felony:\t\t{a9c4e4}%s\n\n{ffffff}Information:\t{a9c4e4}The offender \
  75975. is presently {3D62A8}WANTED {a9c4e4}due to this charge.", GetNameWithSpace(CriminalRecordData[playerid][idx][mdc_cr_offender]),
  75976. GetNameWithSpace(CriminalRecordData[playerid][idx][mdc_cr_officer]), CriminalRecordData[playerid][idx][mdc_cr_date],
  75977. CriminalRecordData[playerid][idx][mdc_cr_time], CriminalRecordData[playerid][idx][mdc_cr_description]);
  75978. } else {
  75979. format(dialogMsg, sizeof(dialogMsg), "{3D62A8}Charge Issued By The Los Santos Police Department\n\n{ffffff}Offender:\t{a9c4e4}%s\n{ffffff}Police Officer:\t{a9c4e4}%s\n{ffffff}\
  75980. Date:\t\t{a9c4e4}%s\n{ffffff}Time:\t\t{a9c4e4}%s\n{ffffff}Felony:\t\t{a9c4e4}%s\n\n{ffffff}Information:\t{a9c4e4}The offender has \
  75981. already served according time in prison.", GetNameWithSpace(CriminalRecordData[playerid][idx][mdc_cr_offender]),
  75982. GetNameWithSpace(CriminalRecordData[playerid][idx][mdc_cr_officer]), CriminalRecordData[playerid][idx][mdc_cr_date],
  75983. CriminalRecordData[playerid][idx][mdc_cr_time], CriminalRecordData[playerid][idx][mdc_cr_description]);
  75984. }
  75985. }
  75986. Dialog_Show(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "{3D62A8}Detailed Record Information", dialogMsg, "Close", "");
  75987. }
  75988. stock mdc_ResetCriminalRecordData(playerid) {
  75989. for(new i = 0; i < MAX_CRIMINAL_RECORDS; i++) {
  75990. for(new j = 0; j < sizeof(CriminalRecordData[][]); j++) {
  75991. CriminalRecordData[playerid][i][CriminalRecordEnum:j] = 0;
  75992. }
  75993. }
  75994. Iter_Clear(RecordIterator[playerid]);
  75995. }
  75996. stock mdc_ShowVehicles(playerid, name[]) {
  75997. new query[140];
  75998. format(query, sizeof(query), "SELECT `modelid`, `color1`, `color2`, `plate` FROM `vehicles` WHERE `owner` = '%s';", name);
  75999. mysql_tquery(connectionID, query, "mdc_FetchVehicle", "ds", playerid, name);
  76000. }
  76001. stock mdc_ShowVehicle(playerid, owner[], model, color1, color2, plate[], bool:nextBtn = false) {
  76002. mdc_Hide(playerid, false);
  76003. // Model
  76004. PlayerTextDrawSetString(playerid, td_mdc_veh_ModelValue, vehicleNames[model - 400]);
  76005. PlayerTextDrawShow(playerid, td_mdc_veh_ModelValue);
  76006. // Model Preview
  76007. PlayerTextDrawSetPreviewModel(playerid, td_mdc_veh_VehicleModel, model);
  76008. PlayerTextDrawSetPreviewVehCol(playerid, td_mdc_veh_VehicleModel, color1, color2);
  76009. PlayerTextDrawShow(playerid, td_mdc_veh_VehicleModel);
  76010. // Owner
  76011. PlayerTextDrawSetString(playerid, td_mdc_veh_OwnerValue, owner);
  76012. PlayerTextDrawShow(playerid, td_mdc_veh_OwnerValue);
  76013. // License Plate Number
  76014. PlayerTextDrawSetString(playerid, td_mdc_veh_PlateValue, plate);
  76015. PlayerTextDrawShow(playerid, td_mdc_veh_PlateValue);
  76016. PlayerTextDrawShow(playerid, td_mdc_veh_InsuranceValue);
  76017. TextDrawShowForPlayer(playerid, td_mdc_veh_Box);
  76018. TextDrawShowForPlayer(playerid, td_mdc_veh_InnerBox);
  76019. TextDrawShowForPlayer(playerid, td_mdc_HeaderBox);
  76020. TextDrawShowForPlayer(playerid, td_mdc_HeaderText);
  76021. TextDrawShowForPlayer(playerid, td_mdc_Exit);
  76022. TextDrawShowForPlayer(playerid, td_mdc_veh_Model);
  76023. TextDrawShowForPlayer(playerid, td_mdc_veh_Owner);
  76024. TextDrawShowForPlayer(playerid, td_mdc_veh_Plate);
  76025. TextDrawShowForPlayer(playerid, td_mdc_veh_Insurance);
  76026. TextDrawShowForPlayer(playerid, td_mdc_veh_Label);
  76027. if(nextBtn != false) {
  76028. TextDrawShowForPlayer(playerid, td_mdc_veh_ArrowRight);
  76029. TextDrawShowForPlayer(playerid, td_mdc_veh_Next);
  76030. }
  76031. SelectTextDraw(playerid, -1);
  76032. }
  76033. /* MySQL */
  76034. forward mdc_SearchCitizenResult(playerid, name[]);
  76035. public mdc_SearchCitizenResult(playerid, name[]) {
  76036. if(cache_get_row_count() > 0) {
  76037. SetPVarString(playerid, "mdc_Citizen", name);
  76038. mdc_ShowCitizen(playerid, GetNameWithSpace(name), cache_get_field_content_int(0, "skin") , cache_get_field_content_int(0, "age"), cache_get_field_content_int(0, "gender"),
  76039. cache_get_field_content_int(0, "carlicense"), cache_get_field_content_int(0, "gunlicense"), cache_get_field_content_int(0, "job"),
  76040. cache_get_field_content_int(0, "phone"));
  76041. } else {
  76042. SendClientMessage(playerid, COLOR_GREY, "No citizen could be found under the mentioned name.");
  76043. Dialog_Show(playerid, SearchCitizem, DIALOG_STYLE_INPUT, "{3D62A8}Search Citizen", "Please enter the citizen's full name below:", "Search", "Cancel");
  76044. }
  76045. }
  76046. forward mdc_SearchPhoneNumber(playerid, phoneNum);
  76047. public mdc_SearchPhoneNumber(playerid, phoneNum) {
  76048. if(cache_get_row_count() > 0) {
  76049. new name[MAX_PLAYER_NAME];
  76050. cache_get_field_content(0, "username", name);
  76051. SetPVarString(playerid, "mdc_Citizen", name);
  76052. mdc_ShowCitizen(playerid, GetNameWithSpace(name), cache_get_field_content_int(0, "skin") , cache_get_field_content_int(0, "age"), cache_get_field_content_int(0, "gender"),
  76053. cache_get_field_content_int(0, "carlicense"), cache_get_field_content_int(0, "gunlicense"), cache_get_field_content_int(0, "job"),
  76054. phoneNum);
  76055. } else {
  76056. SendClientMessage(playerid, COLOR_GREY, "No citizen could be associated with the mentioned phone number.");
  76057. Dialog_Show(playerid, SearchPhoneNumber, DIALOG_STYLE_INPUT, "{3D62A8}Search Phone Number", "Please enter the phone number below:", "Search", "Cancel");
  76058. }
  76059. }
  76060. forward mdc_SearchSerial(playerid);
  76061. public mdc_SearchSerial(playerid) {
  76062. if(cache_get_row_count() > 0) {
  76063. new name[MAX_PLAYER_NAME];
  76064. cache_get_field_content(0, "username", name);
  76065. SetPVarString(playerid, "mdc_Citizen", name);
  76066. mdc_ShowCitizen(playerid, GetNameWithSpace(name), cache_get_field_content_int(0, "skin") , cache_get_field_content_int(0, "age"), cache_get_field_content_int(0, "gender"),
  76067. cache_get_field_content_int(0, "carlicense"), cache_get_field_content_int(0, "gunlicense"), cache_get_field_content_int(0, "job"),
  76068. cache_get_field_content_int(0, "phone"));
  76069. } else {
  76070. SendClientMessage(playerid, COLOR_GREY, "No citizen could be associated with the mentioned weapon serial number.");
  76071. Dialog_Show(playerid, DIALOG_MDC_SEARCH_SERIAL, DIALOG_STYLE_INPUT, "{3D62A8}Search Weapon Serial", "Please enter the weapons's serial number below:", "Search", "Cancel");
  76072. }
  76073. }
  76074. forward mdc_FetchTickets(playerid, name[]);
  76075. public mdc_FetchTickets(playerid, name[]) {
  76076. new idx;
  76077. mdc_ResetCriminalRecordData(playerid);
  76078. SetPVarInt(playerid, "mdc_cr_ScrollTop", 0);
  76079. for(new i = 0; i < cache_get_row_count(); i++) {
  76080. idx = Iter_Free(RecordIterator[playerid]);
  76081. if(idx == -1) {
  76082. break;
  76083. }
  76084. Iter_Add(RecordIterator[playerid], idx);
  76085. format(CriminalRecordData[playerid][idx][mdc_cr_offender], MAX_PLAYER_NAME, "%s", name);
  76086. CriminalRecordData[playerid][idx][mdc_cr_type] = RECORD_TICKET;
  76087. cache_get_field_content(i, "reason", CriminalRecordData[playerid][idx][mdc_cr_description], connectionID, 200);
  76088. cache_get_field_content(i, "time", CriminalRecordData[playerid][idx][mdc_cr_time], connectionID, 15);
  76089. cache_get_field_content(i, "date", CriminalRecordData[playerid][idx][mdc_cr_date], connectionID, 15);
  76090. cache_get_field_content(i, "officer", CriminalRecordData[playerid][idx][mdc_cr_officer], connectionID, MAX_PLAYER_NAME);
  76091. CriminalRecordData[playerid][idx][mdc_cr_paid] = cache_get_field_content_int(i, "paid", connectionID);
  76092. CriminalRecordData[playerid][idx][mdc_cr_price] = cache_get_field_content_int(i, "amount", connectionID);
  76093. }
  76094. new query[130];
  76095. format(query, sizeof(query), "SELECT `officer`, `time`, `date`, `served`, `crime` FROM `criminals` WHERE `player` = '%s';", name);
  76096. mysql_tquery(connectionID, query, "mdc_FetchCharges", "ds", playerid, name);
  76097. }
  76098. forward mdc_FetchCharges(playerid, name[]);
  76099. public mdc_FetchCharges(playerid, name[]) {
  76100. new idx;
  76101. for(new i = 0; i < cache_get_row_count(); i++) {
  76102. idx = Iter_Free(RecordIterator[playerid]);
  76103. if(idx == -1) {
  76104. break;
  76105. }
  76106. Iter_Add(RecordIterator[playerid], idx);
  76107. format(CriminalRecordData[playerid][idx][mdc_cr_offender], MAX_PLAYER_NAME, "%s", name);
  76108. CriminalRecordData[playerid][idx][mdc_cr_type] = RECORD_CHARGE;
  76109. cache_get_field_content(i, "crime", CriminalRecordData[playerid][idx][mdc_cr_description], connectionID, 200);
  76110. cache_get_field_content(i, "time", CriminalRecordData[playerid][idx][mdc_cr_time], connectionID, 15);
  76111. cache_get_field_content(i, "date", CriminalRecordData[playerid][idx][mdc_cr_date], connectionID, 15);
  76112. cache_get_field_content(i, "officer", CriminalRecordData[playerid][idx][mdc_cr_officer], connectionID, MAX_PLAYER_NAME);
  76113. CriminalRecordData[playerid][idx][mdc_cr_served] = cache_get_field_content_int(i, "served", connectionID);
  76114. }
  76115. new count = Iter_Count(RecordIterator[playerid]);
  76116. mdc_Hide(playerid, false);
  76117. TextDrawShowForPlayer(playerid, td_mdc_HeaderBox);
  76118. if(count >= 7) {
  76119. TextDrawShowForPlayer(playerid, td_mdc_cr_Box[6]);
  76120. TextDrawShowForPlayer(playerid, td_mdc_cr_InnerBox[6]);
  76121. } else if(count > 1) {
  76122. TextDrawShowForPlayer(playerid, td_mdc_cr_Box[count - 1]);
  76123. TextDrawShowForPlayer(playerid, td_mdc_cr_InnerBox[count - 1]);
  76124. } else {
  76125. TextDrawShowForPlayer(playerid, td_mdc_cr_Box[0]);
  76126. TextDrawShowForPlayer(playerid, td_mdc_cr_InnerBox[0]);
  76127. }
  76128. TextDrawShowForPlayer(playerid, td_mdc_HeaderText);
  76129. TextDrawShowForPlayer(playerid, td_mdc_Exit);
  76130. TextDrawShowForPlayer(playerid, td_mdc_cr_Title);
  76131. TextDrawShowForPlayer(playerid, td_mdc_cr_TypeTitle);
  76132. TextDrawShowForPlayer(playerid, td_mdc_cr_DescriptionTitle);
  76133. TextDrawShowForPlayer(playerid, td_mdc_cr_DateTitle);
  76134. if(count > 7) {
  76135. TextDrawShowForPlayer(playerid, td_mdc_cr_ArrowUp);
  76136. TextDrawShowForPlayer(playerid, td_mdc_cr_ArrowDown);
  76137. }
  76138. if(count <= 0) {
  76139. PlayerTextDrawColor(playerid, td_mdc_cr_Type[0], COLOR_WHITE);
  76140. PlayerTextDrawSetString(playerid, td_mdc_cr_Type[0], "No entries could be found.");
  76141. PlayerTextDrawShow(playerid, td_mdc_cr_Type[0]);
  76142. } else {
  76143. for(new i = 0; i < sizeof(td_mdc_cr_Info); i++) {
  76144. if(i >= count) {
  76145. break;
  76146. }
  76147. if(CriminalRecordData[playerid][i][mdc_cr_type] == RECORD_CHARGE) {
  76148. PlayerTextDrawSetString(playerid, td_mdc_cr_Type[i], "Charge");
  76149. if(CriminalRecordData[playerid][i][mdc_cr_served] == 0) {
  76150. PlayerTextDrawColor(playerid, td_mdc_cr_Type[i], COLOR_RED);
  76151. PlayerTextDrawColor(playerid, td_mdc_cr_Description[i], COLOR_RED);
  76152. PlayerTextDrawColor(playerid, td_mdc_cr_Date[i], COLOR_RED);
  76153. } else {
  76154. PlayerTextDrawColor(playerid, td_mdc_cr_Type[i], COLOR_WHITE);
  76155. PlayerTextDrawColor(playerid, td_mdc_cr_Description[i], COLOR_WHITE);
  76156. PlayerTextDrawColor(playerid, td_mdc_cr_Date[i], COLOR_WHITE);
  76157. }
  76158. } else {
  76159. PlayerTextDrawSetString(playerid, td_mdc_cr_Type[i], "Ticket");
  76160. if(CriminalRecordData[playerid][i][mdc_cr_paid] == 0) {
  76161. PlayerTextDrawColor(playerid, td_mdc_cr_Type[i], COLOR_RED);
  76162. PlayerTextDrawColor(playerid, td_mdc_cr_Description[i], COLOR_RED);
  76163. PlayerTextDrawColor(playerid, td_mdc_cr_Date[i], COLOR_RED);
  76164. } else {
  76165. PlayerTextDrawColor(playerid, td_mdc_cr_Type[i], COLOR_WHITE);
  76166. PlayerTextDrawColor(playerid, td_mdc_cr_Description[i], COLOR_WHITE);
  76167. PlayerTextDrawColor(playerid, td_mdc_cr_Date[i], COLOR_WHITE);
  76168. }
  76169. }
  76170. PlayerTextDrawSetString(playerid, td_mdc_cr_Date[i], CriminalRecordData[playerid][i][mdc_cr_date]);
  76171. if(strlen(CriminalRecordData[playerid][i][mdc_cr_description]) < 20) {
  76172. PlayerTextDrawSetString(playerid, td_mdc_cr_Description[i], CriminalRecordData[playerid][i][mdc_cr_description]);
  76173. } else {
  76174. new desc[25];
  76175. strmid(desc, CriminalRecordData[playerid][i][mdc_cr_description], 0, 20, 200);
  76176. strins(desc, "...", strlen(desc), sizeof(desc));
  76177. PlayerTextDrawSetString(playerid, td_mdc_cr_Description[i], desc);
  76178. }
  76179. PlayerTextDrawShow(playerid, td_mdc_cr_Type[i]);
  76180. PlayerTextDrawShow(playerid, td_mdc_cr_Description[i]);
  76181. PlayerTextDrawShow(playerid, td_mdc_cr_Date[i]);
  76182. TextDrawShowForPlayer(playerid, td_mdc_cr_Info[i]);
  76183. }
  76184. }
  76185. SelectTextDraw(playerid, -1);
  76186. }
  76187. forward mdc_SearchLicensePlate(playerid, plate[]);
  76188. public mdc_SearchLicensePlate(playerid, plate[]) {
  76189. if(cache_get_row_count() > 0) {
  76190. new name[MAX_PLAYER_NAME];
  76191. cache_get_field_content(0, "owner", name);
  76192. SetPVarString(playerid, "mdc_Citizen", name);
  76193. mdc_ShowVehicle(playerid, GetNameWithSpace(name), cache_get_field_content_int(0, "modelid") , cache_get_field_content_int(0, "color1"), cache_get_field_content_int(0, "color2"),
  76194. plate, false);
  76195. } else {
  76196. SendClientMessage(playerid, COLOR_GREY, "No vehicle could be found under the mentioned license plate number.");
  76197. Dialog_Show(playerid, DIALOG_MDC_SEARCH_PLATE, DIALOG_STYLE_INPUT, "{3D62A8}Search License Plate", "Please enter the license plate below:", "Search", "Cancel");
  76198. }
  76199. }
  76200. forward mdc_FetchVehicle(playerid, owner[]);
  76201. public mdc_FetchVehicle(playerid, owner[]) {
  76202. mdc_Hide(playerid, false);
  76203. if(cache_get_row_count() > 0) {
  76204. if(GetPVarInt(playerid, "mdc_VehicleIndex") >= cache_get_row_count()) {
  76205. SetPVarInt(playerid, "mdc_VehicleIndex", 0);
  76206. }
  76207. new row = GetPVarInt(playerid, "mdc_VehicleIndex"),
  76208. plate[50];
  76209. cache_get_field_content(row, "plate", plate);
  76210. if(cache_get_row_count() > 1) {
  76211. mdc_ShowVehicle(playerid, GetNameWithSpace(owner), cache_get_field_content_int(row, "modelid") , cache_get_field_content_int(row, "color1"),
  76212. cache_get_field_content_int(row, "color2"), plate, true);
  76213. } else {
  76214. mdc_ShowVehicle(playerid, GetNameWithSpace(owner), cache_get_field_content_int(row, "modelid") , cache_get_field_content_int(row, "color1"),
  76215. cache_get_field_content_int(row, "color2"), plate, false);
  76216. }
  76217. } else {
  76218. TextDrawShowForPlayer(playerid, td_mdc_veh_BoxNoEnt);
  76219. TextDrawShowForPlayer(playerid, td_mdc_veh_InnerBoxNoEnt);
  76220. TextDrawShowForPlayer(playerid, td_mdc_HeaderBox);
  76221. TextDrawShowForPlayer(playerid, td_mdc_HeaderText);
  76222. TextDrawShowForPlayer(playerid, td_mdc_Exit);
  76223. TextDrawShowForPlayer(playerid, td_mdc_veh_TextNoEnt);
  76224. TextDrawShowForPlayer(playerid, td_mdc_veh_Label);
  76225. }
  76226. SelectTextDraw(playerid, -1);
  76227. }
  76228. //---------------------------------------------